From d01bee71705d11078b7db19a8e56503b974c8899 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53449 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index fa4479e8f31..e65cfacc81e 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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);