Re: [PATCH] D17268: [LAA] Function 'isStridedPtr' returns additional result “Loop *Lp” via function argument and add appropriate checks out of the 'isStridedPtr'.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 22:40:53 PDT 2016


hfinkel added a comment.

In http://reviews.llvm.org/D17268#432173, @anemet wrote:

> In http://reviews.llvm.org/D17268#426175, @roman.shirokiy wrote:
>
> > Updated diff according to Adam suggestions. Also added negative unit stride check since it seems to not break anything and allows to vectorize
>
>
> Can you please not change this for now.  I have been thinking about this code and I am not sure I understand the original version either.
>
> Particularly unclear is why we only check non-wrapping when we retry proving vectorization safety with memchecks only.  It seems to me that we'd have to do that for any pointer participating in memchecks.
>
> @Hal, do you remember this?  I asked Arnold and he didn't remember anymore.


I don't in detail, but would the SCEV simplify in the first place if the expression might wrap? When we have memchecks we force the non-wrapping, and so we need to check.

> This check feels parallel to the SCEV tests in isDependent because the dep distance is only correct if the pointers don't wrap.  However in this case I think we're only interested if due to wrapping we need to consider the "inverse" interval (end->begin) rather than the normal (begin->end).





http://reviews.llvm.org/D17268





More information about the llvm-commits mailing list