[all-commits] [llvm/llvm-project] d934b7: [RISCV] Optimize add-mul in the zba extension with...
Ben Shi via All-commits
all-commits at lists.llvm.org
Fri Jun 18 23:57:24 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d934b72809cb3cbc9f646a2b505e781e0b8b3d7b
https://github.com/llvm/llvm-project/commit/d934b72809cb3cbc9f646a2b505e781e0b8b3d7b
Author: Ben Shi <powerman1st at 163.com>
Date: 2021-06-19 (Sat, 19 Jun 2021)
Changed paths:
M llvm/lib/Target/RISCV/RISCVInstrInfo.td
M llvm/lib/Target/RISCV/RISCVInstrInfoB.td
M llvm/test/CodeGen/RISCV/rv32zba.ll
M llvm/test/CodeGen/RISCV/rv64zba.ll
Log Message:
-----------
[RISCV] Optimize add-mul in the zba extension with SH*ADD
This patch does the following optimization.
Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry)
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D104588
More information about the All-commits
mailing list