[PATCH] D88735: [SLP] Also try to vectorize incoming values of PHIs .
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 08:07:42 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7604-7609
+ // Try to vectorize the incoming values of the PHI, to catch reductions
+ // that feed into PHIs.
+ for (unsigned I = 0, E = P->getNumIncomingValues(); I != E; I++) {
+ Changed |= vectorizeRootInstruction(nullptr, P->getIncomingValue(I),
+ P->getIncomingBlock(I), R, TTI);
}
----------------
I would add a check here that we're going to vectorize the incoming values from a different basic block only, it is better to postpone vectorization of the values from the current basic block. It may reduce the compile time, I assume.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88735/new/
https://reviews.llvm.org/D88735
More information about the llvm-commits
mailing list