aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-11 16:58:45 +0000
committerChris Lattner <sabre@nondot.org>2007-05-11 16:58:45 +0000
commit3aea1bdca59629bd3031f62b52e2ad353b992b2b (patch)
treee9ed0f8cfc55efb2f6071f217ac54138a6aa6868
parent22d5c37f328950127981b389389abb985d99da28 (diff)
fix regressions from my previous checking, including
Transforms/InstCombine/2006-12-08-ICmp-Combining.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36989 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 51c860776c..4c120799d5 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -3926,9 +3926,9 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
ICmpInst *LHS = cast<ICmpInst>(Op0);
bool NeedsSwap;
if (ICmpInst::isSignedPredicate(LHSCC))
- NeedsSwap = LHSCst->getValue().sgt(LHSCst->getValue());
+ NeedsSwap = LHSCst->getValue().sgt(RHSCst->getValue());
else
- NeedsSwap = LHSCst->getValue().ugt(LHSCst->getValue());
+ NeedsSwap = LHSCst->getValue().ugt(RHSCst->getValue());
if (NeedsSwap) {
std::swap(LHS, RHS);