[all-commits] [llvm/llvm-project] 2c4131: [SPARC] Mark the %g0 register as constant & use it...

Koakuma via All-commits all-commits at lists.llvm.org
Wed Dec 7 10:34:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c41310fc146a1f609147c65ac5f30e5a57e84a8
      https://github.com/llvm/llvm-project/commit/2c41310fc146a1f609147c65ac5f30e5a57e84a8
  Author: Koakuma <koachan at protonmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M llvm/lib/Target/Sparc/SparcInstr64Bit.td
    M llvm/lib/Target/Sparc/SparcInstrInfo.td
    M llvm/lib/Target/Sparc/SparcRegisterInfo.td
    M llvm/test/CodeGen/SPARC/64bit.ll
    M llvm/test/CodeGen/SPARC/64cond.ll
    M llvm/test/CodeGen/SPARC/atomics.ll
    M llvm/test/CodeGen/SPARC/bigreturn.ll
    M llvm/test/CodeGen/SPARC/cttz.ll
    M llvm/test/CodeGen/SPARC/float-constants.ll
    M llvm/test/CodeGen/SPARC/fshl.ll
    M llvm/test/CodeGen/SPARC/inlineasm.ll
    M llvm/test/CodeGen/SPARC/missinglabel.ll
    M llvm/test/CodeGen/SPARC/smulo-128-legalisation-lowering.ll
    M llvm/test/CodeGen/SPARC/tailcall.ll
    M llvm/test/CodeGen/SPARC/umulo-128-legalisation-lowering.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/sparc_generated_funcs.ll.generated.expected
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/sparc_generated_funcs.ll.nogenerated.expected

  Log Message:
  -----------
  [SPARC] Mark the %g0 register as constant & use it to materialize zeros

Materialize zeros by copying from %g0, which is now marked as constant.

This makes it possible for some common operations (like integer negation) to be
performed in fewer instructions.

This continues @arichardson's patch at D132561.

Reviewed By: arsenm

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




More information about the All-commits mailing list