From de89b507ddb3263dfed785b232e47ac710484461 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 11 Jul 2008 06:36:01 +0000 Subject: [PATCH] fix a bug spotted by Eli's eagle eyes llvm-svn: 53447 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 302dc6b53a9d..0cb96d52b800 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 A != MAX return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1); - if (RHSVal == Min-1) // A A == MIN - return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1); + if (RHSVal == Min+1) // A 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