diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-10 01:16:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-10 01:16:03 +0000 |
commit | 87ae6ae41cde4548b55bcc19da36dc0ad7e021df (patch) | |
tree | a7432a7f4df36bc38d157821f1e20823c8d377ef /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | d6063071278d4d911d2928227edab6c04886af87 (diff) |
Fix incorrect constant folds, fixing Stepanov after the SHR patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 224b969694..644f807d1d 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -354,10 +354,10 @@ SDOperand SelectionDAG::getSetCC(ISD::CondCode Cond, SDOperand N1, 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. |