diff options
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
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); |