[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 11:16:10 PDT 2024
================
@@ -14036,10 +14084,22 @@ bool SLPVectorizerPass::vectorizeStores(ArrayRef<StoreInst *> Stores,
unsigned Sz = 1 + Log2_32(MaxVF) - Log2_32(MinVF);
SmallVector<unsigned> CandidateVFs(Sz);
+ auto VFsToFill = make_range(CandidateVFs.begin(), CandidateVFs.end());
----------------
alexey-bataev wrote:
Something like
```
SmallVector<unsigned> CandidateVFs(Sz+(non-power-of-2-vf ? 1 : 0));
unsigned Size = MinVF;
for_each(reverse(CandidateVFs), [&](unsigned &VF) {
VF = Size > MaxVF ? non-power-of-2-vf : Size;
Size *= 2;
});
```
?
https://github.com/llvm/llvm-project/pull/77790
More information about the llvm-commits
mailing list