[PATCH] D132590: [SLP] Try to match reductions first in a vector build sequence.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 09:52:07 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11948-11952
+ SmallVector<Value *, 16> BuildVectorOpds;
+ SmallVector<Value *, 16> BuildVectorInsts;
+ if (!findBuildAggregate(I, TTI, BuildVectorOpds, BuildVectorInsts))
+ continue;
+
----------------
I think you're doing it too early, need to do it after the vectorizeHorReduction, which should start with I, otherwise we may miss single insertelement instruction which has reduction.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132590/new/
https://reviews.llvm.org/D132590
More information about the llvm-commits
mailing list