[llvm] [SLP] Allow non-power-of-2 VF in tryToVectorizeList (PR #206259)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 09:22:05 PDT 2026
================
@@ -29472,7 +29475,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) &&
+ !(ActualVF == VL.size() && isAllowedNonPowerOf2VF(ActualVF)))
----------------
alexey-bataev wrote:
```suggestion
(ActualVF != VL.size() || !isAllowedNonPowerOf2VF(ActualVF)))
```
easier to read
https://github.com/llvm/llvm-project/pull/206259
More information about the llvm-commits
mailing list