[PATCH] D142656: [SVE][codegen] Add pattern for SVE multiply-add accumulate

Sushant Gokhale via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 11:28:04 PST 2023


sushgokh created this revision.
sushgokh added reviewers: SjoerdMeijer, dmgreen, david-arm, madhur13490.
Herald added subscribers: ctetreau, psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: All.
sushgokh requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

It has been observed for multiple SVE code samples that multiply-add IR pattern doesn't get realised into multiply-add accumulate instructions post instruction selection. This patch tries to add instruction selection pattern to improve this scenario.

The patch aims at:

1. Try to generate multiply-accumulate instructions post-isel at more places
2. Improving the current functionality of 'mad' instruction(which only kicks in if intrinsic is used)
3. with 'mla' instruction, it has been observed at multiple places that it generates extra register moves especially if the added is constant. This patch aims to improve this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142656

Files:
  llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  llvm/lib/Target/AArch64/SVEInstrFormats.td
  llvm/test/CodeGen/AArch64/sve-gather-scatter-addr-opts.ll
  llvm/test/CodeGen/AArch64/sve-gep.ll
  llvm/test/CodeGen/AArch64/sve-int-arith.ll
  llvm/test/CodeGen/AArch64/sve-multiply-add-accumulate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142656.492524.patch
Type: text/x-patch
Size: 12061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230126/557f2fd6/attachment.bin>


More information about the llvm-commits mailing list