[PATCH] D129560: [AArch64] Add target hook for preferPredicateOverEpilogue

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 05:19:23 PDT 2022


david-arm created this revision.
david-arm added reviewers: sdesmalen, paulwalker-arm, kmclaughlin, RosieSumpter, peterwaller-arm.
Herald added subscribers: ctetreau, CarolineConcatto, zzheng, hiraditya, kristof.beyls.
Herald added a project: All.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds the AArch64 hook for preferPredicateOverEpilogue,
which currently returns true if SVE is enabled and a new
"sve-tail-predication" option is set to "enabled". The default
value for the option is currently "disabled", with the aim of
expanding this option in future and changing the default.

I've updated all the AArch64 vectoriser tests to use

  "-sve-tail-predication=enabled" instead of
  "-prefer-predicate-over-epilogue=predicate-else-scalar-epilogue" and
  "-prefer-predicate-over-epilogue=predicate-dont-vectorize"

We don't really care about the last option because for SVE we always
want to fall back on using a scalar epilogue if predication cannot
be used.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129560

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/test/Transforms/LoopVectorize/AArch64/eliminate-tail-predication.ll
  llvm/test/Transforms/LoopVectorize/AArch64/scalable-predicate-instruction.ll
  llvm/test/Transforms/LoopVectorize/AArch64/scalable-reductions-tf.ll
  llvm/test/Transforms/LoopVectorize/AArch64/scalar_interleave.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-unroll.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding.ll
  llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129560.443920.patch
Type: text/x-patch
Size: 7425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220712/44bb7824/attachment.bin>


More information about the llvm-commits mailing list