[PATCH] D25276: [LoopVectorizer] Interleaved-mem-accesses analysis and getPtrStride
Dorit Nuzman via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 08:48:24 PDT 2016
dorit added a comment.
In https://reviews.llvm.org/D25276#567411, @sbaranga wrote:
> Assume=true can add more run-time checks than just for what ShouldCheckWrap checks, so it is possible for this to happen. ShouldCheckWrap will check wrapping for something that has an linear expression, while Assume=true can add checks that would make the expression of the pointer linear (this would happen in the previous example). If you look at the implementation of getPtrStride, the PSE.getAsAddRec(Ptr) convert the expression of the pointer to something linear (strided) using runtime checks, while PSE.setNoOverflow will only check the pointer wrapping with runtime checks.
I see. Thanks.
So in this case, don't we have a problem of potentially adding runtime SCEV assumptions without ever checking if we exceed the threshold? getPtrStride is called with Assume=true several times from the cost-model stage and from the actual vectorization transformation stage, via the call to isConsecutivePtr. Looks like these call sites are past the point when we check whether we exceeded the threshold for runtime SCEV assumptions...?
More information about the llvm-commits