Commit
2ad3b1c4334eafaf29f54087cc2941675a96e00e
by Devin PapineauDon't version BNDCHK based on an IV if the loop test is backwards
For an increasing loop-driving IV, the loop test must impose an upper
bound, e.g. while (i < n), whereas for a decreasing loop-driving IV, the
loop test must impose a lower bound instead, e.g. while (i >= n).
Otherwise, the predicted maximum iteration count will be wrong, which
could allow a bound check to be incorrectly skipped.
Loop versioner will now check to ensure that the direction of the loop
test agrees with the sign of the step of the loop-driving IV.
(commit: 2ad3b1c)