[all-commits] [llvm/llvm-project] 811be7: [RISCV][test] Add new tests for mul optimization i...
Ben Shi via All-commits
all-commits at lists.llvm.org
Thu Jul 29 17:36:59 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 811be79433638c3c7eeea65f5438044a5ba8de9a
https://github.com/llvm/llvm-project/commit/811be79433638c3c7eeea65f5438044a5ba8de9a
Author: Ben Shi <powerman1st at 163.com>
Date: 2021-07-30 (Fri, 30 Jul 2021)
Changed paths:
M llvm/test/CodeGen/RISCV/rv32zba.ll
M llvm/test/CodeGen/RISCV/rv64zba.ll
Log Message:
-----------
[RISCV][test] Add new tests for mul optimization in the zba extension with SH*ADD
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D107064
Commit: bb6fddb63ca73acb84c39c4d548024bf6398d86e
https://github.com/llvm/llvm-project/commit/bb6fddb63ca73acb84c39c4d548024bf6398d86e
Author: Ben Shi <powerman1st at 163.com>
Date: 2021-07-30 (Fri, 30 Jul 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
M llvm/test/CodeGen/RISCV/xaluo.ll
Log Message:
-----------
Optimize mul in the zba extension with SH*ADD
This patch does the following optimization of mul with a constant.
(mul x, 11) -> (SH1ADD (SH2ADD x, x), x)
(mul x, 19) -> (SH1ADD (SH3ADD x, x), x)
(mul x, 13) -> (SH2ADD (SH1ADD x, x), x)
(mul x, 21) -> (SH2ADD (SH2ADD x, x), x)
(mul x, 37) -> (SH2ADD (SH3ADD x, x), x)
(mul x, 25) -> (SH3ADD (SH1ADD x, x), x)
(mul x, 41) -> (SH3ADD (SH2ADD x, x), x)
(mul x, 73) -> (SH3ADD (SH3ADD x, x), x)
(mul x, 27) -> (SH1ADD (SH3ADD x, x), (SH3ADD x, x))
(mul x, 45) -> (SH2ADD (SH3ADD x, x), (SH3ADD x, x))
(mul x, 81) -> (SH3ADD (SH3ADD x, x), (SH3ADD x, x))
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D107065
Compare: https://github.com/llvm/llvm-project/compare/1e6a93f15c7e...bb6fddb63ca7
More information about the All-commits
mailing list