[PATCH] D25276: [LoopVectorizer] Interleaved-mem-accesses analysis and getPtrStride

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 06:42:23 PDT 2016


sbaranga added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5872
+        continue;
+      Value *Ptr = getPointerOperand(Member);
+      int Stride = getPtrStride(PSE, Ptr, TheLoop, Strides, /*Assume=*/false,
----------------
I think there is another case here when we don't need to check the wrapping: if the group has the first and last pointers, and we know they both don't wrap.

We should be able to apply this for versioning later and have at most two no-wrap checks per interleaved group.


================
Comment at: llvm/test/Transforms/LoopVectorize/interleaved-accesses-2.ll:16
+; with proper threshold checks.
+; XFAIL: *
+
----------------
mssimpso wrote:
> I would prefer that we not XFAIL a new test. Unless Silviu disagrees with letting Assume=true, I think it would be better to check the actual behavior while keeping the FIXME.
> 
> Would we be missing a test though? If Assume=true here, I don't think we will be checking the case that we actually remove a group that is may wrap?
I think having Assume=true for the initial check should be fine.


https://reviews.llvm.org/D25276





More information about the llvm-commits mailing list