[llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)
Felix via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 20:16:46 PDT 2023
================
@@ -172,10 +173,12 @@ define void @storesTIInit(double %Val) #0 {
; LARGE32-NEXT: stwu 1, -32(1)
; LARGE32-NEXT: stw 0, 40(1)
; LARGE32-NEXT: addis 3, L..C4 at u(2)
-; LARGE32-NEXT: addis 4, L..C5 at u(2)
; LARGE32-NEXT: lwz 3, L..C4 at l(3)
-; LARGE32-NEXT: lwz 4, L..C5 at l(4)
-; LARGE32-NEXT: bla .__tls_get_addr[PR]
+; LARGE32-NEXT: addis 4, L..C5 at u(2)
+; LARGE32-NEXT: lwz 6, L..C5 at l(4)
----------------
orcguru wrote:
# *** IR Dump After PowerPC TLS Dynamic Call Fixup (ppc-tls-dynamic-call) ***:
# Machine code for function storesTIInit: IsSSA, TracksLiveness
Function Live Ins: $f1 in %0
bb.0.entry:
liveins: $f1
%0:f8rc = COPY $f1
%4:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, target-flags(ppc-tlsld) &"_$TLSML[TC]"
%5:g8rc_and_g8rc_nox0 = LDtocL target-flags(ppc-tlsld) &"_$TLSML[TC]", %4:g8rc_and_g8rc_nox0
$x3 = COPY %5:g8rc_and_g8rc_nox0
$x3 = GETtlsMOD64AIX $x3, implicit-def $x0, implicit-def $x4, implicit-def $x5, implicit-def $x11, implicit-def $lr8, implicit-def $cr0
%1:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, target-flags(ppc-tlsld) @TIInit
%2:g8rc = LDtocL target-flags(ppc-tlsld) @TIInit, %1:g8rc_and_g8rc_nox0 :: (load (s64) from got)
ADJCALLSTACKDOWN 0, 0, implicit-def $r1, implicit $r1
$x4 = COPY %2:g8rc
$x3 = ADD8 $x3, $x4
ADJCALLSTACKUP 0, 0, implicit-def $r1, implicit $r1
%3:g8rc_and_g8rc_nox0 = COPY $x3
STFD %0:f8rc, 0, %3:g8rc_and_g8rc_nox0 :: (store (s64) into @TIInit)
BLR8 implicit $lr8, implicit $rm
# End machine code for function storesTIInit.
# *** IR Dump After Machine Instruction Scheduler (machine-scheduler) ***:
# Machine code for function storesTIInit: NoPHIs, TracksLiveness, TiedOpsRewritten
Function Live Ins: $f1 in %0
0B bb.0.entry:
liveins: $f1
16B %0:f8rc = COPY $f1
32B %4:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, target-flags(ppc-tlsld) &"_$TLSML[TC]"
48B %5:g8rc_and_g8rc_nox0 = LDtocL target-flags(ppc-tlsld) &"_$TLSML[TC]", %4:g8rc_and_g8rc_nox0, implicit $x2
96B %1:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, target-flags(ppc-tlsld) @TIInit
100B $x3 = COPY %5:g8rc_and_g8rc_nox0
104B $x3 = GETtlsMOD64AIX $x3, implicit-def dead $x0, implicit-def dead $x4, implicit-def dead $x5, implicit-def dead $x11, implicit-def $lr8, implicit-def dead $cr0
112B %2:g8rc = LDtocL target-flags(ppc-tlsld) @TIInit, %1:g8rc_and_g8rc_nox0, implicit $x2 :: (load (s64) from got)
128B ADJCALLSTACKDOWN 0, 0, implicit-def $r1, implicit $r1
144B $x4 = COPY %2:g8rc
160B $x3 = ADD8 $x3, $x4
176B ADJCALLSTACKUP 0, 0, implicit-def $r1, implicit $r1
192B %3:g8rc_and_g8rc_nox0 = COPY $x3
208B STFD %0:f8rc, 0, %3:g8rc_and_g8rc_nox0 :: (store (s64) into @TIInit)
224B BLR8 implicit $lr8, implicit $rm
# End machine code for function storesTIInit.
https://github.com/llvm/llvm-project/pull/66316
More information about the llvm-commits
mailing list