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
46 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
47 define dso_local void @testGlob1PtrPlus0() {
48 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus0:
49 ; CHECK-P10-LE: # %bb.0: # %entry
50 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL(0), 1
51 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL(0), 1
52 ; CHECK-P10-LE-NEXT: blr
54 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus0:
55 ; CHECK-P10-BE: # %bb.0: # %entry
56 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
57 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
58 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l(r3)
59 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l(r4)
60 ; CHECK-P10-BE-NEXT: blr
62 ; CHECK-LABEL: testGlob1PtrPlus0:
63 ; CHECK: # %bb.0: # %entry
64 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
65 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
66 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l(r3)
67 ; CHECK-NEXT: stb r3, GlobSt1@toc@l(r4)
70 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 0), align 1
71 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 0), align 1
75 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
76 define dso_local void @testGlob1PtrPlus3() {
77 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus3:
78 ; CHECK-P10-LE: # %bb.0: # %entry
79 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+3(0), 1
80 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+3(0), 1
81 ; CHECK-P10-LE-NEXT: blr
83 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus3:
84 ; CHECK-P10-BE: # %bb.0: # %entry
85 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
86 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
87 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd1@toc@l
88 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt1@toc@l
89 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
90 ; CHECK-P10-BE-NEXT: stb r3, 3(r4)
91 ; CHECK-P10-BE-NEXT: blr
93 ; CHECK-LABEL: testGlob1PtrPlus3:
94 ; CHECK: # %bb.0: # %entry
95 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
96 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
97 ; CHECK-NEXT: addi r3, r3, GlobLd1@toc@l
98 ; CHECK-NEXT: addi r4, r4, GlobSt1@toc@l
99 ; CHECK-NEXT: lbz r3, 3(r3)
100 ; CHECK-NEXT: stb r3, 3(r4)
103 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 3), align 1
104 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 3), align 1
108 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
109 define dso_local void @testGlob1PtrPlus4() {
110 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus4:
111 ; CHECK-P10-LE: # %bb.0: # %entry
112 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+4(0), 1
113 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+4(0), 1
114 ; CHECK-P10-LE-NEXT: blr
116 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus4:
117 ; CHECK-P10-BE: # %bb.0: # %entry
118 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+4
119 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+4
120 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
121 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+4(r4)
122 ; CHECK-P10-BE-NEXT: blr
124 ; CHECK-LABEL: testGlob1PtrPlus4:
125 ; CHECK: # %bb.0: # %entry
126 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+4
127 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+4
128 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
129 ; CHECK-NEXT: stb r3, GlobSt1@toc@l+4(r4)
132 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 4), align 1
133 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 4), align 1
137 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
138 define dso_local void @testGlob1PtrPlus16() {
139 ; CHECK-P10-LE-LABEL: testGlob1PtrPlus16:
140 ; CHECK-P10-LE: # %bb.0: # %entry
141 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+16(0), 1
142 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+16(0), 1
143 ; CHECK-P10-LE-NEXT: blr
145 ; CHECK-P10-BE-LABEL: testGlob1PtrPlus16:
146 ; CHECK-P10-BE: # %bb.0: # %entry
147 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+16
148 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+16
149 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
150 ; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+16(r4)
151 ; CHECK-P10-BE-NEXT: blr
153 ; CHECK-LABEL: testGlob1PtrPlus16:
154 ; CHECK: # %bb.0: # %entry
155 ; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+16
156 ; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+16
157 ; CHECK-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
158 ; CHECK-NEXT: stb r3, GlobSt1@toc@l+16(r4)
161 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 16), align 1
162 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 16), align 1
166 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
167 define dso_local void @testGlob1PtrPlusVar(i64 %Idx) {
168 ; CHECK-P10-LE-LABEL: testGlob1PtrPlusVar:
169 ; CHECK-P10-LE: # %bb.0: # %entry
170 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd1@PCREL, 1
171 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt1@PCREL, 1
172 ; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
173 ; CHECK-P10-LE-NEXT: stbx r4, r5, r3
174 ; CHECK-P10-LE-NEXT: blr
176 ; CHECK-P10-BE-LABEL: testGlob1PtrPlusVar:
177 ; CHECK-P10-BE: # %bb.0: # %entry
178 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd1@toc@ha
179 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt1@toc@ha
180 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd1@toc@l
181 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt1@toc@l
182 ; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
183 ; CHECK-P10-BE-NEXT: stbx r4, r5, r3
184 ; CHECK-P10-BE-NEXT: blr
186 ; CHECK-LABEL: testGlob1PtrPlusVar:
187 ; CHECK: # %bb.0: # %entry
188 ; CHECK-NEXT: addis r4, r2, GlobLd1@toc@ha
189 ; CHECK-NEXT: addis r5, r2, GlobSt1@toc@ha
190 ; CHECK-NEXT: addi r4, r4, GlobLd1@toc@l
191 ; CHECK-NEXT: addi r5, r5, GlobSt1@toc@l
192 ; CHECK-NEXT: lbzx r4, r4, r3
193 ; CHECK-NEXT: stbx r4, r5, r3
196 %arrayidx = getelementptr inbounds [20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 %Idx
197 %0 = load i8, i8* %arrayidx, align 1
198 %arrayidx1 = getelementptr inbounds [20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 %Idx
199 store i8 %0, i8* %arrayidx1, align 1
203 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
204 define dso_local void @testGlob2PtrPlus0() {
205 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus0:
206 ; CHECK-P10-LE: # %bb.0: # %entry
207 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL(0), 1
208 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL(0), 1
209 ; CHECK-P10-LE-NEXT: blr
211 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus0:
212 ; CHECK-P10-BE: # %bb.0: # %entry
213 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
214 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
215 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l(r3)
216 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l(r4)
217 ; CHECK-P10-BE-NEXT: blr
219 ; CHECK-LABEL: testGlob2PtrPlus0:
220 ; CHECK: # %bb.0: # %entry
221 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
222 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
223 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l(r3)
224 ; CHECK-NEXT: stb r3, GlobSt2@toc@l(r4)
227 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 0), align 1
228 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 0), align 1
232 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
233 define dso_local void @testGlob2PtrPlus3() {
234 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus3:
235 ; CHECK-P10-LE: # %bb.0: # %entry
236 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+3(0), 1
237 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+3(0), 1
238 ; CHECK-P10-LE-NEXT: blr
240 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus3:
241 ; CHECK-P10-BE: # %bb.0: # %entry
242 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
243 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
244 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd2@toc@l
245 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt2@toc@l
246 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
247 ; CHECK-P10-BE-NEXT: stb r3, 3(r4)
248 ; CHECK-P10-BE-NEXT: blr
250 ; CHECK-LABEL: testGlob2PtrPlus3:
251 ; CHECK: # %bb.0: # %entry
252 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
253 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
254 ; CHECK-NEXT: addi r3, r3, GlobLd2@toc@l
255 ; CHECK-NEXT: addi r4, r4, GlobSt2@toc@l
256 ; CHECK-NEXT: lbz r3, 3(r3)
257 ; CHECK-NEXT: stb r3, 3(r4)
260 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 3), align 1
261 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 3), align 1
265 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
266 define dso_local void @testGlob2PtrPlus4() {
267 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus4:
268 ; CHECK-P10-LE: # %bb.0: # %entry
269 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+4(0), 1
270 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+4(0), 1
271 ; CHECK-P10-LE-NEXT: blr
273 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus4:
274 ; CHECK-P10-BE: # %bb.0: # %entry
275 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+4
276 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+4
277 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
278 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+4(r4)
279 ; CHECK-P10-BE-NEXT: blr
281 ; CHECK-LABEL: testGlob2PtrPlus4:
282 ; CHECK: # %bb.0: # %entry
283 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+4
284 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+4
285 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
286 ; CHECK-NEXT: stb r3, GlobSt2@toc@l+4(r4)
289 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 4), align 1
290 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 4), align 1
294 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
295 define dso_local void @testGlob2PtrPlus16() {
296 ; CHECK-P10-LE-LABEL: testGlob2PtrPlus16:
297 ; CHECK-P10-LE: # %bb.0: # %entry
298 ; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+16(0), 1
299 ; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+16(0), 1
300 ; CHECK-P10-LE-NEXT: blr
302 ; CHECK-P10-BE-LABEL: testGlob2PtrPlus16:
303 ; CHECK-P10-BE: # %bb.0: # %entry
304 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+16
305 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+16
306 ; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
307 ; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+16(r4)
308 ; CHECK-P10-BE-NEXT: blr
310 ; CHECK-LABEL: testGlob2PtrPlus16:
311 ; CHECK: # %bb.0: # %entry
312 ; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+16
313 ; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+16
314 ; CHECK-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
315 ; CHECK-NEXT: stb r3, GlobSt2@toc@l+16(r4)
318 %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 16), align 1
319 store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 16), align 1
323 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
324 define dso_local void @testGlob2PtrPlusVar(i64 %Idx) {
325 ; CHECK-P10-LE-LABEL: testGlob2PtrPlusVar:
326 ; CHECK-P10-LE: # %bb.0: # %entry
327 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd2@PCREL, 1
328 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt2@PCREL, 1
329 ; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
330 ; CHECK-P10-LE-NEXT: stbx r4, r5, r3
331 ; CHECK-P10-LE-NEXT: blr
333 ; CHECK-P10-BE-LABEL: testGlob2PtrPlusVar:
334 ; CHECK-P10-BE: # %bb.0: # %entry
335 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd2@toc@ha
336 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt2@toc@ha
337 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd2@toc@l
338 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt2@toc@l
339 ; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
340 ; CHECK-P10-BE-NEXT: stbx r4, r5, r3
341 ; CHECK-P10-BE-NEXT: blr
343 ; CHECK-LABEL: testGlob2PtrPlusVar:
344 ; CHECK: # %bb.0: # %entry
345 ; CHECK-NEXT: addis r4, r2, GlobLd2@toc@ha
346 ; CHECK-NEXT: addis r5, r2, GlobSt2@toc@ha
347 ; CHECK-NEXT: addi r4, r4, GlobLd2@toc@l
348 ; CHECK-NEXT: addi r5, r5, GlobSt2@toc@l
349 ; CHECK-NEXT: lbzx r4, r4, r3
350 ; CHECK-NEXT: stbx r4, r5, r3
353 %arrayidx = getelementptr inbounds [20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 %Idx
354 %0 = load i8, i8* %arrayidx, align 1
355 %arrayidx1 = getelementptr inbounds [20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 %Idx
356 store i8 %0, i8* %arrayidx1, align 1
360 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
361 define dso_local void @testGlob3PtrPlus0() {
362 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus0:
363 ; CHECK-P10-LE: # %bb.0: # %entry
364 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL(0), 1
365 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL(0), 1
366 ; CHECK-P10-LE-NEXT: blr
368 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus0:
369 ; CHECK-P10-BE: # %bb.0: # %entry
370 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
371 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
372 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l(r3)
373 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l(r4)
374 ; CHECK-P10-BE-NEXT: blr
376 ; CHECK-LABEL: testGlob3PtrPlus0:
377 ; CHECK: # %bb.0: # %entry
378 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
379 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
380 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l(r3)
381 ; CHECK-NEXT: sth r3, GlobSt3@toc@l(r4)
384 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 0), align 2
385 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 0), align 2
389 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
390 define dso_local void @testGlob3PtrPlus3() {
391 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus3:
392 ; CHECK-P10-LE: # %bb.0: # %entry
393 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+3(0), 1
394 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+3(0), 1
395 ; CHECK-P10-LE-NEXT: blr
397 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus3:
398 ; CHECK-P10-BE: # %bb.0: # %entry
399 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
400 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
401 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd3@toc@l
402 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt3@toc@l
403 ; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
404 ; CHECK-P10-BE-NEXT: sth r3, 3(r4)
405 ; CHECK-P10-BE-NEXT: blr
407 ; CHECK-LABEL: testGlob3PtrPlus3:
408 ; CHECK: # %bb.0: # %entry
409 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
410 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
411 ; CHECK-NEXT: addi r3, r3, GlobLd3@toc@l
412 ; CHECK-NEXT: addi r4, r4, GlobSt3@toc@l
413 ; CHECK-NEXT: lhz r3, 3(r3)
414 ; CHECK-NEXT: sth r3, 3(r4)
417 %0 = load i16, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobLd3 to i8*), i64 3) to i16*), align 2
418 store i16 %0, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobSt3 to i8*), i64 3) to i16*), align 2
422 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
423 define dso_local void @testGlob3PtrPlus4() {
424 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus4:
425 ; CHECK-P10-LE: # %bb.0: # %entry
426 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+4(0), 1
427 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+4(0), 1
428 ; CHECK-P10-LE-NEXT: blr
430 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus4:
431 ; CHECK-P10-BE: # %bb.0: # %entry
432 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+4
433 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+4
434 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
435 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+4(r4)
436 ; CHECK-P10-BE-NEXT: blr
438 ; CHECK-LABEL: testGlob3PtrPlus4:
439 ; CHECK: # %bb.0: # %entry
440 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+4
441 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+4
442 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
443 ; CHECK-NEXT: sth r3, GlobSt3@toc@l+4(r4)
446 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 2), align 2
447 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 2), align 2
451 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
452 define dso_local void @testGlob3PtrPlus16() {
453 ; CHECK-P10-LE-LABEL: testGlob3PtrPlus16:
454 ; CHECK-P10-LE: # %bb.0: # %entry
455 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+16(0), 1
456 ; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+16(0), 1
457 ; CHECK-P10-LE-NEXT: blr
459 ; CHECK-P10-BE-LABEL: testGlob3PtrPlus16:
460 ; CHECK-P10-BE: # %bb.0: # %entry
461 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+16
462 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+16
463 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
464 ; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+16(r4)
465 ; CHECK-P10-BE-NEXT: blr
467 ; CHECK-LABEL: testGlob3PtrPlus16:
468 ; CHECK: # %bb.0: # %entry
469 ; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+16
470 ; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+16
471 ; CHECK-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
472 ; CHECK-NEXT: sth r3, GlobSt3@toc@l+16(r4)
475 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 8), align 2
476 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 8), align 2
480 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
481 define dso_local void @testGlob3PtrPlusVar(i64 %Idx) {
482 ; CHECK-P10-LE-LABEL: testGlob3PtrPlusVar:
483 ; CHECK-P10-LE: # %bb.0: # %entry
484 ; CHECK-P10-LE-NEXT: sldi r3, r3, 1
485 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd3@PCREL, 1
486 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt3@PCREL, 1
487 ; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
488 ; CHECK-P10-LE-NEXT: sthx r4, r5, r3
489 ; CHECK-P10-LE-NEXT: blr
491 ; CHECK-P10-BE-LABEL: testGlob3PtrPlusVar:
492 ; CHECK-P10-BE: # %bb.0: # %entry
493 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd3@toc@ha
494 ; CHECK-P10-BE-NEXT: sldi r3, r3, 1
495 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt3@toc@ha
496 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd3@toc@l
497 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt3@toc@l
498 ; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
499 ; CHECK-P10-BE-NEXT: sthx r4, r5, r3
500 ; CHECK-P10-BE-NEXT: blr
502 ; CHECK-LABEL: testGlob3PtrPlusVar:
503 ; CHECK: # %bb.0: # %entry
504 ; CHECK-NEXT: addis r4, r2, GlobLd3@toc@ha
505 ; CHECK-NEXT: sldi r3, r3, 1
506 ; CHECK-NEXT: addis r5, r2, GlobSt3@toc@ha
507 ; CHECK-NEXT: addi r4, r4, GlobLd3@toc@l
508 ; CHECK-NEXT: addi r5, r5, GlobSt3@toc@l
509 ; CHECK-NEXT: lhzx r4, r4, r3
510 ; CHECK-NEXT: sthx r4, r5, r3
513 %arrayidx = getelementptr inbounds [20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 %Idx
514 %0 = load i16, i16* %arrayidx, align 2
515 %arrayidx1 = getelementptr inbounds [20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 %Idx
516 store i16 %0, i16* %arrayidx1, align 2
520 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
521 define dso_local void @testGlob4PtrPlus0() {
522 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus0:
523 ; CHECK-P10-LE: # %bb.0: # %entry
524 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL(0), 1
525 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL(0), 1
526 ; CHECK-P10-LE-NEXT: blr
528 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus0:
529 ; CHECK-P10-BE: # %bb.0: # %entry
530 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
531 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
532 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l(r3)
533 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l(r4)
534 ; CHECK-P10-BE-NEXT: blr
536 ; CHECK-LABEL: testGlob4PtrPlus0:
537 ; CHECK: # %bb.0: # %entry
538 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
539 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
540 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l(r3)
541 ; CHECK-NEXT: sth r3, GlobSt4@toc@l(r4)
544 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 0), align 2
545 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 0), align 2
549 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
550 define dso_local void @testGlob4PtrPlus3() {
551 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus3:
552 ; CHECK-P10-LE: # %bb.0: # %entry
553 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+3(0), 1
554 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+3(0), 1
555 ; CHECK-P10-LE-NEXT: blr
557 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus3:
558 ; CHECK-P10-BE: # %bb.0: # %entry
559 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
560 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
561 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd4@toc@l
562 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt4@toc@l
563 ; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
564 ; CHECK-P10-BE-NEXT: sth r3, 3(r4)
565 ; CHECK-P10-BE-NEXT: blr
567 ; CHECK-LABEL: testGlob4PtrPlus3:
568 ; CHECK: # %bb.0: # %entry
569 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
570 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
571 ; CHECK-NEXT: addi r3, r3, GlobLd4@toc@l
572 ; CHECK-NEXT: addi r4, r4, GlobSt4@toc@l
573 ; CHECK-NEXT: lhz r3, 3(r3)
574 ; CHECK-NEXT: sth r3, 3(r4)
577 %0 = load i16, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobLd4 to i8*), i64 3) to i16*), align 2
578 store i16 %0, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobSt4 to i8*), i64 3) to i16*), align 2
582 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
583 define dso_local void @testGlob4PtrPlus4() {
584 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus4:
585 ; CHECK-P10-LE: # %bb.0: # %entry
586 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+4(0), 1
587 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+4(0), 1
588 ; CHECK-P10-LE-NEXT: blr
590 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus4:
591 ; CHECK-P10-BE: # %bb.0: # %entry
592 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+4
593 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+4
594 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
595 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+4(r4)
596 ; CHECK-P10-BE-NEXT: blr
598 ; CHECK-LABEL: testGlob4PtrPlus4:
599 ; CHECK: # %bb.0: # %entry
600 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+4
601 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+4
602 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
603 ; CHECK-NEXT: sth r3, GlobSt4@toc@l+4(r4)
606 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 2), align 2
607 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 2), align 2
611 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
612 define dso_local void @testGlob4PtrPlus16() {
613 ; CHECK-P10-LE-LABEL: testGlob4PtrPlus16:
614 ; CHECK-P10-LE: # %bb.0: # %entry
615 ; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+16(0), 1
616 ; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+16(0), 1
617 ; CHECK-P10-LE-NEXT: blr
619 ; CHECK-P10-BE-LABEL: testGlob4PtrPlus16:
620 ; CHECK-P10-BE: # %bb.0: # %entry
621 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+16
622 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+16
623 ; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
624 ; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+16(r4)
625 ; CHECK-P10-BE-NEXT: blr
627 ; CHECK-LABEL: testGlob4PtrPlus16:
628 ; CHECK: # %bb.0: # %entry
629 ; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+16
630 ; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+16
631 ; CHECK-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
632 ; CHECK-NEXT: sth r3, GlobSt4@toc@l+16(r4)
635 %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 8), align 2
636 store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 8), align 2
640 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
641 define dso_local void @testGlob4PtrPlusVar(i64 %Idx) {
642 ; CHECK-P10-LE-LABEL: testGlob4PtrPlusVar:
643 ; CHECK-P10-LE: # %bb.0: # %entry
644 ; CHECK-P10-LE-NEXT: sldi r3, r3, 1
645 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd4@PCREL, 1
646 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt4@PCREL, 1
647 ; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
648 ; CHECK-P10-LE-NEXT: sthx r4, r5, r3
649 ; CHECK-P10-LE-NEXT: blr
651 ; CHECK-P10-BE-LABEL: testGlob4PtrPlusVar:
652 ; CHECK-P10-BE: # %bb.0: # %entry
653 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd4@toc@ha
654 ; CHECK-P10-BE-NEXT: sldi r3, r3, 1
655 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt4@toc@ha
656 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd4@toc@l
657 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt4@toc@l
658 ; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
659 ; CHECK-P10-BE-NEXT: sthx r4, r5, r3
660 ; CHECK-P10-BE-NEXT: blr
662 ; CHECK-LABEL: testGlob4PtrPlusVar:
663 ; CHECK: # %bb.0: # %entry
664 ; CHECK-NEXT: addis r4, r2, GlobLd4@toc@ha
665 ; CHECK-NEXT: sldi r3, r3, 1
666 ; CHECK-NEXT: addis r5, r2, GlobSt4@toc@ha
667 ; CHECK-NEXT: addi r4, r4, GlobLd4@toc@l
668 ; CHECK-NEXT: addi r5, r5, GlobSt4@toc@l
669 ; CHECK-NEXT: lhzx r4, r4, r3
670 ; CHECK-NEXT: sthx r4, r5, r3
673 %arrayidx = getelementptr inbounds [20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 %Idx
674 %0 = load i16, i16* %arrayidx, align 2
675 %arrayidx1 = getelementptr inbounds [20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 %Idx
676 store i16 %0, i16* %arrayidx1, align 2
680 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
681 define dso_local void @testGlob5PtrPlus0() {
682 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus0:
683 ; CHECK-P10-LE: # %bb.0: # %entry
684 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL(0), 1
685 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL(0), 1
686 ; CHECK-P10-LE-NEXT: blr
688 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus0:
689 ; CHECK-P10-BE: # %bb.0: # %entry
690 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
691 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
692 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l(r3)
693 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l(r4)
694 ; CHECK-P10-BE-NEXT: blr
696 ; CHECK-LABEL: testGlob5PtrPlus0:
697 ; CHECK: # %bb.0: # %entry
698 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
699 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
700 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l(r3)
701 ; CHECK-NEXT: stw r3, GlobSt5@toc@l(r4)
704 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 0), align 4
705 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 0), align 4
709 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
710 define dso_local void @testGlob5PtrPlus3() {
711 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus3:
712 ; CHECK-P10-LE: # %bb.0: # %entry
713 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+3(0), 1
714 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+3(0), 1
715 ; CHECK-P10-LE-NEXT: blr
717 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus3:
718 ; CHECK-P10-BE: # %bb.0: # %entry
719 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
720 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
721 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
722 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+3(r4)
723 ; CHECK-P10-BE-NEXT: blr
725 ; CHECK-LABEL: testGlob5PtrPlus3:
726 ; CHECK: # %bb.0: # %entry
727 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
728 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
729 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
730 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+3(r4)
733 %0 = load i32, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobLd5 to i8*), i64 3) to i32*), align 4
734 store i32 %0, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobSt5 to i8*), i64 3) to i32*), align 4
738 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
739 define dso_local void @testGlob5PtrPlus4() {
740 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus4:
741 ; CHECK-P10-LE: # %bb.0: # %entry
742 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+4(0), 1
743 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+4(0), 1
744 ; CHECK-P10-LE-NEXT: blr
746 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus4:
747 ; CHECK-P10-BE: # %bb.0: # %entry
748 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+4
749 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+4
750 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
751 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+4(r4)
752 ; CHECK-P10-BE-NEXT: blr
754 ; CHECK-LABEL: testGlob5PtrPlus4:
755 ; CHECK: # %bb.0: # %entry
756 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+4
757 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+4
758 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
759 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+4(r4)
762 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 1), align 4
763 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 1), align 4
767 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
768 define dso_local void @testGlob5PtrPlus16() {
769 ; CHECK-P10-LE-LABEL: testGlob5PtrPlus16:
770 ; CHECK-P10-LE: # %bb.0: # %entry
771 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+16(0), 1
772 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+16(0), 1
773 ; CHECK-P10-LE-NEXT: blr
775 ; CHECK-P10-BE-LABEL: testGlob5PtrPlus16:
776 ; CHECK-P10-BE: # %bb.0: # %entry
777 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+16
778 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+16
779 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
780 ; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+16(r4)
781 ; CHECK-P10-BE-NEXT: blr
783 ; CHECK-LABEL: testGlob5PtrPlus16:
784 ; CHECK: # %bb.0: # %entry
785 ; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+16
786 ; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+16
787 ; CHECK-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
788 ; CHECK-NEXT: stw r3, GlobSt5@toc@l+16(r4)
791 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 4), align 4
792 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 4), align 4
796 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
797 define dso_local void @testGlob5PtrPlusVar(i64 %Idx) {
798 ; CHECK-P10-LE-LABEL: testGlob5PtrPlusVar:
799 ; CHECK-P10-LE: # %bb.0: # %entry
800 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
801 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd5@PCREL, 1
802 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt5@PCREL, 1
803 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
804 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
805 ; CHECK-P10-LE-NEXT: blr
807 ; CHECK-P10-BE-LABEL: testGlob5PtrPlusVar:
808 ; CHECK-P10-BE: # %bb.0: # %entry
809 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd5@toc@ha
810 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
811 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt5@toc@ha
812 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd5@toc@l
813 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt5@toc@l
814 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
815 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
816 ; CHECK-P10-BE-NEXT: blr
818 ; CHECK-LABEL: testGlob5PtrPlusVar:
819 ; CHECK: # %bb.0: # %entry
820 ; CHECK-NEXT: addis r4, r2, GlobLd5@toc@ha
821 ; CHECK-NEXT: sldi r3, r3, 2
822 ; CHECK-NEXT: addis r5, r2, GlobSt5@toc@ha
823 ; CHECK-NEXT: addi r4, r4, GlobLd5@toc@l
824 ; CHECK-NEXT: addi r5, r5, GlobSt5@toc@l
825 ; CHECK-NEXT: lwzx r4, r4, r3
826 ; CHECK-NEXT: stwx r4, r5, r3
829 %arrayidx = getelementptr inbounds [20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 %Idx
830 %0 = load i32, i32* %arrayidx, align 4
831 %arrayidx1 = getelementptr inbounds [20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 %Idx
832 store i32 %0, i32* %arrayidx1, align 4
836 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
837 define dso_local void @testGlob6PtrPlus0() {
838 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus0:
839 ; CHECK-P10-LE: # %bb.0: # %entry
840 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL(0), 1
841 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL(0), 1
842 ; CHECK-P10-LE-NEXT: blr
844 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus0:
845 ; CHECK-P10-BE: # %bb.0: # %entry
846 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
847 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
848 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l(r3)
849 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l(r4)
850 ; CHECK-P10-BE-NEXT: blr
852 ; CHECK-LABEL: testGlob6PtrPlus0:
853 ; CHECK: # %bb.0: # %entry
854 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
855 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
856 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l(r3)
857 ; CHECK-NEXT: stw r3, GlobSt6@toc@l(r4)
860 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 0), align 4
861 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 0), align 4
865 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
866 define dso_local void @testGlob6PtrPlus3() {
867 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus3:
868 ; CHECK-P10-LE: # %bb.0: # %entry
869 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+3(0), 1
870 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+3(0), 1
871 ; CHECK-P10-LE-NEXT: blr
873 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus3:
874 ; CHECK-P10-BE: # %bb.0: # %entry
875 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
876 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
877 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
878 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+3(r4)
879 ; CHECK-P10-BE-NEXT: blr
881 ; CHECK-LABEL: testGlob6PtrPlus3:
882 ; CHECK: # %bb.0: # %entry
883 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
884 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
885 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
886 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+3(r4)
889 %0 = load i32, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobLd6 to i8*), i64 3) to i32*), align 4
890 store i32 %0, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobSt6 to i8*), i64 3) to i32*), align 4
894 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
895 define dso_local void @testGlob6PtrPlus4() {
896 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus4:
897 ; CHECK-P10-LE: # %bb.0: # %entry
898 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+4(0), 1
899 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+4(0), 1
900 ; CHECK-P10-LE-NEXT: blr
902 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus4:
903 ; CHECK-P10-BE: # %bb.0: # %entry
904 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+4
905 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+4
906 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
907 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+4(r4)
908 ; CHECK-P10-BE-NEXT: blr
910 ; CHECK-LABEL: testGlob6PtrPlus4:
911 ; CHECK: # %bb.0: # %entry
912 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+4
913 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+4
914 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
915 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+4(r4)
918 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 1), align 4
919 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 1), align 4
923 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
924 define dso_local void @testGlob6PtrPlus16() {
925 ; CHECK-P10-LE-LABEL: testGlob6PtrPlus16:
926 ; CHECK-P10-LE: # %bb.0: # %entry
927 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+16(0), 1
928 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+16(0), 1
929 ; CHECK-P10-LE-NEXT: blr
931 ; CHECK-P10-BE-LABEL: testGlob6PtrPlus16:
932 ; CHECK-P10-BE: # %bb.0: # %entry
933 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+16
934 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+16
935 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
936 ; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+16(r4)
937 ; CHECK-P10-BE-NEXT: blr
939 ; CHECK-LABEL: testGlob6PtrPlus16:
940 ; CHECK: # %bb.0: # %entry
941 ; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+16
942 ; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+16
943 ; CHECK-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
944 ; CHECK-NEXT: stw r3, GlobSt6@toc@l+16(r4)
947 %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 4), align 4
948 store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 4), align 4
952 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
953 define dso_local void @testGlob6PtrPlusVar(i64 %Idx) {
954 ; CHECK-P10-LE-LABEL: testGlob6PtrPlusVar:
955 ; CHECK-P10-LE: # %bb.0: # %entry
956 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
957 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd6@PCREL, 1
958 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt6@PCREL, 1
959 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
960 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
961 ; CHECK-P10-LE-NEXT: blr
963 ; CHECK-P10-BE-LABEL: testGlob6PtrPlusVar:
964 ; CHECK-P10-BE: # %bb.0: # %entry
965 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd6@toc@ha
966 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
967 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt6@toc@ha
968 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd6@toc@l
969 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt6@toc@l
970 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
971 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
972 ; CHECK-P10-BE-NEXT: blr
974 ; CHECK-LABEL: testGlob6PtrPlusVar:
975 ; CHECK: # %bb.0: # %entry
976 ; CHECK-NEXT: addis r4, r2, GlobLd6@toc@ha
977 ; CHECK-NEXT: sldi r3, r3, 2
978 ; CHECK-NEXT: addis r5, r2, GlobSt6@toc@ha
979 ; CHECK-NEXT: addi r4, r4, GlobLd6@toc@l
980 ; CHECK-NEXT: addi r5, r5, GlobSt6@toc@l
981 ; CHECK-NEXT: lwzx r4, r4, r3
982 ; CHECK-NEXT: stwx r4, r5, r3
985 %arrayidx = getelementptr inbounds [20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 %Idx
986 %0 = load i32, i32* %arrayidx, align 4
987 %arrayidx1 = getelementptr inbounds [20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 %Idx
988 store i32 %0, i32* %arrayidx1, align 4
992 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
993 define dso_local void @testGlob7PtrPlus0() {
994 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus0:
995 ; CHECK-P10-LE: # %bb.0: # %entry
996 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL(0), 1
997 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL(0), 1
998 ; CHECK-P10-LE-NEXT: blr
1000 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus0:
1001 ; CHECK-P10-BE: # %bb.0: # %entry
1002 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
1003 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
1004 ; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l(r3)
1005 ; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l(r4)
1006 ; CHECK-P10-BE-NEXT: blr
1008 ; CHECK-P9-LABEL: testGlob7PtrPlus0:
1009 ; CHECK-P9: # %bb.0: # %entry
1010 ; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
1011 ; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
1012 ; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l(r3)
1013 ; CHECK-P9-NEXT: std r3, GlobSt7@toc@l(r4)
1014 ; CHECK-P9-NEXT: blr
1016 ; CHECK-P8-LABEL: testGlob7PtrPlus0:
1017 ; CHECK-P8: # %bb.0: # %entry
1018 ; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
1019 ; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l(r3)
1020 ; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
1021 ; CHECK-P8-NEXT: std r3, GlobSt7@toc@l(r4)
1022 ; CHECK-P8-NEXT: blr
1024 %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd7, i64 0, i64 0), align 8
1025 store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt7, i64 0, i64 0), align 8
1029 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1030 define dso_local void @testGlob7PtrPlus3() {
1031 ; CHECK-P10-LE-LABEL: testGlob7PtrPlus3:
1032 ; CHECK-P10-LE: # %bb.0: # %entry
1033 ; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+3(0), 1
1034 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+3(0), 1
1035 ; CHECK-P10-LE-NEXT: blr
1037 ; CHECK-P10-BE-LABEL: testGlob7PtrPlus3:
1038 ; CHECK-P10-BE: # %bb.0: # %entry
1039 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
1040 ; CHECK-P10-BE-NEXT: li r4, 3
1041 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt7@toc@ha
1042 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd7@toc@l
1043 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt7@toc@l
1044 ; CHECK-P10-BE-NEXT: ldx r3, r3, r4
1045 ; CHECK-P10-BE-NEXT: stdx r3, r5, r4
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, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd7 to i8*), i64 3) to i64*), align 8
1060 store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt7 to i8*), i64 3) to i64*), 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, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd7 to i8*), i64 4) to i64*), align 8
1097 store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt7 to i8*), i64 4) to i64*), 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, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd7, i64 0, i64 2), align 8
1134 store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @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], [20 x i64]* @GlobLd7, i64 0, i64 %Idx
1172 %0 = load i64, i64* %arrayidx, align 8
1173 %arrayidx1 = getelementptr inbounds [20 x i64], [20 x i64]* @GlobSt7, i64 0, i64 %Idx
1174 store i64 %0, i64* %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, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 0), align 8
1211 store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 0), 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: li r4, 3
1227 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt8@toc@ha
1228 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd8@toc@l
1229 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt8@toc@l
1230 ; CHECK-P10-BE-NEXT: ldx r3, r3, r4
1231 ; CHECK-P10-BE-NEXT: stdx r3, r5, r4
1232 ; CHECK-P10-BE-NEXT: blr
1234 ; CHECK-LABEL: testGlob8PtrPlus3:
1235 ; CHECK: # %bb.0: # %entry
1236 ; CHECK-NEXT: addis r3, r2, GlobLd8@toc@ha
1237 ; CHECK-NEXT: li r4, 3
1238 ; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
1239 ; CHECK-NEXT: addi r3, r3, GlobLd8@toc@l
1240 ; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
1241 ; CHECK-NEXT: ldx r3, r3, r4
1242 ; CHECK-NEXT: stdx r3, r5, r4
1245 %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd8 to i8*), i64 3) to i64*), align 8
1246 store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt8 to i8*), i64 3) to i64*), align 8
1250 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1251 define dso_local void @testGlob8PtrPlus4() {
1252 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus4:
1253 ; CHECK-P10-LE: # %bb.0: # %entry
1254 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+4(0), 1
1255 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+4(0), 1
1256 ; CHECK-P10-LE-NEXT: blr
1258 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus4:
1259 ; CHECK-P10-BE: # %bb.0: # %entry
1260 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
1261 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
1262 ; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1263 ; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+4(r4)
1264 ; CHECK-P10-BE-NEXT: blr
1266 ; CHECK-P9-LABEL: testGlob8PtrPlus4:
1267 ; CHECK-P9: # %bb.0: # %entry
1268 ; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha
1269 ; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha
1270 ; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1271 ; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+4(r4)
1272 ; CHECK-P9-NEXT: blr
1274 ; CHECK-P8-LABEL: testGlob8PtrPlus4:
1275 ; CHECK-P8: # %bb.0: # %entry
1276 ; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha
1277 ; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+4(r3)
1278 ; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha
1279 ; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+4(r4)
1280 ; CHECK-P8-NEXT: blr
1282 %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd8 to i8*), i64 4) to i64*), align 8
1283 store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt8 to i8*), i64 4) to i64*), align 8
1287 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1288 define dso_local void @testGlob8PtrPlus16() {
1289 ; CHECK-P10-LE-LABEL: testGlob8PtrPlus16:
1290 ; CHECK-P10-LE: # %bb.0: # %entry
1291 ; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+16(0), 1
1292 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+16(0), 1
1293 ; CHECK-P10-LE-NEXT: blr
1295 ; CHECK-P10-BE-LABEL: testGlob8PtrPlus16:
1296 ; CHECK-P10-BE: # %bb.0: # %entry
1297 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1298 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1299 ; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1300 ; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+16(r4)
1301 ; CHECK-P10-BE-NEXT: blr
1303 ; CHECK-P9-LABEL: testGlob8PtrPlus16:
1304 ; CHECK-P9: # %bb.0: # %entry
1305 ; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1306 ; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1307 ; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1308 ; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+16(r4)
1309 ; CHECK-P9-NEXT: blr
1311 ; CHECK-P8-LABEL: testGlob8PtrPlus16:
1312 ; CHECK-P8: # %bb.0: # %entry
1313 ; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha+16
1314 ; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+16(r3)
1315 ; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha+16
1316 ; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+16(r4)
1317 ; CHECK-P8-NEXT: blr
1319 %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 2), align 8
1320 store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 2), align 8
1324 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1325 define dso_local void @testGlob8PtrPlusVar(i64 %Idx) {
1326 ; CHECK-P10-LE-LABEL: testGlob8PtrPlusVar:
1327 ; CHECK-P10-LE: # %bb.0: # %entry
1328 ; CHECK-P10-LE-NEXT: sldi r3, r3, 3
1329 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd8@PCREL, 1
1330 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt8@PCREL, 1
1331 ; CHECK-P10-LE-NEXT: ldx r4, r4, r3
1332 ; CHECK-P10-LE-NEXT: stdx r4, r5, r3
1333 ; CHECK-P10-LE-NEXT: blr
1335 ; CHECK-P10-BE-LABEL: testGlob8PtrPlusVar:
1336 ; CHECK-P10-BE: # %bb.0: # %entry
1337 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd8@toc@ha
1338 ; CHECK-P10-BE-NEXT: sldi r3, r3, 3
1339 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt8@toc@ha
1340 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd8@toc@l
1341 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt8@toc@l
1342 ; CHECK-P10-BE-NEXT: ldx r4, r4, r3
1343 ; CHECK-P10-BE-NEXT: stdx r4, r5, r3
1344 ; CHECK-P10-BE-NEXT: blr
1346 ; CHECK-LABEL: testGlob8PtrPlusVar:
1347 ; CHECK: # %bb.0: # %entry
1348 ; CHECK-NEXT: addis r4, r2, GlobLd8@toc@ha
1349 ; CHECK-NEXT: sldi r3, r3, 3
1350 ; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
1351 ; CHECK-NEXT: addi r4, r4, GlobLd8@toc@l
1352 ; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
1353 ; CHECK-NEXT: ldx r4, r4, r3
1354 ; CHECK-NEXT: stdx r4, r5, r3
1357 %arrayidx = getelementptr inbounds [20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 %Idx
1358 %0 = load i64, i64* %arrayidx, align 8
1359 %arrayidx1 = getelementptr inbounds [20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 %Idx
1360 store i64 %0, i64* %arrayidx1, align 8
1364 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1365 define dso_local void @testGlob9PtrPlus0() {
1366 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus0:
1367 ; CHECK-P10-LE: # %bb.0: # %entry
1368 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL(0), 1
1369 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL(0), 1
1370 ; CHECK-P10-LE-NEXT: blr
1372 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus0:
1373 ; CHECK-P10-BE: # %bb.0: # %entry
1374 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
1375 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
1376 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l(r3)
1377 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l(r4)
1378 ; CHECK-P10-BE-NEXT: blr
1380 ; CHECK-LABEL: testGlob9PtrPlus0:
1381 ; CHECK: # %bb.0: # %entry
1382 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
1383 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
1384 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l(r3)
1385 ; CHECK-NEXT: stw r3, GlobSt9@toc@l(r4)
1388 %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 0), align 4
1389 store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 0), align 4
1393 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1394 define dso_local void @testGlob9PtrPlus3() {
1395 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus3:
1396 ; CHECK-P10-LE: # %bb.0: # %entry
1397 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+3(0), 1
1398 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+3(0), 1
1399 ; CHECK-P10-LE-NEXT: blr
1401 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus3:
1402 ; CHECK-P10-BE: # %bb.0: # %entry
1403 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
1404 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
1405 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
1406 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+3(r4)
1407 ; CHECK-P10-BE-NEXT: blr
1409 ; CHECK-LABEL: testGlob9PtrPlus3:
1410 ; CHECK: # %bb.0: # %entry
1411 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
1412 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
1413 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
1414 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+3(r4)
1417 %0 = load float, float* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x float]* @GlobLd9 to i8*), i64 3) to float*), align 4
1418 store float %0, float* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x float]* @GlobSt9 to i8*), i64 3) to float*), align 4
1422 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1423 define dso_local void @testGlob9PtrPlus4() {
1424 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus4:
1425 ; CHECK-P10-LE: # %bb.0: # %entry
1426 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+4(0), 1
1427 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+4(0), 1
1428 ; CHECK-P10-LE-NEXT: blr
1430 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus4:
1431 ; CHECK-P10-BE: # %bb.0: # %entry
1432 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+4
1433 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+4
1434 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
1435 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+4(r4)
1436 ; CHECK-P10-BE-NEXT: blr
1438 ; CHECK-LABEL: testGlob9PtrPlus4:
1439 ; CHECK: # %bb.0: # %entry
1440 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+4
1441 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+4
1442 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
1443 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+4(r4)
1446 %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 1), align 4
1447 store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 1), align 4
1451 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1452 define dso_local void @testGlob9PtrPlus16() {
1453 ; CHECK-P10-LE-LABEL: testGlob9PtrPlus16:
1454 ; CHECK-P10-LE: # %bb.0: # %entry
1455 ; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+16(0), 1
1456 ; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+16(0), 1
1457 ; CHECK-P10-LE-NEXT: blr
1459 ; CHECK-P10-BE-LABEL: testGlob9PtrPlus16:
1460 ; CHECK-P10-BE: # %bb.0: # %entry
1461 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+16
1462 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+16
1463 ; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
1464 ; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+16(r4)
1465 ; CHECK-P10-BE-NEXT: blr
1467 ; CHECK-LABEL: testGlob9PtrPlus16:
1468 ; CHECK: # %bb.0: # %entry
1469 ; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+16
1470 ; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+16
1471 ; CHECK-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
1472 ; CHECK-NEXT: stw r3, GlobSt9@toc@l+16(r4)
1475 %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 4), align 4
1476 store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 4), align 4
1480 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1481 define dso_local void @testGlob9PtrPlusVar(i64 %Idx) {
1482 ; CHECK-P10-LE-LABEL: testGlob9PtrPlusVar:
1483 ; CHECK-P10-LE: # %bb.0: # %entry
1484 ; CHECK-P10-LE-NEXT: sldi r3, r3, 2
1485 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd9@PCREL, 1
1486 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt9@PCREL, 1
1487 ; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
1488 ; CHECK-P10-LE-NEXT: stwx r4, r5, r3
1489 ; CHECK-P10-LE-NEXT: blr
1491 ; CHECK-P10-BE-LABEL: testGlob9PtrPlusVar:
1492 ; CHECK-P10-BE: # %bb.0: # %entry
1493 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd9@toc@ha
1494 ; CHECK-P10-BE-NEXT: sldi r3, r3, 2
1495 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt9@toc@ha
1496 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd9@toc@l
1497 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt9@toc@l
1498 ; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
1499 ; CHECK-P10-BE-NEXT: stwx r4, r5, r3
1500 ; CHECK-P10-BE-NEXT: blr
1502 ; CHECK-LABEL: testGlob9PtrPlusVar:
1503 ; CHECK: # %bb.0: # %entry
1504 ; CHECK-NEXT: addis r4, r2, GlobLd9@toc@ha
1505 ; CHECK-NEXT: sldi r3, r3, 2
1506 ; CHECK-NEXT: addis r5, r2, GlobSt9@toc@ha
1507 ; CHECK-NEXT: addi r4, r4, GlobLd9@toc@l
1508 ; CHECK-NEXT: addi r5, r5, GlobSt9@toc@l
1509 ; CHECK-NEXT: lwzx r4, r4, r3
1510 ; CHECK-NEXT: stwx r4, r5, r3
1513 %arrayidx = getelementptr inbounds [20 x float], [20 x float]* @GlobLd9, i64 0, i64 %Idx
1514 %0 = load float, float* %arrayidx, align 4
1515 %arrayidx1 = getelementptr inbounds [20 x float], [20 x float]* @GlobSt9, i64 0, i64 %Idx
1516 store float %0, float* %arrayidx1, align 4
1520 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1521 define dso_local void @testGlob10PtrPlus0() {
1522 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus0:
1523 ; CHECK-P10-LE: # %bb.0: # %entry
1524 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL(0), 1
1525 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL(0), 1
1526 ; CHECK-P10-LE-NEXT: blr
1528 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus0:
1529 ; CHECK-P10-BE: # %bb.0: # %entry
1530 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1531 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
1532 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l(r3)
1533 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l(r4)
1534 ; CHECK-P10-BE-NEXT: blr
1536 ; CHECK-P9-LABEL: testGlob10PtrPlus0:
1537 ; CHECK-P9: # %bb.0: # %entry
1538 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
1539 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
1540 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l(r3)
1541 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l(r4)
1542 ; CHECK-P9-NEXT: blr
1544 ; CHECK-P8-LABEL: testGlob10PtrPlus0:
1545 ; CHECK-P8: # %bb.0: # %entry
1546 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
1547 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l(r3)
1548 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
1549 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l(r4)
1550 ; CHECK-P8-NEXT: blr
1552 %0 = load double, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobLd10, i64 0, i64 0), align 8
1553 store double %0, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobSt10, i64 0, i64 0), align 8
1557 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1558 define dso_local void @testGlob10PtrPlus3() {
1559 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus3:
1560 ; CHECK-P10-LE: # %bb.0: # %entry
1561 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+3(0), 1
1562 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+3(0), 1
1563 ; CHECK-P10-LE-NEXT: blr
1565 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus3:
1566 ; CHECK-P10-BE: # %bb.0: # %entry
1567 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1568 ; CHECK-P10-BE-NEXT: li r4, 3
1569 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt10@toc@ha
1570 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd10@toc@l
1571 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt10@toc@l
1572 ; CHECK-P10-BE-NEXT: ldx r3, r3, r4
1573 ; CHECK-P10-BE-NEXT: stdx r3, r5, r4
1574 ; CHECK-P10-BE-NEXT: blr
1576 ; CHECK-LABEL: testGlob10PtrPlus3:
1577 ; CHECK: # %bb.0: # %entry
1578 ; CHECK-NEXT: addis r3, r2, GlobLd10@toc@ha
1579 ; CHECK-NEXT: li r4, 3
1580 ; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
1581 ; CHECK-NEXT: addi r3, r3, GlobLd10@toc@l
1582 ; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
1583 ; CHECK-NEXT: ldx r3, r3, r4
1584 ; CHECK-NEXT: stdx r3, r5, r4
1587 %0 = load double, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobLd10 to i8*), i64 3) to double*), align 8
1588 store double %0, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobSt10 to i8*), i64 3) to double*), align 8
1592 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1593 define dso_local void @testGlob10PtrPlus4() {
1594 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus4:
1595 ; CHECK-P10-LE: # %bb.0: # %entry
1596 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+4(0), 1
1597 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+4(0), 1
1598 ; CHECK-P10-LE-NEXT: blr
1600 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus4:
1601 ; CHECK-P10-BE: # %bb.0: # %entry
1602 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
1603 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
1604 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1605 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+4(r4)
1606 ; CHECK-P10-BE-NEXT: blr
1608 ; CHECK-P9-LABEL: testGlob10PtrPlus4:
1609 ; CHECK-P9: # %bb.0: # %entry
1610 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
1611 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
1612 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1613 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+4(r4)
1614 ; CHECK-P9-NEXT: blr
1616 ; CHECK-P8-LABEL: testGlob10PtrPlus4:
1617 ; CHECK-P8: # %bb.0: # %entry
1618 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
1619 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+4(r3)
1620 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
1621 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+4(r4)
1622 ; CHECK-P8-NEXT: blr
1624 %0 = load double, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobLd10 to i8*), i64 4) to double*), align 8
1625 store double %0, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobSt10 to i8*), i64 4) to double*), align 8
1629 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1630 define dso_local void @testGlob10PtrPlus16() {
1631 ; CHECK-P10-LE-LABEL: testGlob10PtrPlus16:
1632 ; CHECK-P10-LE: # %bb.0: # %entry
1633 ; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+16(0), 1
1634 ; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+16(0), 1
1635 ; CHECK-P10-LE-NEXT: blr
1637 ; CHECK-P10-BE-LABEL: testGlob10PtrPlus16:
1638 ; CHECK-P10-BE: # %bb.0: # %entry
1639 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1640 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1641 ; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1642 ; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+16(r4)
1643 ; CHECK-P10-BE-NEXT: blr
1645 ; CHECK-P9-LABEL: testGlob10PtrPlus16:
1646 ; CHECK-P9: # %bb.0: # %entry
1647 ; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1648 ; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1649 ; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1650 ; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+16(r4)
1651 ; CHECK-P9-NEXT: blr
1653 ; CHECK-P8-LABEL: testGlob10PtrPlus16:
1654 ; CHECK-P8: # %bb.0: # %entry
1655 ; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha+16
1656 ; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+16(r3)
1657 ; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha+16
1658 ; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+16(r4)
1659 ; CHECK-P8-NEXT: blr
1661 %0 = load double, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobLd10, i64 0, i64 2), align 8
1662 store double %0, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobSt10, i64 0, i64 2), align 8
1666 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1667 define dso_local void @testGlob10PtrPlusVar(i64 %Idx) {
1668 ; CHECK-P10-LE-LABEL: testGlob10PtrPlusVar:
1669 ; CHECK-P10-LE: # %bb.0: # %entry
1670 ; CHECK-P10-LE-NEXT: sldi r3, r3, 3
1671 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd10@PCREL, 1
1672 ; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt10@PCREL, 1
1673 ; CHECK-P10-LE-NEXT: ldx r4, r4, r3
1674 ; CHECK-P10-LE-NEXT: stdx r4, r5, r3
1675 ; CHECK-P10-LE-NEXT: blr
1677 ; CHECK-P10-BE-LABEL: testGlob10PtrPlusVar:
1678 ; CHECK-P10-BE: # %bb.0: # %entry
1679 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd10@toc@ha
1680 ; CHECK-P10-BE-NEXT: sldi r3, r3, 3
1681 ; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt10@toc@ha
1682 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd10@toc@l
1683 ; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt10@toc@l
1684 ; CHECK-P10-BE-NEXT: ldx r4, r4, r3
1685 ; CHECK-P10-BE-NEXT: stdx r4, r5, r3
1686 ; CHECK-P10-BE-NEXT: blr
1688 ; CHECK-LABEL: testGlob10PtrPlusVar:
1689 ; CHECK: # %bb.0: # %entry
1690 ; CHECK-NEXT: addis r4, r2, GlobLd10@toc@ha
1691 ; CHECK-NEXT: sldi r3, r3, 3
1692 ; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
1693 ; CHECK-NEXT: addi r4, r4, GlobLd10@toc@l
1694 ; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
1695 ; CHECK-NEXT: ldx r4, r4, r3
1696 ; CHECK-NEXT: stdx r4, r5, r3
1699 %arrayidx = getelementptr inbounds [20 x double], [20 x double]* @GlobLd10, i64 0, i64 %Idx
1700 %0 = load double, double* %arrayidx, align 8
1701 %arrayidx1 = getelementptr inbounds [20 x double], [20 x double]* @GlobSt10, i64 0, i64 %Idx
1702 store double %0, double* %arrayidx1, align 8
1706 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1707 define dso_local void @testGlob11PtrPlus0() {
1708 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus0:
1709 ; CHECK-P10-LE: # %bb.0: # %entry
1710 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL(0), 1
1711 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL(0), 1
1712 ; CHECK-P10-LE-NEXT: blr
1714 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus0:
1715 ; CHECK-P10-BE: # %bb.0: # %entry
1716 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1717 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1718 ; CHECK-P10-BE-NEXT: lxv vs0, 0(r3)
1719 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1720 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1721 ; CHECK-P10-BE-NEXT: stxv vs0, 0(r3)
1722 ; CHECK-P10-BE-NEXT: blr
1724 ; CHECK-P9-LABEL: testGlob11PtrPlus0:
1725 ; CHECK-P9: # %bb.0: # %entry
1726 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1727 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1728 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
1729 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1730 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1731 ; CHECK-P9-NEXT: stxv vs0, 0(r3)
1732 ; CHECK-P9-NEXT: blr
1734 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus0:
1735 ; CHECK-P8-LE: # %bb.0: # %entry
1736 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1737 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1738 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
1739 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1740 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1741 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1742 ; CHECK-P8-LE-NEXT: blr
1744 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus0:
1745 ; CHECK-P8-BE: # %bb.0: # %entry
1746 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1747 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1748 ; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
1749 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1750 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1751 ; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
1752 ; CHECK-P8-BE-NEXT: blr
1754 %0 = load <16 x i8>, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0), align 16
1755 store <16 x i8> %0, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0), align 16
1759 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1760 define dso_local void @testGlob11PtrPlus3() {
1761 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus3:
1762 ; CHECK-P10-LE: # %bb.0: # %entry
1763 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+3(0), 1
1764 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+3(0), 1
1765 ; CHECK-P10-LE-NEXT: blr
1767 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus3:
1768 ; CHECK-P10-BE: # %bb.0: # %entry
1769 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1770 ; CHECK-P10-BE-NEXT: li r4, 3
1771 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1772 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
1773 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1774 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1775 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
1776 ; CHECK-P10-BE-NEXT: blr
1778 ; CHECK-P9-LABEL: testGlob11PtrPlus3:
1779 ; CHECK-P9: # %bb.0: # %entry
1780 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1781 ; CHECK-P9-NEXT: li r4, 3
1782 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1783 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
1784 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1785 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1786 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
1787 ; CHECK-P9-NEXT: blr
1789 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus3:
1790 ; CHECK-P8-LE: # %bb.0: # %entry
1791 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1792 ; CHECK-P8-LE-NEXT: li r4, 3
1793 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1794 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
1795 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1796 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1797 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1798 ; CHECK-P8-LE-NEXT: blr
1800 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus3:
1801 ; CHECK-P8-BE: # %bb.0: # %entry
1802 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1803 ; CHECK-P8-BE-NEXT: li r4, 3
1804 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1805 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1806 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1807 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1808 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1809 ; CHECK-P8-BE-NEXT: blr
1811 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
1812 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
1816 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1817 define dso_local void @testGlob11PtrPlus4() {
1818 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus4:
1819 ; CHECK-P10-LE: # %bb.0: # %entry
1820 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+4(0), 1
1821 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+4(0), 1
1822 ; CHECK-P10-LE-NEXT: blr
1824 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus4:
1825 ; CHECK-P10-BE: # %bb.0: # %entry
1826 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1827 ; CHECK-P10-BE-NEXT: li r4, 4
1828 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1829 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
1830 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1831 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1832 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
1833 ; CHECK-P10-BE-NEXT: blr
1835 ; CHECK-P9-LABEL: testGlob11PtrPlus4:
1836 ; CHECK-P9: # %bb.0: # %entry
1837 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1838 ; CHECK-P9-NEXT: li r4, 4
1839 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1840 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
1841 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1842 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1843 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
1844 ; CHECK-P9-NEXT: blr
1846 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus4:
1847 ; CHECK-P8-LE: # %bb.0: # %entry
1848 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1849 ; CHECK-P8-LE-NEXT: li r4, 4
1850 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1851 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
1852 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1853 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1854 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1855 ; CHECK-P8-LE-NEXT: blr
1857 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus4:
1858 ; CHECK-P8-BE: # %bb.0: # %entry
1859 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1860 ; CHECK-P8-BE-NEXT: li r4, 4
1861 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1862 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1863 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1864 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1865 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1866 ; CHECK-P8-BE-NEXT: blr
1868 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
1869 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
1873 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1874 define dso_local void @testGlob11PtrPlus16() {
1875 ; CHECK-P10-LE-LABEL: testGlob11PtrPlus16:
1876 ; CHECK-P10-LE: # %bb.0: # %entry
1877 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+16(0), 1
1878 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+16(0), 1
1879 ; CHECK-P10-LE-NEXT: blr
1881 ; CHECK-P10-BE-LABEL: testGlob11PtrPlus16:
1882 ; CHECK-P10-BE: # %bb.0: # %entry
1883 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1884 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1885 ; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
1886 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1887 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1888 ; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
1889 ; CHECK-P10-BE-NEXT: blr
1891 ; CHECK-P9-LABEL: testGlob11PtrPlus16:
1892 ; CHECK-P9: # %bb.0: # %entry
1893 ; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
1894 ; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
1895 ; CHECK-P9-NEXT: lxv vs0, 16(r3)
1896 ; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
1897 ; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
1898 ; CHECK-P9-NEXT: stxv vs0, 16(r3)
1899 ; CHECK-P9-NEXT: blr
1901 ; CHECK-P8-LE-LABEL: testGlob11PtrPlus16:
1902 ; CHECK-P8-LE: # %bb.0: # %entry
1903 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
1904 ; CHECK-P8-LE-NEXT: li r4, 16
1905 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
1906 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
1907 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
1908 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
1909 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1910 ; CHECK-P8-LE-NEXT: blr
1912 ; CHECK-P8-BE-LABEL: testGlob11PtrPlus16:
1913 ; CHECK-P8-BE: # %bb.0: # %entry
1914 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
1915 ; CHECK-P8-BE-NEXT: li r4, 16
1916 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
1917 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
1918 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
1919 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
1920 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
1921 ; CHECK-P8-BE-NEXT: blr
1923 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
1924 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
1928 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1929 define dso_local void @testGlob11PtrPlusVar(i64 %Idx) {
1930 ; CHECK-P10-LE-LABEL: testGlob11PtrPlusVar:
1931 ; CHECK-P10-LE: # %bb.0: # %entry
1932 ; CHECK-P10-LE-NEXT: sldi r3, r3, 4
1933 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd11@PCREL, 1
1934 ; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
1935 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt11@PCREL, 1
1936 ; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
1937 ; CHECK-P10-LE-NEXT: blr
1939 ; CHECK-P10-BE-LABEL: testGlob11PtrPlusVar:
1940 ; CHECK-P10-BE: # %bb.0: # %entry
1941 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
1942 ; CHECK-P10-BE-NEXT: sldi r3, r3, 4
1943 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd11@toc@l
1944 ; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
1945 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
1946 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt11@toc@l
1947 ; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
1948 ; CHECK-P10-BE-NEXT: blr
1950 ; CHECK-P9-LABEL: testGlob11PtrPlusVar:
1951 ; CHECK-P9: # %bb.0: # %entry
1952 ; CHECK-P9-NEXT: addis r4, r2, GlobLd11@toc@ha
1953 ; CHECK-P9-NEXT: sldi r3, r3, 4
1954 ; CHECK-P9-NEXT: addi r4, r4, GlobLd11@toc@l
1955 ; CHECK-P9-NEXT: lxvx vs0, r4, r3
1956 ; CHECK-P9-NEXT: addis r4, r2, GlobSt11@toc@ha
1957 ; CHECK-P9-NEXT: addi r4, r4, GlobSt11@toc@l
1958 ; CHECK-P9-NEXT: stxvx vs0, r4, r3
1959 ; CHECK-P9-NEXT: blr
1961 ; CHECK-P8-LE-LABEL: testGlob11PtrPlusVar:
1962 ; CHECK-P8-LE: # %bb.0: # %entry
1963 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd11@toc@ha
1964 ; CHECK-P8-LE-NEXT: sldi r3, r3, 4
1965 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd11@toc@l
1966 ; CHECK-P8-LE-NEXT: lvx v2, r4, r3
1967 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt11@toc@ha
1968 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt11@toc@l
1969 ; CHECK-P8-LE-NEXT: stvx v2, r4, r3
1970 ; CHECK-P8-LE-NEXT: blr
1972 ; CHECK-P8-BE-LABEL: testGlob11PtrPlusVar:
1973 ; CHECK-P8-BE: # %bb.0: # %entry
1974 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
1975 ; CHECK-P8-BE-NEXT: sldi r3, r3, 4
1976 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd11@toc@l
1977 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
1978 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
1979 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt11@toc@l
1980 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
1981 ; CHECK-P8-BE-NEXT: blr
1983 %arrayidx = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 %Idx
1984 %0 = load <16 x i8>, <16 x i8>* %arrayidx, align 16
1985 %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 %Idx
1986 store <16 x i8> %0, <16 x i8>* %arrayidx1, align 16
1990 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
1991 define dso_local void @testGlob12PtrPlus0() {
1992 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus0:
1993 ; CHECK-P10-LE: # %bb.0: # %entry
1994 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL(0), 1
1995 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL(0), 1
1996 ; CHECK-P10-LE-NEXT: blr
1998 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus0:
1999 ; CHECK-P10-BE: # %bb.0: # %entry
2000 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2001 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2002 ; CHECK-P10-BE-NEXT: lxv vs0, 0(r3)
2003 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2004 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2005 ; CHECK-P10-BE-NEXT: stxv vs0, 0(r3)
2006 ; CHECK-P10-BE-NEXT: blr
2008 ; CHECK-P9-LABEL: testGlob12PtrPlus0:
2009 ; CHECK-P9: # %bb.0: # %entry
2010 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2011 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2012 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
2013 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2014 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2015 ; CHECK-P9-NEXT: stxv vs0, 0(r3)
2016 ; CHECK-P9-NEXT: blr
2018 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus0:
2019 ; CHECK-P8-LE: # %bb.0: # %entry
2020 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2021 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2022 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
2023 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2024 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2025 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
2026 ; CHECK-P8-LE-NEXT: blr
2028 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus0:
2029 ; CHECK-P8-BE: # %bb.0: # %entry
2030 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2031 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2032 ; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
2033 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2034 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2035 ; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
2036 ; CHECK-P8-BE-NEXT: blr
2038 %0 = load <16 x i8>, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0), align 16
2039 store <16 x i8> %0, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0), align 16
2043 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2044 define dso_local void @testGlob12PtrPlus3() {
2045 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus3:
2046 ; CHECK-P10-LE: # %bb.0: # %entry
2047 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+3(0), 1
2048 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+3(0), 1
2049 ; CHECK-P10-LE-NEXT: blr
2051 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus3:
2052 ; CHECK-P10-BE: # %bb.0: # %entry
2053 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2054 ; CHECK-P10-BE-NEXT: li r4, 3
2055 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2056 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
2057 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2058 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2059 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
2060 ; CHECK-P10-BE-NEXT: blr
2062 ; CHECK-P9-LABEL: testGlob12PtrPlus3:
2063 ; CHECK-P9: # %bb.0: # %entry
2064 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2065 ; CHECK-P9-NEXT: li r4, 3
2066 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2067 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
2068 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2069 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2070 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
2071 ; CHECK-P9-NEXT: blr
2073 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus3:
2074 ; CHECK-P8-LE: # %bb.0: # %entry
2075 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2076 ; CHECK-P8-LE-NEXT: li r4, 3
2077 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2078 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
2079 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2080 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2081 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
2082 ; CHECK-P8-LE-NEXT: blr
2084 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus3:
2085 ; CHECK-P8-BE: # %bb.0: # %entry
2086 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2087 ; CHECK-P8-BE-NEXT: li r4, 3
2088 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2089 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2090 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2091 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2092 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2093 ; CHECK-P8-BE-NEXT: blr
2095 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
2096 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
2100 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2101 define dso_local void @testGlob12PtrPlus4() {
2102 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus4:
2103 ; CHECK-P10-LE: # %bb.0: # %entry
2104 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+4(0), 1
2105 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+4(0), 1
2106 ; CHECK-P10-LE-NEXT: blr
2108 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus4:
2109 ; CHECK-P10-BE: # %bb.0: # %entry
2110 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2111 ; CHECK-P10-BE-NEXT: li r4, 4
2112 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2113 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
2114 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2115 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2116 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
2117 ; CHECK-P10-BE-NEXT: blr
2119 ; CHECK-P9-LABEL: testGlob12PtrPlus4:
2120 ; CHECK-P9: # %bb.0: # %entry
2121 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2122 ; CHECK-P9-NEXT: li r4, 4
2123 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2124 ; CHECK-P9-NEXT: lxvx vs0, r3, r4
2125 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2126 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2127 ; CHECK-P9-NEXT: stxvx vs0, r3, r4
2128 ; CHECK-P9-NEXT: blr
2130 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus4:
2131 ; CHECK-P8-LE: # %bb.0: # %entry
2132 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2133 ; CHECK-P8-LE-NEXT: li r4, 4
2134 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2135 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
2136 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2137 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2138 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
2139 ; CHECK-P8-LE-NEXT: blr
2141 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus4:
2142 ; CHECK-P8-BE: # %bb.0: # %entry
2143 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2144 ; CHECK-P8-BE-NEXT: li r4, 4
2145 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2146 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2147 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2148 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2149 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2150 ; CHECK-P8-BE-NEXT: blr
2152 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
2153 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
2157 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2158 define dso_local void @testGlob12PtrPlus16() {
2159 ; CHECK-P10-LE-LABEL: testGlob12PtrPlus16:
2160 ; CHECK-P10-LE: # %bb.0: # %entry
2161 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+16(0), 1
2162 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+16(0), 1
2163 ; CHECK-P10-LE-NEXT: blr
2165 ; CHECK-P10-BE-LABEL: testGlob12PtrPlus16:
2166 ; CHECK-P10-BE: # %bb.0: # %entry
2167 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2168 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2169 ; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
2170 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2171 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2172 ; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
2173 ; CHECK-P10-BE-NEXT: blr
2175 ; CHECK-P9-LABEL: testGlob12PtrPlus16:
2176 ; CHECK-P9: # %bb.0: # %entry
2177 ; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
2178 ; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
2179 ; CHECK-P9-NEXT: lxv vs0, 16(r3)
2180 ; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
2181 ; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
2182 ; CHECK-P9-NEXT: stxv vs0, 16(r3)
2183 ; CHECK-P9-NEXT: blr
2185 ; CHECK-P8-LE-LABEL: testGlob12PtrPlus16:
2186 ; CHECK-P8-LE: # %bb.0: # %entry
2187 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
2188 ; CHECK-P8-LE-NEXT: li r4, 16
2189 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
2190 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
2191 ; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
2192 ; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
2193 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
2194 ; CHECK-P8-LE-NEXT: blr
2196 ; CHECK-P8-BE-LABEL: testGlob12PtrPlus16:
2197 ; CHECK-P8-BE: # %bb.0: # %entry
2198 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
2199 ; CHECK-P8-BE-NEXT: li r4, 16
2200 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
2201 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
2202 ; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
2203 ; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
2204 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
2205 ; CHECK-P8-BE-NEXT: blr
2207 %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
2208 store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
2212 ; Function Attrs: nofree norecurse nounwind uwtable willreturn
2213 define dso_local void @testGlob12PtrPlusVar(i64 %Idx) {
2214 ; CHECK-P10-LE-LABEL: testGlob12PtrPlusVar:
2215 ; CHECK-P10-LE: # %bb.0: # %entry
2216 ; CHECK-P10-LE-NEXT: sldi r3, r3, 4
2217 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd12@PCREL, 1
2218 ; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
2219 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt12@PCREL, 1
2220 ; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
2221 ; CHECK-P10-LE-NEXT: blr
2223 ; CHECK-P10-BE-LABEL: testGlob12PtrPlusVar:
2224 ; CHECK-P10-BE: # %bb.0: # %entry
2225 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
2226 ; CHECK-P10-BE-NEXT: sldi r3, r3, 4
2227 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd12@toc@l
2228 ; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
2229 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
2230 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt12@toc@l
2231 ; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
2232 ; CHECK-P10-BE-NEXT: blr
2234 ; CHECK-P9-LABEL: testGlob12PtrPlusVar:
2235 ; CHECK-P9: # %bb.0: # %entry
2236 ; CHECK-P9-NEXT: addis r4, r2, GlobLd12@toc@ha
2237 ; CHECK-P9-NEXT: sldi r3, r3, 4
2238 ; CHECK-P9-NEXT: addi r4, r4, GlobLd12@toc@l
2239 ; CHECK-P9-NEXT: lxvx vs0, r4, r3
2240 ; CHECK-P9-NEXT: addis r4, r2, GlobSt12@toc@ha
2241 ; CHECK-P9-NEXT: addi r4, r4, GlobSt12@toc@l
2242 ; CHECK-P9-NEXT: stxvx vs0, r4, r3
2243 ; CHECK-P9-NEXT: blr
2245 ; CHECK-P8-LE-LABEL: testGlob12PtrPlusVar:
2246 ; CHECK-P8-LE: # %bb.0: # %entry
2247 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd12@toc@ha
2248 ; CHECK-P8-LE-NEXT: sldi r3, r3, 4
2249 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd12@toc@l
2250 ; CHECK-P8-LE-NEXT: lvx v2, r4, r3
2251 ; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt12@toc@ha
2252 ; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt12@toc@l
2253 ; CHECK-P8-LE-NEXT: stvx v2, r4, r3
2254 ; CHECK-P8-LE-NEXT: blr
2256 ; CHECK-P8-BE-LABEL: testGlob12PtrPlusVar:
2257 ; CHECK-P8-BE: # %bb.0: # %entry
2258 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
2259 ; CHECK-P8-BE-NEXT: sldi r3, r3, 4
2260 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd12@toc@l
2261 ; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
2262 ; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
2263 ; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt12@toc@l
2264 ; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
2265 ; CHECK-P8-BE-NEXT: blr
2267 %arrayidx = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 %Idx
2268 %0 = load <16 x i8>, <16 x i8>* %arrayidx, align 16
2269 %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 %Idx
2270 store <16 x i8> %0, <16 x i8>* %arrayidx1, align 16