[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Evan Cheng evan.cheng at apple.com
Mon Mar 27 00:10:39 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.287 -> 1.288
---
Log message:

Try again

---
Diffs of the changes:  (+10 -3)

 SelectionDAG.cpp |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.287 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.288
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.287	Mon Mar 27 01:26:17 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Mon Mar 27 02:10:26 2006
@@ -91,9 +91,16 @@
     if (!cast<ConstantSDNode>(NotZero)->isAllOnesValue())
       return false;
   } else if (isa<ConstantFPSDNode>(NotZero)) {
-    if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) ==
-        (0ULL - 1))
-      return false;
+    MVT::ValueType VT = NotZero.getValueType();
+    if (VT== MVT::f64) {
+      if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) !=
+          (uint64_t)-1)
+        return false;
+    } else {
+      if (FloatToBits(cast<ConstantFPSDNode>(NotZero)->getValue()) !=
+          (uint32_t)-1)
+        return false;
+    }
   } else
     return false;
   






More information about the llvm-commits mailing list