[PATCH] D53011: [LV] Add support for vectorizing predicated strided accesses using masked interleave-group

Dorit Nuzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 05:35:03 PDT 2018


dorit marked 10 inline comments as done.
dorit added inline comments.


================
Comment at: include/llvm/Analysis/VectorUtils.h:131
+/// This function creates a shuffle mask for duplicating each of the elements
+/// in a vector of \p VF elements \p InterleaveFactor times. It can be used to
+/// transform a mask of \p VF elements into a mask of
----------------
Ayal wrote:
> "each of the elements in a vector of \p VF elements" >> “each element in a vector of \p VF elements”, or “each of the \p VF elements in a vector”.
> 
> Indicate “Interleaving” in the name of the method, given the InterleaveFactor argument?
> 
createInterleavedMask is already taken, but all we do is replicate each of the elements a given number of times, so I went with createReplicatedMask.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4304
+             ? (TTI.isLegalMaskedLoad(Ty) || isLegalMaskedGather(Ty))
+             : (TTI.isLegalMaskedStore(Ty) || isLegalMaskedScatter(Ty));
+}
----------------
Ayal wrote:
> Better check only if `isLegalMaskedLoad` : `isLegalMaskedStore`. The purpose of optimizing interleaved accesses is to improve upon the use of Gather/Scatter.
Right! Thanks.


https://reviews.llvm.org/D53011





More information about the llvm-commits mailing list