another bug in the same line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53448 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 0cb96d5..fa4479e 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -5341,7 +5341,7 @@
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_EQ, Op0, Op1);
+ return new ICmpInst(ICmpInst::ICMP_EQ, Op0, SubOne(CI));
break;
case ICmpInst::ICMP_SGT:
if (Min.sgt(RHSVal)) // A >s C -> true iff min(A) > C