From 3994bed1a9baf3913b425a0f04275ab22c624d0c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 11 Jul 2008 06:40:29 +0000 Subject: [PATCH] a missed optimization that Eli spotted llvm-svn: 53449 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index fa4479e8f31e..e65cfacc81e3 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5336,7 +5336,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { case ICmpInst::ICMP_SLT: if (Max.slt(RHSVal)) // A true iff max(A) < C return ReplaceInstUsesWith(I, ConstantInt::getTrue()); - if (Min.sgt(RHSVal)) // A false iff min(A) >= C + if (Min.sge(RHSVal)) // A false iff min(A) >= C return ReplaceInstUsesWith(I, ConstantInt::getFalse()); if (RHSVal == Max) // A A != MAX return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1);