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

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 17 18:12:10 PST 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.38 -> 1.39
---
Log message:

Fix the completely broken FP constant folds for setcc's.


---
Diffs of the changes:  (+4 -4)

Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.38 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.39
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.38	Mon Jan 17 11:15:02 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Mon Jan 17 20:11:55 2005
@@ -389,10 +389,10 @@
       default: break; // FIXME: Implement the rest of these!
       case ISD::SETEQ:  return getConstant(C1 == C2, MVT::i1);
       case ISD::SETNE:  return getConstant(C1 != C2, MVT::i1);
-      case ISD::SETLT:  return getConstant((int64_t)C1 < (int64_t)C2, MVT::i1);
-      case ISD::SETGT:  return getConstant((int64_t)C1 < (int64_t)C2, MVT::i1);
-      case ISD::SETLE:  return getConstant((int64_t)C1 < (int64_t)C2, MVT::i1);
-      case ISD::SETGE:  return getConstant((int64_t)C1 < (int64_t)C2, MVT::i1);
+      case ISD::SETLT:  return getConstant(C1 < C2, MVT::i1);
+      case ISD::SETGT:  return getConstant(C1 > C2, MVT::i1);
+      case ISD::SETLE:  return getConstant(C1 <= C2, MVT::i1);
+      case ISD::SETGE:  return getConstant(C1 > C2, MVT::i1);
       }
     } else {
       // Ensure that the constant occurs on the RHS.






More information about the llvm-commits mailing list