summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitde89b507ddb3263dfed785b232e47ac710484461 (patch)
tree041aa037af5d45da8c22304a9d0f3a0b8de12ad2 /llvm/lib
parentbd25b8507ca4af505f311ee03d0339831a4b2329 (diff)
downloadbcm5719-llvm-de89b507ddb3263dfed785b232e47ac710484461.tar.gz
bcm5719-llvm-de89b507ddb3263dfed785b232e47ac710484461.zip
fix a bug spotted by Eli's eagle eyes
llvm-svn: 53447
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 302dc6b53a9..0cb96d52b80 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud