[llvm] [LoopUnroll] Introduce parallel reduction phis when unrolling. (PR #149470)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 14:22:44 PDT 2025


efriedma-quic wrote:

There are also cases where we can interleave, but not unroll, so it might make sense to do both.  For example:

```
void f(int *p, int *sum) {
  #pragma clang loop vectorize_width(1) interleave_count(4)
  for (int i = 0; i < 10000; ++i) {
    *sum += p[i];
  }
}
```

https://github.com/llvm/llvm-project/pull/149470


More information about the llvm-commits mailing list