[PATCH] D157628: [AArch64][SVE2] Change the cost of extends with S/URHADD to 0

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 08:32:10 PDT 2023


kmclaughlin created this revision.
kmclaughlin added reviewers: david-arm, hassnaa-arm, dtemirbulatov, sdesmalen.
Herald added subscribers: ctetreau, hiraditya, kristof.beyls.
Herald added a reviewer: efriedma.
Herald added a project: All.
kmclaughlin requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.

When SVE2 is enabled, we can combine an add of 1, add & shift right by 1
to a single s/urhadd instruction. If the operands to the adds are extended,
these extends will fold into the s/urhadd and their costs should be 0.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157628

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/sve2-ext-rhadd-costs.ll
  llvm/test/Transforms/LoopVectorize/AArch64/sve2-ext-rhadd.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157628.549049.patch
Type: text/x-patch
Size: 20818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230810/2c6e7ac2/attachment.bin>


More information about the llvm-commits mailing list