[all-commits] [llvm/llvm-project] 311907: [RISCV][test] Add new tests for add-mul optimizati...
Ben Shi via All-commits
all-commits at lists.llvm.org
Fri Jun 18 23:31:21 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31190738c024298745d877a47ef95a5263ea5c9e
https://github.com/llvm/llvm-project/commit/31190738c024298745d877a47ef95a5263ea5c9e
Author: Ben Shi <powerman1st at 163.com>
Date: 2021-06-19 (Sat, 19 Jun 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 add-mul optimization in the zba extension with SH*ADD
These tests will show the following optimization by future patches.
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)
Rx * (3 << C) => (SLLI (SH1ADD Rx, Rx), C)
Rx * (5 << C) => (SLLI (SH2ADD Rx, Rx), C)
Rx * (9 << C) => (SLLI (SH3ADD Rx, Rx), C)
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D104507
More information about the All-commits
mailing list