[llvm] [RISCV] Turn certain cases of masked.load into vp.load + vp.merge (PR #214350)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 00:49:55 PDT 2026


lukel97 wrote:

Is it possible to split this up into a transform like this first:

```
%s = <0, 1, 2, 3, ...>
%m = sub %n, min(%n, %base)
%M = splat %m
%m = icmp ult %s, %M
%v = mask.load %p, %m, %passthru
```

And then a separate transform that does `mask.load %p, (icmp ult step-vector, %n) -> vp.load %p, vl=%n`?

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


More information about the llvm-commits mailing list