[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
Wed Aug 24 12:27:32 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11691-11693
+bool SLPVectorizerPass::vectorizeRootInstruction(
+ PHINode *P, Value *V, BasicBlock *BB, BoUpSLP &R, TargetTransformInfo *TTI,
+ SmallVectorImpl<WeakTrackingVH> &PostponedInsts) {
----------------
Can you put this and corresponding changes to the separate NFC patch?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11963-11964
+
+ }
+ else if (isa<InsertElementInst>(I)) {
+ SmallVector<int> Mask;
----------------
Formatting
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11976-11980
+ // Try to vectorize postponed binops where reductions were not found.
+ for (Value *V : PostponedInsts)
+ if (auto *Inst = dyn_cast<Instruction>(V))
+ if (!R.isDeleted(Inst))
+ OpsChanged |= tryToVectorize(Inst, R);
----------------
Outline this code to the separate function? Same code is used in 2 places.
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