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-prefixes=CHECK,CHECK-P10,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-prefixes=CHECK,CHECK-P10,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-PREP10
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-PREP10
15 @GlobLd128 = dso_local local_unnamed_addr global [20 x fp128] zeroinitializer, align 16
16 @GlobSt128 = dso_local local_unnamed_addr global [20 x fp128] zeroinitializer, align 16
18 ; Function Attrs: norecurse nounwind readonly willreturn
19 define dso_local fp128 @ld_0___float128___float128(i64 %ptr) {
20 ; CHECK-LABEL: ld_0___float128___float128:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: lxv v2, 0(r3)
25 %0 = inttoptr i64 %ptr to fp128*
26 %1 = load fp128, fp128* %0, align 16
30 ; Function Attrs: norecurse nounwind readonly willreturn
31 define dso_local fp128 @ld_unalign16___float128___float128(i8* nocapture readonly %ptr) {
32 ; CHECK-LABEL: ld_unalign16___float128___float128:
33 ; CHECK: # %bb.0: # %entry
34 ; CHECK-NEXT: li r4, 1
35 ; CHECK-NEXT: lxvx v2, r3, r4
38 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
39 %0 = bitcast i8* %add.ptr to fp128*
40 %1 = load fp128, fp128* %0, align 16
44 ; Function Attrs: norecurse nounwind readonly willreturn
45 define dso_local fp128 @ld_align16___float128___float128(i8* nocapture readonly %ptr) {
46 ; CHECK-LABEL: ld_align16___float128___float128:
47 ; CHECK: # %bb.0: # %entry
48 ; CHECK-NEXT: li r4, 8
49 ; CHECK-NEXT: lxvx v2, r3, r4
52 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
53 %0 = bitcast i8* %add.ptr to fp128*
54 %1 = load fp128, fp128* %0, align 16
58 ; Function Attrs: norecurse nounwind readonly willreturn
59 define dso_local fp128 @ld_unalign32___float128___float128(i8* nocapture readonly %ptr) {
60 ; CHECK-P10-LABEL: ld_unalign32___float128___float128:
61 ; CHECK-P10: # %bb.0: # %entry
62 ; CHECK-P10-NEXT: pli r4, 99999
63 ; CHECK-P10-NEXT: lxvx v2, r3, r4
66 ; CHECK-PREP10-LABEL: ld_unalign32___float128___float128:
67 ; CHECK-PREP10: # %bb.0: # %entry
68 ; CHECK-PREP10-NEXT: lis r4, 1
69 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
70 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
71 ; CHECK-PREP10-NEXT: blr
73 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
74 %0 = bitcast i8* %add.ptr to fp128*
75 %1 = load fp128, fp128* %0, align 16
79 ; Function Attrs: norecurse nounwind readonly willreturn
80 define dso_local fp128 @ld_align32___float128___float128(i8* nocapture readonly %ptr) {
81 ; CHECK-P10-LABEL: ld_align32___float128___float128:
82 ; CHECK-P10: # %bb.0: # %entry
83 ; CHECK-P10-NEXT: pli r4, 99999000
84 ; CHECK-P10-NEXT: lxvx v2, r3, r4
87 ; CHECK-PREP10-LABEL: ld_align32___float128___float128:
88 ; CHECK-PREP10: # %bb.0: # %entry
89 ; CHECK-PREP10-NEXT: lis r4, 1525
90 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
91 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
92 ; CHECK-PREP10-NEXT: blr
94 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
95 %0 = bitcast i8* %add.ptr to fp128*
96 %1 = load fp128, fp128* %0, align 16
100 ; Function Attrs: norecurse nounwind readonly willreturn
101 define dso_local fp128 @ld_unalign64___float128___float128(i8* nocapture readonly %ptr) {
102 ; CHECK-P10-LABEL: ld_unalign64___float128___float128:
103 ; CHECK-P10: # %bb.0: # %entry
104 ; CHECK-P10-NEXT: pli r4, 232
105 ; CHECK-P10-NEXT: pli r5, 3567587329
106 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
107 ; CHECK-P10-NEXT: lxvx v2, r3, r5
108 ; CHECK-P10-NEXT: blr
110 ; CHECK-PREP10-LABEL: ld_unalign64___float128___float128:
111 ; CHECK-PREP10: # %bb.0: # %entry
112 ; CHECK-PREP10-NEXT: li r4, 29
113 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
114 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
115 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
116 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
117 ; CHECK-PREP10-NEXT: blr
119 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
120 %0 = bitcast i8* %add.ptr to fp128*
121 %1 = load fp128, fp128* %0, align 16
125 ; Function Attrs: norecurse nounwind readonly willreturn
126 define dso_local fp128 @ld_align64___float128___float128(i8* nocapture readonly %ptr) {
127 ; CHECK-P10-LABEL: ld_align64___float128___float128:
128 ; CHECK-P10: # %bb.0: # %entry
129 ; CHECK-P10-NEXT: pli r4, 244140625
130 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
131 ; CHECK-P10-NEXT: lxvx v2, r3, r4
132 ; CHECK-P10-NEXT: blr
134 ; CHECK-PREP10-LABEL: ld_align64___float128___float128:
135 ; CHECK-PREP10: # %bb.0: # %entry
136 ; CHECK-PREP10-NEXT: lis r4, 3725
137 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
138 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
139 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
140 ; CHECK-PREP10-NEXT: blr
142 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
143 %0 = bitcast i8* %add.ptr to fp128*
144 %1 = load fp128, fp128* %0, align 16
148 ; Function Attrs: norecurse nounwind readonly willreturn
149 define dso_local fp128 @ld_reg___float128___float128(i8* nocapture readonly %ptr, i64 %off) {
150 ; CHECK-LABEL: ld_reg___float128___float128:
151 ; CHECK: # %bb.0: # %entry
152 ; CHECK-NEXT: lxvx v2, r3, r4
155 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
156 %0 = bitcast i8* %add.ptr to fp128*
157 %1 = load fp128, fp128* %0, align 16
161 ; Function Attrs: norecurse nounwind readonly willreturn
162 define dso_local fp128 @ld_or___float128___float128(i64 %ptr, i8 zeroext %off) {
163 ; CHECK-LABEL: ld_or___float128___float128:
164 ; CHECK: # %bb.0: # %entry
165 ; CHECK-NEXT: or r3, r4, r3
166 ; CHECK-NEXT: lxv v2, 0(r3)
169 %conv = zext i8 %off to i64
170 %or = or i64 %conv, %ptr
171 %0 = inttoptr i64 %or to fp128*
172 %1 = load fp128, fp128* %0, align 16
176 ; Function Attrs: norecurse nounwind readonly willreturn
177 define dso_local fp128 @ld_or2___float128___float128(i64 %ptr, i8 zeroext %off) {
178 ; CHECK-LABEL: ld_or2___float128___float128:
179 ; CHECK: # %bb.0: # %entry
180 ; CHECK-NEXT: rldicr r3, r3, 0, 51
181 ; CHECK-NEXT: lxvx v2, r3, r4
184 %and = and i64 %ptr, -4096
185 %conv = zext i8 %off to i64
186 %or = or i64 %and, %conv
187 %0 = inttoptr i64 %or to fp128*
188 %1 = load fp128, fp128* %0, align 16
192 ; Function Attrs: norecurse nounwind readonly willreturn
193 define dso_local fp128 @ld_not_disjoint16___float128___float128(i64 %ptr) {
194 ; CHECK-LABEL: ld_not_disjoint16___float128___float128:
195 ; CHECK: # %bb.0: # %entry
196 ; CHECK-NEXT: ori r3, r3, 6
197 ; CHECK-NEXT: lxv v2, 0(r3)
201 %0 = inttoptr i64 %or to fp128*
202 %1 = load fp128, fp128* %0, align 16
206 ; Function Attrs: norecurse nounwind readonly willreturn
207 define dso_local fp128 @ld_disjoint_unalign16___float128___float128(i64 %ptr) {
208 ; CHECK-LABEL: ld_disjoint_unalign16___float128___float128:
209 ; CHECK: # %bb.0: # %entry
210 ; CHECK-NEXT: rldicr r3, r3, 0, 51
211 ; CHECK-NEXT: li r4, 6
212 ; CHECK-NEXT: lxvx v2, r3, r4
215 %and = and i64 %ptr, -4096
217 %0 = inttoptr i64 %or to fp128*
218 %1 = load fp128, fp128* %0, align 16
222 ; Function Attrs: norecurse nounwind readonly willreturn
223 define dso_local fp128 @ld_disjoint_align16___float128___float128(i64 %ptr) {
224 ; CHECK-LABEL: ld_disjoint_align16___float128___float128:
225 ; CHECK: # %bb.0: # %entry
226 ; CHECK-NEXT: rldicr r3, r3, 0, 51
227 ; CHECK-NEXT: li r4, 24
228 ; CHECK-NEXT: lxvx v2, r3, r4
231 %and = and i64 %ptr, -4096
232 %or = or i64 %and, 24
233 %0 = inttoptr i64 %or to fp128*
234 %1 = load fp128, fp128* %0, align 16
238 ; Function Attrs: norecurse nounwind readonly willreturn
239 define dso_local fp128 @ld_not_disjoint32___float128___float128(i64 %ptr) {
240 ; CHECK-LABEL: ld_not_disjoint32___float128___float128:
241 ; CHECK: # %bb.0: # %entry
242 ; CHECK-NEXT: ori r3, r3, 34463
243 ; CHECK-NEXT: oris r3, r3, 1
244 ; CHECK-NEXT: lxv v2, 0(r3)
247 %or = or i64 %ptr, 99999
248 %0 = inttoptr i64 %or to fp128*
249 %1 = load fp128, fp128* %0, align 16
253 ; Function Attrs: norecurse nounwind readonly willreturn
254 define dso_local fp128 @ld_disjoint_unalign32___float128___float128(i64 %ptr) {
255 ; CHECK-P10-LABEL: ld_disjoint_unalign32___float128___float128:
256 ; CHECK-P10: # %bb.0: # %entry
257 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
258 ; CHECK-P10-NEXT: pli r4, 99999
259 ; CHECK-P10-NEXT: lxvx v2, r3, r4
260 ; CHECK-P10-NEXT: blr
262 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32___float128___float128:
263 ; CHECK-PREP10: # %bb.0: # %entry
264 ; CHECK-PREP10-NEXT: lis r4, 1
265 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
266 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
267 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
268 ; CHECK-PREP10-NEXT: blr
270 %and = and i64 %ptr, -1048576
271 %or = or i64 %and, 99999
272 %0 = inttoptr i64 %or to fp128*
273 %1 = load fp128, fp128* %0, align 16
277 ; Function Attrs: norecurse nounwind readonly willreturn
278 define dso_local fp128 @ld_disjoint_align32___float128___float128(i64 %ptr) {
279 ; CHECK-P10-LABEL: ld_disjoint_align32___float128___float128:
280 ; CHECK-P10: # %bb.0: # %entry
281 ; CHECK-P10-NEXT: lis r4, -15264
282 ; CHECK-P10-NEXT: and r3, r3, r4
283 ; CHECK-P10-NEXT: pli r4, 999990000
284 ; CHECK-P10-NEXT: lxvx v2, r3, r4
285 ; CHECK-P10-NEXT: blr
287 ; CHECK-PREP10-LABEL: ld_disjoint_align32___float128___float128:
288 ; CHECK-PREP10: # %bb.0: # %entry
289 ; CHECK-PREP10-NEXT: lis r4, -15264
290 ; CHECK-PREP10-NEXT: and r3, r3, r4
291 ; CHECK-PREP10-NEXT: lis r4, 15258
292 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
293 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
294 ; CHECK-PREP10-NEXT: blr
296 %and = and i64 %ptr, -1000341504
297 %or = or i64 %and, 999990000
298 %0 = inttoptr i64 %or to fp128*
299 %1 = load fp128, fp128* %0, align 16
303 ; Function Attrs: norecurse nounwind readonly willreturn
304 define dso_local fp128 @ld_not_disjoint64___float128___float128(i64 %ptr) {
305 ; CHECK-P10-LABEL: ld_not_disjoint64___float128___float128:
306 ; CHECK-P10: # %bb.0: # %entry
307 ; CHECK-P10-NEXT: pli r4, 232
308 ; CHECK-P10-NEXT: pli r5, 3567587329
309 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
310 ; CHECK-P10-NEXT: or r3, r3, r5
311 ; CHECK-P10-NEXT: lxv v2, 0(r3)
312 ; CHECK-P10-NEXT: blr
314 ; CHECK-PREP10-LABEL: ld_not_disjoint64___float128___float128:
315 ; CHECK-PREP10: # %bb.0: # %entry
316 ; CHECK-PREP10-NEXT: li r4, 29
317 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
318 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
319 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
320 ; CHECK-PREP10-NEXT: or r3, r3, r4
321 ; CHECK-PREP10-NEXT: lxv v2, 0(r3)
322 ; CHECK-PREP10-NEXT: blr
324 %or = or i64 %ptr, 1000000000001
325 %0 = inttoptr i64 %or to fp128*
326 %1 = load fp128, fp128* %0, align 16
330 ; Function Attrs: norecurse nounwind readonly willreturn
331 define dso_local fp128 @ld_disjoint_unalign64___float128___float128(i64 %ptr) {
332 ; CHECK-P10-LABEL: ld_disjoint_unalign64___float128___float128:
333 ; CHECK-P10: # %bb.0: # %entry
334 ; CHECK-P10-NEXT: pli r4, 232
335 ; CHECK-P10-NEXT: pli r5, 3567587329
336 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
337 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
338 ; CHECK-P10-NEXT: lxvx v2, r3, r5
339 ; CHECK-P10-NEXT: blr
341 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64___float128___float128:
342 ; CHECK-PREP10: # %bb.0: # %entry
343 ; CHECK-PREP10-NEXT: li r4, 29
344 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
345 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
346 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
347 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
348 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
349 ; CHECK-PREP10-NEXT: blr
351 %and = and i64 %ptr, -1099511627776
352 %or = or i64 %and, 1000000000001
353 %0 = inttoptr i64 %or to fp128*
354 %1 = load fp128, fp128* %0, align 16
358 ; Function Attrs: norecurse nounwind readonly willreturn
359 define dso_local fp128 @ld_disjoint_align64___float128___float128(i64 %ptr) {
360 ; CHECK-P10-LABEL: ld_disjoint_align64___float128___float128:
361 ; CHECK-P10: # %bb.0: # %entry
362 ; CHECK-P10-NEXT: pli r4, 244140625
363 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
364 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
365 ; CHECK-P10-NEXT: lxvx v2, r3, r4
366 ; CHECK-P10-NEXT: blr
368 ; CHECK-PREP10-LABEL: ld_disjoint_align64___float128___float128:
369 ; CHECK-PREP10: # %bb.0: # %entry
370 ; CHECK-PREP10-NEXT: lis r4, 3725
371 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
372 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
373 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
374 ; CHECK-PREP10-NEXT: lxvx v2, r3, r4
375 ; CHECK-PREP10-NEXT: blr
377 %and = and i64 %ptr, -1099511627776
378 %or = or i64 %and, 1000000000000
379 %0 = inttoptr i64 %or to fp128*
380 %1 = load fp128, fp128* %0, align 4096
384 ; Function Attrs: norecurse nounwind readonly willreturn
385 define dso_local fp128 @ld_cst_unalign16___float128___float128() {
386 ; CHECK-LABEL: ld_cst_unalign16___float128___float128:
387 ; CHECK: # %bb.0: # %entry
388 ; CHECK-NEXT: li r3, 255
389 ; CHECK-NEXT: lxv v2, 0(r3)
392 %0 = load fp128, fp128* inttoptr (i64 255 to fp128*), align 16
396 ; Function Attrs: norecurse nounwind readonly willreturn
397 define dso_local fp128 @ld_cst_align16___float128___float128() {
398 ; CHECK-LABEL: ld_cst_align16___float128___float128:
399 ; CHECK: # %bb.0: # %entry
400 ; CHECK-NEXT: lxv v2, 4080(0)
403 %0 = load fp128, fp128* inttoptr (i64 4080 to fp128*), align 16
407 ; Function Attrs: norecurse nounwind readonly willreturn
408 define dso_local fp128 @ld_cst_unalign32___float128___float128() {
409 ; CHECK-P10-LABEL: ld_cst_unalign32___float128___float128:
410 ; CHECK-P10: # %bb.0: # %entry
411 ; CHECK-P10-NEXT: pli r3, 99999
412 ; CHECK-P10-NEXT: lxv v2, 0(r3)
413 ; CHECK-P10-NEXT: blr
415 ; CHECK-PREP10-LABEL: ld_cst_unalign32___float128___float128:
416 ; CHECK-PREP10: # %bb.0: # %entry
417 ; CHECK-PREP10-NEXT: lis r3, 1
418 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
419 ; CHECK-PREP10-NEXT: lxv v2, 0(r3)
420 ; CHECK-PREP10-NEXT: blr
422 %0 = load fp128, fp128* inttoptr (i64 99999 to fp128*), align 16
426 ; Function Attrs: norecurse nounwind readonly willreturn
427 define dso_local fp128 @ld_cst_align32___float128___float128() {
428 ; CHECK-P10-LABEL: ld_cst_align32___float128___float128:
429 ; CHECK-P10: # %bb.0: # %entry
430 ; CHECK-P10-NEXT: pli r3, 9999900
431 ; CHECK-P10-NEXT: lxv v2, 0(r3)
432 ; CHECK-P10-NEXT: blr
434 ; CHECK-PREP10-LABEL: ld_cst_align32___float128___float128:
435 ; CHECK-PREP10: # %bb.0: # %entry
436 ; CHECK-PREP10-NEXT: lis r3, 152
437 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
438 ; CHECK-PREP10-NEXT: lxv v2, 0(r3)
439 ; CHECK-PREP10-NEXT: blr
441 %0 = load fp128, fp128* inttoptr (i64 9999900 to fp128*), align 16
445 ; Function Attrs: norecurse nounwind readonly willreturn
446 define dso_local fp128 @ld_cst_unalign64___float128___float128() {
447 ; CHECK-P10-LABEL: ld_cst_unalign64___float128___float128:
448 ; CHECK-P10: # %bb.0: # %entry
449 ; CHECK-P10-NEXT: pli r3, 232
450 ; CHECK-P10-NEXT: pli r4, 3567587329
451 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
452 ; CHECK-P10-NEXT: lxv v2, 0(r4)
453 ; CHECK-P10-NEXT: blr
455 ; CHECK-PREP10-LABEL: ld_cst_unalign64___float128___float128:
456 ; CHECK-PREP10: # %bb.0: # %entry
457 ; CHECK-PREP10-NEXT: li r3, 29
458 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
459 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
460 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
461 ; CHECK-PREP10-NEXT: lxv v2, 0(r3)
462 ; CHECK-PREP10-NEXT: blr
464 %0 = load fp128, fp128* inttoptr (i64 1000000000001 to fp128*), align 16
468 ; Function Attrs: norecurse nounwind readonly willreturn
469 define dso_local fp128 @ld_cst_align64___float128___float128() {
470 ; CHECK-P10-LABEL: ld_cst_align64___float128___float128:
471 ; CHECK-P10: # %bb.0: # %entry
472 ; CHECK-P10-NEXT: pli r3, 244140625
473 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
474 ; CHECK-P10-NEXT: lxv v2, 0(r3)
475 ; CHECK-P10-NEXT: blr
477 ; CHECK-PREP10-LABEL: ld_cst_align64___float128___float128:
478 ; CHECK-PREP10: # %bb.0: # %entry
479 ; CHECK-PREP10-NEXT: lis r3, 3725
480 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
481 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
482 ; CHECK-PREP10-NEXT: lxv v2, 0(r3)
483 ; CHECK-PREP10-NEXT: blr
485 %0 = load fp128, fp128* inttoptr (i64 1000000000000 to fp128*), align 4096
489 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
490 define dso_local void @st_0___float128___float128(i64 %ptr, fp128 %str) {
491 ; CHECK-LABEL: st_0___float128___float128:
492 ; CHECK: # %bb.0: # %entry
493 ; CHECK-NEXT: stxv v2, 0(r3)
496 %0 = inttoptr i64 %ptr to fp128*
497 store fp128 %str, fp128* %0, align 16
501 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
502 define dso_local void @st_unalign16___float128___float128(i8* nocapture %ptr, fp128 %str) {
503 ; CHECK-LABEL: st_unalign16___float128___float128:
504 ; CHECK: # %bb.0: # %entry
505 ; CHECK-NEXT: li r4, 1
506 ; CHECK-NEXT: stxvx v2, r3, r4
509 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
510 %0 = bitcast i8* %add.ptr to fp128*
511 store fp128 %str, fp128* %0, align 16
515 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
516 define dso_local void @st_align16___float128___float128(i8* nocapture %ptr, fp128 %str) {
517 ; CHECK-LABEL: st_align16___float128___float128:
518 ; CHECK: # %bb.0: # %entry
519 ; CHECK-NEXT: li r4, 8
520 ; CHECK-NEXT: stxvx v2, r3, r4
523 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
524 %0 = bitcast i8* %add.ptr to fp128*
525 store fp128 %str, fp128* %0, align 16
529 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
530 define dso_local void @st_unalign32___float128___float128(i8* nocapture %ptr, fp128 %str) {
531 ; CHECK-P10-LABEL: st_unalign32___float128___float128:
532 ; CHECK-P10: # %bb.0: # %entry
533 ; CHECK-P10-NEXT: pli r4, 99999
534 ; CHECK-P10-NEXT: stxvx v2, r3, r4
535 ; CHECK-P10-NEXT: blr
537 ; CHECK-PREP10-LABEL: st_unalign32___float128___float128:
538 ; CHECK-PREP10: # %bb.0: # %entry
539 ; CHECK-PREP10-NEXT: lis r4, 1
540 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
541 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
542 ; CHECK-PREP10-NEXT: blr
544 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
545 %0 = bitcast i8* %add.ptr to fp128*
546 store fp128 %str, fp128* %0, align 16
550 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
551 define dso_local void @st_align32___float128___float128(i8* nocapture %ptr, fp128 %str) {
552 ; CHECK-P10-LABEL: st_align32___float128___float128:
553 ; CHECK-P10: # %bb.0: # %entry
554 ; CHECK-P10-NEXT: pli r4, 99999000
555 ; CHECK-P10-NEXT: stxvx v2, r3, r4
556 ; CHECK-P10-NEXT: blr
558 ; CHECK-PREP10-LABEL: st_align32___float128___float128:
559 ; CHECK-PREP10: # %bb.0: # %entry
560 ; CHECK-PREP10-NEXT: lis r4, 1525
561 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
562 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
563 ; CHECK-PREP10-NEXT: blr
565 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
566 %0 = bitcast i8* %add.ptr to fp128*
567 store fp128 %str, fp128* %0, align 16
571 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
572 define dso_local void @st_unalign64___float128___float128(i8* nocapture %ptr, fp128 %str) {
573 ; CHECK-P10-LABEL: st_unalign64___float128___float128:
574 ; CHECK-P10: # %bb.0: # %entry
575 ; CHECK-P10-NEXT: pli r4, 232
576 ; CHECK-P10-NEXT: pli r5, 3567587329
577 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
578 ; CHECK-P10-NEXT: stxvx v2, r3, r5
579 ; CHECK-P10-NEXT: blr
581 ; CHECK-PREP10-LABEL: st_unalign64___float128___float128:
582 ; CHECK-PREP10: # %bb.0: # %entry
583 ; CHECK-PREP10-NEXT: li r4, 29
584 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
585 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
586 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
587 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
588 ; CHECK-PREP10-NEXT: blr
590 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
591 %0 = bitcast i8* %add.ptr to fp128*
592 store fp128 %str, fp128* %0, align 16
596 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
597 define dso_local void @st_align64___float128___float128(i8* nocapture %ptr, fp128 %str) {
598 ; CHECK-P10-LABEL: st_align64___float128___float128:
599 ; CHECK-P10: # %bb.0: # %entry
600 ; CHECK-P10-NEXT: pli r4, 244140625
601 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
602 ; CHECK-P10-NEXT: stxvx v2, r3, r4
603 ; CHECK-P10-NEXT: blr
605 ; CHECK-PREP10-LABEL: st_align64___float128___float128:
606 ; CHECK-PREP10: # %bb.0: # %entry
607 ; CHECK-PREP10-NEXT: lis r4, 3725
608 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
609 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
610 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
611 ; CHECK-PREP10-NEXT: blr
613 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
614 %0 = bitcast i8* %add.ptr to fp128*
615 store fp128 %str, fp128* %0, align 16
619 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
620 define dso_local void @st_reg___float128___float128(i8* nocapture %ptr, i64 %off, fp128 %str) {
621 ; CHECK-LABEL: st_reg___float128___float128:
622 ; CHECK: # %bb.0: # %entry
623 ; CHECK-NEXT: stxvx v2, r3, r4
626 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
627 %0 = bitcast i8* %add.ptr to fp128*
628 store fp128 %str, fp128* %0, align 16
632 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
633 define dso_local void @st_or1___float128___float128(i64 %ptr, i8 zeroext %off, fp128 %str) {
634 ; CHECK-LABEL: st_or1___float128___float128:
635 ; CHECK: # %bb.0: # %entry
636 ; CHECK-NEXT: or r3, r4, r3
637 ; CHECK-NEXT: stxv v2, 0(r3)
640 %conv = zext i8 %off to i64
641 %or = or i64 %conv, %ptr
642 %0 = inttoptr i64 %or to fp128*
643 store fp128 %str, fp128* %0, align 16
647 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
648 define dso_local void @st_or2___float128___float128(i64 %ptr, i8 zeroext %off, fp128 %str) {
649 ; CHECK-LABEL: st_or2___float128___float128:
650 ; CHECK: # %bb.0: # %entry
651 ; CHECK-NEXT: rldicr r3, r3, 0, 51
652 ; CHECK-NEXT: stxvx v2, r3, r4
655 %and = and i64 %ptr, -4096
656 %conv = zext i8 %off to i64
657 %or = or i64 %and, %conv
658 %0 = inttoptr i64 %or to fp128*
659 store fp128 %str, fp128* %0, align 16
663 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
664 define dso_local void @st_not_disjoint16___float128___float128(i64 %ptr, fp128 %str) {
665 ; CHECK-LABEL: st_not_disjoint16___float128___float128:
666 ; CHECK: # %bb.0: # %entry
667 ; CHECK-NEXT: ori r3, r3, 6
668 ; CHECK-NEXT: stxv v2, 0(r3)
672 %0 = inttoptr i64 %or to fp128*
673 store fp128 %str, fp128* %0, align 16
677 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
678 define dso_local void @st_disjoint_unalign16___float128___float128(i64 %ptr, fp128 %str) {
679 ; CHECK-LABEL: st_disjoint_unalign16___float128___float128:
680 ; CHECK: # %bb.0: # %entry
681 ; CHECK-NEXT: rldicr r3, r3, 0, 51
682 ; CHECK-NEXT: li r4, 6
683 ; CHECK-NEXT: stxvx v2, r3, r4
686 %and = and i64 %ptr, -4096
688 %0 = inttoptr i64 %or to fp128*
689 store fp128 %str, fp128* %0, align 16
693 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
694 define dso_local void @st_disjoint_align16___float128___float128(i64 %ptr, fp128 %str) {
695 ; CHECK-LABEL: st_disjoint_align16___float128___float128:
696 ; CHECK: # %bb.0: # %entry
697 ; CHECK-NEXT: rldicr r3, r3, 0, 51
698 ; CHECK-NEXT: li r4, 24
699 ; CHECK-NEXT: stxvx v2, r3, r4
702 %and = and i64 %ptr, -4096
703 %or = or i64 %and, 24
704 %0 = inttoptr i64 %or to fp128*
705 store fp128 %str, fp128* %0, align 16
709 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
710 define dso_local void @st_not_disjoint32___float128___float128(i64 %ptr, fp128 %str) {
711 ; CHECK-LABEL: st_not_disjoint32___float128___float128:
712 ; CHECK: # %bb.0: # %entry
713 ; CHECK-NEXT: ori r3, r3, 34463
714 ; CHECK-NEXT: oris r3, r3, 1
715 ; CHECK-NEXT: stxv v2, 0(r3)
718 %or = or i64 %ptr, 99999
719 %0 = inttoptr i64 %or to fp128*
720 store fp128 %str, fp128* %0, align 16
724 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
725 define dso_local void @st_disjoint_unalign32___float128___float128(i64 %ptr, fp128 %str) {
726 ; CHECK-P10-LABEL: st_disjoint_unalign32___float128___float128:
727 ; CHECK-P10: # %bb.0: # %entry
728 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
729 ; CHECK-P10-NEXT: pli r4, 99999
730 ; CHECK-P10-NEXT: stxvx v2, r3, r4
731 ; CHECK-P10-NEXT: blr
733 ; CHECK-PREP10-LABEL: st_disjoint_unalign32___float128___float128:
734 ; CHECK-PREP10: # %bb.0: # %entry
735 ; CHECK-PREP10-NEXT: lis r4, 1
736 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
737 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
738 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
739 ; CHECK-PREP10-NEXT: blr
741 %and = and i64 %ptr, -1048576
742 %or = or i64 %and, 99999
743 %0 = inttoptr i64 %or to fp128*
744 store fp128 %str, fp128* %0, align 16
748 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
749 define dso_local void @st_disjoint_align32___float128___float128(i64 %ptr, fp128 %str) {
750 ; CHECK-P10-LABEL: st_disjoint_align32___float128___float128:
751 ; CHECK-P10: # %bb.0: # %entry
752 ; CHECK-P10-NEXT: lis r4, -15264
753 ; CHECK-P10-NEXT: and r3, r3, r4
754 ; CHECK-P10-NEXT: pli r4, 999990000
755 ; CHECK-P10-NEXT: stxvx v2, r3, r4
756 ; CHECK-P10-NEXT: blr
758 ; CHECK-PREP10-LABEL: st_disjoint_align32___float128___float128:
759 ; CHECK-PREP10: # %bb.0: # %entry
760 ; CHECK-PREP10-NEXT: lis r4, -15264
761 ; CHECK-PREP10-NEXT: and r3, r3, r4
762 ; CHECK-PREP10-NEXT: lis r4, 15258
763 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
764 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
765 ; CHECK-PREP10-NEXT: blr
767 %and = and i64 %ptr, -1000341504
768 %or = or i64 %and, 999990000
769 %0 = inttoptr i64 %or to fp128*
770 store fp128 %str, fp128* %0, align 16
774 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
775 define dso_local void @st_not_disjoint64___float128___float128(i64 %ptr, fp128 %str) {
776 ; CHECK-P10-LABEL: st_not_disjoint64___float128___float128:
777 ; CHECK-P10: # %bb.0: # %entry
778 ; CHECK-P10-NEXT: pli r4, 232
779 ; CHECK-P10-NEXT: pli r5, 3567587329
780 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
781 ; CHECK-P10-NEXT: or r3, r3, r5
782 ; CHECK-P10-NEXT: stxv v2, 0(r3)
783 ; CHECK-P10-NEXT: blr
785 ; CHECK-PREP10-LABEL: st_not_disjoint64___float128___float128:
786 ; CHECK-PREP10: # %bb.0: # %entry
787 ; CHECK-PREP10-NEXT: li r4, 29
788 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
789 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
790 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
791 ; CHECK-PREP10-NEXT: or r3, r3, r4
792 ; CHECK-PREP10-NEXT: stxv v2, 0(r3)
793 ; CHECK-PREP10-NEXT: blr
795 %or = or i64 %ptr, 1000000000001
796 %0 = inttoptr i64 %or to fp128*
797 store fp128 %str, fp128* %0, align 16
801 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
802 define dso_local void @st_disjoint_unalign64___float128___float128(i64 %ptr, fp128 %str) {
803 ; CHECK-P10-LABEL: st_disjoint_unalign64___float128___float128:
804 ; CHECK-P10: # %bb.0: # %entry
805 ; CHECK-P10-NEXT: pli r4, 232
806 ; CHECK-P10-NEXT: pli r5, 3567587329
807 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
808 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
809 ; CHECK-P10-NEXT: stxvx v2, r3, r5
810 ; CHECK-P10-NEXT: blr
812 ; CHECK-PREP10-LABEL: st_disjoint_unalign64___float128___float128:
813 ; CHECK-PREP10: # %bb.0: # %entry
814 ; CHECK-PREP10-NEXT: li r4, 29
815 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
816 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
817 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
818 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
819 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
820 ; CHECK-PREP10-NEXT: blr
822 %and = and i64 %ptr, -1099511627776
823 %or = or i64 %and, 1000000000001
824 %0 = inttoptr i64 %or to fp128*
825 store fp128 %str, fp128* %0, align 16
829 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
830 define dso_local void @st_disjoint_align64___float128___float128(i64 %ptr, fp128 %str) {
831 ; CHECK-P10-LABEL: st_disjoint_align64___float128___float128:
832 ; CHECK-P10: # %bb.0: # %entry
833 ; CHECK-P10-NEXT: pli r4, 244140625
834 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
835 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
836 ; CHECK-P10-NEXT: stxvx v2, r3, r4
837 ; CHECK-P10-NEXT: blr
839 ; CHECK-PREP10-LABEL: st_disjoint_align64___float128___float128:
840 ; CHECK-PREP10: # %bb.0: # %entry
841 ; CHECK-PREP10-NEXT: lis r4, 3725
842 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
843 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
844 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
845 ; CHECK-PREP10-NEXT: stxvx v2, r3, r4
846 ; CHECK-PREP10-NEXT: blr
848 %and = and i64 %ptr, -1099511627776
849 %or = or i64 %and, 1000000000000
850 %0 = inttoptr i64 %or to fp128*
851 store fp128 %str, fp128* %0, align 4096
855 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
856 define dso_local void @st_cst_unalign16___float128___float128(fp128 %str) {
857 ; CHECK-LABEL: st_cst_unalign16___float128___float128:
858 ; CHECK: # %bb.0: # %entry
859 ; CHECK-NEXT: li r3, 255
860 ; CHECK-NEXT: stxv v2, 0(r3)
863 store fp128 %str, fp128* inttoptr (i64 255 to fp128*), align 16
867 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
868 define dso_local void @st_cst_align16___float128___float128(fp128 %str) {
869 ; CHECK-LABEL: st_cst_align16___float128___float128:
870 ; CHECK: # %bb.0: # %entry
871 ; CHECK-NEXT: stxv v2, 4080(0)
874 store fp128 %str, fp128* inttoptr (i64 4080 to fp128*), align 16
878 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
879 define dso_local void @st_cst_unalign32___float128___float128(fp128 %str) {
880 ; CHECK-P10-LABEL: st_cst_unalign32___float128___float128:
881 ; CHECK-P10: # %bb.0: # %entry
882 ; CHECK-P10-NEXT: pli r3, 99999
883 ; CHECK-P10-NEXT: stxv v2, 0(r3)
884 ; CHECK-P10-NEXT: blr
886 ; CHECK-PREP10-LABEL: st_cst_unalign32___float128___float128:
887 ; CHECK-PREP10: # %bb.0: # %entry
888 ; CHECK-PREP10-NEXT: lis r3, 1
889 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
890 ; CHECK-PREP10-NEXT: stxv v2, 0(r3)
891 ; CHECK-PREP10-NEXT: blr
893 store fp128 %str, fp128* inttoptr (i64 99999 to fp128*), align 16
897 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
898 define dso_local void @st_cst_align32___float128___float128(fp128 %str) {
899 ; CHECK-P10-LABEL: st_cst_align32___float128___float128:
900 ; CHECK-P10: # %bb.0: # %entry
901 ; CHECK-P10-NEXT: pli r3, 9999900
902 ; CHECK-P10-NEXT: stxv v2, 0(r3)
903 ; CHECK-P10-NEXT: blr
905 ; CHECK-PREP10-LABEL: st_cst_align32___float128___float128:
906 ; CHECK-PREP10: # %bb.0: # %entry
907 ; CHECK-PREP10-NEXT: lis r3, 152
908 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
909 ; CHECK-PREP10-NEXT: stxv v2, 0(r3)
910 ; CHECK-PREP10-NEXT: blr
912 store fp128 %str, fp128* inttoptr (i64 9999900 to fp128*), align 16
916 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
917 define dso_local void @st_cst_unalign64___float128___float128(fp128 %str) {
918 ; CHECK-P10-LABEL: st_cst_unalign64___float128___float128:
919 ; CHECK-P10: # %bb.0: # %entry
920 ; CHECK-P10-NEXT: pli r3, 232
921 ; CHECK-P10-NEXT: pli r4, 3567587329
922 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
923 ; CHECK-P10-NEXT: stxv v2, 0(r4)
924 ; CHECK-P10-NEXT: blr
926 ; CHECK-PREP10-LABEL: st_cst_unalign64___float128___float128:
927 ; CHECK-PREP10: # %bb.0: # %entry
928 ; CHECK-PREP10-NEXT: li r3, 29
929 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
930 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
931 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
932 ; CHECK-PREP10-NEXT: stxv v2, 0(r3)
933 ; CHECK-PREP10-NEXT: blr
935 store fp128 %str, fp128* inttoptr (i64 1000000000001 to fp128*), align 16
939 ; Function Attrs: nofree norecurse nounwind willreturn writeonly
940 define dso_local void @st_cst_align64___float128___float128(fp128 %str) {
941 ; CHECK-P10-LABEL: st_cst_align64___float128___float128:
942 ; CHECK-P10: # %bb.0: # %entry
943 ; CHECK-P10-NEXT: pli r3, 244140625
944 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
945 ; CHECK-P10-NEXT: stxv v2, 0(r3)
946 ; CHECK-P10-NEXT: blr
948 ; CHECK-PREP10-LABEL: st_cst_align64___float128___float128:
949 ; CHECK-PREP10: # %bb.0: # %entry
950 ; CHECK-PREP10-NEXT: lis r3, 3725
951 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
952 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
953 ; CHECK-PREP10-NEXT: stxv v2, 0(r3)
954 ; CHECK-PREP10-NEXT: blr
956 store fp128 %str, fp128* inttoptr (i64 1000000000000 to fp128*), align 4096
960 ; Function Attrs: nofree norecurse nounwind willreturn
961 define dso_local void @testGlob128PtrPlus0() {
962 ; CHECK-P10-LE-LABEL: testGlob128PtrPlus0:
963 ; CHECK-P10-LE: # %bb.0: # %entry
964 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL(0), 1
965 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL(0), 1
966 ; CHECK-P10-LE-NEXT: blr
968 ; CHECK-P10-BE-LABEL: testGlob128PtrPlus0:
969 ; CHECK-P10-BE: # %bb.0: # %entry
970 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
971 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
972 ; CHECK-P10-BE-NEXT: lxv vs0, 0(r3)
973 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
974 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
975 ; CHECK-P10-BE-NEXT: stxv vs0, 0(r3)
976 ; CHECK-P10-BE-NEXT: blr
978 ; CHECK-PREP10-LABEL: testGlob128PtrPlus0:
979 ; CHECK-PREP10: # %bb.0: # %entry
980 ; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
981 ; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
982 ; CHECK-PREP10-NEXT: lxv vs0, 0(r3)
983 ; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
984 ; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
985 ; CHECK-PREP10-NEXT: stxv vs0, 0(r3)
986 ; CHECK-PREP10-NEXT: blr
988 %0 = load fp128, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 0), align 16
989 store fp128 %0, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 0), align 16
993 ; Function Attrs: nofree norecurse nounwind willreturn
994 define dso_local void @testGlob128PtrPlus3() {
995 ; CHECK-P10-LE-LABEL: testGlob128PtrPlus3:
996 ; CHECK-P10-LE: # %bb.0: # %entry
997 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+3(0), 1
998 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+3(0), 1
999 ; CHECK-P10-LE-NEXT: blr
1001 ; CHECK-P10-BE-LABEL: testGlob128PtrPlus3:
1002 ; CHECK-P10-BE: # %bb.0: # %entry
1003 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
1004 ; CHECK-P10-BE-NEXT: li r4, 3
1005 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
1006 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
1007 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
1008 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
1009 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
1010 ; CHECK-P10-BE-NEXT: blr
1012 ; CHECK-PREP10-LABEL: testGlob128PtrPlus3:
1013 ; CHECK-PREP10: # %bb.0: # %entry
1014 ; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
1015 ; CHECK-PREP10-NEXT: li r4, 3
1016 ; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
1017 ; CHECK-PREP10-NEXT: lxvx vs0, r3, r4
1018 ; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
1019 ; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
1020 ; CHECK-PREP10-NEXT: stxvx vs0, r3, r4
1021 ; CHECK-PREP10-NEXT: blr
1023 %0 = load fp128, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobLd128 to i8*), i64 3) to fp128*), align 16
1024 store fp128 %0, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobSt128 to i8*), i64 3) to fp128*), align 16
1028 ; Function Attrs: nofree norecurse nounwind willreturn
1029 define dso_local void @testGlob128PtrPlus4() {
1030 ; CHECK-P10-LE-LABEL: testGlob128PtrPlus4:
1031 ; CHECK-P10-LE: # %bb.0: # %entry
1032 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+4(0), 1
1033 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+4(0), 1
1034 ; CHECK-P10-LE-NEXT: blr
1036 ; CHECK-P10-BE-LABEL: testGlob128PtrPlus4:
1037 ; CHECK-P10-BE: # %bb.0: # %entry
1038 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
1039 ; CHECK-P10-BE-NEXT: li r4, 4
1040 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
1041 ; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
1042 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
1043 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
1044 ; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
1045 ; CHECK-P10-BE-NEXT: blr
1047 ; CHECK-PREP10-LABEL: testGlob128PtrPlus4:
1048 ; CHECK-PREP10: # %bb.0: # %entry
1049 ; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
1050 ; CHECK-PREP10-NEXT: li r4, 4
1051 ; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
1052 ; CHECK-PREP10-NEXT: lxvx vs0, r3, r4
1053 ; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
1054 ; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
1055 ; CHECK-PREP10-NEXT: stxvx vs0, r3, r4
1056 ; CHECK-PREP10-NEXT: blr
1058 %0 = load fp128, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobLd128 to i8*), i64 4) to fp128*), align 16
1059 store fp128 %0, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobSt128 to i8*), i64 4) to fp128*), align 16
1063 ; Function Attrs: nofree norecurse nounwind willreturn
1064 define dso_local void @testGlob128PtrPlus16() {
1065 ; CHECK-P10-LE-LABEL: testGlob128PtrPlus16:
1066 ; CHECK-P10-LE: # %bb.0: # %entry
1067 ; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+16(0), 1
1068 ; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+16(0), 1
1069 ; CHECK-P10-LE-NEXT: blr
1071 ; CHECK-P10-BE-LABEL: testGlob128PtrPlus16:
1072 ; CHECK-P10-BE: # %bb.0: # %entry
1073 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
1074 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
1075 ; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
1076 ; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
1077 ; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
1078 ; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
1079 ; CHECK-P10-BE-NEXT: blr
1081 ; CHECK-PREP10-LABEL: testGlob128PtrPlus16:
1082 ; CHECK-PREP10: # %bb.0: # %entry
1083 ; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
1084 ; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
1085 ; CHECK-PREP10-NEXT: lxv vs0, 16(r3)
1086 ; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
1087 ; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
1088 ; CHECK-PREP10-NEXT: stxv vs0, 16(r3)
1089 ; CHECK-PREP10-NEXT: blr
1091 %0 = load fp128, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 1), align 16
1092 store fp128 %0, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 1), align 16
1096 ; Function Attrs: nofree norecurse nounwind willreturn
1097 define dso_local void @testGlob128PtrPlusVar(i64 %Idx) {
1098 ; CHECK-P10-LE-LABEL: testGlob128PtrPlusVar:
1099 ; CHECK-P10-LE: # %bb.0: # %entry
1100 ; CHECK-P10-LE-NEXT: sldi r3, r3, 4
1101 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd128@PCREL, 1
1102 ; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
1103 ; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt128@PCREL, 1
1104 ; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
1105 ; CHECK-P10-LE-NEXT: blr
1107 ; CHECK-P10-BE-LABEL: testGlob128PtrPlusVar:
1108 ; CHECK-P10-BE: # %bb.0: # %entry
1109 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd128@toc@ha
1110 ; CHECK-P10-BE-NEXT: sldi r3, r3, 4
1111 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd128@toc@l
1112 ; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
1113 ; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt128@toc@ha
1114 ; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt128@toc@l
1115 ; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
1116 ; CHECK-P10-BE-NEXT: blr
1118 ; CHECK-PREP10-LABEL: testGlob128PtrPlusVar:
1119 ; CHECK-PREP10: # %bb.0: # %entry
1120 ; CHECK-PREP10-NEXT: addis r4, r2, GlobLd128@toc@ha
1121 ; CHECK-PREP10-NEXT: sldi r3, r3, 4
1122 ; CHECK-PREP10-NEXT: addi r4, r4, GlobLd128@toc@l
1123 ; CHECK-PREP10-NEXT: lxvx vs0, r4, r3
1124 ; CHECK-PREP10-NEXT: addis r4, r2, GlobSt128@toc@ha
1125 ; CHECK-PREP10-NEXT: addi r4, r4, GlobSt128@toc@l
1126 ; CHECK-PREP10-NEXT: stxvx vs0, r4, r3
1127 ; CHECK-PREP10-NEXT: blr
1129 %arrayidx = getelementptr inbounds [20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 %Idx
1130 %0 = load fp128, fp128* %arrayidx, align 16
1131 %arrayidx1 = getelementptr inbounds [20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 %Idx
1132 store fp128 %0, fp128* %arrayidx1, align 16