[all-commits] [llvm/llvm-project] 5b6c9a: [RISCV] Optimize add in the zba extension with SH*ADD

Ben Shi via All-commits all-commits at lists.llvm.org
Fri Aug 20 07:43:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b6c9a5ab092954b5305b51a1f7b02aec48285a5
      https://github.com/llvm/llvm-project/commit/5b6c9a5ab092954b5305b51a1f7b02aec48285a5
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2021-08-20 (Fri, 20 Aug 2021)

  Changed paths:
    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 in the zba extension with SH*ADD

Optimize (add x, c) to (SH*ADD (c>>b), x) if c is not simm12
while (c>>b) is simm12 and c has b trailing zeros.

Reviewed By: luismarques

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




More information about the All-commits mailing list