[all-commits] [llvm/llvm-project] ed102c: [RISCV][test] Add new tests for mul optimization i...

Ben Shi via All-commits all-commits at lists.llvm.org
Thu Jul 8 18:48:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed102ce20a5f5ddf388bc71217228b756e2f5fe3
      https://github.com/llvm/llvm-project/commit/ed102ce20a5f5ddf388bc71217228b756e2f5fe3
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2021-07-09 (Fri, 09 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

This patch will show the following optimization by future patches.

(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.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D105614




More information about the All-commits mailing list