mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 10:16:43 +00:00
In my analysis for r56076 I missed the case where the original
multiplication overflows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1df3fd6683
commit
7f85fbd9de
@ -5789,7 +5789,8 @@ Instruction *InstCombiner::FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI,
|
||||
// e.g. X/-5 op -3 --> [15, 20)
|
||||
LoBound = Prod;
|
||||
LoOverflow = HiOverflow = ProdOV ? 1 : 0;
|
||||
HiOverflow = SubWithOverflow(HiBound, Prod, DivRHS, true);
|
||||
if (!HiOverflow)
|
||||
HiOverflow = SubWithOverflow(HiBound, Prod, DivRHS, true);
|
||||
}
|
||||
|
||||
// Dividing by a negative swaps the condition. LT <-> GT
|
||||
|
Loading…
x
Reference in New Issue
Block a user