C++: expand a comment

This commit is contained in:
Robert Marsh
2018-12-18 09:54:27 -08:00
parent 0040a2d123
commit af8a3f2522

View File

@@ -161,7 +161,11 @@ private IRGuardCondition boundFlowCond(ValueNumber vn, NonPhiOperand bound, int
{
exists(int d |
result.comparesLt(vn.getAUse(), bound, d, upper, testIsTrue) and
// strengthen from x < y to x <= y-1
/*
* `comparesLt` provides bounds of the form `x < y + k` or `x >= y + k`, but we need
* `x <= y + k` so we strengthen here. `testIsTrue` has the same semantics in `comparesLt` as
* it does here, so we don't need to account for it.
*/
if upper = true
then delta = d-1
else delta = d