[llvm] [RISCV] Don't use EVL/Mask for vid when lowering vp.reverse (PR #123048)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 06:31:19 PST 2025


lukel97 wrote:

> I handled the same issue before but my solution was generating strided load/store with negative stride so that we don't need to reverse the mask and load/store.

Yeah, hopefully there will be less of them if we can either teach the loop vectorizer to emit strided intrinsics or land #122244, but I guess we might still need it for general reverse gathers? E.g.

```c
for (int i = n; i >= 0; i--)
  x[y[i]] = 0;
```

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


More information about the llvm-commits mailing list