[PATCH] D104210: [RISCV][test] Add new tests of sh*add in the zba extension

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 02:56:41 PDT 2021


benshi001 created this revision.
benshi001 added reviewers: asb, luismarques, MaskRay, craig.topper.
Herald added subscribers: vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar.
benshi001 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

These tests will show the following optimization by future patches.

Rx + Ry * 6  => (SH1ADD (SH2ADD Rx, Ry), Ry)
Rx + Ry * 7  => (SUB (SH3ADD Rx, Ry), Ry)
Rx + Ry * 10 => (SH1ADD (SH3ADD Rx, Ry), Ry)
Rx + Ry * 12 => (SH2ADD (SH3ADD Rx, Ry), Ry)

The total mount of instructions will be reduced a lot on targets without
the M extension but with the Zba extension.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104210

Files:
  llvm/test/CodeGen/RISCV/rv32zba.ll
  llvm/test/CodeGen/RISCV/rv64zba.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104210.351802.patch
Type: text/x-patch
Size: 23772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/0e2593d4/attachment.bin>


More information about the llvm-commits mailing list