[PATCH] D19694: [LV] Only bail on interleaved accesses in predicated blocks

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 07:40:27 PDT 2016


mssimpso added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4990
@@ -4989,3 +4989,3 @@
         continue;
       // FIXME: Currently we can't handle mixed accesses and predicated accesses
       if (IsPred)
----------------
mcrosier wrote:
> Does the Comment need updating?
> 
I think the comment should probably stay the same. We still can't handle predicated accesses. The current patch just prevents us from giving up on the non-predicated accesses in the loop, if the loop contains a predicated block.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5056
@@ -5055,3 +5055,3 @@
   collectConstStridedAccesses(StrideAccesses, Strides);
 
   if (StrideAccesses.empty())
----------------
sbaranga wrote:
> With that change, analyzeInterleaving won't see all the loads/stores (as the predicated ones get skipped). Would this have any impact on the correctness of the analysis (it might be ok, but it's worth thinking about it).
Hey Silviu, thanks for commenting! Right, this prevents accesses from being placed into an interleaved group if they are in a predicated block, which seems like the right thing to do to me. This is what the test case demonstrates. Currently, no accesses are recognized as interleaved if the loop contains a single predicated block. If an access is non-consecutive and not in an interleaved group, it should be scalarized (unless gather/scatter is supported).


http://reviews.llvm.org/D19694





More information about the llvm-commits mailing list