[all-commits] [llvm/llvm-project] e4ba24: [RISCV] Support (addi (addi globaladdr, C1), C2) i...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Jun 8 08:26:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4ba24c17d2ee8db0e8dd166d7700aa9dd083770
      https://github.com/llvm/llvm-project/commit/e4ba24c17d2ee8db0e8dd166d7700aa9dd083770
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
    M llvm/test/CodeGen/RISCV/hoist-global-addr-base.ll

  Log Message:
  -----------
  [RISCV] Support (addi (addi globaladdr, C1), C2) in RISCVMergeBaseOffset.

Add with immediates in the range [-4096, -2049] or [2048, 4095] get
convert to two ADDIs. Teach RISCVMergeBaseOffset to recognize this
pattern as well.

Reviewed By: luismarques

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




More information about the All-commits mailing list