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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 09:54:34 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)
----------------
preames wrote:

> Does the change mean support for different factors must be added for all architectures with scalable vectors at the same time?

This is an IR representation issue.  We have no way to represent in IR a interleave load or store at anything other than Factor=2 today.  When we change that, yes, we will have to audit the cost models for each of the targets which support the new intrinsic.  That seems pretty standard.

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


More information about the llvm-commits mailing list