[PATCH] D70587: [SLP] Enhance SLPVectorizer to vectorize different combinations of aggregates
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 05:26:50 PST 2019
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6963
+ IE->getType(),
+ CI->getZExtValue());
+ }
----------------
RKSimon wrote:
> anton-afanasyev wrote:
> > RKSimon wrote:
> > > If the insertion index isn't constant we should call getVectorInstrCost with a ~0/-1 value
> > Hmm, what is `~0/-1` value exactly?
> > Also, I'm not sure the cost tuning is related to this commit -- the current logic is taken unchanged as it was before.
> OK, that's acceptable for now but we should be enabling this for non-const indices as well in a future patch.
>
> getVectorInstrCost recognizes the 'all bits set' insert/extract index argument as a non-constant index (which on most targets has a high cost).
>
> @spatel is currently looking at this on x86 as part of PR43605
I was wondering about that -1 setting too. It's confusing because of the the way the cost model is organized with abstract class, concrete class, overrides, etc. But there is this documentation comment in TargetTransformInfo.h:
/// \return The expected cost of vector Insert and Extract.
/// Use -1 to indicate that there is no information on the index value.
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index = -1) const;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70587/new/
https://reviews.llvm.org/D70587
More information about the llvm-commits
mailing list