From: Bill Wendling Date: Sun, 30 Nov 2008 12:41:09 +0000 (+0000) Subject: Forgot one remaining call to getSExtValue(). X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7c7048ecc688d57d10689009719dc2513a03250e;p=oota-llvm.git Forgot one remaining call to getSExtValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60289 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 93510f0593f..8716e9a8a6c 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2968,7 +2968,7 @@ Instruction *InstCombiner::visitSDiv(BinaryOperator &I) { if (Value *LHSNeg = dyn_castNegVal(Op0)) { if (ConstantInt *CI = dyn_cast(LHSNeg)) { ConstantInt *CINeg = cast(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)))