[PATCH] D113003: [LoopVectorize] Enable tail folding for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 05:43:27 PDT 2021


david-arm added a comment.

In D113003#3102731 <https://reviews.llvm.org/D113003#3102731>, @SjoerdMeijer wrote:

> Since we are (also) talking about profitability of the transform:
>
>> For now it's best not to enable tail-folding with scalable vectors for low trip counts or when optimising for code size, since there has been no analysis on whether this is worth it.
>
> I was expecting we would need to implement target hook `preferPredicateOverEpilogue` for AArch64/SVE that controls this, and add some of this logic there?

Hi @SjoerdMeijer, at the moment we're not really worried about profitability since we don't intend to enable tail-folding by default anytime soon. I'm happy to look into the TTI hook (preferPredicateOverEpilogue), but I'm not sure what benefit it gives us at the moment? The main reason for supporting tail-folding for scalable vectors for AArch64 is to ensure we have the technical capability and nothing crashes with scalable vectors. In future we'd like to use predication for vector epilogues and avoid the scalar tail, but maintain an unpredicated main vector loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113003



More information about the llvm-commits mailing list