[PATCH] D132261: [SLP]Do not reduce repeated values, use scalar red ops instead.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 4 13:08:51 PST 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:12424
+ return RedV.size() < 2 ||
+ !all_of(RedV, [&](Value *V) { return isConstant(V); }) ||
+ !isSplat(RedV);
----------------
Use allConstant() ?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:12534
+ if (AllowSameScalarsReduction && Candidates.size() > 1 &&
+ all_of(Candidates, isConstant)) {
+ Value *Res = Candidates.front();
----------------
allConstant(Candidates)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132261/new/
https://reviews.llvm.org/D132261
More information about the llvm-commits
mailing list