Forgot one remaining call to getSExtValue().
authorBill Wendling <isanbard@gmail.com>
Sun, 30 Nov 2008 12:41:09 +0000 (12:41 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 30 Nov 2008 12:41:09 +0000 (12:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 93510f0593fbeea1c729ba1ca4fb084234e13596..8716e9a8a6c0983cf432d03d251c128aa2a45ec6 100644 (file)
@@ -2968,7 +2968,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) {
       if (Value *LHSNeg = dyn_castNegVal(Op0)) {
         if (ConstantInt *CI = dyn_cast<ConstantInt>(LHSNeg)) {
           ConstantInt *CINeg = cast<ConstantInt>(ConstantExpr::getNeg(CI));
-          APInt CINegAPI(CINeg->getBitWidth(), CINeg->getSExtValue(), true);
+          APInt CINegAPI(CINeg->getValue());
 
           if ((CI->getValue().isNegative() && CINegAPI.slt(TwoToExp - 1)) ||
               (CI->getValue().isNonNegative() && CINegAPI.sgt(TwoToExp*NegOne)))