[PATCH] D138887: [SPARC] Mark the %g0 register as constant & use it to materialize zeros

Koakuma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 19:07:56 PST 2022


koakuma created this revision.
koakuma added reviewers: dcederman, brad, arsenm, MaskRay, jrtc27.
Herald added subscribers: StephenFan, fedor.sergeev, hiraditya, jyknight.
Herald added a project: All.
koakuma requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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 <https://reviews.llvm.org/D132561>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138887

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138887.478438.patch
Type: text/x-patch
Size: 39100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221129/b2e1920c/attachment.bin>


More information about the llvm-commits mailing list