[PATCH] D107790: [RISCV] Add a pass to recognize VLS strided loads/store from gather/scatter.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 12:40:22 PDT 2021


craig.topper added a comment.

In D107790#2936902 <https://reviews.llvm.org/D107790#2936902>, @frasercrmck wrote:

> I'll do a further review later when I find some time.
>
> One thing is that I'd be interested to see is this expanded to scalable vector types. Selfishly speaking, our vectorizer will emit the scalable-vector equivalent. The only real difference, I think, is that the strided "constant" is a `llvm.experimental.stepvector` optionally followed by `mul` and possibly some other operations. How difficult do you think it would be to support this? I don't see why the llvm loop vectorizer couldn't do something similar if it doesn't already.
>
> I could do that as a follow-up patch: I don't mean to derail this one. I just want to source your thoughts at this stage.

I don't think it would be too difficult to support. Splat constants on scalable vectors will be hidden behind shuffle+insertelement, but I think that's the same pattern that non-constants use for fixed vectors so I think getSplatValue should still work.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107790/new/

https://reviews.llvm.org/D107790



More information about the llvm-commits mailing list