[all-commits] [llvm/llvm-project] c75e3e: [RISCV] Improve constant materialization by using ...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Sep 27 21:48:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c75e3ea4bd0562c06058f5b5ea4e5102ae3f3842
      https://github.com/llvm/llvm-project/commit/c75e3ea4bd0562c06058f5b5ea4e5102ae3f3842
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
    M llvm/test/CodeGen/RISCV/imm.ll
    M llvm/test/MC/RISCV/rv64i-aliases-valid.s

  Log Message:
  -----------
  [RISCV] Improve constant materialization by using a sequence that end… (#66943)

…s with 2 addis in some cases.

If the lower 13 bits are something like 0x17ff, we can first materialize
it as 0x1800 followed by an addi to subtract a small offset. This might
be cheaper to materialize since the constant ending in 0x1800 can use a
simm12 immediate for its final addi.




More information about the All-commits mailing list