[PATCH] D52682: [IAI, LV] Avoid creating interleave-groups for predicated accesses

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 06:55:00 PDT 2018


Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.

Nice catch, added only minor optional comments.



================
Comment at: lib/Analysis/VectorUtils.cpp:715
     InterleaveGroup *Group = nullptr;
-    if (isStrided(DesB.Stride)) {
+    // Ignore B if it is in a predicated block. This restriction can be relaxed
+    // in the future once we handle masked interleaved groups.
----------------
Best add TODO when referring to such potential "in the future" work.


================
Comment at: lib/Analysis/VectorUtils.cpp:815
       // complicated blocks.
       if (isPredicated(A->getParent()) || isPredicated(B->getParent()))
         continue;
----------------
This check for isPredicated(B) now becomes redundant, right?


================
Comment at: test/Transforms/LoopVectorize/X86/x86-pr39099.ll:9
+; interleaved-group (which requires proper masking, currently unsupported)
+; but rather as three separate scalarized accesses.
+; (For SKX, gather/scatter is not supported by the compiler for chars, therefore
----------------
CHECK for three scalarized accesse below, as claimed above. Alternatively, stores with gaps are (currently) not supported, so the bug is relevant for loads only; i.e, suffice to test with consecutive stores to q[ix].


https://reviews.llvm.org/D52682





More information about the llvm-commits mailing list