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.
Differential D105614
[RISCV][test] Add new tests for mul optimization in the zba extension with SH*ADD benshi001 on Jul 8 2021, 1:46 AM. Authored by
Details This patch does the following optimization. (mul x imm) -> (SH1ADD x, (SLLI x, bits)) when imm = 2^n + 2.
Diff Detail Event TimelineComment Actions Please get in the habit of creating revisions with full patch context as stated in https://www.llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface |