[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 11:39:12 PDT 2024


================
@@ -5805,7 +5832,10 @@ BoUpSLP::TreeEntry::EntryState BoUpSLP::getScalarsVectorizationState(
   case Instruction::ExtractValue:
   case Instruction::ExtractElement: {
     bool Reuse = canReuseExtract(VL, VL0, CurrentOrder);
-    if (Reuse || !CurrentOrder.empty())
+    // FIXME: Vectorizing is not supported yet for non-power-of-2 ops.
+    if (!isPowerOf2_32(VL.size()))
+      return TreeEntry::NeedToGather;
+    if ((Reuse || !CurrentOrder.empty()))
----------------
alexey-bataev wrote:

Remove extra parens, restore original check here

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


More information about the llvm-commits mailing list