[llvm] [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (PR #67812)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 02:01:56 PDT 2024
================
----------------
Mel-Chen wrote:
No, we must retain `llvm/test/Transforms/LoopVectorize/select-min-index.ll`. `select-min-index.ll` demonstrates another semantics: minmax with index. This semantics is similar to FindLastIV but different.
```
int min = start_min;
int idx = start_idx;
for (int i = 0; i < n; i++)
if (min > a[i]) {
min = a[i];
idx = i;
}
// live-out: idx
```
https://github.com/llvm/llvm-project/pull/67812
More information about the llvm-commits
mailing list