[llvm-commits] [llvm] r130360 - in /llvm/trunk: lib/CodeGen/SelectionDAG/FastISel.cpp test/CodeGen/X86/fast-isel-x86-64.ll
Eli Friedman
eli.friedman at gmail.com
Wed Apr 27 17:42:03 PDT 2011
Author: efriedma
Date: Wed Apr 27 19:42:03 2011
New Revision: 130360
URL: http://llvm.org/viewvc/llvm-project?rev=130360&view=rev
Log:
Fix a silly mistake in r130338.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=130360&r1=130359&r2=130360&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Apr 27 19:42:03 2011
@@ -164,7 +164,7 @@
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.
Modified: llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll?rev=130360&r1=130359&r2=130360&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-x86-64.ll Wed Apr 27 19:42:03 2011
@@ -251,3 +251,12 @@
; 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
+}
More information about the llvm-commits
mailing list