1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
4 ; RUN: < %s | FileCheck %s --check-prefix=CHECK-P10-LE
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
7 ; RUN: < %s | FileCheck %s --check-prefix=CHECK-P10-BE
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
9 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
10 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
11 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
12 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
13 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
14 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
15 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
16 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P8,CHECK-P8-LE
17 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
18 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
19 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P8,CHECK-P8-BE
21 @GlobLd1 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
22 @GlobSt1 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
23 @GlobLd2 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
24 @GlobSt2 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
25 @GlobLd3 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
26 @GlobSt3 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
27 @GlobLd4 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
28 @GlobSt4 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
29 @GlobLd5 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
30 @GlobSt5 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
31 @GlobLd6 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
32 @GlobSt6 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
33 @GlobLd7 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
34 @GlobSt7 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
35 @GlobLd8 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
36 @GlobSt8 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
37 @GlobLd9 = dso_local local_unnamed_addr global [20 x float] zeroinitializer, align 4
38 @GlobSt9 = dso_local local_unnamed_addr global [20 x float] zeroinitializer, align 4
39 @GlobLd10 = dso_local local_unnamed_addr global [20 x double] zeroinitializer, align 8
40 @GlobSt10 = dso_local local_unnamed_addr global [20 x double] zeroinitializer, align 8
41 @GlobLd11 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
42 @GlobSt11 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
43 @GlobLd12 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
44 @GlobSt12 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
45 @GlobF128 = dso_local local_unnamed_addr global [20 x fp128] zeroinitializer, align 16
47 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
48 define dso_local void @testGlob1PtrPlus0() {
49 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus0:
50 ; CHECK-P10-LE: # %bb.0: # %entry
51 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL(0), 1
52 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL(0), 1
53 ; CHECK-P10-LE-NEXT: blr
55 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus0:
56 ; CHECK-P10-BE: # %bb.0: # %entry
57 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
58 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
59 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l(r3)
60 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l(r4)
61 ; CHECK-P10-BE-NEXT: blr
63 ; CHECK-LABEL: testGlob1PtrPlus0:
64 ; CHECK: # %bb.0: # %entry
65 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
66 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
67 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l(r3)
68 ; CHECK-NEXT: stb r3, GlobSt1@toc@l(r4)
71 %0 = load i8, ptr @GlobLd1, align 1
72 store i8 %0, ptr @GlobSt1, align 1
76 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
77 define dso_local void @testGlob1PtrPlus3() {
78 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus3:
79 ; CHECK-P10-LE: # %bb.0: # %entry
80 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+3(0), 1
81 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+3(0), 1
82 ; CHECK-P10-LE-NEXT: blr
84 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus3:
85 ; CHECK-P10-BE: # %bb.0: # %entry
86 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
87 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
88 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd1@toc@l
89 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt1@toc@l
90 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
91 ; CHECK-P10-BE-NEXT: stb r3, 3(r4)
92 ; CHECK-P10-BE-NEXT: blr
94 ; CHECK-LABEL: testGlob1PtrPlus3:
95 ; CHECK: # %bb.0: # %entry
96 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
97 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
98 ; CHECK-NEXT: addi r3, r3, GlobLd1@toc@l
99 ; CHECK-NEXT: addi r4, r4, GlobSt1@toc@l
100 ; CHECK-NEXT: lbz r3, 3(r3)
101 ; CHECK-NEXT: stb r3, 3(r4)
104 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd1, i64 0, i64 3), align 1
105 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt1, i64 0, i64 3), align 1
109 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
110 define dso_local void @testGlob1PtrPlus4() {
111 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus4:
112 ; CHECK-P10-LE: # %bb.0: # %entry
113 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+4(0), 1
114 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+4(0), 1
115 ; CHECK-P10-LE-NEXT: blr
117 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus4:
118 ; CHECK-P10-BE: # %bb.0: # %entry
119 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+4
120 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+4
121 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
122 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+4(r4)
123 ; CHECK-P10-BE-NEXT: blr
125 ; CHECK-LABEL: testGlob1PtrPlus4:
126 ; CHECK: # %bb.0: # %entry
127 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+4
128 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+4
129 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
130 ; CHECK-NEXT: stb r3, GlobSt1@toc@l+4(r4)
133 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd1, i64 0, i64 4), align 1
134 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt1, i64 0, i64 4), align 1
138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
139 define dso_local void @testGlob1PtrPlus16() {
140 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus16:
141 ; CHECK-P10-LE: # %bb.0: # %entry
142 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+16(0), 1
143 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+16(0), 1
144 ; CHECK-P10-LE-NEXT: blr
146 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus16:
147 ; CHECK-P10-BE: # %bb.0: # %entry
148 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+16
149 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+16
150 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
151 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+16(r4)
152 ; CHECK-P10-BE-NEXT: blr
154 ; CHECK-LABEL: testGlob1PtrPlus16:
155 ; CHECK: # %bb.0: # %entry
156 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+16
157 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+16
158 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
159 ; CHECK-NEXT: stb r3, GlobSt1@toc@l+16(r4)
162 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd1, i64 0, i64 16), align 1
163 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt1, i64 0, i64 16), align 1
167 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
168 define dso_local void @testGlob1PtrPlusVar(i64 %Idx) {
169 ; CHECK-P10-LE-LABEL: testGlob1PtrPlusVar:
170 ; CHECK-P10-LE: # %bb.0: # %entry
171 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd1@PCREL, 1
172 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt1@PCREL, 1
173 ; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
174 ; CHECK-P10-LE-NEXT: stbx r4, r5, r3
175 ; CHECK-P10-LE-NEXT: blr
177 ; CHECK-P10-BE-LABEL: testGlob1PtrPlusVar:
178 ; CHECK-P10-BE: # %bb.0: # %entry
179 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd1@toc@ha
180 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt1@toc@ha
181 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd1@toc@l
182 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt1@toc@l
183 ; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
184 ; CHECK-P10-BE-NEXT: stbx r4, r5, r3
185 ; CHECK-P10-BE-NEXT: blr
187 ; CHECK-LABEL: testGlob1PtrPlusVar:
188 ; CHECK: # %bb.0: # %entry
189 ; CHECK-NEXT: addis r4, r2, GlobLd1@toc@ha
190 ; CHECK-NEXT: addis r5, r2, GlobSt1@toc@ha
191 ; CHECK-NEXT: addi r4, r4, GlobLd1@toc@l
192 ; CHECK-NEXT: addi r5, r5, GlobSt1@toc@l
193 ; CHECK-NEXT: lbzx r4, r4, r3
194 ; CHECK-NEXT: stbx r4, r5, r3
197 %arrayidx = getelementptr inbounds [20 x i8], ptr @GlobLd1, i64 0, i64 %Idx
198 %0 = load i8, ptr %arrayidx, align 1
199 %arrayidx1 = getelementptr inbounds [20 x i8], ptr @GlobSt1, i64 0, i64 %Idx
200 store i8 %0, ptr %arrayidx1, align 1
204 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
205 define dso_local void @testGlob2PtrPlus0() {
206 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus0:
207 ; CHECK-P10-LE: # %bb.0: # %entry
208 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL(0), 1
209 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL(0), 1
210 ; CHECK-P10-LE-NEXT: blr
212 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus0:
213 ; CHECK-P10-BE: # %bb.0: # %entry
214 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
215 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
216 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l(r3)
217 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l(r4)
218 ; CHECK-P10-BE-NEXT: blr
220 ; CHECK-LABEL: testGlob2PtrPlus0:
221 ; CHECK: # %bb.0: # %entry
222 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
223 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
224 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l(r3)
225 ; CHECK-NEXT: stb r3, GlobSt2@toc@l(r4)
228 %0 = load i8, ptr @GlobLd2, align 1
229 store i8 %0, ptr @GlobSt2, align 1
233 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
234 define dso_local void @testGlob2PtrPlus3() {
235 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus3:
236 ; CHECK-P10-LE: # %bb.0: # %entry
237 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+3(0), 1
238 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+3(0), 1
239 ; CHECK-P10-LE-NEXT: blr
241 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus3:
242 ; CHECK-P10-BE: # %bb.0: # %entry
243 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
244 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
245 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd2@toc@l
246 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt2@toc@l
247 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
248 ; CHECK-P10-BE-NEXT: stb r3, 3(r4)
249 ; CHECK-P10-BE-NEXT: blr
251 ; CHECK-LABEL: testGlob2PtrPlus3:
252 ; CHECK: # %bb.0: # %entry
253 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
254 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
255 ; CHECK-NEXT: addi r3, r3, GlobLd2@toc@l
256 ; CHECK-NEXT: addi r4, r4, GlobSt2@toc@l
257 ; CHECK-NEXT: lbz r3, 3(r3)
258 ; CHECK-NEXT: stb r3, 3(r4)
261 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd2, i64 0, i64 3), align 1
262 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt2, i64 0, i64 3), align 1
266 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
267 define dso_local void @testGlob2PtrPlus4() {
268 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus4:
269 ; CHECK-P10-LE: # %bb.0: # %entry
270 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+4(0), 1
271 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+4(0), 1
272 ; CHECK-P10-LE-NEXT: blr
274 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus4:
275 ; CHECK-P10-BE: # %bb.0: # %entry
276 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+4
277 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+4
278 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
279 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+4(r4)
280 ; CHECK-P10-BE-NEXT: blr
282 ; CHECK-LABEL: testGlob2PtrPlus4:
283 ; CHECK: # %bb.0: # %entry
284 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+4
285 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+4
286 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
287 ; CHECK-NEXT: stb r3, GlobSt2@toc@l+4(r4)
290 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd2, i64 0, i64 4), align 1
291 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt2, i64 0, i64 4), align 1
295 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
296 define dso_local void @testGlob2PtrPlus16() {
297 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus16:
298 ; CHECK-P10-LE: # %bb.0: # %entry
299 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+16(0), 1
300 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+16(0), 1
301 ; CHECK-P10-LE-NEXT: blr
303 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus16:
304 ; CHECK-P10-BE: # %bb.0: # %entry
305 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+16
306 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+16
307 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
308 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+16(r4)
309 ; CHECK-P10-BE-NEXT: blr
311 ; CHECK-LABEL: testGlob2PtrPlus16:
312 ; CHECK: # %bb.0: # %entry
313 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+16
314 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+16
315 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
316 ; CHECK-NEXT: stb r3, GlobSt2@toc@l+16(r4)
319 %0 = load i8, ptr getelementptr inbounds ([20 x i8], ptr @GlobLd2, i64 0, i64 16), align 1
320 store i8 %0, ptr getelementptr inbounds ([20 x i8], ptr @GlobSt2, i64 0, i64 16), align 1
324 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
325 define dso_local void @testGlob2PtrPlusVar(i64 %Idx) {
326 ; CHECK-P10-LE-LABEL: testGlob2PtrPlusVar:
327 ; CHECK-P10-LE: # %bb.0: # %entry
328 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd2@PCREL, 1
329 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt2@PCREL, 1
330 ; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
331 ; CHECK-P10-LE-NEXT: stbx r4, r5, r3
332 ; CHECK-P10-LE-NEXT: blr
334 ; CHECK-P10-BE-LABEL: testGlob2PtrPlusVar:
335 ; CHECK-P10-BE: # %bb.0: # %entry
336 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd2@toc@ha
337 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt2@toc@ha
338 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd2@toc@l
339 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt2@toc@l
340 ; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
341 ; CHECK-P10-BE-NEXT: stbx r4, r5, r3
342 ; CHECK-P10-BE-NEXT: blr
344 ; CHECK-LABEL: testGlob2PtrPlusVar:
345 ; CHECK: # %bb.0: # %entry
346 ; CHECK-NEXT: addis r4, r2, GlobLd2@toc@ha
347 ; CHECK-NEXT: addis r5, r2, GlobSt2@toc@ha
348 ; CHECK-NEXT: addi r4, r4, GlobLd2@toc@l
349 ; CHECK-NEXT: addi r5, r5, GlobSt2@toc@l
350 ; CHECK-NEXT: lbzx r4, r4, r3
351 ; CHECK-NEXT: stbx r4, r5, r3
354 %arrayidx = getelementptr inbounds [20 x i8], ptr @GlobLd2, i64 0, i64 %Idx
355 %0 = load i8, ptr %arrayidx, align 1
356 %arrayidx1 = getelementptr inbounds [20 x i8], ptr @GlobSt2, i64 0, i64 %Idx
357 store i8 %0, ptr %arrayidx1, align 1
361 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
362 define dso_local void @testGlob3PtrPlus0() {
363 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus0:
364 ; CHECK-P10-LE: # %bb.0: # %entry
365 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL(0), 1
366 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL(0), 1
367 ; CHECK-P10-LE-NEXT: blr
369 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus0:
370 ; CHECK-P10-BE: # %bb.0: # %entry
371 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
372 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
373 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l(r3)
374 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l(r4)
375 ; CHECK-P10-BE-NEXT: blr
377 ; CHECK-LABEL: testGlob3PtrPlus0:
378 ; CHECK: # %bb.0: # %entry
379 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
380 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
381 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l(r3)
382 ; CHECK-NEXT: sth r3, GlobSt3@toc@l(r4)
385 %0 = load i16, ptr @GlobLd3, align 2
386 store i16 %0, ptr @GlobSt3, align 2
390 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
391 define dso_local void @testGlob3PtrPlus3() {
392 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus3:
393 ; CHECK-P10-LE: # %bb.0: # %entry
394 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+3(0), 1
395 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+3(0), 1
396 ; CHECK-P10-LE-NEXT: blr
398 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus3:
399 ; CHECK-P10-BE: # %bb.0: # %entry
400 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
401 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
402 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd3@toc@l
403 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt3@toc@l
404 ; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
405 ; CHECK-P10-BE-NEXT: sth r3, 3(r4)
406 ; CHECK-P10-BE-NEXT: blr
408 ; CHECK-LABEL: testGlob3PtrPlus3:
409 ; CHECK: # %bb.0: # %entry
410 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
411 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
412 ; CHECK-NEXT: addi r3, r3, GlobLd3@toc@l
413 ; CHECK-NEXT: addi r4, r4, GlobSt3@toc@l
414 ; CHECK-NEXT: lhz r3, 3(r3)
415 ; CHECK-NEXT: sth r3, 3(r4)
418 %0 = load i16, ptr getelementptr inbounds (i8, ptr @GlobLd3, i64 3), align 2
419 store i16 %0, ptr getelementptr inbounds (i8, ptr @GlobSt3, i64 3), align 2
423 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
424 define dso_local void @testGlob3PtrPlus4() {
425 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus4:
426 ; CHECK-P10-LE: # %bb.0: # %entry
427 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+4(0), 1
428 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+4(0), 1
429 ; CHECK-P10-LE-NEXT: blr
431 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus4:
432 ; CHECK-P10-BE: # %bb.0: # %entry
433 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+4
434 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+4
435 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
436 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+4(r4)
437 ; CHECK-P10-BE-NEXT: blr
439 ; CHECK-LABEL: testGlob3PtrPlus4:
440 ; CHECK: # %bb.0: # %entry
441 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+4
442 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+4
443 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
444 ; CHECK-NEXT: sth r3, GlobSt3@toc@l+4(r4)
447 %0 = load i16, ptr getelementptr inbounds ([20 x i16], ptr @GlobLd3, i64 0, i64 2), align 2
448 store i16 %0, ptr getelementptr inbounds ([20 x i16], ptr @GlobSt3, i64 0, i64 2), align 2
452 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
453 define dso_local void @testGlob3PtrPlus16() {
454 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus16:
455 ; CHECK-P10-LE: # %bb.0: # %entry
456 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+16(0), 1
457 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+16(0), 1
458 ; CHECK-P10-LE-NEXT: blr
460 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus16:
461 ; CHECK-P10-BE: # %bb.0: # %entry
462 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+16
463 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+16
464 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
465 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+16(r4)
466 ; CHECK-P10-BE-NEXT: blr
468 ; CHECK-LABEL: testGlob3PtrPlus16:
469 ; CHECK: # %bb.0: # %entry
470 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+16
471 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+16
472 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
473 ; CHECK-NEXT: sth r3, GlobSt3@toc@l+16(r4)
476 %0 = load i16, ptr getelementptr inbounds ([20 x i16], ptr @GlobLd3, i64 0, i64 8), align 2
477 store i16 %0, ptr getelementptr inbounds ([20 x i16], ptr @GlobSt3, i64 0, i64 8), align 2
481 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
482 define dso_local void @testGlob3PtrPlusVar(i64 %Idx) {
483 ; CHECK-P10-LE-LABEL: testGlob3PtrPlusVar:
484 ; CHECK-P10-LE: # %bb.0: # %entry
485 ; CHECK-P10-LE-NEXT: sldi r3, r3, 1
486 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd3@PCREL, 1
487 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt3@PCREL, 1
488 ; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
489 ; CHECK-P10-LE-NEXT: sthx r4, r5, r3
490 ; CHECK-P10-LE-NEXT: blr
492 ; CHECK-P10-BE-LABEL: testGlob3PtrPlusVar:
493 ; CHECK-P10-BE: # %bb.0: # %entry
494 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd3@toc@ha
495 ; CHECK-P10-BE-NEXT: sldi r3, r3, 1
496 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt3@toc@ha
497 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd3@toc@l
498 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt3@toc@l
499 ; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
500 ; CHECK-P10-BE-NEXT: sthx r4, r5, r3
501 ; CHECK-P10-BE-NEXT: blr
503 ; CHECK-LABEL: testGlob3PtrPlusVar:
504 ; CHECK: # %bb.0: # %entry
505 ; CHECK-NEXT: addis r4, r2, GlobLd3@toc@ha
506 ; CHECK-NEXT: sldi r3, r3, 1
507 ; CHECK-NEXT: addis r5, r2, GlobSt3@toc@ha
508 ; CHECK-NEXT: addi r4, r4, GlobLd3@toc@l
509 ; CHECK-NEXT: addi r5, r5, GlobSt3@toc@l
510 ; CHECK-NEXT: lhzx r4, r4, r3
511 ; CHECK-NEXT: sthx r4, r5, r3
514 %arrayidx = getelementptr inbounds [20 x i16], ptr @GlobLd3, i64 0, i64 %Idx
515 %0 = load i16, ptr %arrayidx, align 2
516 %arrayidx1 = getelementptr inbounds [20 x i16], ptr @GlobSt3, i64 0, i64 %Idx
517 store i16 %0, ptr %arrayidx1, align 2
521 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
522 define dso_local void @testGlob4PtrPlus0() {
523 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus0:
524 ; CHECK-P10-LE: # %bb.0: # %entry
525 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL(0), 1
526 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL(0), 1
527 ; CHECK-P10-LE-NEXT: blr
529 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus0:
530 ; CHECK-P10-BE: # %bb.0: # %entry
531 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
532 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
533 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l(r3)
534 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l(r4)
535 ; CHECK-P10-BE-NEXT: blr
537 ; CHECK-LABEL: testGlob4PtrPlus0:
538 ; CHECK: # %bb.0: # %entry
539 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
540 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
541 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l(r3)
542 ; CHECK-NEXT: sth r3, GlobSt4@toc@l(r4)
545 %0 = load i16, ptr @GlobLd4, align 2
546 store i16 %0, ptr @GlobSt4, align 2
550 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
551 define dso_local void @testGlob4PtrPlus3() {
552 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus3:
553 ; CHECK-P10-LE: # %bb.0: # %entry
554 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+3(0), 1
555 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+3(0), 1
556 ; CHECK-P10-LE-NEXT: blr
558 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus3:
559 ; CHECK-P10-BE: # %bb.0: # %entry
560 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
561 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
562 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd4@toc@l
563 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt4@toc@l
564 ; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
565 ; CHECK-P10-BE-NEXT: sth r3, 3(r4)
566 ; CHECK-P10-BE-NEXT: blr
568 ; CHECK-LABEL: testGlob4PtrPlus3:
569 ; CHECK: # %bb.0: # %entry
570 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
571 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
572 ; CHECK-NEXT: addi r3, r3, GlobLd4@toc@l
573 ; CHECK-NEXT: addi r4, r4, GlobSt4@toc@l
574 ; CHECK-NEXT: lhz r3, 3(r3)
575 ; CHECK-NEXT: sth r3, 3(r4)
578 %0 = load i16, ptr getelementptr inbounds (i8, ptr @GlobLd4, i64 3), align 2
579 store i16 %0, ptr getelementptr inbounds (i8, ptr @GlobSt4, i64 3), align 2
583 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
584 define dso_local void @testGlob4PtrPlus4() {
585 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus4:
586 ; CHECK-P10-LE: # %bb.0: # %entry
587 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+4(0), 1
588 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+4(0), 1
589 ; CHECK-P10-LE-NEXT: blr
591 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus4:
592 ; CHECK-P10-BE: # %bb.0: # %entry
593 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+4
594 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+4
595 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
596 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+4(r4)
597 ; CHECK-P10-BE-NEXT: blr
599 ; CHECK-LABEL: testGlob4PtrPlus4:
600 ; CHECK: # %bb.0: # %entry
601 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+4
602 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+4
603 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
604 ; CHECK-NEXT: sth r3, GlobSt4@toc@l+4(r4)
607 %0 = load i16, ptr getelementptr inbounds ([20 x i16], ptr @GlobLd4, i64 0, i64 2), align 2
608 store i16 %0, ptr getelementptr inbounds ([20 x i16], ptr @GlobSt4, i64 0, i64 2), align 2
612 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
613 define dso_local void @testGlob4PtrPlus16() {
614 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus16:
615 ; CHECK-P10-LE: # %bb.0: # %entry
616 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+16(0), 1
617 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+16(0), 1
618 ; CHECK-P10-LE-NEXT: blr
620 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus16:
621 ; CHECK-P10-BE: # %bb.0: # %entry
622 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+16
623 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+16
624 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
625 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+16(r4)
626 ; CHECK-P10-BE-NEXT: blr
628 ; CHECK-LABEL: testGlob4PtrPlus16:
629 ; CHECK: # %bb.0: # %entry
630 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+16
631 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+16
632 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
633 ; CHECK-NEXT: sth r3, GlobSt4@toc@l+16(r4)
636 %0 = load i16, ptr getelementptr inbounds ([20 x i16], ptr @GlobLd4, i64 0, i64 8), align 2
637 store i16 %0, ptr getelementptr inbounds ([20 x i16], ptr @GlobSt4, i64 0, i64 8), align 2
641 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
642 define dso_local void @testGlob4PtrPlusVar(i64 %Idx) {
643 ; CHECK-P10-LE-LABEL: testGlob4PtrPlusVar:
644 ; CHECK-P10-LE: # %bb.0: # %entry
645 ; CHECK-P10-LE-NEXT: sldi r3, r3, 1
646 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd4@PCREL, 1
647 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt4@PCREL, 1
648 ; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
649 ; CHECK-P10-LE-NEXT: sthx r4, r5, r3
650 ; CHECK-P10-LE-NEXT: blr
652 ; CHECK-P10-BE-LABEL: testGlob4PtrPlusVar:
653 ; CHECK-P10-BE: # %bb.0: # %entry
654 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd4@toc@ha
655 ; CHECK-P10-BE-NEXT: sldi r3, r3, 1
656 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt4@toc@ha
657 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd4@toc@l
658 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt4@toc@l
659 ; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
660 ; CHECK-P10-BE-NEXT: sthx r4, r5, r3
661 ; CHECK-P10-BE-NEXT: blr
663 ; CHECK-LABEL: testGlob4PtrPlusVar:
664 ; CHECK: # %bb.0: # %entry
665 ; CHECK-NEXT: addis r4, r2, GlobLd4@toc@ha
666 ; CHECK-NEXT: sldi r3, r3, 1
667 ; CHECK-NEXT: addis r5, r2, GlobSt4@toc@ha
668 ; CHECK-NEXT: addi r4, r4, GlobLd4@toc@l
669 ; CHECK-NEXT: addi r5, r5, GlobSt4@toc@l
670 ; CHECK-NEXT: lhzx r4, r4, r3
671 ; CHECK-NEXT: sthx r4, r5, r3
674 %arrayidx = getelementptr inbounds [20 x i16], ptr @GlobLd4, i64 0, i64 %Idx
675 %0 = load i16, ptr %arrayidx, align 2
676 %arrayidx1 = getelementptr inbounds [20 x i16], ptr @GlobSt4, i64 0, i64 %Idx
677 store i16 %0, ptr %arrayidx1, align 2
681 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
682 define dso_local void @testGlob5PtrPlus0() {
683 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus0:
684 ; CHECK-P10-LE: # %bb.0: # %entry
685 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL(0), 1
686 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL(0), 1
687 ; CHECK-P10-LE-NEXT: blr
689 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus0:
690 ; CHECK-P10-BE: # %bb.0: # %entry
691 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
692 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
693 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l(r3)
694 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l(r4)
695 ; CHECK-P10-BE-NEXT: blr
697 ; CHECK-LABEL: testGlob5PtrPlus0:
698 ; CHECK: # %bb.0: # %entry
699 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
700 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
701 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l(r3)
702 ; CHECK-NEXT: stw r3, GlobSt5@toc@l(r4)
705 %0 = load i32, ptr @GlobLd5, align 4
706 store i32 %0, ptr @GlobSt5, align 4
710 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
711 define dso_local void @testGlob5PtrPlus3() {
712 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus3:
713 ; CHECK-P10-LE: # %bb.0: # %entry
714 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+3(0), 1
715 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+3(0), 1
716 ; CHECK-P10-LE-NEXT: blr
718 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus3:
719 ; CHECK-P10-BE: # %bb.0: # %entry
720 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
721 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
722 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
723 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+3(r4)
724 ; CHECK-P10-BE-NEXT: blr
726 ; CHECK-LABEL: testGlob5PtrPlus3:
727 ; CHECK: # %bb.0: # %entry
728 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
729 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
730 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
731 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+3(r4)
734 %0 = load i32, ptr getelementptr inbounds (i8, ptr @GlobLd5, i64 3), align 4
735 store i32 %0, ptr getelementptr inbounds (i8, ptr @GlobSt5, i64 3), align 4
739 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
740 define dso_local void @testGlob5PtrPlus4() {
741 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus4:
742 ; CHECK-P10-LE: # %bb.0: # %entry
743 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+4(0), 1
744 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+4(0), 1
745 ; CHECK-P10-LE-NEXT: blr
747 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus4:
748 ; CHECK-P10-BE: # %bb.0: # %entry
749 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+4
750 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+4
751 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
752 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+4(r4)
753 ; CHECK-P10-BE-NEXT: blr
755 ; CHECK-LABEL: testGlob5PtrPlus4:
756 ; CHECK: # %bb.0: # %entry
757 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+4
758 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+4
759 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
760 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+4(r4)
763 %0 = load i32, ptr getelementptr inbounds ([20 x i32], ptr @GlobLd5, i64 0, i64 1), align 4
764 store i32 %0, ptr getelementptr inbounds ([20 x i32], ptr @GlobSt5, i64 0, i64 1), align 4
768 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
769 define dso_local void @testGlob5PtrPlus16() {
770 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus16:
771 ; CHECK-P10-LE: # %bb.0: # %entry
772 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+16(0), 1
773 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+16(0), 1
774 ; CHECK-P10-LE-NEXT: blr
776 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus16:
777 ; CHECK-P10-BE: # %bb.0: # %entry
778 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+16
779 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+16
780 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
781 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+16(r4)
782 ; CHECK-P10-BE-NEXT: blr
784 ; CHECK-LABEL: testGlob5PtrPlus16:
785 ; CHECK: # %bb.0: # %entry
786 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+16
787 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+16
788 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
789 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+16(r4)
792 %0 = load i32, ptr getelementptr inbounds ([20 x i32], ptr @GlobLd5, i64 0, i64 4), align 4
793 store i32 %0, ptr getelementptr inbounds ([20 x i32], ptr @GlobSt5, i64 0, i64 4), align 4
797 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
798 define dso_local void @testGlob5PtrPlusVar(i64 %Idx) {
799 ; CHECK-P10-LE-LABEL: testGlob5PtrPlusVar:
800 ; CHECK-P10-LE: # %bb.0: # %entry
801 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
802 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd5@PCREL, 1
803 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt5@PCREL, 1
804 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
805 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
806 ; CHECK-P10-LE-NEXT: blr
808 ; CHECK-P10-BE-LABEL: testGlob5PtrPlusVar:
809 ; CHECK-P10-BE: # %bb.0: # %entry
810 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd5@toc@ha
811 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
812 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt5@toc@ha
813 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd5@toc@l
814 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt5@toc@l
815 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
816 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
817 ; CHECK-P10-BE-NEXT: blr
819 ; CHECK-LABEL: testGlob5PtrPlusVar:
820 ; CHECK: # %bb.0: # %entry
821 ; CHECK-NEXT: addis r4, r2, GlobLd5@toc@ha
822 ; CHECK-NEXT: sldi r3, r3, 2
823 ; CHECK-NEXT: addis r5, r2, GlobSt5@toc@ha
824 ; CHECK-NEXT: addi r4, r4, GlobLd5@toc@l
825 ; CHECK-NEXT: addi r5, r5, GlobSt5@toc@l
826 ; CHECK-NEXT: lwzx r4, r4, r3
827 ; CHECK-NEXT: stwx r4, r5, r3
830 %arrayidx = getelementptr inbounds [20 x i32], ptr @GlobLd5, i64 0, i64 %Idx
831 %0 = load i32, ptr %arrayidx, align 4
832 %arrayidx1 = getelementptr inbounds [20 x i32], ptr @GlobSt5, i64 0, i64 %Idx
833 store i32 %0, ptr %arrayidx1, align 4
837 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
838 define dso_local void @testGlob6PtrPlus0() {
839 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus0:
840 ; CHECK-P10-LE: # %bb.0: # %entry
841 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL(0), 1
842 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL(0), 1
843 ; CHECK-P10-LE-NEXT: blr
845 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus0:
846 ; CHECK-P10-BE: # %bb.0: # %entry
847 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
848 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
849 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l(r3)
850 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l(r4)
851 ; CHECK-P10-BE-NEXT: blr
853 ; CHECK-LABEL: testGlob6PtrPlus0:
854 ; CHECK: # %bb.0: # %entry
855 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
856 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
857 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l(r3)
858 ; CHECK-NEXT: stw r3, GlobSt6@toc@l(r4)
861 %0 = load i32, ptr @GlobLd6, align 4
862 store i32 %0, ptr @GlobSt6, align 4
866 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
867 define dso_local void @testGlob6PtrPlus3() {
868 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus3:
869 ; CHECK-P10-LE: # %bb.0: # %entry
870 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+3(0), 1
871 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+3(0), 1
872 ; CHECK-P10-LE-NEXT: blr
874 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus3:
875 ; CHECK-P10-BE: # %bb.0: # %entry
876 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
877 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
878 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
879 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+3(r4)
880 ; CHECK-P10-BE-NEXT: blr
882 ; CHECK-LABEL: testGlob6PtrPlus3:
883 ; CHECK: # %bb.0: # %entry
884 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
885 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
886 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
887 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+3(r4)
890 %0 = load i32, ptr getelementptr inbounds (i8, ptr @GlobLd6, i64 3), align 4
891 store i32 %0, ptr getelementptr inbounds (i8, ptr @GlobSt6, i64 3), align 4
895 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
896 define dso_local void @testGlob6PtrPlus4() {
897 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus4:
898 ; CHECK-P10-LE: # %bb.0: # %entry
899 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+4(0), 1
900 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+4(0), 1
901 ; CHECK-P10-LE-NEXT: blr
903 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus4:
904 ; CHECK-P10-BE: # %bb.0: # %entry
905 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+4
906 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+4
907 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
908 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+4(r4)
909 ; CHECK-P10-BE-NEXT: blr
911 ; CHECK-LABEL: testGlob6PtrPlus4:
912 ; CHECK: # %bb.0: # %entry
913 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+4
914 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+4
915 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
916 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+4(r4)
919 %0 = load i32, ptr getelementptr inbounds ([20 x i32], ptr @GlobLd6, i64 0, i64 1), align 4
920 store i32 %0, ptr getelementptr inbounds ([20 x i32], ptr @GlobSt6, i64 0, i64 1), align 4
924 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
925 define dso_local void @testGlob6PtrPlus16() {
926 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus16:
927 ; CHECK-P10-LE: # %bb.0: # %entry
928 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+16(0), 1
929 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+16(0), 1
930 ; CHECK-P10-LE-NEXT: blr
932 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus16:
933 ; CHECK-P10-BE: # %bb.0: # %entry
934 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+16
935 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+16
936 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
937 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+16(r4)
938 ; CHECK-P10-BE-NEXT: blr
940 ; CHECK-LABEL: testGlob6PtrPlus16:
941 ; CHECK: # %bb.0: # %entry
942 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+16
943 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+16
944 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
945 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+16(r4)
948 %0 = load i32, ptr getelementptr inbounds ([20 x i32], ptr @GlobLd6, i64 0, i64 4), align 4
949 store i32 %0, ptr getelementptr inbounds ([20 x i32], ptr @GlobSt6, i64 0, i64 4), align 4
953 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
954 define dso_local void @testGlob6PtrPlusVar(i64 %Idx) {
955 ; CHECK-P10-LE-LABEL: testGlob6PtrPlusVar:
956 ; CHECK-P10-LE: # %bb.0: # %entry
957 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
958 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd6@PCREL, 1
959 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt6@PCREL, 1
960 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
961 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
962 ; CHECK-P10-LE-NEXT: blr
964 ; CHECK-P10-BE-LABEL: testGlob6PtrPlusVar:
965 ; CHECK-P10-BE: # %bb.0: # %entry
966 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd6@toc@ha
967 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
968 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt6@toc@ha
969 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd6@toc@l
970 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt6@toc@l
971 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
972 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
973 ; CHECK-P10-BE-NEXT: blr
975 ; CHECK-LABEL: testGlob6PtrPlusVar:
976 ; CHECK: # %bb.0: # %entry
977 ; CHECK-NEXT: addis r4, r2, GlobLd6@toc@ha
978 ; CHECK-NEXT: sldi r3, r3, 2
979 ; CHECK-NEXT: addis r5, r2, GlobSt6@toc@ha
980 ; CHECK-NEXT: addi r4, r4, GlobLd6@toc@l
981 ; CHECK-NEXT: addi r5, r5, GlobSt6@toc@l
982 ; CHECK-NEXT: lwzx r4, r4, r3
983 ; CHECK-NEXT: stwx r4, r5, r3
986 %arrayidx = getelementptr inbounds [20 x i32], ptr @GlobLd6, i64 0, i64 %Idx
987 %0 = load i32, ptr %arrayidx, align 4
988 %arrayidx1 = getelementptr inbounds [20 x i32], ptr @GlobSt6, i64 0, i64 %Idx
989 store i32 %0, ptr %arrayidx1, align 4
993 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
994 define dso_local void @testGlob7PtrPlus0() {
995 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus0:
996 ; CHECK-P10-LE: # %bb.0: # %entry
997 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL(0), 1
998 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL(0), 1
999 ; CHECK-P10-LE-NEXT: blr
1001 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus0:
1002 ; CHECK-P10-BE: # %bb.0: # %entry
1003 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
1004 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
1005 ; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l(r3)
1006 ; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l(r4)
1007 ; CHECK-P10-BE-NEXT: blr
1009 ; CHECK-P9-LABEL: testGlob7PtrPlus0:
1010 ; CHECK-P9: # %bb.0: # %entry
1011 ; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
1012 ; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
1013 ; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l(r3)
1014 ; CHECK-P9-NEXT: std r3, GlobSt7@toc@l(r4)
1015 ; CHECK-P9-NEXT: blr
1017 ; CHECK-P8-LABEL: testGlob7PtrPlus0:
1018 ; CHECK-P8: # %bb.0: # %entry
1019 ; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
1020 ; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l(r3)
1021 ; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
1022 ; CHECK-P8-NEXT: std r3, GlobSt7@toc@l(r4)
1023 ; CHECK-P8-NEXT: blr
1025 %0 = load i64, ptr @GlobLd7, align 8
1026 store i64 %0, ptr @GlobSt7, align 8
1030 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1031 define dso_local void @testGlob7PtrPlus3() {
1032 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus3:
1033 ; CHECK-P10-LE: # %bb.0: # %entry
1034 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+3(0), 1
1035 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+3(0), 1
1036 ; CHECK-P10-LE-NEXT: blr
1038 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus3:
1039 ; CHECK-P10-BE: # %bb.0: # %entry
1040 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
1041 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
1042 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd7@toc@l
1043 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt7@toc@l
1044 ; CHECK-P10-BE-NEXT: pld r3, 3(r3), 0
1045 ; CHECK-P10-BE-NEXT: pstd r3, 3(r4), 0
1046 ; CHECK-P10-BE-NEXT: blr
1048 ; CHECK-LABEL: testGlob7PtrPlus3:
1049 ; CHECK: # %bb.0: # %entry
1050 ; CHECK-NEXT: addis r3, r2, GlobLd7@toc@ha
1051 ; CHECK-NEXT: li r4, 3
1052 ; CHECK-NEXT: addis r5, r2, GlobSt7@toc@ha
1053 ; CHECK-NEXT: addi r3, r3, GlobLd7@toc@l
1054 ; CHECK-NEXT: addi r5, r5, GlobSt7@toc@l
1055 ; CHECK-NEXT: ldx r3, r3, r4
1056 ; CHECK-NEXT: stdx r3, r5, r4
1059 %0 = load i64, ptr getelementptr inbounds (i8, ptr @GlobLd7, i64 3), align 8
1060 store i64 %0, ptr getelementptr inbounds (i8, ptr @GlobSt7, i64 3), align 8
1064 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1065 define dso_local void @testGlob7PtrPlus4() {
1066 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus4:
1067 ; CHECK-P10-LE: # %bb.0: # %entry
1068 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+4(0), 1
1069 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+4(0), 1
1070 ; CHECK-P10-LE-NEXT: blr
1072 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus4:
1073 ; CHECK-P10-BE: # %bb.0: # %entry
1074 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
1075 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
1076 ; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l+4(r3)
1077 ; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l+4(r4)
1078 ; CHECK-P10-BE-NEXT: blr
1080 ; CHECK-P9-LABEL: testGlob7PtrPlus4:
1081 ; CHECK-P9: # %bb.0: # %entry
1082 ; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
1083 ; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
1084 ; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l+4(r3)
1085 ; CHECK-P9-NEXT: std r3, GlobSt7@toc@l+4(r4)
1086 ; CHECK-P9-NEXT: blr
1088 ; CHECK-P8-LABEL: testGlob7PtrPlus4:
1089 ; CHECK-P8: # %bb.0: # %entry
1090 ; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
1091 ; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l+4(r3)
1092 ; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
1093 ; CHECK-P8-NEXT: std r3, GlobSt7@toc@l+4(r4)
1094 ; CHECK-P8-NEXT: blr
1096 %0 = load i64, ptr getelementptr inbounds (i8, ptr @GlobLd7, i64 4), align 8
1097 store i64 %0, ptr getelementptr inbounds (i8, ptr @GlobSt7, i64 4), align 8
1101 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1102 define dso_local void @testGlob7PtrPlus16() {
1103 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus16:
1104 ; CHECK-P10-LE: # %bb.0: # %entry
1105 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+16(0), 1
1106 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+16(0), 1
1107 ; CHECK-P10-LE-NEXT: blr
1109 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus16:
1110 ; CHECK-P10-BE: # %bb.0: # %entry
1111 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha+16
1112 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha+16
1113 ; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l+16(r3)
1114 ; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l+16(r4)
1115 ; CHECK-P10-BE-NEXT: blr
1117 ; CHECK-P9-LABEL: testGlob7PtrPlus16:
1118 ; CHECK-P9: # %bb.0: # %entry
1119 ; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha+16
1120 ; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha+16
1121 ; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l+16(r3)
1122 ; CHECK-P9-NEXT: std r3, GlobSt7@toc@l+16(r4)
1123 ; CHECK-P9-NEXT: blr
1125 ; CHECK-P8-LABEL: testGlob7PtrPlus16:
1126 ; CHECK-P8: # %bb.0: # %entry
1127 ; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha+16
1128 ; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l+16(r3)
1129 ; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha+16
1130 ; CHECK-P8-NEXT: std r3, GlobSt7@toc@l+16(r4)
1131 ; CHECK-P8-NEXT: blr
1133 %0 = load i64, ptr getelementptr inbounds ([20 x i64], ptr @GlobLd7, i64 0, i64 2), align 8
1134 store i64 %0, ptr getelementptr inbounds ([20 x i64], ptr @GlobSt7, i64 0, i64 2), align 8
1138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1139 define dso_local void @testGlob7PtrPlusVar(i64 %Idx) {
1140 ; CHECK-P10-LE-LABEL: testGlob7PtrPlusVar:
1141 ; CHECK-P10-LE: # %bb.0: # %entry
1142 ; CHECK-P10-LE-NEXT: sldi r3, r3, 3
1143 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd7@PCREL, 1
1144 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt7@PCREL, 1
1145 ; CHECK-P10-LE-NEXT: ldx r4, r4, r3
1146 ; CHECK-P10-LE-NEXT: stdx r4, r5, r3
1147 ; CHECK-P10-LE-NEXT: blr
1149 ; CHECK-P10-BE-LABEL: testGlob7PtrPlusVar:
1150 ; CHECK-P10-BE: # %bb.0: # %entry
1151 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd7@toc@ha
1152 ; CHECK-P10-BE-NEXT: sldi r3, r3, 3
1153 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt7@toc@ha
1154 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd7@toc@l
1155 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt7@toc@l
1156 ; CHECK-P10-BE-NEXT: ldx r4, r4, r3
1157 ; CHECK-P10-BE-NEXT: stdx r4, r5, r3
1158 ; CHECK-P10-BE-NEXT: blr
1160 ; CHECK-LABEL: testGlob7PtrPlusVar:
1161 ; CHECK: # %bb.0: # %entry
1162 ; CHECK-NEXT: addis r4, r2, GlobLd7@toc@ha
1163 ; CHECK-NEXT: sldi r3, r3, 3
1164 ; CHECK-NEXT: addis r5, r2, GlobSt7@toc@ha
1165 ; CHECK-NEXT: addi r4, r4, GlobLd7@toc@l
1166 ; CHECK-NEXT: addi r5, r5, GlobSt7@toc@l
1167 ; CHECK-NEXT: ldx r4, r4, r3
1168 ; CHECK-NEXT: stdx r4, r5, r3
1171 %arrayidx = getelementptr inbounds [20 x i64], ptr @GlobLd7, i64 0, i64 %Idx
1172 %0 = load i64, ptr %arrayidx, align 8
1173 %arrayidx1 = getelementptr inbounds [20 x i64], ptr @GlobSt7, i64 0, i64 %Idx
1174 store i64 %0, ptr %arrayidx1, align 8
1178 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1179 define dso_local void @testGlob8PtrPlus0() {
1180 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus0:
1181 ; CHECK-P10-LE: # %bb.0: # %entry
1182 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL(0), 1
1183 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL(0), 1
1184 ; CHECK-P10-LE-NEXT: blr
1186 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus0:
1187 ; CHECK-P10-BE: # %bb.0: # %entry
1188 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
1189 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
1190 ; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l(r3)
1191 ; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l(r4)
1192 ; CHECK-P10-BE-NEXT: blr
1194 ; CHECK-P9-LABEL: testGlob8PtrPlus0:
1195 ; CHECK-P9: # %bb.0: # %entry
1196 ; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha
1197 ; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha
1198 ; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l(r3)
1199 ; CHECK-P9-NEXT: std r3, GlobSt8@toc@l(r4)
1200 ; CHECK-P9-NEXT: blr
1202 ; CHECK-P8-LABEL: testGlob8PtrPlus0:
1203 ; CHECK-P8: # %bb.0: # %entry
1204 ; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha
1205 ; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l(r3)
1206 ; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha
1207 ; CHECK-P8-NEXT: std r3, GlobSt8@toc@l(r4)
1208 ; CHECK-P8-NEXT: blr
1210 %0 = load i64, ptr @GlobLd8, align 8
1211 store i64 %0, ptr @GlobSt8, align 8
1215 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1216 define dso_local void @testGlob8PtrPlus3() {
1217 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus3:
1218 ; CHECK-P10-LE: # %bb.0: # %entry
1219 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+3(0), 1
1220 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+3(0), 1
1221 ; CHECK-P10-LE-NEXT: blr
1223 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus3:
1224 ; CHECK-P10-BE: # %bb.0: # %entry
1225 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
1226 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
1227 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd8@toc@l
1228 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt8@toc@l
1229 ; CHECK-P10-BE-NEXT: pld r3, 3(r3), 0
1230 ; CHECK-P10-BE-NEXT: pstd r3, 3(r4), 0
1231 ; CHECK-P10-BE-NEXT: blr
1233 ; CHECK-LABEL: testGlob8PtrPlus3:
1234 ; CHECK: # %bb.0: # %entry
1235 ; CHECK-NEXT: addis r3, r2, GlobLd8@toc@ha
1236 ; CHECK-NEXT: li r4, 3
1237 ; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
1238 ; CHECK-NEXT: addi r3, r3, GlobLd8@toc@l
1239 ; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
1240 ; CHECK-NEXT: ldx r3, r3, r4
1241 ; CHECK-NEXT: stdx r3, r5, r4
1244 %0 = load i64, ptr getelementptr inbounds (i8, ptr @GlobLd8, i64 3), align 8
1245 store i64 %0, ptr getelementptr inbounds (i8, ptr @GlobSt8, i64 3), align 8
1249 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1250 define dso_local void @testGlob8PtrPlus4() {
1251 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus4:
1252 ; CHECK-P10-LE: # %bb.0: # %entry
1253 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+4(0), 1
1254 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+4(0), 1
1255 ; CHECK-P10-LE-NEXT: blr
1257 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus4:
1258 ; CHECK-P10-BE: # %bb.0: # %entry
1259 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
1260 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
1261 ; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1262 ; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+4(r4)
1263 ; CHECK-P10-BE-NEXT: blr
1265 ; CHECK-P9-LABEL: testGlob8PtrPlus4:
1266 ; CHECK-P9: # %bb.0: # %entry
1267 ; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha
1268 ; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha
1269 ; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1270 ; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+4(r4)
1271 ; CHECK-P9-NEXT: blr
1273 ; CHECK-P8-LABEL: testGlob8PtrPlus4:
1274 ; CHECK-P8: # %bb.0: # %entry
1275 ; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha
1276 ; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1277 ; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha
1278 ; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+4(r4)
1279 ; CHECK-P8-NEXT: blr
1281 %0 = load i64, ptr getelementptr inbounds (i8, ptr @GlobLd8, i64 4), align 8
1282 store i64 %0, ptr getelementptr inbounds (i8, ptr @GlobSt8, i64 4), align 8
1286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1287 define dso_local void @testGlob8PtrPlus16() {
1288 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus16:
1289 ; CHECK-P10-LE: # %bb.0: # %entry
1290 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+16(0), 1
1291 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+16(0), 1
1292 ; CHECK-P10-LE-NEXT: blr
1294 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus16:
1295 ; CHECK-P10-BE: # %bb.0: # %entry
1296 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1297 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1298 ; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1299 ; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+16(r4)
1300 ; CHECK-P10-BE-NEXT: blr
1302 ; CHECK-P9-LABEL: testGlob8PtrPlus16:
1303 ; CHECK-P9: # %bb.0: # %entry
1304 ; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1305 ; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1306 ; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1307 ; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+16(r4)
1308 ; CHECK-P9-NEXT: blr
1310 ; CHECK-P8-LABEL: testGlob8PtrPlus16:
1311 ; CHECK-P8: # %bb.0: # %entry
1312 ; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1313 ; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1314 ; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1315 ; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+16(r4)
1316 ; CHECK-P8-NEXT: blr
1318 %0 = load i64, ptr getelementptr inbounds ([20 x i64], ptr @GlobLd8, i64 0, i64 2), align 8
1319 store i64 %0, ptr getelementptr inbounds ([20 x i64], ptr @GlobSt8, i64 0, i64 2), align 8
1323 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1324 define dso_local void @testGlob8PtrPlusVar(i64 %Idx) {
1325 ; CHECK-P10-LE-LABEL: testGlob8PtrPlusVar:
1326 ; CHECK-P10-LE: # %bb.0: # %entry
1327 ; CHECK-P10-LE-NEXT: sldi r3, r3, 3
1328 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd8@PCREL, 1
1329 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt8@PCREL, 1
1330 ; CHECK-P10-LE-NEXT: ldx r4, r4, r3
1331 ; CHECK-P10-LE-NEXT: stdx r4, r5, r3
1332 ; CHECK-P10-LE-NEXT: blr
1334 ; CHECK-P10-BE-LABEL: testGlob8PtrPlusVar:
1335 ; CHECK-P10-BE: # %bb.0: # %entry
1336 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd8@toc@ha
1337 ; CHECK-P10-BE-NEXT: sldi r3, r3, 3
1338 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt8@toc@ha
1339 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd8@toc@l
1340 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt8@toc@l
1341 ; CHECK-P10-BE-NEXT: ldx r4, r4, r3
1342 ; CHECK-P10-BE-NEXT: stdx r4, r5, r3
1343 ; CHECK-P10-BE-NEXT: blr
1345 ; CHECK-LABEL: testGlob8PtrPlusVar:
1346 ; CHECK: # %bb.0: # %entry
1347 ; CHECK-NEXT: addis r4, r2, GlobLd8@toc@ha
1348 ; CHECK-NEXT: sldi r3, r3, 3
1349 ; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
1350 ; CHECK-NEXT: addi r4, r4, GlobLd8@toc@l
1351 ; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
1352 ; CHECK-NEXT: ldx r4, r4, r3
1353 ; CHECK-NEXT: stdx r4, r5, r3
1356 %arrayidx = getelementptr inbounds [20 x i64], ptr @GlobLd8, i64 0, i64 %Idx
1357 %0 = load i64, ptr %arrayidx, align 8
1358 %arrayidx1 = getelementptr inbounds [20 x i64], ptr @GlobSt8, i64 0, i64 %Idx
1359 store i64 %0, ptr %arrayidx1, align 8
1363 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1364 define dso_local void @testGlob9PtrPlus0() {
1365 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus0:
1366 ; CHECK-P10-LE: # %bb.0: # %entry
1367 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL(0), 1
1368 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL(0), 1
1369 ; CHECK-P10-LE-NEXT: blr
1371 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus0:
1372 ; CHECK-P10-BE: # %bb.0: # %entry
1373 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
1374 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
1375 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l(r3)
1376 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l(r4)
1377 ; CHECK-P10-BE-NEXT: blr
1379 ; CHECK-LABEL: testGlob9PtrPlus0:
1380 ; CHECK: # %bb.0: # %entry
1381 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
1382 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
1383 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l(r3)
1384 ; CHECK-NEXT: stw r3, GlobSt9@toc@l(r4)
1387 %0 = load float, ptr @GlobLd9, align 4
1388 store float %0, ptr @GlobSt9, align 4
1392 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1393 define dso_local void @testGlob9PtrPlus3() {
1394 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus3:
1395 ; CHECK-P10-LE: # %bb.0: # %entry
1396 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+3(0), 1
1397 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+3(0), 1
1398 ; CHECK-P10-LE-NEXT: blr
1400 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus3:
1401 ; CHECK-P10-BE: # %bb.0: # %entry
1402 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
1403 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
1404 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
1405 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+3(r4)
1406 ; CHECK-P10-BE-NEXT: blr
1408 ; CHECK-LABEL: testGlob9PtrPlus3:
1409 ; CHECK: # %bb.0: # %entry
1410 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
1411 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
1412 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
1413 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+3(r4)
1416 %0 = load float, ptr getelementptr inbounds (i8, ptr @GlobLd9, i64 3), align 4
1417 store float %0, ptr getelementptr inbounds (i8, ptr @GlobSt9, i64 3), align 4
1421 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1422 define dso_local void @testGlob9PtrPlus4() {
1423 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus4:
1424 ; CHECK-P10-LE: # %bb.0: # %entry
1425 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+4(0), 1
1426 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+4(0), 1
1427 ; CHECK-P10-LE-NEXT: blr
1429 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus4:
1430 ; CHECK-P10-BE: # %bb.0: # %entry
1431 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+4
1432 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+4
1433 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
1434 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+4(r4)
1435 ; CHECK-P10-BE-NEXT: blr
1437 ; CHECK-LABEL: testGlob9PtrPlus4:
1438 ; CHECK: # %bb.0: # %entry
1439 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+4
1440 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+4
1441 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
1442 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+4(r4)
1445 %0 = load float, ptr getelementptr inbounds ([20 x float], ptr @GlobLd9, i64 0, i64 1), align 4
1446 store float %0, ptr getelementptr inbounds ([20 x float], ptr @GlobSt9, i64 0, i64 1), align 4
1450 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1451 define dso_local void @testGlob9PtrPlus16() {
1452 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus16:
1453 ; CHECK-P10-LE: # %bb.0: # %entry
1454 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+16(0), 1
1455 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+16(0), 1
1456 ; CHECK-P10-LE-NEXT: blr
1458 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus16:
1459 ; CHECK-P10-BE: # %bb.0: # %entry
1460 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+16
1461 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+16
1462 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
1463 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+16(r4)
1464 ; CHECK-P10-BE-NEXT: blr
1466 ; CHECK-LABEL: testGlob9PtrPlus16:
1467 ; CHECK: # %bb.0: # %entry
1468 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+16
1469 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+16
1470 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
1471 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+16(r4)
1474 %0 = load float, ptr getelementptr inbounds ([20 x float], ptr @GlobLd9, i64 0, i64 4), align 4
1475 store float %0, ptr getelementptr inbounds ([20 x float], ptr @GlobSt9, i64 0, i64 4), align 4
1479 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1480 define dso_local void @testGlob9PtrPlusVar(i64 %Idx) {
1481 ; CHECK-P10-LE-LABEL: testGlob9PtrPlusVar:
1482 ; CHECK-P10-LE: # %bb.0: # %entry
1483 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
1484 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd9@PCREL, 1
1485 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt9@PCREL, 1
1486 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
1487 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
1488 ; CHECK-P10-LE-NEXT: blr
1490 ; CHECK-P10-BE-LABEL: testGlob9PtrPlusVar:
1491 ; CHECK-P10-BE: # %bb.0: # %entry
1492 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd9@toc@ha
1493 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
1494 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt9@toc@ha
1495 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd9@toc@l
1496 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt9@toc@l
1497 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
1498 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
1499 ; CHECK-P10-BE-NEXT: blr
1501 ; CHECK-LABEL: testGlob9PtrPlusVar:
1502 ; CHECK: # %bb.0: # %entry
1503 ; CHECK-NEXT: addis r4, r2, GlobLd9@toc@ha
1504 ; CHECK-NEXT: sldi r3, r3, 2
1505 ; CHECK-NEXT: addis r5, r2, GlobSt9@toc@ha
1506 ; CHECK-NEXT: addi r4, r4, GlobLd9@toc@l
1507 ; CHECK-NEXT: addi r5, r5, GlobSt9@toc@l
1508 ; CHECK-NEXT: lwzx r4, r4, r3
1509 ; CHECK-NEXT: stwx r4, r5, r3
1512 %arrayidx = getelementptr inbounds [20 x float], ptr @GlobLd9, i64 0, i64 %Idx
1513 %0 = load float, ptr %arrayidx, align 4
1514 %arrayidx1 = getelementptr inbounds [20 x float], ptr @GlobSt9, i64 0, i64 %Idx
1515 store float %0, ptr %arrayidx1, align 4
1519 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1520 define dso_local void @testGlob10PtrPlus0() {
1521 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus0:
1522 ; CHECK-P10-LE: # %bb.0: # %entry
1523 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL(0), 1
1524 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL(0), 1
1525 ; CHECK-P10-LE-NEXT: blr
1527 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus0:
1528 ; CHECK-P10-BE: # %bb.0: # %entry
1529 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1530 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
1531 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l(r3)
1532 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l(r4)
1533 ; CHECK-P10-BE-NEXT: blr
1535 ; CHECK-P9-LABEL: testGlob10PtrPlus0:
1536 ; CHECK-P9: # %bb.0: # %entry
1537 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
1538 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
1539 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l(r3)
1540 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l(r4)
1541 ; CHECK-P9-NEXT: blr
1543 ; CHECK-P8-LABEL: testGlob10PtrPlus0:
1544 ; CHECK-P8: # %bb.0: # %entry
1545 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
1546 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l(r3)
1547 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
1548 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l(r4)
1549 ; CHECK-P8-NEXT: blr
1551 %0 = load double, ptr @GlobLd10, align 8
1552 store double %0, ptr @GlobSt10, align 8
1556 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1557 define dso_local void @testGlob10PtrPlus3() {
1558 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus3:
1559 ; CHECK-P10-LE: # %bb.0: # %entry
1560 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+3(0), 1
1561 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+3(0), 1
1562 ; CHECK-P10-LE-NEXT: blr
1564 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus3:
1565 ; CHECK-P10-BE: # %bb.0: # %entry
1566 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1567 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
1568 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd10@toc@l
1569 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt10@toc@l
1570 ; CHECK-P10-BE-NEXT: pld r3, 3(r3), 0
1571 ; CHECK-P10-BE-NEXT: pstd r3, 3(r4), 0
1572 ; CHECK-P10-BE-NEXT: blr
1574 ; CHECK-LABEL: testGlob10PtrPlus3:
1575 ; CHECK: # %bb.0: # %entry
1576 ; CHECK-NEXT: addis r3, r2, GlobLd10@toc@ha
1577 ; CHECK-NEXT: li r4, 3
1578 ; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
1579 ; CHECK-NEXT: addi r3, r3, GlobLd10@toc@l
1580 ; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
1581 ; CHECK-NEXT: ldx r3, r3, r4
1582 ; CHECK-NEXT: stdx r3, r5, r4
1585 %0 = load double, ptr getelementptr inbounds (i8, ptr @GlobLd10, i64 3), align 8
1586 store double %0, ptr getelementptr inbounds (i8, ptr @GlobSt10, i64 3), align 8
1590 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1591 define dso_local void @testGlob10PtrPlus4() {
1592 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus4:
1593 ; CHECK-P10-LE: # %bb.0: # %entry
1594 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+4(0), 1
1595 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+4(0), 1
1596 ; CHECK-P10-LE-NEXT: blr
1598 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus4:
1599 ; CHECK-P10-BE: # %bb.0: # %entry
1600 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1601 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
1602 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1603 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+4(r4)
1604 ; CHECK-P10-BE-NEXT: blr
1606 ; CHECK-P9-LABEL: testGlob10PtrPlus4:
1607 ; CHECK-P9: # %bb.0: # %entry
1608 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
1609 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
1610 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1611 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+4(r4)
1612 ; CHECK-P9-NEXT: blr
1614 ; CHECK-P8-LABEL: testGlob10PtrPlus4:
1615 ; CHECK-P8: # %bb.0: # %entry
1616 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
1617 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1618 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
1619 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+4(r4)
1620 ; CHECK-P8-NEXT: blr
1622 %0 = load double, ptr getelementptr inbounds (i8, ptr @GlobLd10, i64 4), align 8
1623 store double %0, ptr getelementptr inbounds (i8, ptr @GlobSt10, i64 4), align 8
1627 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1628 define dso_local void @testGlob10PtrPlus16() {
1629 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus16:
1630 ; CHECK-P10-LE: # %bb.0: # %entry
1631 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+16(0), 1
1632 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+16(0), 1
1633 ; CHECK-P10-LE-NEXT: blr
1635 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus16:
1636 ; CHECK-P10-BE: # %bb.0: # %entry
1637 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1638 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1639 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1640 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+16(r4)
1641 ; CHECK-P10-BE-NEXT: blr
1643 ; CHECK-P9-LABEL: testGlob10PtrPlus16:
1644 ; CHECK-P9: # %bb.0: # %entry
1645 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1646 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1647 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1648 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+16(r4)
1649 ; CHECK-P9-NEXT: blr
1651 ; CHECK-P8-LABEL: testGlob10PtrPlus16:
1652 ; CHECK-P8: # %bb.0: # %entry
1653 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1654 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1655 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1656 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+16(r4)
1657 ; CHECK-P8-NEXT: blr
1659 %0 = load double, ptr getelementptr inbounds ([20 x double], ptr @GlobLd10, i64 0, i64 2), align 8
1660 store double %0, ptr getelementptr inbounds ([20 x double], ptr @GlobSt10, i64 0, i64 2), align 8
1664 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1665 define dso_local void @testGlob10PtrPlusVar(i64 %Idx) {
1666 ; CHECK-P10-LE-LABEL: testGlob10PtrPlusVar:
1667 ; CHECK-P10-LE: # %bb.0: # %entry
1668 ; CHECK-P10-LE-NEXT: sldi r3, r3, 3
1669 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd10@PCREL, 1
1670 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt10@PCREL, 1
1671 ; CHECK-P10-LE-NEXT: ldx r4, r4, r3
1672 ; CHECK-P10-LE-NEXT: stdx r4, r5, r3
1673 ; CHECK-P10-LE-NEXT: blr
1675 ; CHECK-P10-BE-LABEL: testGlob10PtrPlusVar:
1676 ; CHECK-P10-BE: # %bb.0: # %entry
1677 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd10@toc@ha
1678 ; CHECK-P10-BE-NEXT: sldi r3, r3, 3
1679 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt10@toc@ha
1680 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd10@toc@l
1681 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt10@toc@l
1682 ; CHECK-P10-BE-NEXT: ldx r4, r4, r3
1683 ; CHECK-P10-BE-NEXT: stdx r4, r5, r3
1684 ; CHECK-P10-BE-NEXT: blr
1686 ; CHECK-LABEL: testGlob10PtrPlusVar:
1687 ; CHECK: # %bb.0: # %entry
1688 ; CHECK-NEXT: addis r4, r2, GlobLd10@toc@ha
1689 ; CHECK-NEXT: sldi r3, r3, 3
1690 ; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
1691 ; CHECK-NEXT: addi r4, r4, GlobLd10@toc@l
1692 ; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
1693 ; CHECK-NEXT: ldx r4, r4, r3
1694 ; CHECK-NEXT: stdx r4, r5, r3
1697 %arrayidx = getelementptr inbounds [20 x double], ptr @GlobLd10, i64 0, i64 %Idx
1698 %0 = load double, ptr %arrayidx, align 8
1699 %arrayidx1 = getelementptr inbounds [20 x double], ptr @GlobSt10, i64 0, i64 %Idx
1700 store double %0, ptr %arrayidx1, align 8
1704 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1705 define dso_local void @testGlob11PtrPlus0() {
1706 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus0:
1707 ; CHECK-P10-LE: # %bb.0: # %entry
1708 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL(0), 1
1709 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL(0), 1
1710 ; CHECK-P10-LE-NEXT: blr
1712 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus0:
1713 ; CHECK-P10-BE: # %bb.0: # %entry
1714 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1715 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1716 ; CHECK-P10-BE-NEXT: lxv vs0, 0(r3)
1717 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1718 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1719 ; CHECK-P10-BE-NEXT: stxv vs0, 0(r3)
1720 ; CHECK-P10-BE-NEXT: blr
1722 ; CHECK-P9-LABEL: testGlob11PtrPlus0:
1723 ; CHECK-P9: # %bb.0: # %entry
1724 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1725 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1726 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
1727 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1728 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1729 ; CHECK-P9-NEXT: stxv vs0, 0(r3)
1730 ; CHECK-P9-NEXT: blr
1732 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus0:
1733 ; CHECK-P8-LE: # %bb.0: # %entry
1734 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1735 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1736 ; CHECK-P8-LE-NEXT: lxvd2x vs0, 0, r3
1737 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1738 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1739 ; CHECK-P8-LE-NEXT: stxvd2x vs0, 0, r3
1740 ; CHECK-P8-LE-NEXT: blr
1742 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus0:
1743 ; CHECK-P8-BE: # %bb.0: # %entry
1744 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1745 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1746 ; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
1747 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1748 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1749 ; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
1750 ; CHECK-P8-BE-NEXT: blr
1752 %0 = load <16 x i8>, ptr @GlobLd11, align 16
1753 store <16 x i8> %0, ptr @GlobSt11, align 16
1757 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1758 define dso_local void @testGlob11PtrPlus3() {
1759 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus3:
1760 ; CHECK-P10-LE: # %bb.0: # %entry
1761 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+3(0), 1
1762 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+3(0), 1
1763 ; CHECK-P10-LE-NEXT: blr
1765 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus3:
1766 ; CHECK-P10-BE: # %bb.0: # %entry
1767 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1768 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1769 ; CHECK-P10-BE-NEXT: plxv vs0, 3(r3), 0
1770 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1771 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1772 ; CHECK-P10-BE-NEXT: pstxv vs0, 3(r3), 0
1773 ; CHECK-P10-BE-NEXT: blr
1775 ; CHECK-P9-LABEL: testGlob11PtrPlus3:
1776 ; CHECK-P9: # %bb.0: # %entry
1777 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1778 ; CHECK-P9-NEXT: li r4, 3
1779 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1780 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
1781 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1782 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1783 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
1784 ; CHECK-P9-NEXT: blr
1786 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus3:
1787 ; CHECK-P8-LE: # %bb.0: # %entry
1788 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1789 ; CHECK-P8-LE-NEXT: li r4, 3
1790 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1791 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
1792 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1793 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1794 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
1795 ; CHECK-P8-LE-NEXT: blr
1797 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus3:
1798 ; CHECK-P8-BE: # %bb.0: # %entry
1799 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1800 ; CHECK-P8-BE-NEXT: li r4, 3
1801 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1802 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1803 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1804 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1805 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1806 ; CHECK-P8-BE-NEXT: blr
1808 %0 = load <16 x i8>, ptr getelementptr ([20 x <16 x i8>], ptr @GlobLd11, i64 0, i64 0, i64 3), align 16
1809 store <16 x i8> %0, ptr getelementptr ([20 x <16 x i8>], ptr @GlobSt11, i64 0, i64 0, i64 3), align 16
1813 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1814 define dso_local void @testGlob11PtrPlus4() {
1815 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus4:
1816 ; CHECK-P10-LE: # %bb.0: # %entry
1817 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+4(0), 1
1818 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+4(0), 1
1819 ; CHECK-P10-LE-NEXT: blr
1821 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus4:
1822 ; CHECK-P10-BE: # %bb.0: # %entry
1823 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1824 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1825 ; CHECK-P10-BE-NEXT: plxv vs0, 4(r3), 0
1826 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1827 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1828 ; CHECK-P10-BE-NEXT: pstxv vs0, 4(r3), 0
1829 ; CHECK-P10-BE-NEXT: blr
1831 ; CHECK-P9-LABEL: testGlob11PtrPlus4:
1832 ; CHECK-P9: # %bb.0: # %entry
1833 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1834 ; CHECK-P9-NEXT: li r4, 4
1835 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1836 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
1837 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1838 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1839 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
1840 ; CHECK-P9-NEXT: blr
1842 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus4:
1843 ; CHECK-P8-LE: # %bb.0: # %entry
1844 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1845 ; CHECK-P8-LE-NEXT: li r4, 4
1846 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1847 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
1848 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1849 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1850 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
1851 ; CHECK-P8-LE-NEXT: blr
1853 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus4:
1854 ; CHECK-P8-BE: # %bb.0: # %entry
1855 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1856 ; CHECK-P8-BE-NEXT: li r4, 4
1857 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1858 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1859 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1860 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1861 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1862 ; CHECK-P8-BE-NEXT: blr
1864 %0 = load <16 x i8>, ptr getelementptr ([20 x <16 x i8>], ptr @GlobLd11, i64 0, i64 0, i64 4), align 16
1865 store <16 x i8> %0, ptr getelementptr ([20 x <16 x i8>], ptr @GlobSt11, i64 0, i64 0, i64 4), align 16
1869 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1870 define dso_local void @testGlob11PtrPlus16() {
1871 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus16:
1872 ; CHECK-P10-LE: # %bb.0: # %entry
1873 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+16(0), 1
1874 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+16(0), 1
1875 ; CHECK-P10-LE-NEXT: blr
1877 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus16:
1878 ; CHECK-P10-BE: # %bb.0: # %entry
1879 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1880 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1881 ; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
1882 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1883 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1884 ; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
1885 ; CHECK-P10-BE-NEXT: blr
1887 ; CHECK-P9-LABEL: testGlob11PtrPlus16:
1888 ; CHECK-P9: # %bb.0: # %entry
1889 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1890 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1891 ; CHECK-P9-NEXT: lxv vs0, 16(r3)
1892 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1893 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1894 ; CHECK-P9-NEXT: stxv vs0, 16(r3)
1895 ; CHECK-P9-NEXT: blr
1897 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus16:
1898 ; CHECK-P8-LE: # %bb.0: # %entry
1899 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1900 ; CHECK-P8-LE-NEXT: li r4, 16
1901 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1902 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
1903 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1904 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1905 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
1906 ; CHECK-P8-LE-NEXT: blr
1908 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus16:
1909 ; CHECK-P8-BE: # %bb.0: # %entry
1910 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1911 ; CHECK-P8-BE-NEXT: li r4, 16
1912 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1913 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1914 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1915 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1916 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1917 ; CHECK-P8-BE-NEXT: blr
1919 %0 = load <16 x i8>, ptr getelementptr inbounds ([20 x <16 x i8>], ptr @GlobLd11, i64 0, i64 1, i64 0), align 16
1920 store <16 x i8> %0, ptr getelementptr inbounds ([20 x <16 x i8>], ptr @GlobSt11, i64 0, i64 1, i64 0), align 16
1924 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1925 define dso_local void @testGlob11PtrPlusVar(i64 %Idx) {
1926 ; CHECK-P10-LE-LABEL: testGlob11PtrPlusVar:
1927 ; CHECK-P10-LE: # %bb.0: # %entry
1928 ; CHECK-P10-LE-NEXT: sldi r3, r3, 4
1929 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd11@PCREL, 1
1930 ; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
1931 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt11@PCREL, 1
1932 ; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
1933 ; CHECK-P10-LE-NEXT: blr
1935 ; CHECK-P10-BE-LABEL: testGlob11PtrPlusVar:
1936 ; CHECK-P10-BE: # %bb.0: # %entry
1937 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
1938 ; CHECK-P10-BE-NEXT: sldi r3, r3, 4
1939 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd11@toc@l
1940 ; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
1941 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
1942 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt11@toc@l
1943 ; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
1944 ; CHECK-P10-BE-NEXT: blr
1946 ; CHECK-P9-LABEL: testGlob11PtrPlusVar:
1947 ; CHECK-P9: # %bb.0: # %entry
1948 ; CHECK-P9-NEXT: addis r4, r2, GlobLd11@toc@ha
1949 ; CHECK-P9-NEXT: sldi r3, r3, 4
1950 ; CHECK-P9-NEXT: addi r4, r4, GlobLd11@toc@l
1951 ; CHECK-P9-NEXT: lxvx vs0, r4, r3
1952 ; CHECK-P9-NEXT: addis r4, r2, GlobSt11@toc@ha
1953 ; CHECK-P9-NEXT: addi r4, r4, GlobSt11@toc@l
1954 ; CHECK-P9-NEXT: stxvx vs0, r4, r3
1955 ; CHECK-P9-NEXT: blr
1957 ; CHECK-P8-LE-LABEL: testGlob11PtrPlusVar:
1958 ; CHECK-P8-LE: # %bb.0: # %entry
1959 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd11@toc@ha
1960 ; CHECK-P8-LE-NEXT: sldi r3, r3, 4
1961 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd11@toc@l
1962 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r4, r3
1963 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt11@toc@ha
1964 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt11@toc@l
1965 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r4, r3
1966 ; CHECK-P8-LE-NEXT: blr
1968 ; CHECK-P8-BE-LABEL: testGlob11PtrPlusVar:
1969 ; CHECK-P8-BE: # %bb.0: # %entry
1970 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
1971 ; CHECK-P8-BE-NEXT: sldi r3, r3, 4
1972 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd11@toc@l
1973 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
1974 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
1975 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt11@toc@l
1976 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
1977 ; CHECK-P8-BE-NEXT: blr
1979 %arrayidx = getelementptr inbounds [20 x <16 x i8>], ptr @GlobLd11, i64 0, i64 %Idx
1980 %0 = load <16 x i8>, ptr %arrayidx, align 16
1981 %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], ptr @GlobSt11, i64 0, i64 %Idx
1982 store <16 x i8> %0, ptr %arrayidx1, align 16
1986 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1987 define dso_local void @testGlob12PtrPlus0() {
1988 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus0:
1989 ; CHECK-P10-LE: # %bb.0: # %entry
1990 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL(0), 1
1991 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL(0), 1
1992 ; CHECK-P10-LE-NEXT: blr
1994 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus0:
1995 ; CHECK-P10-BE: # %bb.0: # %entry
1996 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
1997 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
1998 ; CHECK-P10-BE-NEXT: lxv vs0, 0(r3)
1999 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2000 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2001 ; CHECK-P10-BE-NEXT: stxv vs0, 0(r3)
2002 ; CHECK-P10-BE-NEXT: blr
2004 ; CHECK-P9-LABEL: testGlob12PtrPlus0:
2005 ; CHECK-P9: # %bb.0: # %entry
2006 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2007 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2008 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
2009 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2010 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2011 ; CHECK-P9-NEXT: stxv vs0, 0(r3)
2012 ; CHECK-P9-NEXT: blr
2014 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus0:
2015 ; CHECK-P8-LE: # %bb.0: # %entry
2016 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2017 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2018 ; CHECK-P8-LE-NEXT: lxvd2x vs0, 0, r3
2019 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2020 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2021 ; CHECK-P8-LE-NEXT: stxvd2x vs0, 0, r3
2022 ; CHECK-P8-LE-NEXT: blr
2024 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus0:
2025 ; CHECK-P8-BE: # %bb.0: # %entry
2026 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2027 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2028 ; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
2029 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2030 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2031 ; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
2032 ; CHECK-P8-BE-NEXT: blr
2034 %0 = load <16 x i8>, ptr @GlobLd12, align 16
2035 store <16 x i8> %0, ptr @GlobSt12, align 16
2039 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2040 define dso_local void @testGlob12PtrPlus3() {
2041 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus3:
2042 ; CHECK-P10-LE: # %bb.0: # %entry
2043 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+3(0), 1
2044 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+3(0), 1
2045 ; CHECK-P10-LE-NEXT: blr
2047 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus3:
2048 ; CHECK-P10-BE: # %bb.0: # %entry
2049 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2050 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2051 ; CHECK-P10-BE-NEXT: plxv vs0, 3(r3), 0
2052 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2053 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2054 ; CHECK-P10-BE-NEXT: pstxv vs0, 3(r3), 0
2055 ; CHECK-P10-BE-NEXT: blr
2057 ; CHECK-P9-LABEL: testGlob12PtrPlus3:
2058 ; CHECK-P9: # %bb.0: # %entry
2059 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2060 ; CHECK-P9-NEXT: li r4, 3
2061 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2062 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
2063 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2064 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2065 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
2066 ; CHECK-P9-NEXT: blr
2068 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus3:
2069 ; CHECK-P8-LE: # %bb.0: # %entry
2070 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2071 ; CHECK-P8-LE-NEXT: li r4, 3
2072 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2073 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
2074 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2075 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2076 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
2077 ; CHECK-P8-LE-NEXT: blr
2079 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus3:
2080 ; CHECK-P8-BE: # %bb.0: # %entry
2081 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2082 ; CHECK-P8-BE-NEXT: li r4, 3
2083 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2084 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2085 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2086 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2087 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2088 ; CHECK-P8-BE-NEXT: blr
2090 %0 = load <16 x i8>, ptr getelementptr ([20 x <16 x i8>], ptr @GlobLd12, i64 0, i64 0, i64 3), align 16
2091 store <16 x i8> %0, ptr getelementptr ([20 x <16 x i8>], ptr @GlobSt12, i64 0, i64 0, i64 3), align 16
2095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2096 define dso_local void @testGlob12PtrPlus4() {
2097 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus4:
2098 ; CHECK-P10-LE: # %bb.0: # %entry
2099 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+4(0), 1
2100 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+4(0), 1
2101 ; CHECK-P10-LE-NEXT: blr
2103 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus4:
2104 ; CHECK-P10-BE: # %bb.0: # %entry
2105 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2106 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2107 ; CHECK-P10-BE-NEXT: plxv vs0, 4(r3), 0
2108 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2109 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2110 ; CHECK-P10-BE-NEXT: pstxv vs0, 4(r3), 0
2111 ; CHECK-P10-BE-NEXT: blr
2113 ; CHECK-P9-LABEL: testGlob12PtrPlus4:
2114 ; CHECK-P9: # %bb.0: # %entry
2115 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2116 ; CHECK-P9-NEXT: li r4, 4
2117 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2118 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
2119 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2120 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2121 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
2122 ; CHECK-P9-NEXT: blr
2124 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus4:
2125 ; CHECK-P8-LE: # %bb.0: # %entry
2126 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2127 ; CHECK-P8-LE-NEXT: li r4, 4
2128 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2129 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
2130 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2131 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2132 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
2133 ; CHECK-P8-LE-NEXT: blr
2135 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus4:
2136 ; CHECK-P8-BE: # %bb.0: # %entry
2137 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2138 ; CHECK-P8-BE-NEXT: li r4, 4
2139 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2140 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2141 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2142 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2143 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2144 ; CHECK-P8-BE-NEXT: blr
2146 %0 = load <16 x i8>, ptr getelementptr ([20 x <16 x i8>], ptr @GlobLd12, i64 0, i64 0, i64 4), align 16
2147 store <16 x i8> %0, ptr getelementptr ([20 x <16 x i8>], ptr @GlobSt12, i64 0, i64 0, i64 4), align 16
2151 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2152 define dso_local void @testGlob12PtrPlus16() {
2153 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus16:
2154 ; CHECK-P10-LE: # %bb.0: # %entry
2155 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+16(0), 1
2156 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+16(0), 1
2157 ; CHECK-P10-LE-NEXT: blr
2159 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus16:
2160 ; CHECK-P10-BE: # %bb.0: # %entry
2161 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2162 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2163 ; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
2164 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2165 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2166 ; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
2167 ; CHECK-P10-BE-NEXT: blr
2169 ; CHECK-P9-LABEL: testGlob12PtrPlus16:
2170 ; CHECK-P9: # %bb.0: # %entry
2171 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2172 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2173 ; CHECK-P9-NEXT: lxv vs0, 16(r3)
2174 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2175 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2176 ; CHECK-P9-NEXT: stxv vs0, 16(r3)
2177 ; CHECK-P9-NEXT: blr
2179 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus16:
2180 ; CHECK-P8-LE: # %bb.0: # %entry
2181 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2182 ; CHECK-P8-LE-NEXT: li r4, 16
2183 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2184 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r3, r4
2185 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2186 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2187 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r3, r4
2188 ; CHECK-P8-LE-NEXT: blr
2190 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus16:
2191 ; CHECK-P8-BE: # %bb.0: # %entry
2192 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2193 ; CHECK-P8-BE-NEXT: li r4, 16
2194 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2195 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2196 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2197 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2198 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2199 ; CHECK-P8-BE-NEXT: blr
2201 %0 = load <16 x i8>, ptr getelementptr inbounds ([20 x <16 x i8>], ptr @GlobLd12, i64 0, i64 1, i64 0), align 16
2202 store <16 x i8> %0, ptr getelementptr inbounds ([20 x <16 x i8>], ptr @GlobSt12, i64 0, i64 1, i64 0), align 16
2206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2207 define dso_local void @testGlob12PtrPlusVar(i64 %Idx) {
2208 ; CHECK-P10-LE-LABEL: testGlob12PtrPlusVar:
2209 ; CHECK-P10-LE: # %bb.0: # %entry
2210 ; CHECK-P10-LE-NEXT: sldi r3, r3, 4
2211 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd12@PCREL, 1
2212 ; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
2213 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt12@PCREL, 1
2214 ; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
2215 ; CHECK-P10-LE-NEXT: blr
2217 ; CHECK-P10-BE-LABEL: testGlob12PtrPlusVar:
2218 ; CHECK-P10-BE: # %bb.0: # %entry
2219 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
2220 ; CHECK-P10-BE-NEXT: sldi r3, r3, 4
2221 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd12@toc@l
2222 ; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
2223 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
2224 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt12@toc@l
2225 ; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
2226 ; CHECK-P10-BE-NEXT: blr
2228 ; CHECK-P9-LABEL: testGlob12PtrPlusVar:
2229 ; CHECK-P9: # %bb.0: # %entry
2230 ; CHECK-P9-NEXT: addis r4, r2, GlobLd12@toc@ha
2231 ; CHECK-P9-NEXT: sldi r3, r3, 4
2232 ; CHECK-P9-NEXT: addi r4, r4, GlobLd12@toc@l
2233 ; CHECK-P9-NEXT: lxvx vs0, r4, r3
2234 ; CHECK-P9-NEXT: addis r4, r2, GlobSt12@toc@ha
2235 ; CHECK-P9-NEXT: addi r4, r4, GlobSt12@toc@l
2236 ; CHECK-P9-NEXT: stxvx vs0, r4, r3
2237 ; CHECK-P9-NEXT: blr
2239 ; CHECK-P8-LE-LABEL: testGlob12PtrPlusVar:
2240 ; CHECK-P8-LE: # %bb.0: # %entry
2241 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd12@toc@ha
2242 ; CHECK-P8-LE-NEXT: sldi r3, r3, 4
2243 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd12@toc@l
2244 ; CHECK-P8-LE-NEXT: lxvd2x vs0, r4, r3
2245 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt12@toc@ha
2246 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt12@toc@l
2247 ; CHECK-P8-LE-NEXT: stxvd2x vs0, r4, r3
2248 ; CHECK-P8-LE-NEXT: blr
2250 ; CHECK-P8-BE-LABEL: testGlob12PtrPlusVar:
2251 ; CHECK-P8-BE: # %bb.0: # %entry
2252 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
2253 ; CHECK-P8-BE-NEXT: sldi r3, r3, 4
2254 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd12@toc@l
2255 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
2256 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
2257 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt12@toc@l
2258 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
2259 ; CHECK-P8-BE-NEXT: blr
2261 %arrayidx = getelementptr inbounds [20 x <16 x i8>], ptr @GlobLd12, i64 0, i64 %Idx
2262 %0 = load <16 x i8>, ptr %arrayidx, align 16
2263 %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], ptr @GlobSt12, i64 0, i64 %Idx
2264 store <16 x i8> %0, ptr %arrayidx1, align 16
2268 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2269 define dso_local void @Atomic_LdSt_i8() {
2270 ; CHECK-P10-LE-LABEL: Atomic_LdSt_i8:
2271 ; CHECK-P10-LE: # %bb.0: # %entry
2272 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL(0), 1
2273 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL(0), 1
2274 ; CHECK-P10-LE-NEXT: blr
2276 ; CHECK-P10-BE-LABEL: Atomic_LdSt_i8:
2277 ; CHECK-P10-BE: # %bb.0: # %entry
2278 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
2279 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
2280 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l(r3)
2281 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l(r4)
2282 ; CHECK-P10-BE-NEXT: blr
2284 ; CHECK-LABEL: Atomic_LdSt_i8:
2285 ; CHECK: # %bb.0: # %entry
2286 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
2287 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
2288 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l(r3)
2289 ; CHECK-NEXT: stb r3, GlobSt1@toc@l(r4)
2292 %0 = load atomic i8, ptr @GlobLd1 monotonic, align 1
2293 store atomic i8 %0, ptr @GlobSt1 monotonic, align 1
2297 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2298 define dso_local void @Atomic_LdSt_i16() {
2299 ; CHECK-P10-LE-LABEL: Atomic_LdSt_i16:
2300 ; CHECK-P10-LE: # %bb.0: # %entry
2301 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL(0), 1
2302 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL(0), 1
2303 ; CHECK-P10-LE-NEXT: blr
2305 ; CHECK-P10-BE-LABEL: Atomic_LdSt_i16:
2306 ; CHECK-P10-BE: # %bb.0: # %entry
2307 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
2308 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
2309 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l(r3)
2310 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l(r4)
2311 ; CHECK-P10-BE-NEXT: blr
2313 ; CHECK-LABEL: Atomic_LdSt_i16:
2314 ; CHECK: # %bb.0: # %entry
2315 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
2316 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
2317 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l(r3)
2318 ; CHECK-NEXT: sth r3, GlobSt3@toc@l(r4)
2321 %0 = load atomic i16, ptr @GlobLd3 monotonic, align 2
2322 store atomic i16 %0, ptr @GlobSt3 monotonic, align 2
2326 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2327 define dso_local void @Atomic_LdSt_i32() {
2328 ; CHECK-P10-LE-LABEL: Atomic_LdSt_i32:
2329 ; CHECK-P10-LE: # %bb.0: # %entry
2330 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL(0), 1
2331 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL(0), 1
2332 ; CHECK-P10-LE-NEXT: blr
2334 ; CHECK-P10-BE-LABEL: Atomic_LdSt_i32:
2335 ; CHECK-P10-BE: # %bb.0: # %entry
2336 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
2337 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
2338 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l(r3)
2339 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l(r4)
2340 ; CHECK-P10-BE-NEXT: blr
2342 ; CHECK-LABEL: Atomic_LdSt_i32:
2343 ; CHECK: # %bb.0: # %entry
2344 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
2345 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
2346 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l(r3)
2347 ; CHECK-NEXT: stw r3, GlobSt5@toc@l(r4)
2350 %0 = load atomic i32, ptr @GlobLd5 monotonic, align 4
2351 store atomic i32 %0, ptr @GlobSt5 monotonic, align 4
2355 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2356 define dso_local void @Atomic_LdSt_i64() {
2357 ; CHECK-P10-LE-LABEL: Atomic_LdSt_i64:
2358 ; CHECK-P10-LE: # %bb.0: # %entry
2359 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL(0), 1
2360 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL(0), 1
2361 ; CHECK-P10-LE-NEXT: blr
2363 ; CHECK-P10-BE-LABEL: Atomic_LdSt_i64:
2364 ; CHECK-P10-BE: # %bb.0: # %entry
2365 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
2366 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
2367 ; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l(r3)
2368 ; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l(r4)
2369 ; CHECK-P10-BE-NEXT: blr
2371 ; CHECK-P9-LABEL: Atomic_LdSt_i64:
2372 ; CHECK-P9: # %bb.0: # %entry
2373 ; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
2374 ; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
2375 ; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l(r3)
2376 ; CHECK-P9-NEXT: std r3, GlobSt7@toc@l(r4)
2377 ; CHECK-P9-NEXT: blr
2379 ; CHECK-P8-LABEL: Atomic_LdSt_i64:
2380 ; CHECK-P8: # %bb.0: # %entry
2381 ; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
2382 ; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l(r3)
2383 ; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
2384 ; CHECK-P8-NEXT: std r3, GlobSt7@toc@l(r4)
2385 ; CHECK-P8-NEXT: blr
2387 %0 = load atomic i64, ptr @GlobLd7 monotonic, align 8
2388 store atomic i64 %0, ptr @GlobSt7 monotonic, align 8
2392 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
2393 define dso_local void @store_double_f64_to_uint(double %str) local_unnamed_addr #0 {
2394 ; CHECK-P10-LE-LABEL: store_double_f64_to_uint:
2395 ; CHECK-P10-LE: # %bb.0: # %entry
2396 ; CHECK-P10-LE-NEXT: xscvdpuxds v2, f1
2397 ; CHECK-P10-LE-NEXT: pstxsd v2, GlobSt10@PCREL(0), 1
2398 ; CHECK-P10-LE-NEXT: blr
2400 ; CHECK-P10-BE-LABEL: store_double_f64_to_uint:
2401 ; CHECK-P10-BE: # %bb.0: # %entry
2402 ; CHECK-P10-BE-NEXT: xscvdpuxds v2, f1
2403 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt10@toc@ha
2404 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt10@toc@l
2405 ; CHECK-P10-BE-NEXT: stxsd v2, 0(r3)
2406 ; CHECK-P10-BE-NEXT: blr
2408 ; CHECK-P9-LABEL: store_double_f64_to_uint:
2409 ; CHECK-P9: # %bb.0: # %entry
2410 ; CHECK-P9-NEXT: xscvdpuxds v2, f1
2411 ; CHECK-P9-NEXT: addis r3, r2, GlobSt10@toc@ha
2412 ; CHECK-P9-NEXT: addi r3, r3, GlobSt10@toc@l
2413 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
2414 ; CHECK-P9-NEXT: blr
2416 ; CHECK-P8-LABEL: store_double_f64_to_uint:
2417 ; CHECK-P8: # %bb.0: # %entry
2418 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
2419 ; CHECK-P8-NEXT: addis r3, r2, GlobSt10@toc@ha
2420 ; CHECK-P8-NEXT: addi r3, r3, GlobSt10@toc@l
2421 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
2422 ; CHECK-P8-NEXT: blr
2424 %conv = fptoui double %str to i64
2425 store i64 %conv, ptr @GlobSt10, align 8
2429 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
2430 define dso_local void @store_double_f64_to_sint(double %str) local_unnamed_addr #0 {
2431 ; CHECK-P10-LE-LABEL: store_double_f64_to_sint:
2432 ; CHECK-P10-LE: # %bb.0: # %entry
2433 ; CHECK-P10-LE-NEXT: xscvdpsxds v2, f1
2434 ; CHECK-P10-LE-NEXT: pstxsd v2, GlobSt10@PCREL(0), 1
2435 ; CHECK-P10-LE-NEXT: blr
2437 ; CHECK-P10-BE-LABEL: store_double_f64_to_sint:
2438 ; CHECK-P10-BE: # %bb.0: # %entry
2439 ; CHECK-P10-BE-NEXT: xscvdpsxds v2, f1
2440 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt10@toc@ha
2441 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt10@toc@l
2442 ; CHECK-P10-BE-NEXT: stxsd v2, 0(r3)
2443 ; CHECK-P10-BE-NEXT: blr
2445 ; CHECK-P9-LABEL: store_double_f64_to_sint:
2446 ; CHECK-P9: # %bb.0: # %entry
2447 ; CHECK-P9-NEXT: xscvdpsxds v2, f1
2448 ; CHECK-P9-NEXT: addis r3, r2, GlobSt10@toc@ha
2449 ; CHECK-P9-NEXT: addi r3, r3, GlobSt10@toc@l
2450 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
2451 ; CHECK-P9-NEXT: blr
2453 ; CHECK-P8-LABEL: store_double_f64_to_sint:
2454 ; CHECK-P8: # %bb.0: # %entry
2455 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
2456 ; CHECK-P8-NEXT: addis r3, r2, GlobSt10@toc@ha
2457 ; CHECK-P8-NEXT: addi r3, r3, GlobSt10@toc@l
2458 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
2459 ; CHECK-P8-NEXT: blr
2461 %conv = fptosi double %str to i64
2462 store i64 %conv, ptr @GlobSt10, align 8
2466 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
2467 define dso_local void @store_f128_to_uint(fp128 %str) local_unnamed_addr #0 {
2468 ; CHECK-P10-LE-LABEL: store_f128_to_uint:
2469 ; CHECK-P10-LE: # %bb.0: # %entry
2470 ; CHECK-P10-LE-NEXT: xscvqpudz v2, v2
2471 ; CHECK-P10-LE-NEXT: pstxsd v2, GlobF128@PCREL(0), 1
2472 ; CHECK-P10-LE-NEXT: blr
2474 ; CHECK-P10-BE-LABEL: store_f128_to_uint:
2475 ; CHECK-P10-BE: # %bb.0: # %entry
2476 ; CHECK-P10-BE-NEXT: xscvqpudz v2, v2
2477 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobF128@toc@ha
2478 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobF128@toc@l
2479 ; CHECK-P10-BE-NEXT: stxsd v2, 0(r3)
2480 ; CHECK-P10-BE-NEXT: blr
2482 ; CHECK-P9-LABEL: store_f128_to_uint:
2483 ; CHECK-P9: # %bb.0: # %entry
2484 ; CHECK-P9-NEXT: xscvqpudz v2, v2
2485 ; CHECK-P9-NEXT: addis r3, r2, GlobF128@toc@ha
2486 ; CHECK-P9-NEXT: addi r3, r3, GlobF128@toc@l
2487 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
2488 ; CHECK-P9-NEXT: blr
2490 ; CHECK-P8-LE-LABEL: store_f128_to_uint:
2491 ; CHECK-P8-LE: # %bb.0: # %entry
2492 ; CHECK-P8-LE-NEXT: mflr r0
2493 ; CHECK-P8-LE-NEXT: stdu r1, -32(r1)
2494 ; CHECK-P8-LE-NEXT: std r0, 48(r1)
2495 ; CHECK-P8-LE-NEXT: .cfi_def_cfa_offset 32
2496 ; CHECK-P8-LE-NEXT: .cfi_offset lr, 16
2497 ; CHECK-P8-LE-NEXT: bl __fixunskfdi
2498 ; CHECK-P8-LE-NEXT: nop
2499 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobF128@toc@ha
2500 ; CHECK-P8-LE-NEXT: std r3, GlobF128@toc@l(r4)
2501 ; CHECK-P8-LE-NEXT: addi r1, r1, 32
2502 ; CHECK-P8-LE-NEXT: ld r0, 16(r1)
2503 ; CHECK-P8-LE-NEXT: mtlr r0
2504 ; CHECK-P8-LE-NEXT: blr
2506 ; CHECK-P8-BE-LABEL: store_f128_to_uint:
2507 ; CHECK-P8-BE: # %bb.0: # %entry
2508 ; CHECK-P8-BE-NEXT: mflr r0
2509 ; CHECK-P8-BE-NEXT: stdu r1, -112(r1)
2510 ; CHECK-P8-BE-NEXT: std r0, 128(r1)
2511 ; CHECK-P8-BE-NEXT: .cfi_def_cfa_offset 112
2512 ; CHECK-P8-BE-NEXT: .cfi_offset lr, 16
2513 ; CHECK-P8-BE-NEXT: bl __fixunskfdi
2514 ; CHECK-P8-BE-NEXT: nop
2515 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobF128@toc@ha
2516 ; CHECK-P8-BE-NEXT: std r3, GlobF128@toc@l(r4)
2517 ; CHECK-P8-BE-NEXT: addi r1, r1, 112
2518 ; CHECK-P8-BE-NEXT: ld r0, 16(r1)
2519 ; CHECK-P8-BE-NEXT: mtlr r0
2520 ; CHECK-P8-BE-NEXT: blr
2522 %conv = fptoui fp128 %str to i64
2523 store i64 %conv, ptr @GlobF128, align 16
2527 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
2528 define dso_local void @store_f128_to_sint(fp128 %str) local_unnamed_addr #0 {
2529 ; CHECK-P10-LE-LABEL: store_f128_to_sint:
2530 ; CHECK-P10-LE: # %bb.0: # %entry
2531 ; CHECK-P10-LE-NEXT: xscvqpsdz v2, v2
2532 ; CHECK-P10-LE-NEXT: pstxsd v2, GlobF128@PCREL(0), 1
2533 ; CHECK-P10-LE-NEXT: blr
2535 ; CHECK-P10-BE-LABEL: store_f128_to_sint:
2536 ; CHECK-P10-BE: # %bb.0: # %entry
2537 ; CHECK-P10-BE-NEXT: xscvqpsdz v2, v2
2538 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobF128@toc@ha
2539 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobF128@toc@l
2540 ; CHECK-P10-BE-NEXT: stxsd v2, 0(r3)
2541 ; CHECK-P10-BE-NEXT: blr
2543 ; CHECK-P9-LABEL: store_f128_to_sint:
2544 ; CHECK-P9: # %bb.0: # %entry
2545 ; CHECK-P9-NEXT: xscvqpsdz v2, v2
2546 ; CHECK-P9-NEXT: addis r3, r2, GlobF128@toc@ha
2547 ; CHECK-P9-NEXT: addi r3, r3, GlobF128@toc@l
2548 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
2549 ; CHECK-P9-NEXT: blr
2551 ; CHECK-P8-LE-LABEL: store_f128_to_sint:
2552 ; CHECK-P8-LE: # %bb.0: # %entry
2553 ; CHECK-P8-LE-NEXT: mflr r0
2554 ; CHECK-P8-LE-NEXT: stdu r1, -32(r1)
2555 ; CHECK-P8-LE-NEXT: std r0, 48(r1)
2556 ; CHECK-P8-LE-NEXT: .cfi_def_cfa_offset 32
2557 ; CHECK-P8-LE-NEXT: .cfi_offset lr, 16
2558 ; CHECK-P8-LE-NEXT: bl __fixkfdi
2559 ; CHECK-P8-LE-NEXT: nop
2560 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobF128@toc@ha
2561 ; CHECK-P8-LE-NEXT: std r3, GlobF128@toc@l(r4)
2562 ; CHECK-P8-LE-NEXT: addi r1, r1, 32
2563 ; CHECK-P8-LE-NEXT: ld r0, 16(r1)
2564 ; CHECK-P8-LE-NEXT: mtlr r0
2565 ; CHECK-P8-LE-NEXT: blr
2567 ; CHECK-P8-BE-LABEL: store_f128_to_sint:
2568 ; CHECK-P8-BE: # %bb.0: # %entry
2569 ; CHECK-P8-BE-NEXT: mflr r0
2570 ; CHECK-P8-BE-NEXT: stdu r1, -112(r1)
2571 ; CHECK-P8-BE-NEXT: std r0, 128(r1)
2572 ; CHECK-P8-BE-NEXT: .cfi_def_cfa_offset 112
2573 ; CHECK-P8-BE-NEXT: .cfi_offset lr, 16
2574 ; CHECK-P8-BE-NEXT: bl __fixkfdi
2575 ; CHECK-P8-BE-NEXT: nop
2576 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobF128@toc@ha
2577 ; CHECK-P8-BE-NEXT: std r3, GlobF128@toc@l(r4)
2578 ; CHECK-P8-BE-NEXT: addi r1, r1, 112
2579 ; CHECK-P8-BE-NEXT: ld r0, 16(r1)
2580 ; CHECK-P8-BE-NEXT: mtlr r0
2581 ; CHECK-P8-BE-NEXT: blr
2583 %conv = fptosi fp128 %str to i64
2584 store i64 %conv, ptr @GlobF128, align 16