[llvm-commits] [llvm] r53447 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Thu Jul 10 23:36:01 PDT 2008
Author: lattner
Date: Fri Jul 11 01:36:01 2008
New Revision: 53447
URL: http://llvm.org/viewvc/llvm-project?rev=53447&view=rev
Log:
fix a bug spotted by Eli's eagle eyes
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=53447&r1=53446&r2=53447&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri Jul 11 01:36:01 2008
@@ -5340,8 +5340,8 @@
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
More information about the llvm-commits
mailing list