[llvm] [SLP] Allow non-power-of-2 VF in tryToVectorizeList (PR #206259)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 27 09:06:38 PDT 2026


================
@@ -28601,7 +28605,8 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
     for (unsigned I = NextInst; I < MaxInst; ++I) {
       unsigned ActualVF = std::min(MaxInst - I, VF);
 
-      if (!hasFullVectorsOrPowerOf2(*TTI, ScalarTy, ActualVF))
+      if (!hasFullVectorsOrPowerOf2(*TTI, ScalarTy, ActualVF) &&
+          !isAllowedNonPowerOf2VF(ActualVF))
----------------
alexey-bataev wrote:

Why do you need this?

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


More information about the llvm-commits mailing list