mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
In my analysis for r56076 I missed the case where the original
multiplication overflows. llvm-svn: 56082
This commit is contained in:
parent
ebfb483309
commit
36e01356ec
@ -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…
Reference in New Issue
Block a user