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

Koakuma via All-commits all-commits at lists.llvm.org
Tue Dec 13 14:26:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eaade37fddec5439f58587347ad7c463f7a41400
      https://github.com/llvm/llvm-project/commit/eaade37fddec5439f58587347ad7c463f7a41400
  Author: Koakuma <koachan at protonmail.com>
  Date:   2022-12-13 (Tue, 13 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