Fix integer range loss in loop index reduction
This commit is contained in:
parent
bedafe7b6f
commit
fefb511404
|
@ -15915,6 +15915,11 @@ bool InterCodeBasicBlock::SingleTailLoopOptimization(const NumberSet& aliasedPar
|
||||||
ains->mSrc[0].mIntConst = s;
|
ains->mSrc[0].mIntConst = s;
|
||||||
tail->AppendBeforeBranch(ains);
|
tail->AppendBeforeBranch(ains);
|
||||||
|
|
||||||
|
if (s > 0)
|
||||||
|
ains->mDst.mRange.mMaxValue += s;
|
||||||
|
else
|
||||||
|
ains->mDst.mRange.mMinValue += s;
|
||||||
|
|
||||||
indexScale[ains->mDst.mTemp] = s;
|
indexScale[ains->mDst.mTemp] = s;
|
||||||
|
|
||||||
modified = true;
|
modified = true;
|
||||||
|
|
Loading…
Reference in New Issue