mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
Don't crash when dealing with INTMIN. This fixes PR585 and
Transforms/InstCombine/2005-06-16-RangeCrash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22234 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98b4d59861
commit
5662503afd
@ -2699,6 +2699,8 @@ Instruction *InstCombiner::visitSetCondInst(SetCondInst &I) {
|
||||
if (CI->isNullValue()) { // (X / neg) op 0
|
||||
LoBound = AddOne(DivRHS);
|
||||
HiBound = cast<ConstantInt>(ConstantExpr::getNeg(DivRHS));
|
||||
if (HiBound == DivRHS)
|
||||
LoBound = 0; // - INTMIN = INTMIN
|
||||
} else if (isPositive(CI)) { // (X / neg) op pos
|
||||
HiOverflow = LoOverflow = ProdOV;
|
||||
if (!LoOverflow)
|
||||
|
Loading…
Reference in New Issue
Block a user