1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
3 ; RUN: -mattr=+aix-small-local-dynamic-tls -mtriple powerpc64-ibm-aix-xcoff < %s \
4 ; RUN: | FileCheck %s --check-prefix=SMALL-LOCAL-DYNAMIC-SMALLCM64
5 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
6 ; RUN: -mattr=+aix-small-local-dynamic-tls -mtriple powerpc64-ibm-aix-xcoff --code-model=large \
7 ; RUN: < %s | FileCheck %s --check-prefix=SMALL-LOCAL-DYNAMIC-LARGECM64
8 ; RUN: llc -O0 -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
9 ; RUN: -mattr=+aix-small-local-dynamic-tls -mtriple powerpc64-ibm-aix-xcoff < %s \
10 ; RUN: | FileCheck %s --check-prefix=SMALL-LOCAL-DYNAMIC-SMALLCM64-O0
11 ; RUN: llc -O0 -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
12 ; RUN: -mattr=+aix-small-local-dynamic-tls -mtriple powerpc64-ibm-aix-xcoff --code-model=large \
13 ; RUN: < %s | FileCheck %s --check-prefix=SMALL-LOCAL-DYNAMIC-LARGECM64-O0
14 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
15 ; RUN: -mtriple powerpc64-ibm-aix-xcoff < %s \
16 ; RUN: | FileCheck %s --check-prefix=DEFAULT-LOCAL-DYNAMIC-SMALLCM64
17 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
18 ; RUN: -mtriple powerpc64-ibm-aix-xcoff --code-model=large \
19 ; RUN: < %s | FileCheck %s \
20 ; RUN: --check-prefix=DEFAULT-LOCAL-DYNAMIC-LARGECM64
21 ; RUN: llc -O0 -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
22 ; RUN: -mtriple powerpc64-ibm-aix-xcoff < %s \
23 ; RUN: | FileCheck %s --check-prefix=DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0
24 ; RUN: llc -O0 -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \
25 ; RUN: -mtriple powerpc64-ibm-aix-xcoff --code-model=large \
26 ; RUN: < %s | FileCheck %s \
27 ; RUN: --check-prefix=DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0
29 declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1
30 @tlv_int_init = local_unnamed_addr global i32 87, align 4
32 @tlv_char = thread_local(localdynamic) global i8 1, align 1
33 @tlv_short = thread_local(localdynamic) global i8 1, align 2
34 @tlv_int = thread_local(localdynamic) global i32 1, align 4
35 @internal_tlv_int = internal thread_local(localdynamic) global i32 1, align 4
36 @tlv_long = thread_local(localdynamic) global i64 1, align 8
37 @internal_tlv_long = internal thread_local(localdynamic) global i64 1, align 8
38 @tlv_float = thread_local(localdynamic) global float 1.000000e+00, align 4
39 @internal_tlv_double = internal thread_local(localdynamic) global double 1.000000e+00, align 8
41 %struct.anon = type { i32 }
42 @ThreadLocalStructAlign1 = thread_local(localdynamic) global %struct.anon zeroinitializer, align 1
43 @ThreadLocalStructAlign4 = thread_local(localdynamic) global %struct.anon zeroinitializer, align 4
44 @a = thread_local(localdynamic) global [87 x i32] zeroinitializer, align 4
46 define nonnull ptr @AddrTest1() local_unnamed_addr {
47 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: AddrTest1:
48 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
49 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
50 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
51 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
52 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
53 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
54 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: la r3, a[TL]@ld+12(r3)
55 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
56 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
57 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
58 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
60 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: AddrTest1:
61 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
62 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
63 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
64 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
65 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
66 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
67 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
68 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: la r3, a[TL]@ld+12(r3)
69 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
70 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
71 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
72 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
74 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: AddrTest1:
75 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
76 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
77 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
78 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
79 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
80 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
81 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, a[TL]@ld(r3)
82 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r3, 12
83 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
84 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
85 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
86 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
88 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: AddrTest1:
89 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
90 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
91 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
92 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
93 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
94 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
95 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
96 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, a[TL]@ld(r3)
97 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r3, 12
98 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
99 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
100 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
101 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
103 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: AddrTest1:
104 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
105 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
106 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
107 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
108 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
109 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
110 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C1(r2) # target-flags(ppc-tlsld) @a
111 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: add r3, r3, r4
112 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r3, r3, 12
113 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
114 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
115 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
116 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
118 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: AddrTest1:
119 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
120 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
121 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
122 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
123 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C1@u(r2)
124 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
125 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
126 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
127 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C1@l(r6)
128 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: add r3, r3, r4
129 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r3, r3, 12
130 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
131 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
132 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
133 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
135 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: AddrTest1:
136 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
137 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
138 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
139 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
140 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
141 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
142 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C1(r2) # target-flags(ppc-tlsld) @a
143 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
144 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r3, 12
145 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
146 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
147 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
148 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
150 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: AddrTest1:
151 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
152 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
153 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
154 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
155 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
156 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
157 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
158 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
159 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
160 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
161 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C0@l(r4)
162 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
163 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r3, 12
164 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
165 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
166 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
167 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
169 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @a)
170 %arrayidx = getelementptr inbounds [87 x i32], ptr %tlv_addr, i64 0, i64 3
174 ; Demonstrates when offset is zero, addi for the offset is optimized out.
175 define nonnull ptr @AddrTest2() local_unnamed_addr {
176 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: AddrTest2:
177 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
178 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
179 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
180 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
181 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
182 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
183 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: la r3, a[TL]@ld(r3)
184 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
185 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
186 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
187 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
189 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: AddrTest2:
190 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
191 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
192 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
193 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
194 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
195 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
196 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
197 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: la r3, a[TL]@ld(r3)
198 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
199 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
200 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
201 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
203 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: AddrTest2:
204 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
205 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
206 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
207 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
208 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
209 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
210 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, a[TL]@ld(r3)
211 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
212 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
213 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
214 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
216 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: AddrTest2:
217 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
218 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
219 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
220 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
221 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
222 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
223 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
224 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, a[TL]@ld(r3)
225 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
226 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
227 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
228 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
230 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: AddrTest2:
231 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
232 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
233 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
234 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
235 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
236 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
237 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C1(r2) # target-flags(ppc-tlsld) @a
238 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: add r3, r3, r4
239 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
240 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
241 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
242 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
244 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: AddrTest2:
245 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
246 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
247 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
248 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
249 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C1@u(r2)
250 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
251 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
252 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
253 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C1@l(r6)
254 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: add r3, r3, r4
255 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
256 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
257 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
258 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
260 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: AddrTest2:
261 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
262 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
263 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
264 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
265 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
266 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
267 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C1(r2) # target-flags(ppc-tlsld) @a
268 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
269 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
270 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
271 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
272 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
274 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: AddrTest2:
275 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
276 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
277 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
278 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
279 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
280 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
281 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
282 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
283 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
284 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
285 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C0@l(r4)
286 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
287 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
288 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
289 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
290 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
292 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @a)
293 %arrayidx = getelementptr inbounds [87 x i32], ptr %tlv_addr, i64 0, i64 0
297 define signext i32 @testUnaligned() {
298 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testUnaligned:
299 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
300 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
301 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
302 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
303 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
304 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
305 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: la r3, ThreadLocalStructAlign1[TL]@ld(r3)
306 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwa r3, 0(r3)
307 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
308 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
309 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
310 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
312 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testUnaligned:
313 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
314 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
315 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
316 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
317 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
318 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
319 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
320 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: la r3, ThreadLocalStructAlign1[TL]@ld(r3)
321 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwa r3, 0(r3)
322 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
323 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
324 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
325 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
327 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testUnaligned:
328 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
329 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
330 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
331 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
332 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
333 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
334 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, ThreadLocalStructAlign1[TL]@ld(r3)
335 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
336 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
337 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
338 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
339 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
341 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testUnaligned:
342 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
343 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
344 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
345 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
346 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
347 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
348 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
349 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, ThreadLocalStructAlign1[TL]@ld(r3)
350 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
351 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
352 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
353 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
354 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
356 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testUnaligned:
357 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
358 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
359 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
360 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
361 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
362 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
363 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C2(r2) # target-flags(ppc-tlsld) @ThreadLocalStructAlign1
364 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwax r3, r3, r4
365 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
366 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
367 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
368 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
370 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testUnaligned:
371 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
372 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
373 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
374 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
375 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C2@u(r2)
376 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
377 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
378 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
379 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C2@l(r6)
380 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwax r3, r3, r4
381 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
382 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
383 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
384 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
386 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testUnaligned:
387 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
388 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
389 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
390 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
391 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
392 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
393 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C2(r2) # target-flags(ppc-tlsld) @ThreadLocalStructAlign1
394 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
395 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
396 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
397 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
398 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
399 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
401 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testUnaligned:
402 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
403 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
404 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
405 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
406 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C2@u(r2)
407 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
408 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
409 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
410 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
411 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
412 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C2@l(r4)
413 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
414 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
415 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
416 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
417 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
418 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
420 %tlv_addr1 = call align 1 ptr @llvm.threadlocal.address.p0(ptr align 1 @ThreadLocalStructAlign1)
421 %x = getelementptr inbounds %struct.anon, ptr %tlv_addr1, i32 0, i32 0
422 %value1 = load i32, ptr %x, align 1
426 define signext i32 @testAligned() {
427 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testAligned:
428 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
429 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
430 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
431 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
432 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
433 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
434 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwa r3, ThreadLocalStructAlign4[TL]@ld(r3)
435 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
436 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
437 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
438 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
440 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testAligned:
441 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
442 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
443 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
444 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
445 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
446 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
447 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
448 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwa r3, ThreadLocalStructAlign4[TL]@ld(r3)
449 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
450 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
451 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
452 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
454 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testAligned:
455 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
456 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
457 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
458 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
459 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
460 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
461 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, ThreadLocalStructAlign4[TL]@ld(r3)
462 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
463 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
464 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
465 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
466 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
468 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testAligned:
469 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
470 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
471 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
472 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
473 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
474 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
475 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
476 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, ThreadLocalStructAlign4[TL]@ld(r3)
477 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
478 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
479 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
480 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
481 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
483 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testAligned:
484 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
485 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
486 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
487 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
488 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
489 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
490 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C3(r2) # target-flags(ppc-tlsld) @ThreadLocalStructAlign4
491 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwax r3, r3, r4
492 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
493 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
494 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
495 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
497 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testAligned:
498 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
499 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
500 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
501 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
502 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C3@u(r2)
503 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
504 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
505 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
506 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C3@l(r6)
507 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwax r3, r3, r4
508 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
509 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
510 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
511 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
513 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testAligned:
514 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
515 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
516 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
517 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
518 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
519 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
520 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C3(r2) # target-flags(ppc-tlsld) @ThreadLocalStructAlign4
521 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
522 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
523 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
524 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
525 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
526 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
528 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testAligned:
529 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
530 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
531 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
532 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
533 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C3@u(r2)
534 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
535 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
536 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
537 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
538 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
539 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C3@l(r4)
540 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
541 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
542 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
543 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
544 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
545 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
547 %tlv_addr1 = call align 1 ptr @llvm.threadlocal.address.p0(ptr align 4 @ThreadLocalStructAlign4)
548 %x = getelementptr inbounds %struct.anon, ptr %tlv_addr1, i32 0, i32 0
549 %value1 = load i32, ptr %x, align 1
553 define void @testChar(i8 noundef signext %x) {
554 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testChar:
555 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
556 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
557 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
558 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mr r6, r3
559 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
560 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
561 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
562 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stb r6, tlv_char[TL]@ld(r3)
563 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
564 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
565 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
566 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
568 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testChar:
569 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
570 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
571 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
572 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mr r6, r3
573 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
574 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
575 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
576 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
577 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stb r6, tlv_char[TL]@ld(r3)
578 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
579 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
580 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
581 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
583 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testChar:
584 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
585 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
586 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
587 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
588 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
589 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
590 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
591 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
592 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mr r4, r3
593 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
594 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r4, tlv_char[TL]@ld(r4)
595 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stb r3, 0(r4)
596 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
597 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
598 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
599 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
601 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testChar:
602 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
603 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
604 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
605 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
606 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
607 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
608 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
609 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
610 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
611 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mr r4, r3
612 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
613 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r4, tlv_char[TL]@ld(r4)
614 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stb r3, 0(r4)
615 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
616 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
617 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
618 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
620 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testChar:
621 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
622 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
623 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
624 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mr r6, r3
625 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
626 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
627 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
628 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C4(r2) # target-flags(ppc-tlsld) @tlv_char
629 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stbx r6, r3, r4
630 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
631 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
632 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
633 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
635 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testChar:
636 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
637 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
638 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
639 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mr r6, r3
640 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
641 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r7, L..C4@u(r2)
642 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
643 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
644 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
645 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C4@l(r7)
646 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stbx r6, r3, r4
647 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
648 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
649 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
650 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
652 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testChar:
653 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
654 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
655 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
656 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
657 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
658 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
659 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
660 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
661 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mr r4, r3
662 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
663 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r5, L..C4(r2) # target-flags(ppc-tlsld) @tlv_char
664 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r4, r4, r5
665 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stb r3, 0(r4)
666 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
667 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
668 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
669 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
671 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testChar:
672 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
673 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
674 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
675 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
676 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
677 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
678 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C4@u(r2)
679 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 48(r1) # 8-byte Folded Spill
680 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
681 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
682 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
683 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r5, 48(r1) # 8-byte Folded Reload
684 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mr r4, r3
685 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
686 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r5, L..C4@l(r5)
687 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r4, r4, r5
688 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stb r3, 0(r4)
689 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
690 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
691 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
692 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
694 %tlv_addr = tail call align 1 ptr @llvm.threadlocal.address.p0(ptr align 1 @tlv_char)
695 store i8 %x, ptr %tlv_addr, align 1
699 define void @testShort(i16 noundef signext %x) {
700 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testShort:
701 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
702 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
703 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
704 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mr r6, r3
705 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
706 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
707 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
708 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: sth r6, tlv_short[TL]@ld(r3)
709 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
710 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
711 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
712 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
714 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testShort:
715 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
716 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
717 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
718 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mr r6, r3
719 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
720 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
721 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
722 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
723 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: sth r6, tlv_short[TL]@ld(r3)
724 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
725 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
726 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
727 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
729 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testShort:
730 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
731 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
732 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
733 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
734 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
735 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
736 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
737 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
738 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mr r4, r3
739 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
740 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r4, tlv_short[TL]@ld(r4)
741 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: sth r3, 0(r4)
742 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
743 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
744 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
745 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
747 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testShort:
748 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
749 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
750 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
751 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
752 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
753 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
754 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
755 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
756 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
757 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mr r4, r3
758 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
759 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r4, tlv_short[TL]@ld(r4)
760 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: sth r3, 0(r4)
761 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
762 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
763 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
764 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
766 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testShort:
767 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
768 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
769 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
770 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mr r6, r3
771 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
772 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
773 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
774 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C5(r2) # target-flags(ppc-tlsld) @tlv_short
775 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: sthx r6, r3, r4
776 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
777 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
778 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
779 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
781 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testShort:
782 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
783 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
784 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
785 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mr r6, r3
786 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
787 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r7, L..C5@u(r2)
788 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
789 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
790 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
791 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C5@l(r7)
792 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: sthx r6, r3, r4
793 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
794 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
795 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
796 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
798 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testShort:
799 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
800 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
801 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
802 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
803 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
804 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
805 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
806 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
807 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mr r4, r3
808 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
809 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r5, L..C5(r2) # target-flags(ppc-tlsld) @tlv_short
810 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r4, r4, r5
811 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: sth r3, 0(r4)
812 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
813 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
814 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
815 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
817 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testShort:
818 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
819 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
820 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
821 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
822 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
823 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stw r3, 60(r1) # 4-byte Folded Spill
824 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C5@u(r2)
825 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 48(r1) # 8-byte Folded Spill
826 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
827 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
828 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
829 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r5, 48(r1) # 8-byte Folded Reload
830 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mr r4, r3
831 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 60(r1) # 4-byte Folded Reload
832 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r5, L..C5@l(r5)
833 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r4, r4, r5
834 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: sth r3, 0(r4)
835 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
836 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
837 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
838 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
840 %tlv_addr = tail call align 2 ptr @llvm.threadlocal.address.p0(ptr align 2 @tlv_short)
841 store i16 %x, ptr %tlv_addr, align 2
845 define signext i32 @testInt1() {
846 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testInt1:
847 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
848 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
849 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
850 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
851 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
852 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
853 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwa r3, tlv_int[TL]@ld(r3)
854 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
855 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
856 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
857 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
859 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testInt1:
860 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
861 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
862 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
863 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
864 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
865 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
866 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
867 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwa r3, tlv_int[TL]@ld(r3)
868 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
869 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
870 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
871 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
873 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testInt1:
874 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
875 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
876 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
877 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
878 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
879 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
880 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, tlv_int[TL]@ld(r3)
881 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
882 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
883 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
884 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
885 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
887 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testInt1:
888 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
889 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
890 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
891 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
892 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
893 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
894 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
895 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, tlv_int[TL]@ld(r3)
896 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
897 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
898 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
899 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
900 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
902 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testInt1:
903 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
904 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
905 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
906 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
907 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
908 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
909 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C6(r2) # target-flags(ppc-tlsld) @tlv_int
910 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwax r3, r3, r4
911 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
912 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
913 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
914 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
916 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testInt1:
917 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
918 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
919 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
920 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
921 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C6@u(r2)
922 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
923 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
924 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
925 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C6@l(r6)
926 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwax r3, r3, r4
927 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
928 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
929 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
930 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
932 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testInt1:
933 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
934 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
935 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
936 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
937 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
938 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
939 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C6(r2) # target-flags(ppc-tlsld) @tlv_int
940 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
941 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 0(r3)
942 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
943 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
944 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
945 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
947 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testInt1:
948 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
949 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
950 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
951 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
952 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C6@u(r2)
953 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
954 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
955 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
956 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
957 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
958 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C6@l(r4)
959 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
960 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 0(r3)
961 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
962 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
963 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
964 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
966 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @tlv_int)
967 %value = load i32, ptr %tlv_addr, align 4
971 define signext i32 @testInt2() {
972 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testInt2:
973 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
974 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
975 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
976 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
977 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
978 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
979 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C1(r2) # @tlv_int_init
980 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r3, internal_tlv_int[TL]@ld(r3)
981 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r4, 0(r4)
982 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: add r3, r4, r3
983 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: extsw r3, r3
984 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
985 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
986 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
987 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
989 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testInt2:
990 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
991 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
992 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
993 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
994 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
995 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
996 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
997 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r4, L..C1@u(r2)
998 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C1@l(r4)
999 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r3, internal_tlv_int[TL]@ld(r3)
1000 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r4, 0(r4)
1001 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: add r3, r4, r3
1002 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: extsw r3, r3
1003 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1004 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1005 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1006 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1008 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testInt2:
1009 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1010 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1011 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1012 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1013 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1014 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1015 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, internal_tlv_int[TL]@ld(r3)
1016 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r4, 0(r3)
1017 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C1(r2) # @tlv_int_init
1018 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 0(r3)
1019 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1020 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: extsw r3, r3
1021 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1022 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1023 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1024 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1026 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testInt2:
1027 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1028 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1029 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1030 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1031 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1032 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1033 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1034 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, internal_tlv_int[TL]@ld(r3)
1035 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r4, 0(r3)
1036 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1037 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1038 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 0(r3)
1039 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1040 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: extsw r3, r3
1041 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1042 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1043 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1044 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1046 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testInt2:
1047 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1048 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1049 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1050 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1051 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1052 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1053 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C7(r2) # target-flags(ppc-tlsld) @internal_tlv_int
1054 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwzx r3, r3, r4
1055 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C8(r2) # @tlv_int_init
1056 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r4, 0(r4)
1057 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: add r3, r4, r3
1058 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: extsw r3, r3
1059 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1060 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1061 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1062 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1064 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testInt2:
1065 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1066 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1067 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1068 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1069 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C7@u(r2)
1070 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1071 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1072 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1073 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C7@l(r6)
1074 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwzx r3, r3, r4
1075 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r4, L..C8@u(r2)
1076 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C8@l(r4)
1077 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r4, 0(r4)
1078 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: add r3, r4, r3
1079 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: extsw r3, r3
1080 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1081 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1082 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1083 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1085 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testInt2:
1086 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1087 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1088 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1089 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1090 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1091 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1092 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C7(r2) # target-flags(ppc-tlsld) @internal_tlv_int
1093 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1094 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r4, 0(r3)
1095 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C8(r2) # @tlv_int_init
1096 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 0(r3)
1097 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1098 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: extsw r3, r3
1099 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1100 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1101 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1102 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1104 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testInt2:
1105 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1106 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1107 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1108 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1109 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C7@u(r2)
1110 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1111 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1112 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1113 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1114 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
1115 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C7@l(r4)
1116 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1117 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r4, 0(r3)
1118 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C8@u(r2)
1119 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C8@l(r3)
1120 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 0(r3)
1121 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1122 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: extsw r3, r3
1123 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1124 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1125 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1126 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1128 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @internal_tlv_int)
1129 %tlv_val = load i32, ptr %tlv_addr, align 4
1130 %global_val = load i32, ptr @tlv_int_init, align 4
1131 %sum = add nsw i32 %global_val, %tlv_val
1135 define signext i64 @testLong1() {
1136 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong1:
1137 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1138 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1139 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1140 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1141 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1142 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1143 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, tlv_long[TL]@ld(r3)
1144 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1145 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1146 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1147 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1149 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong1:
1150 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1151 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1152 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1153 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1154 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1155 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1156 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1157 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, tlv_long[TL]@ld(r3)
1158 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1159 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1160 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1161 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1163 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong1:
1164 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1165 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1166 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1167 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1168 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1169 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1170 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, tlv_long[TL]@ld(r3)
1171 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r3)
1172 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1173 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1174 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1175 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1177 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong1:
1178 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1179 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1180 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1181 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1182 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1183 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1184 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1185 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, tlv_long[TL]@ld(r3)
1186 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r3)
1187 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1188 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1189 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1190 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1192 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong1:
1193 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1194 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1195 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1196 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1197 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1198 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1199 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C9(r2) # target-flags(ppc-tlsld) @tlv_long
1200 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ldx r3, r3, r4
1201 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1202 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1203 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1204 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1206 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong1:
1207 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1208 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1209 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1210 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1211 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C9@u(r2)
1212 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1213 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1214 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1215 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C9@l(r6)
1216 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ldx r3, r3, r4
1217 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1218 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1219 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1220 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1222 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong1:
1223 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1224 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1225 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1226 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1227 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1228 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1229 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C9(r2) # target-flags(ppc-tlsld) @tlv_long
1230 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1231 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r3)
1232 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1233 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1234 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1235 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1237 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong1:
1238 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1239 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1240 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1241 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1242 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C9@u(r2)
1243 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1244 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1245 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1246 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1247 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
1248 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C9@l(r4)
1249 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1250 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r3)
1251 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1252 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1253 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1254 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1256 %tlv_addr = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @tlv_long)
1257 %value = load i64, ptr %tlv_addr, align 4
1261 define void @testLong2(i64 noundef signext %x) {
1262 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong2:
1263 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1264 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1265 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1266 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1267 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1268 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1269 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, internal_tlv_long[TL]@ld(r3)
1270 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r4, r4, 9
1271 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r4, internal_tlv_long[TL]@ld(r3)
1272 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1273 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1274 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1275 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1277 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong2:
1278 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1279 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1280 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1281 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1282 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1283 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1284 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1285 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, internal_tlv_long[TL]@ld(r3)
1286 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r4, r4, 9
1287 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r4, internal_tlv_long[TL]@ld(r3)
1288 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1289 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1290 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1291 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1293 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong2:
1294 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1295 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1296 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1297 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1298 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1299 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1300 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r4, internal_tlv_long[TL]@ld(r3)
1301 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r4)
1302 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r3, 9
1303 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r3, 0(r4)
1304 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1305 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1306 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1307 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1309 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong2:
1310 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1311 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1312 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1313 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1314 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1315 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1316 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1317 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r4, internal_tlv_long[TL]@ld(r3)
1318 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r4)
1319 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r3, 9
1320 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 0(r4)
1321 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1322 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1323 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1324 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1326 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong2:
1327 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1328 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1329 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1330 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1331 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1332 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1333 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C10(r2) # target-flags(ppc-tlsld) @internal_tlv_long
1334 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ldx r5, r3, r4
1335 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r5, r5, 9
1336 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdx r5, r3, r4
1337 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1338 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1339 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1340 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1342 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong2:
1343 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1344 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1345 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1346 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1347 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C10@u(r2)
1348 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1349 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1350 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1351 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C10@l(r6)
1352 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ldx r5, r3, r4
1353 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r5, r5, 9
1354 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdx r5, r3, r4
1355 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1356 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1357 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1358 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1360 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong2:
1361 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1362 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1363 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1364 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1365 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1366 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1367 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C10(r2) # target-flags(ppc-tlsld) @internal_tlv_long
1368 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r4, r3, r4
1369 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r4)
1370 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r3, 9
1371 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r3, 0(r4)
1372 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1373 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1374 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1375 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1377 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong2:
1378 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1379 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1380 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1381 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1382 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C10@u(r2)
1383 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1384 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1385 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1386 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1387 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
1388 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C10@l(r4)
1389 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r4, r3, r4
1390 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r4)
1391 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r3, 9
1392 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 0(r4)
1393 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1394 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1395 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1396 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1398 %tlv_addr = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @internal_tlv_long)
1399 %value = load i64, ptr %tlv_addr, align 8
1400 %add = add nsw i64 %value, 9
1401 store i64 %add, ptr %tlv_addr, align 8
1405 define i32 @testLong3() {
1406 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong3:
1407 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1408 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1409 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1410 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1411 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1412 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1413 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, tlv_long[TL]@ld(r3)
1414 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1415 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1416 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1417 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1419 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong3:
1420 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1421 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1422 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1423 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1424 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1425 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1426 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1427 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, tlv_long[TL]@ld(r3)
1428 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1429 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1430 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1431 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1433 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong3:
1434 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1435 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1436 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1437 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1438 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1439 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1440 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, tlv_long[TL]@ld(r3)
1441 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r3)
1442 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
1443 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
1444 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1445 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1446 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1447 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1449 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong3:
1450 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1451 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1452 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1453 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1454 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1455 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1456 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1457 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, tlv_long[TL]@ld(r3)
1458 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r3)
1459 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
1460 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
1461 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1462 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1463 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1464 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1466 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testLong3:
1467 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1468 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1469 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1470 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1471 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1472 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1473 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C9(r2) # target-flags(ppc-tlsld) @tlv_long
1474 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ldx r3, r3, r4
1475 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1476 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1477 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1478 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1480 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testLong3:
1481 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1482 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1483 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1484 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1485 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C9@u(r2)
1486 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1487 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1488 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1489 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C9@l(r6)
1490 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ldx r3, r3, r4
1491 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1492 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1493 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1494 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1496 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testLong3:
1497 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1498 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1499 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1500 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1501 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1502 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1503 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C9(r2) # target-flags(ppc-tlsld) @tlv_long
1504 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1505 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, 0(r3)
1506 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
1507 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
1508 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1509 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1510 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1511 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1513 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testLong3:
1514 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1515 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1516 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1517 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1518 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C9@u(r2)
1519 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1520 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1521 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1522 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1523 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
1524 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C9@l(r4)
1525 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1526 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, 0(r3)
1527 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $r3 killed $r3 killed $x3
1528 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
1529 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1530 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1531 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1532 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1534 %tlv_addr = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @tlv_long)
1535 %value = load i64, ptr %tlv_addr, align 8
1536 %conv = trunc i64 %value to i32
1540 define void @testFloat1(float noundef %x) {
1541 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testFloat1:
1542 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1543 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1544 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1545 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: vspltisw v2, 1
1546 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1547 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1548 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: vspltisw v3, 8
1549 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: xvcvsxwdp vs0, vs34
1550 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1551 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfs f1, tlv_float[TL]@ld(r3)
1552 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: fadds f0, f1, f0
1553 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: xvcvsxwdp vs1, vs35
1554 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: fadds f0, f0, f1
1555 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfs f0, tlv_float[TL]@ld(r3)
1556 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1557 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1558 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1559 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1561 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testFloat1:
1562 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1563 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1564 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1565 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: vspltisw v2, 1
1566 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1567 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1568 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1569 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: vspltisw v3, 8
1570 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: xvcvsxwdp vs0, vs34
1571 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1572 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lfs f1, tlv_float[TL]@ld(r3)
1573 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: fadds f0, f1, f0
1574 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: xvcvsxwdp vs1, vs35
1575 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: fadds f0, f0, f1
1576 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stfs f0, tlv_float[TL]@ld(r3)
1577 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1578 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1579 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1580 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1582 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testFloat1:
1583 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1584 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1585 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1586 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1587 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1588 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1589 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, tlv_float[TL]@ld(r3)
1590 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f0, 0(r3)
1591 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C2(r2) # %const.1
1592 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f1, 0(r4)
1593 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fadds f0, f0, f1
1594 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C3(r2) # %const.0
1595 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f1, 0(r4)
1596 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fadds f0, f0, f1
1597 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfs f0, 0(r3)
1598 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1599 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1600 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1601 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1603 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testFloat1:
1604 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1605 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1606 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1607 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1608 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1609 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1610 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1611 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, tlv_float[TL]@ld(r3)
1612 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f0, 0(r3)
1613 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r4, L..C2@u(r2)
1614 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C2@l(r4)
1615 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f1, 0(r4)
1616 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fadds f0, f0, f1
1617 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r4, L..C3@u(r2)
1618 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C3@l(r4)
1619 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f1, 0(r4)
1620 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fadds f0, f0, f1
1621 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfs f0, 0(r3)
1622 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1623 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1624 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1625 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1627 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testFloat1:
1628 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1629 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1630 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1631 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1632 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: vspltisw v2, 1
1633 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1634 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: vspltisw v3, 8
1635 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1636 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: xvcvsxwdp vs0, vs34
1637 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C11(r2) # target-flags(ppc-tlsld) @tlv_float
1638 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfsx f1, r3, r4
1639 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: fadds f0, f1, f0
1640 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: xvcvsxwdp vs1, vs35
1641 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: fadds f0, f0, f1
1642 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfsx f0, r3, r4
1643 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1644 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1645 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1646 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1648 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testFloat1:
1649 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1650 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1651 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1652 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1653 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: vspltisw v2, 1
1654 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C11@u(r2)
1655 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1656 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1657 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: vspltisw v3, 8
1658 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1659 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: xvcvsxwdp vs0, vs34
1660 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C11@l(r6)
1661 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lfsx f1, r3, r4
1662 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: fadds f0, f1, f0
1663 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: xvcvsxwdp vs1, vs35
1664 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: fadds f0, f0, f1
1665 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stfsx f0, r3, r4
1666 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1667 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1668 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1669 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1671 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testFloat1:
1672 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1673 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1674 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1675 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1676 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1677 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1678 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C11(r2) # target-flags(ppc-tlsld) @tlv_float
1679 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1680 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f0, 0(r3)
1681 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C12(r2) # %const.1
1682 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f1, 0(r4)
1683 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fadds f0, f0, f1
1684 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C13(r2) # %const.0
1685 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f1, 0(r4)
1686 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fadds f0, f0, f1
1687 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfs f0, 0(r3)
1688 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1689 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1690 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1691 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1693 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testFloat1:
1694 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1695 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1696 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1697 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1698 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C11@u(r2)
1699 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1700 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1701 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1702 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1703 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
1704 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C11@l(r4)
1705 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1706 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f0, 0(r3)
1707 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r4, L..C12@u(r2)
1708 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C12@l(r4)
1709 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f1, 0(r4)
1710 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fadds f0, f0, f1
1711 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r4, L..C13@u(r2)
1712 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C13@l(r4)
1713 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f1, 0(r4)
1714 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fadds f0, f0, f1
1715 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfs f0, 0(r3)
1716 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1717 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1718 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1719 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1721 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @tlv_float)
1722 %value = load float, ptr %tlv_addr, align 4
1723 %inc = fadd float %value, 1.000000e+00
1724 %add = fadd float %inc, 8.000000e+00
1725 store float %add, ptr %tlv_addr, align 4
1729 define i32 @testFloat2() {
1730 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testFloat2:
1731 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1732 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1733 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -64(r1)
1734 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1735 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 80(r1)
1736 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1737 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfs f0, tlv_float[TL]@ld(r3)
1738 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r3, r1, 60
1739 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: xscvdpsxws f0, f0
1740 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfiwx f0, 0, r3
1741 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r3, 60(r1)
1742 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 64
1743 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1744 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1745 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1747 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testFloat2:
1748 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1749 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1750 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -64(r1)
1751 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1752 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 80(r1)
1753 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1754 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1755 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lfs f0, tlv_float[TL]@ld(r3)
1756 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r3, r1, 60
1757 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: xscvdpsxws f0, f0
1758 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stfiwx f0, 0, r3
1759 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r3, 60(r1)
1760 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 64
1761 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1762 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1763 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1765 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testFloat2:
1766 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1767 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1768 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
1769 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
1770 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1771 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1772 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, tlv_float[TL]@ld(r3)
1773 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f0, 0(r3)
1774 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fctiwz f0, f0
1775 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfd f0, 56(r1)
1776 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 60(r1)
1777 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
1778 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
1779 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1780 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1781 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1783 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testFloat2:
1784 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1785 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1786 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1787 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1788 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1789 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1790 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1791 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, tlv_float[TL]@ld(r3)
1792 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f0, 0(r3)
1793 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fctiwz f0, f0
1794 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfd f0, 56(r1)
1795 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 60(r1)
1796 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
1797 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1798 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1799 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1800 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1802 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testFloat2:
1803 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1804 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1805 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -64(r1)
1806 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1807 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 80(r1)
1808 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1809 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C11(r2) # target-flags(ppc-tlsld) @tlv_float
1810 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfsx f0, r3, r4
1811 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r3, r1, 60
1812 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: xscvdpsxws f0, f0
1813 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfiwx f0, 0, r3
1814 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r3, 60(r1)
1815 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 64
1816 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1817 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1818 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1820 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testFloat2:
1821 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1822 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1823 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -64(r1)
1824 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1825 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C11@u(r2)
1826 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 80(r1)
1827 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1828 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1829 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C11@l(r6)
1830 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lfsx f0, r3, r4
1831 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r3, r1, 60
1832 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: xscvdpsxws f0, f0
1833 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stfiwx f0, 0, r3
1834 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r3, 60(r1)
1835 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 64
1836 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1837 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1838 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1840 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testFloat2:
1841 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1842 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1843 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
1844 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
1845 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1846 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1847 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C11(r2) # target-flags(ppc-tlsld) @tlv_float
1848 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1849 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfs f0, 0(r3)
1850 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: fctiwz f0, f0
1851 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfd f0, 56(r1)
1852 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwa r3, 60(r1)
1853 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
1854 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
1855 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1856 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1857 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1859 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testFloat2:
1860 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1861 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1862 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1863 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1864 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C11@u(r2)
1865 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 48(r1) # 8-byte Folded Spill
1866 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1867 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1868 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1869 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 48(r1) # 8-byte Folded Reload
1870 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C11@l(r4)
1871 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
1872 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfs f0, 0(r3)
1873 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: fctiwz f0, f0
1874 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfd f0, 56(r1)
1875 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwa r3, 60(r1)
1876 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
1877 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
1878 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1879 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1880 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1882 %tlv_addr = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @tlv_float)
1883 %value = load float, ptr %tlv_addr, align 4
1884 %conv = fptosi float %value to i32
1888 define void @testDouble1(double noundef %x) {
1889 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testDouble1:
1890 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1891 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1892 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1893 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1894 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1895 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1896 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfd f1, internal_tlv_double[TL]@ld(r3)
1897 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1898 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1899 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1900 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1902 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testDouble1:
1903 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1904 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1905 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1906 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1907 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1908 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1909 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1910 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stfd f1, internal_tlv_double[TL]@ld(r3)
1911 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1912 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1913 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1914 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1916 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testDouble1:
1917 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1918 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1919 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1920 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1921 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1922 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1923 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, internal_tlv_double[TL]@ld(r3)
1924 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stxsdx f1, 0, r3
1925 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1926 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1927 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1928 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1930 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testDouble1:
1931 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1932 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1933 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -48(r1)
1934 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 64(r1)
1935 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
1936 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
1937 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
1938 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, internal_tlv_double[TL]@ld(r3)
1939 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stxsdx f1, 0, r3
1940 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 48
1941 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
1942 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
1943 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
1945 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testDouble1:
1946 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
1947 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
1948 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -48(r1)
1949 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1950 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 64(r1)
1951 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
1952 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C12(r2) # target-flags(ppc-tlsld) @internal_tlv_double
1953 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfdx f1, r3, r4
1954 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 48
1955 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
1956 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
1957 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
1959 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testDouble1:
1960 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
1961 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
1962 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -48(r1)
1963 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
1964 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C12@u(r2)
1965 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 64(r1)
1966 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
1967 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
1968 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C12@l(r6)
1969 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stfdx f1, r3, r4
1970 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 48
1971 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
1972 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
1973 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
1975 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testDouble1:
1976 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
1977 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
1978 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -48(r1)
1979 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 64(r1)
1980 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
1981 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
1982 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C14(r2) # target-flags(ppc-tlsld) @internal_tlv_double
1983 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: add r3, r3, r4
1984 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stxsdx f1, 0, r3
1985 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 48
1986 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
1987 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
1988 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
1990 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testDouble1:
1991 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
1992 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
1993 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
1994 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
1995 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C14@u(r2)
1996 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
1997 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
1998 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
1999 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
2000 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
2001 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C14@l(r4)
2002 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: add r3, r3, r4
2003 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stxsdx f1, 0, r3
2004 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
2005 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
2006 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
2007 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
2009 %tlv_addr = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @internal_tlv_double)
2010 store double %x, ptr %tlv_addr, align 8
2014 define i32 @testDouble2() {
2015 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-LABEL: testDouble2:
2016 ; SMALL-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
2017 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
2018 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -64(r1)
2019 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
2020 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 80(r1)
2021 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
2022 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfd f0, internal_tlv_double[TL]@ld(r3)
2023 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r3, r1, 60
2024 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: xscvdpsxws f0, f0
2025 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfiwx f0, 0, r3
2026 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r3, 60(r1)
2027 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 64
2028 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
2029 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
2030 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
2032 ; SMALL-LOCAL-DYNAMIC-LARGECM64-LABEL: testDouble2:
2033 ; SMALL-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
2034 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
2035 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -64(r1)
2036 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
2037 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 80(r1)
2038 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
2039 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
2040 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lfd f0, internal_tlv_double[TL]@ld(r3)
2041 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r3, r1, 60
2042 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: xscvdpsxws f0, f0
2043 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: stfiwx f0, 0, r3
2044 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r3, 60(r1)
2045 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 64
2046 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
2047 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
2048 ; SMALL-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
2050 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testDouble2:
2051 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
2052 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
2053 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
2054 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
2055 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
2056 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
2057 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: la r3, internal_tlv_double[TL]@ld(r3)
2058 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfd f0, 0(r3)
2059 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: # kill: def $f1 killed $f0
2060 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: xscvdpsxws f0, f0
2061 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r1, 52
2062 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfiwx f0, 0, r3
2063 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 52(r1)
2064 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
2065 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
2066 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
2067 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
2068 ; SMALL-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
2070 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testDouble2:
2071 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
2072 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
2073 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -64(r1)
2074 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 80(r1)
2075 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C0@u(r2)
2076 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C0@l(r3)
2077 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
2078 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: la r3, internal_tlv_double[TL]@ld(r3)
2079 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfd f0, 0(r3)
2080 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: # kill: def $f1 killed $f0
2081 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: xscvdpsxws f0, f0
2082 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r1, 52
2083 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfiwx f0, 0, r3
2084 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 52(r1)
2085 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
2086 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 64
2087 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
2088 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
2089 ; SMALL-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
2091 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-LABEL: testDouble2:
2092 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64: # %bb.0: # %entry
2093 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mflr r0
2094 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stdu r1, -64(r1)
2095 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
2096 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: std r0, 80(r1)
2097 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: bla .__tls_get_mod[PR]
2098 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r4, L..C12(r2) # target-flags(ppc-tlsld) @internal_tlv_double
2099 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lfdx f0, r3, r4
2100 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r3, r1, 60
2101 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: xscvdpsxws f0, f0
2102 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: stfiwx f0, 0, r3
2103 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: lwz r3, 60(r1)
2104 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: addi r1, r1, 64
2105 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: ld r0, 16(r1)
2106 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: mtlr r0
2107 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-NEXT: blr
2109 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-LABEL: testDouble2:
2110 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64: # %bb.0: # %entry
2111 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mflr r0
2112 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stdu r1, -64(r1)
2113 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r3, L..C0@u(r2)
2114 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addis r6, L..C12@u(r2)
2115 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: std r0, 80(r1)
2116 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r3, L..C0@l(r3)
2117 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: bla .__tls_get_mod[PR]
2118 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r4, L..C12@l(r6)
2119 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lfdx f0, r3, r4
2120 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r3, r1, 60
2121 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: xscvdpsxws f0, f0
2122 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: stfiwx f0, 0, r3
2123 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: lwz r3, 60(r1)
2124 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: addi r1, r1, 64
2125 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: ld r0, 16(r1)
2126 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: mtlr r0
2127 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-NEXT: blr
2129 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-LABEL: testDouble2:
2130 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0: # %bb.0: # %entry
2131 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mflr r0
2132 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stdu r1, -64(r1)
2133 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: std r0, 80(r1)
2134 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r3, L..C0(r2) # target-flags(ppc-tlsldm) @"_$TLSML"
2135 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: bla .__tls_get_mod[PR]
2136 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r4, L..C14(r2) # target-flags(ppc-tlsld) @internal_tlv_double
2137 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lfdx f0, r3, r4
2138 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: xscvdpsxws f0, f0
2139 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r3, r1, 52
2140 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: stfiwx f0, 0, r3
2141 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: lwz r3, 52(r1)
2142 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: clrldi r3, r3, 32
2143 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: addi r1, r1, 64
2144 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: ld r0, 16(r1)
2145 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: mtlr r0
2146 ; DEFAULT-LOCAL-DYNAMIC-SMALLCM64-O0-NEXT: blr
2148 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-LABEL: testDouble2:
2149 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0: # %bb.0: # %entry
2150 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mflr r0
2151 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stdu r1, -80(r1)
2152 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r0, 96(r1)
2153 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C14@u(r2)
2154 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: std r3, 56(r1) # 8-byte Folded Spill
2155 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addis r3, L..C1@u(r2)
2156 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r3, L..C1@l(r3)
2157 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: bla .__tls_get_mod[PR]
2158 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, 56(r1) # 8-byte Folded Reload
2159 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r4, L..C14@l(r4)
2160 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lfdx f0, r3, r4
2161 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: xscvdpsxws f0, f0
2162 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r3, r1, 68
2163 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: stfiwx f0, 0, r3
2164 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: lwz r3, 68(r1)
2165 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: clrldi r3, r3, 32
2166 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: addi r1, r1, 80
2167 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: ld r0, 16(r1)
2168 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: mtlr r0
2169 ; DEFAULT-LOCAL-DYNAMIC-LARGECM64-O0-NEXT: blr
2171 %tlv_addr = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @internal_tlv_double)
2172 %value = load double, ptr %tlv_addr, align 8
2173 %conv = fptosi double %value to i32