summaryrefslogtreecommitdiffstats
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
commit2b4b79581da4a673c7d49078172674cdf307f0a1 (patch)
tree426f36c399b6cf2e9eba8f8678410a5559513f42
parenta7acdda0647d2c96dbb49937950cd6e458d7399b (diff)
downloadbcm5719-llvm-2b4b79581da4a673c7d49078172674cdf307f0a1.tar.gz
bcm5719-llvm-2b4b79581da4a673c7d49078172674cdf307f0a1.zip
Fix the completely broken FP constant folds for setcc's.
llvm-svn: 19651
-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 95da4600db5..e40d022ad26 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud