[PATCH] D152827: [AArch64] Correctly determine if {ADD,SUB}{W,X}rs instructions are cheap

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 09:23:10 PDT 2023


chill created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
chill requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

These are marked to be "as cheap as a move".

According to publicly available Software Optimization Guides, they
have one cycle latency and maximum throughput only on some
microarchitectures, only for `LSL` and only for some shift amounts.

This patch uses the subtarget feature `FeatureLSLFast` to determine
how cheap the instructions are. As a consequence, each subtarget
with `FeatureLSLFast` now also has `FeatureCustomCheapAsMoveHandling` added.


https://reviews.llvm.org/D152827

Files:
  llvm/lib/Target/AArch64/AArch64.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152827.530939.patch
Type: text/x-patch
Size: 7765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230613/087b8a93/attachment.bin>


More information about the llvm-commits mailing list