[PATCH] D104436: [RISCV] Optimize mul-add in the zbs extension with SH*ADD

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 20:14:49 PDT 2021


benshi001 created this revision.
benshi001 added reviewers: MaskRay, craig.topper, asb, luismarques.
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, hiraditya.
benshi001 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch does the following optimization.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104436

Files:
  llvm/lib/Target/RISCV/RISCVInstrInfoB.td
  llvm/test/CodeGen/RISCV/rv32zba.ll
  llvm/test/CodeGen/RISCV/rv64zba.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104436.352609.patch
Type: text/x-patch
Size: 4711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210617/e2e14d81/attachment.bin>


More information about the llvm-commits mailing list