[PATCH] D132261: [SLP]Do not reduce repeated values, use scalar red ops instead.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 16:10:38 PST 2023
vdmitrie added a comment.
Thanks. This revision basically looks good to me. So I'm going to accept it.
@RKSimon , do you have any remarks/comments/concerns?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:13100-13103
+ if (VL.empty()) {
+ unsigned Cnt =
+ SameValuesCounter.lookup(TrackedToOrig.find(VectorizedValue)->second);
+ switch (RdxKind) {
----------------
okay :-) that works too
just a n.i.t. remark: you could reduce arguments to just these if the code was a dedicated method:
(Value *VectorizedValue, IRBuilderBase &Builder, ArrayRef<Value *> VL, unsigned Cnt)
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