LoopVectorize/iv-select-cmp: add test for decreasing IV out-of-bound
The most straightforward extension to D150851 would involve handling the decreasing IV case, for which tests have been added in 110ec186 (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; } Differential Revision: https://reviews.llvm.org/D157969
parent
b7ff0320
Please register or sign in to comment