[PATCH] D105614: [RISCV][test] Add new tests for mul optimization in the zba extension with SH*ADD
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 01:46:39 PDT 2021
benshi001 created this revision.
benshi001 added reviewers: craig.topper, asb, luismarques, MaskRay.
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.
This patch does the following optimization.
(mul x imm) -> (SH1ADD x, (SLLI x, bits)) when imm = 2^n + 2.
(mul x imm) -> (SH2ADD x, (SLLI x, bits)) when imm = 2^n + 4.
(mul x imm) -> (SH3ADD x, (SLLI x, bits)) when imm = 2^n + 8.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105614
Files:
llvm/test/CodeGen/RISCV/rv32zba.ll
llvm/test/CodeGen/RISCV/rv64zba.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105614.357160.patch
Type: text/x-patch
Size: 3600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210708/4646e607/attachment.bin>
More information about the llvm-commits
mailing list