[PATCH] D20789: Consecutive memory access in Loop Vectorizer - fixed and simplified

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 02:19:57 PDT 2016

sbaranga added a comment.

In http://reviews.llvm.org/D20789#461679, @delena wrote:

> What solution do you suggest? I see 2 options

I was suggesting doing the following:

In http://reviews.llvm.org/D20789#456115, @sbaranga wrote:

> In that case it might be better to either factor out the wrapping checks from getPtrStride or change the interface so that getPtrStride takes an Assume parameter and a ShouldCheckWrap parameter?

To expand on this:

My preference would be to have just one Assume=true argument. However, we don't need to prove non-wrapping for isConsecutivePtr, so we should avoid the logic in getPtrStride that tries to prove non-wrapping:

- only have one Assume argument to getPtrStride, and pass in a ShouldCheckWrap argument
- In getPtrStride, change the logic for IsNoWrapAddRec to be:

  bool IsNoWrapAddRec = !ShouldCheckWrap || PSE.hasNoOverflow(Ptr, SCEVWrapPredicate::IncrementNUSW) || isNoWrapAddRec(Ptr, AR, PSE, Lp);

and invoke getPtrStride with Assume=true and ShouldCheckWrap=false.

FWIW this doesn't look like a bug fix.



More information about the llvm-commits mailing list