This patch make the following optimization.
(mul x, 2 + power_of_2) -> (SH1ADD x, (SLLI x, bits))
(mul x, 4 + power_of_2) -> (SH2ADD x, (SLLI x, bits))
(mul x, 8 + power_of_2) -> (SH3ADD x, (SLLI x, bits))
Paths
| Differential D108551
[RISCV] Make more optimization for multiplication in the zba extension with SH*ADD. AbandonedPublic Authored by jacquesguan on Aug 23 2021, 6:12 AM.
Details Summary This patch make the following optimization. (mul x, 2 + power_of_2) -> (SH1ADD x, (SLLI x, bits))
Diff Detail
Unit TestsFailed
Event TimelineHerald added subscribers: vkmr, evandro, apazos and 22 others. · View Herald TranscriptAug 23 2021, 6:12 AM Comment Actions This optimization has already been implemented in https://reviews.llvm.org/rG264b8e2a20b3124b80bdf6f17dc29d5869336375
Revision Contents
Diff 368083 llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32zba.ll
llvm/test/CodeGen/RISCV/rv64zba.ll
|
SH2ADD?