[llvm] [SLP]Initial support for non-power-of-2 (but still whole register) number of elements in operands. (PR #107273)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 13:09:21 PDT 2024


================
@@ -11682,13 +11718,14 @@ BoUpSLP::isGatherShuffledEntry(
   if (TE == VectorizableTree.front().get())
     return {};
   // FIXME: Gathering for non-power-of-2 nodes not implemented yet.
-  if (TE->isNonPowOf2Vec())
+  if (TE->hasNonWholeRegisterElems(*TTI))
     return {};
   Mask.assign(VL.size(), PoisonMaskElem);
   assert(TE->UserTreeIndices.size() == 1 &&
          "Expected only single user of the gather node.");
-  assert(VL.size() % NumParts == 0 &&
-         "Number of scalars must be divisible by NumParts.");
+  // Number of scalars must be divisible by NumParts.
+  if (VL.size() % NumParts != 0)
----------------
alexey-bataev wrote:

No, not vector type splitting, but finding subvectors, which can be shuffled

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


More information about the llvm-commits mailing list