[PATCH] D150367: [AIX][TLS] Generate optimized 64-bit local-exec access code sequence using X-Form loads/stores

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 07:26:16 PDT 2023


amyk created this revision.
amyk added reviewers: PowerPC, kamaub, stefanp, nemanjai.
amyk added a project: LLVM.
Herald added subscribers: kbarton, hiraditya.
Herald added a project: All.
amyk requested review of this revision.
Herald added a subscriber: llvm-commits.

This patch is a follow up to D149722 <https://reviews.llvm.org/D149722>, where a slightly more optimized code sequence is generated for
64-bit local-exec accesses when optimizations are turned on.

Instead of producing an explicit add to r13 (the thread pointer) like the following:

  ld r4, L..C0(r2) # target-flags(ppc-tprel) @IThreadLocalVarUninit
  add r4, r13, r4
  stw r3, 0(r4)
  blr

We instead produce an X-Form load (or store) like:

  ld r4, L..C0(r2) # target-flags(ppc-tprel) @IThreadLocalVarUninit
  stwx r3, r4, r13
  blr


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150367

Files:
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-double.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-int.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-ldst-longlong.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc-large.ll
  llvm/test/CodeGen/PowerPC/aix-tls-le-xcoff-reloc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150367.521296.patch
Type: text/x-patch
Size: 83085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230511/cb0435f2/attachment.bin>


More information about the llvm-commits mailing list