Fix a silly mistake in r130338.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130360 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2011-04-28 00:42:03 +00:00
parent 2d525c5532
commit bd1253809b
2 changed files with 10 additions and 1 deletions

View File

@ -164,7 +164,7 @@ unsigned FastISel::materializeRegForValue(const Value *V, MVT VT) {
Reg =
getRegForValue(Constant::getNullValue(TD.getIntPtrType(V->getContext())));
} else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
if (CF->isZero()) {
if (CF->isNullValue()) {
Reg = TargetMaterializeFloatZero(CF);
} else {
// Try to emit the constant directly.

View File

@ -251,3 +251,12 @@ entry:
; CHECK: callq _test20sret
}
declare void @test20sret(%struct.a* sret)
; Check that -0.0 is not materialized using pxor
define void @test21(double* %p1) {
store double -0.0, double* %p1
ret void
; CHECK: test21:
; CHECK-NOT: pxor
; CHECK: movsd LCPI
}