aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-11 06:36:01 +0000
committerChris Lattner <sabre@nondot.org>2008-07-11 06:36:01 +0000
commita8ff4a88bb604979c254e935445b9c363f470949 (patch)
treedb926ba2450ece1a424405eec00cb0898ebd0129 /lib/Transforms
parent183661e43a8085aed3dc7dcd71c6829f3a883c9e (diff)
fix a bug spotted by Eli's eagle eyes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-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 302dc6b53a..0cb96d52b8 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -5340,8 +5340,8 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
return ReplaceInstUsesWith(I, ConstantInt::getFalse());
if (RHSVal == Max) // A <s MAX -> A != MAX
return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
- if (RHSVal == Min-1) // A <s MIN+1 -> A == MIN
- return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);
+ if (RHSVal == Min+1) // A <s MIN+1 -> A == MIN
+ return new ICmpInst(ICmpInst::ICMP_EQ, Op0, Op1);
break;
case ICmpInst::ICMP_SGT:
if (Min.sgt(RHSVal)) // A >s C -> true iff min(A) > C