[PATCH] D153049: [AArch64] Try to convert vector shift operation into vector add operation

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 09:58:55 PDT 2023


jaykang10 created this revision.
jaykang10 added reviewers: dmgreen, efriedma, t.p.northover.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
jaykang10 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

It has been reported that the vector shift instructions tend to be worse than ADD/SUB on AArch64 cores.
This patch supports tablegen patterns for below simple transformation.

  x << 1  ==>  x + x


https://reviews.llvm.org/D153049

Files:
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/arm64-sli-sri-opt.ll
  llvm/test/CodeGen/AArch64/arm64-vshift.ll
  llvm/test/CodeGen/AArch64/rax1.ll
  llvm/test/CodeGen/AArch64/shl-to-add.ll
  llvm/test/CodeGen/AArch64/urem-seteq-illegal-types.ll
  llvm/test/CodeGen/AArch64/vector_splat-const-shift-of-constmasked.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153049.531808.patch
Type: text/x-patch
Size: 13675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/ad02dacd/attachment.bin>


More information about the llvm-commits mailing list