[PATCH] D79783: [LV] Fallback strategies if tail-folding fails

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 05:35:41 PDT 2020


SjoerdMeijer updated this revision to Diff 279493.
SjoerdMeijer added a comment.

Thanks for looking at this Dave. This addresses:

- the minor comments, the rewording of comments/option,
- restores 2 new regression tests that I forgot to upload in the previous diff.

> Is the idea to turn this option on by default for MVE? Maybe by changing the preferPredicateOverEpilogue call?

So that was definitely the idea, that was the motivation of this prep work here.
I was thinking of addressing that in a follow up patch, because that is a different functional change, and then we can also discuss how to enable this. I.e., `preferPredicateOverEpilogue` would be one way to do it, another way is to flip the switch and default to falling back to vectorisation, which seems to me what most targets would want actually, but perhaps I am wrong and should get some performance numbers for this.


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

https://reviews.llvm.org/D79783

Files:
  llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/ARM/prefer-tail-loop-folding.ll
  llvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll
  llvm/test/Transforms/LoopVectorize/ARM/tail-folding-prefer-flag.ll
  llvm/test/Transforms/LoopVectorize/ARM/tail-folding-scalar-epilogue-fallback.ll
  llvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
  llvm/test/Transforms/LoopVectorize/memdep-fold-tail.ll
  llvm/test/Transforms/LoopVectorize/pr46525-expander-insertpoint.ll
  llvm/test/Transforms/LoopVectorize/tail-folding-counting-down.ll
  llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79783.279493.patch
Type: text/x-patch
Size: 28741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200721/c61166f4/attachment.bin>


More information about the llvm-commits mailing list