summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-10 01:16:03 +0000
committerChris Lattner <sabre@nondot.org>2005-01-10 01:16:03 +0000
commit00c231baa71462eabd1212e4411a76f67e0bd12e (patch)
tree0e13dddb4ba3bbce99234f39bcf4b06f68c6a14d /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentc783e07a7c910eafc4e84e3995302ffbe653fd90 (diff)
downloadbcm5719-llvm-00c231baa71462eabd1212e4411a76f67e0bd12e.tar.gz
bcm5719-llvm-00c231baa71462eabd1212e4411a76f67e0bd12e.zip
Fix incorrect constant folds, fixing Stepanov after the SHR patch.
llvm-svn: 19429
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 224b969694d..644f807d1d8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud