[PATCH] D139718: [SLP][NFC]Inital redesign of ShuffleInstructionBuilder, NFC.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 10:14:44 PST 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8119
+/// Merges shuffle masks and emits final shuffle instruction, if required. It
+/// supports shuffling of 2 input vectors. It implements lazy shuffles emission,
+/// when the actual shuffle instruction is generated only if this is actually
----------------
vdmitrie wrote:
> ABataev wrote:
> > vdmitrie wrote:
> > > Could you please add more details on restrictions assumed on masks and input vectors? I mean sizes of masks and vectors.
> > > The description will greatly benefit from an example.
> > > 
> > There will be no limitations on masks and vectors. What kind of example do you think might be useful here?
> > There will be no limitations on masks and vectors. What kind of example do you think might be useful here?
> 
> For example, can size of mask be less than size of vectors? This class is supposed to be used to merge two vectors of the same size (for alternating ops) and/or extend a vector (i.e. replicate some of the elements). Right? Here in SLP vectorizer there are not so many uses cases that the class handles yet. So I'm asking to list these cases explicitly.
Yes, it will do it later. It will resize the operands, if required.
I'll try to add some examples.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139718/new/

https://reviews.llvm.org/D139718



More information about the llvm-commits mailing list