mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 855965 - Symbolic range analysis transfers range analysis bounds to phis. r=mjrosenb
This commit is contained in:
parent
c739458274
commit
d88a324520
@ -1038,10 +1038,15 @@ RangeAnalysis::analyzeLoopPhi(MBasicBlock *header, LoopIterationBound *loopBound
|
||||
if (!SafeSub(0, modified.constant, &negativeConstant) || !limitSum.add(negativeConstant))
|
||||
return;
|
||||
|
||||
Range *initRange = initial->range();
|
||||
if (modified.constant > 0) {
|
||||
if (initRange && !initRange->isLowerInfinite())
|
||||
phi->range()->setLower(initRange->lower());
|
||||
phi->range()->setSymbolicLower(new SymbolicBound(NULL, initialSum));
|
||||
phi->range()->setSymbolicUpper(new SymbolicBound(loopBound, limitSum));
|
||||
} else {
|
||||
if (initRange && !initRange->isUpperInfinite())
|
||||
phi->range()->setUpper(initRange->upper());
|
||||
phi->range()->setSymbolicUpper(new SymbolicBound(NULL, initialSum));
|
||||
phi->range()->setSymbolicLower(new SymbolicBound(loopBound, limitSum));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user