mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 18:33:22 +00:00
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:
parent
6e1783fb4a
commit
7c7048ecc6
@ -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)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user