aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-18 02:11:55 +0000
committerChris Lattner <sabre@nondot.org>2005-01-18 02:11:55 +0000
commit6e4e7652d8c671d83b6332d0189e93f2920c04ff (patch)
treeae0100c601d9c2e6c8e3e0ad5c99e7ba974f1829 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent98a8ba039314fad7f7bd58652ac5dc14a0f22af3 (diff)
Fix the completely broken FP constant folds for setcc's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 95da4600db..e40d022ad2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -389,10 +389,10 @@ SDOperand SelectionDAG::getSetCC(ISD::CondCode Cond, SDOperand N1,
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.