[llvm] [LV] Check early for supported interleave factors with scalable types [nfc] (PR #111592)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 09:35:58 PDT 2024
================
@@ -3743,7 +3743,7 @@ InstructionCost AArch64TTIImpl::getInterleavedMemoryOpCost(
assert(Factor >= 2 && "Invalid interleave factor");
auto *VecVTy = cast<VectorType>(VecTy);
- if (VecTy->isScalableTy() && (!ST->hasSVE() || Factor != 2))
+ if (VecTy->isScalableTy() && !ST->hasSVE())
----------------
paulwalker-arm wrote:
I'm with @preames, there's no legal LLVM IR that cannot be handled by the code generator when scalable vectors are available and thus there's no reason for the cost model to return an invalid cost. https://github.com/llvm/llvm-project/pull/89018 changes nothing because it doesn't introduce any new IR and thus at worst the cost might be wrong, but it'll still safely make it through code generation.
The cost model shouldn't have to worry about non-existent LLVM IR, whereas it seems prudent for LoopVectorize to first check that what it's trying to do is possible within the current limitations of LLVM IR.
https://github.com/llvm/llvm-project/pull/111592
More information about the llvm-commits
mailing list