[llvm] [AArch64] Lower vector.[de]interleave4 (PR #141513)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 09:38:06 PDT 2025
lukel97 wrote:
> Rather than each target having to do this can you move the expansion into the target neutral part of operation legalisation? with `AArch64TargetLowering::LowerVECTOR_DEINTERLEAVE` returning `SDValue()` for the cases where expansion is required.
>
> This will make it easier to support the other interleave factors as well because the common expansion can just expand one level down (i.e. (de)interleave8 -> (de)interleave4, then (de)interleave4 -> (de)interleave2), which gives a target the option to say the intermediate step is legal or to custom lower it.
Good idea, I've done this in c2e329d4aee3766e988f39d6374d129ca37ab79e and added a test for (de)interleave8 codegen. It's worth noting that the target will always need to be able to lower at least (de)interleave2, since you need it to decompose factor 8 into factor 4.
https://github.com/llvm/llvm-project/pull/141513
More information about the llvm-commits
mailing list