[PATCH] D66688: [LoopVectorize] Leverage speculation safety to avoid masked.loads

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 13:00:19 PDT 2019


Ayal added a comment.

In D66688#1653401 <https://reviews.llvm.org/D66688#1653401>, @reames wrote:

> ...
>  p.s. There was one comment in previous review about needing to handle the interleave case.  I'm interpreting that as a request for further optimization (i.e. broadened scope) and have left it for future work.  If it was actually a correctness concern, then please explain more.


Sorry for late response. This was indeed referring to potential for further optimizations, such as:

1. Current logic for handling an interleave group (of loads) with gaps at the end, is to ensure there's at-least one scalar iteration following all vector iterations. This may result in running VF*UF scalar iterations instead of a single last vector/unrolled iteration. With the ability to "close this gap" - prove that all missing elements of the last vector iteration can be loaded speculatively, this can be improved.
2. Current logic requires all members of an interleave group to belong to same basic-block. Unmasking loads should help facilitate forming interleave groups across distinct basic-blocks.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66688/new/

https://reviews.llvm.org/D66688





More information about the llvm-commits mailing list