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

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 9 17:16:18 PST 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.21 -> 1.22
---
Log message:

Fix incorrect constant folds, fixing Stepanov after the SHR patch.


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

Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.21 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.22
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.21	Sun Jan  9 18:07:15 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Sun Jan  9 19:16:03 2005
@@ -354,10 +354,10 @@
       case ISD::SETUGT: return getConstant(C1 >  C2, MVT::i1);
       case ISD::SETULE: return getConstant(C1 <= C2, MVT::i1);
       case ISD::SETUGE: 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((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);
       }
     } else {
       // Ensure that the constant occurs on the RHS.






More information about the llvm-commits mailing list