Silence warning
authorAnton Korobeynikov <asl@math.spbu.ru>
Sat, 17 Mar 2007 14:48:06 +0000 (14:48 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sat, 17 Mar 2007 14:48:06 +0000 (14:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35137 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/PredicateSimplifier.cpp

index 9c88e2832848e6efe5b6ec1aa27ac057d25ef005..7ee4bc827d3f0156c12916676e02ed3c96ee412c 100644 (file)
@@ -2054,8 +2054,8 @@ namespace {
         case ICmpInst::ICMP_SLT:
         case ICmpInst::ICMP_ULT:
           if (Op1->getValue() != 0)
-            NextVal = cast<ConstantInt>(ConstantExpr::getAdd(
-                          Op1, ConstantInt::get(Op1->getType(), -1)));
+            NextVal = cast<ConstantInt>(ConstantExpr::getSub(
+                          Op1, ConstantInt::get(Op1->getType(), 1)));
          break;
         case ICmpInst::ICMP_SGT:
         case ICmpInst::ICMP_UGT: