[llvm] [LV] Check early for supported interleave factors with scalable types [nfc] (PR #111592)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 21:11:49 PDT 2024


================
@@ -3414,9 +3415,14 @@ bool LoopVectorizationCostModel::interleavedAccessCanBeWidened(
   if (hasIrregularType(ScalarTy, DL))
     return false;
 
+  // We currently only know how to emit interleave/deinterleave with
+  // Factor=2 for scalable vectors.  This is purely an implementation
+  // limit.
+  if (VF.isScalable() && InterleaveFactor != 2)
----------------
Mel-Chen wrote:

> > SVE also has a similar check in interleavedAccessCanBeWidened.
> > Indeed, it would be better to clean them up too if possible.
> 
> I can't find this check except in the AArch64 cost model (now removed). What are you referring to?

My mistake. I mentioned the wrong function earlier; it should be getInterleavedMemoryOpCost rather than interleavedAccessCanBeWidened. 
And commit 3a5c127f98bd918114c473cf75a565e46022d032 has already fixed it, thank you.

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


More information about the llvm-commits mailing list