The most straightforward extension to D150851 would involve handling the
decreasing IV case, for which tests have been added in 110ec1863a
(LoopVectorize/iv-select-cmp: add test for decreasing IV, const start).
However, the commit missed a testcase for the out-of-bound sentinel
value LONG_MAX, which should not be vectorized. Fix this by adding a
test corresponding to the following program:
long test(long *a) { long rdx = 331; for (long i = LONG_MAX; i >= 0; i--) { if (a[i] > 3) rdx = i; } return rdx; }
might be helpful for future readers to add a quick comment to say what this test