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

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 10:04:51 PDT 2016


sbaranga requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5142
@@ -5109,3 +5141,3 @@
   for (InterleaveGroup *Group : LoadGroups)
-    if (!Group->getMember(0) || !Group->getMember(Group->getFactor() - 1))
-      releaseGroup(Group);
+    if (!Group->getMember(Group->getFactor() - 1)) {
+      DEBUG(dbgs() << "LV: Interleaved group requires scalar iteration.\n");
----------------
Sorry to backtrack on this, but it appears that you also require to have a positive stride for the group in order for this to work.
Otherwise, you might get an out of bounds access in the first iteration of the vector loop.


http://reviews.llvm.org/D19487





More information about the llvm-commits mailing list