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

Dorit Nuzman via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 03:25:44 PDT 2016

dorit added a comment.

In https://reviews.llvm.org/D25276#574171, @mssimpso wrote:

> Hi Dorit/Silviu,
> Intuitively it seems like we would want to use getPtrStride in the interleaved access analysis the same way we do in isConsecutivePtr. Is the issue here that we might add additional run-time checks that we aren't currently?

That was my initial intuition too (the first version of the patch I proposed did exactly that).

AFAIU Silviu's concern here was that if we use Assume=true during interleaving analysis we may be adding "nice to have" runtime checks (loop can be vectorized without it) which may prevent us from adding necessary runtime checks later (due to exceeding the SCEV-runtime-checks-threshold) which would prevent vectorization altogether.

In any case, we have two orthogonal issues here:
(1) the general SCEV-runtime-checks threshold issues -- straightening that up all over.
(2) interleaving analysis being overly conservative w.r.t stride analysis.
In this patch we want to improve (2), but without making (1) worse.
I was going to open a separate PR for (1).

Are we ok with the patch (for addressing (2))?



More information about the llvm-commits mailing list