[llvm] [LV] Support scalable interleave groups for factors 3, 5, 6 and 7 (PR #141865)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 16:57:31 PDT 2025
================
@@ -4575,6 +4575,13 @@ InstructionCost AArch64TTIImpl::getInterleavedMemoryOpCost(
if (VecTy->isScalableTy() && !ST->hasSVE())
return InstructionCost::getInvalid();
+ // Scalable VFs will emit vector.de[interleave] intrinsics, and currently we
+ // only have lowering for power-of-2 factors.
+ // TODO: Add lowering for vector.[de]interleave3 intrinsics and support in
+ // InterleavedAccessPass for ld3/st3
+ if (VecTy->isScalableTy() && !isPowerOf2_32(Factor))
+ return InstructionCost::getInvalid();
----------------
lukel97 wrote:
The loop vectorizer never called `getInterleavedMemoryOpCost` with a non-power-of-2 factor w/ scalable VF before, so this is to preserve the existing behaviour. I.e. it currently only scalably vectorizes factors 2 and 4
https://github.com/llvm/llvm-project/pull/141865
More information about the llvm-commits
mailing list