Forgot one remaining call to getSExtValue().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60289 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2008-11-30 12:41:09 +00:00
parent 6e1783fb4a
commit 7c7048ecc6

View 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)))