[PATCH] D25276: [LoopVectorizer] Interleaved-mem-accesses analysis and getPtrStride
Dorit Nuzman via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 11:27:12 PDT 2016
dorit added inline comments.
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5872
+ Value *Ptr = getPointerOperand(Member);
+ int Stride = getPtrStride(PSE, Ptr, TheLoop, Strides, /*Assume=*/false,
> sbaranga wrote:
> > 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.
> So, trying to summarize:
> 1) Initial check with Assume=true, ShouldCheckWrap=false;
> 2) Revisit only groups with gaps as follows:
> - if first and last elements are accessed: skip further checking.
> - otherwise – check the first and last pointers of the group with Assume=false (for now), ShouldCheckWrap=true;
> Silviu, is that what you meant?
3 and 4 above were meant to be sub-bullets of item 2...:
1.Initial check with Assume=true, ShouldCheckWrap=false;
2.Revisit only groups with gaps as follows:
- if first and last elements are accessed: skip further checking.
- otherwise – check the first and last pointers of the group with Assume=false (for now), ShouldCheckWrap=true;
More information about the llvm-commits