[llvm] [IA] Add support for [de]interleave{3,5,7} (PR #139373)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 10:06:27 PDT 2025


mshockwave wrote:

> * To handle the case where an interleave somehow doesn't get lowered into a ld4 intrinsic, the "interleave of interleaves" expansion from the loop vectorizer into AArch64's VECTOR_[DE]INTERLEAVE lowering

I kind of miss this part: are you referring to the problems with shufflevectors where interleave4 patterns might not be in the canonical form?

But other than that point, I think your plan is reasonable. As pointed out in #89018 the biggest concern for not having dedicated intrinsics at the time was that we hope to synthesize arbitrary factors with only a few intrinsics, such that we'll only have a single lowering path. But right now it seems like it's probably easier to just having two lowering paths where the "fast path" is using dedicated intrinsics for natively supported factor (i.e. up to 8 for RISC-V), while the other path -- which might be less common -- is synthesizing higher factors with intrinsics of smaller factors. 

Whether we're gonna drop shufflevectors to only use (de)interleave intrinsics for both fixed and scalable vectors in the future is another thing. I definitely think that's a good idea to streamline things a little bit though.

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


More information about the llvm-commits mailing list