[all-commits] [llvm/llvm-project] dee5a8: [RISCV] Optimize (add (shl x, c0), (shl y, c1)) wi...

Ben Shi via All-commits all-commits at lists.llvm.org
Sun Sep 19 01:35:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dee5a8ca325f3c752534442233cb601910e918c4
      https://github.com/llvm/llvm-project/commit/dee5a8ca325f3c752534442233cb601910e918c4
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2021-09-19 (Sun, 19 Sep 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rv32zba.ll
    M llvm/test/CodeGen/RISCV/rv64zba.ll

  Log Message:
  -----------
  [RISCV] Optimize (add (shl x, c0), (shl y, c1)) with SH*ADD

Optimize (add (shl x, c0), (shl y, c1)) ->
         (SLLI (SH*ADD x, y), c1), if c0-c1 == 1/2/3.

Reviewed By: craig.topper, luismarques

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




More information about the All-commits mailing list