[all-commits] [llvm/llvm-project] 883f75: [NFC][RISCV] Pre-commit tests for hoisting of Pseu...

Jessica Clarke via All-commits all-commits at lists.llvm.org
Wed Mar 16 11:46:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 883f755639462d3c2cb6ec22bcfb7ee769fb7715
      https://github.com/llvm/llvm-project/commit/883f755639462d3c2cb6ec22bcfb7ee769fb7715
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    A llvm/test/CodeGen/RISCV/machinelicm-address-pseudos.ll

  Log Message:
  -----------
  [NFC][RISCV] Pre-commit tests for hoisting of PseudoLLA/PseudoLA*

Only PseudoLLA is currently hoisted; this will be fixed in a subsequent
commit.


  Commit: 659363c0ccfb36a0cb6ad70b9ea262b66296ed84
      https://github.com/llvm/llvm-project/commit/659363c0ccfb36a0cb6ad70b9ea262b66296ed84
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfo.td
    M llvm/test/CodeGen/RISCV/machinelicm-address-pseudos.ll
    M llvm/test/CodeGen/RISCV/mir-target-flags.ll

  Log Message:
  -----------
  [RISCV] Ensure PseudoLA* can be hoisted

Since we mark the pseudos as mayLoad but do not provide any MMOs,
isSafeToMove conservatively returns false, stopping MachineLICM from
hoisting the instructions. PseudoLA_TLS_GD does not actually expand to a
load, so stop marking that as mayLoad to allow it to be hoisted, and for
the others make sure to add MMOs during lowering to indicate they're GOT
loads and thus can be freely moved.

Fixes https://github.com/llvm/llvm-project/issues/54372

Reviewed By: MaskRay, arichardson

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


Compare: https://github.com/llvm/llvm-project/compare/114a8903b869...659363c0ccfb


More information about the All-commits mailing list