[PATCH] D126885: [SLP]Cost for a constant buildvector.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 09:02:25 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5783
+ E->UserTreeIndices.front().UserTE->isAltShuffle())
+ ? 0
+ : E->UserTreeIndices.front().UserTE->getOpcode();
----------------
vdmitrie wrote:
> ABataev wrote:
> > vdmitrie wrote:
> > > Just wondering is that possible for UserTreeIndices to be empty here? AFAIU it can be for root only but constants do not seed vtree.
> > > if alternate opcodes are for shl/shr but shift value is splat it is still can be immediate for both of them.
> > >
> > 1. If constants are reduced values in reduction ops.
> > 2. That's why there is a TODO above.
> okay. Although I believe it is not SLP vectorizer job to do constant folding.
Do you suggest to hide it in getConstBuildVectorInstrCost? And return the difference? Or just add a new member function?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126885/new/
https://reviews.llvm.org/D126885
More information about the llvm-commits
mailing list