[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 03:27:42 PST 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());
----------------
fhahn wrote:
We need to add the extra non-power-of-2 VF at the front so it gets tried first, so the for-each should only process 1..end elements. Could also insert at index 0, after for-each, but that would be more expensive.
The non-power-of-2 VF cannot be handled via the division, as it would compute incorrect VFs.
https://github.com/llvm/llvm-project/pull/77790
More information about the llvm-commits
mailing list