[PATCH] D19487: [LV] Reallow interleaved load groups with gaps

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 12:33:37 PDT 2016


sbaranga added a comment.

Thanks for working on this! I have a single comment so far (see inline).

-Silviu


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:2896
@@ +2895,3 @@
+  if (VF > 1 && Legal->requiresScalarIteration())
+    R = Builder.CreateAdd(R, Step, "n.adj");
+
----------------
This doesn't look right at first sight.  Let's say we have 0 iterations in total (TC = 0), and Step is 4. If I'm not mistaken, this would underflow the VectorTripCount and give a result of MAX_UINT - 3?

Also, if the result of the URem is 0 you don't need to peel the loop (although this wouldn't be that important and perhaps not even profitable to account for).


http://reviews.llvm.org/D19487





More information about the llvm-commits mailing list