fix regressions from my previous checking, including
authorChris Lattner <sabre@nondot.org>
Fri, 11 May 2007 16:58:45 +0000 (16:58 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 11 May 2007 16:58:45 +0000 (16:58 +0000)
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

lib/Transforms/Scalar/InstructionCombining.cpp

index 51c860776c83f771cee9bec930cab411f3744a1b..4c120799d5da961613feb3f0e0a166d1dc936b85 100644 (file)
@@ -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);