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
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
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-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-P8-BE
21 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
22 define dso_local <16 x i8> @ld_0_vector(i64 %ptr) {
23 ; CHECK-LABEL: ld_0_vector:
24 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: lxv v2, 0(r3)
28 ; CHECK-P8-LE-LABEL: ld_0_vector:
29 ; CHECK-P8-LE: # %bb.0: # %entry
30 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
31 ; CHECK-P8-LE-NEXT: blr
33 ; CHECK-P8-BE-LABEL: ld_0_vector:
34 ; CHECK-P8-BE: # %bb.0: # %entry
35 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
36 ; CHECK-P8-BE-NEXT: blr
38 %0 = inttoptr i64 %ptr to <16 x i8>*
39 %1 = load <16 x i8>, <16 x i8>* %0, align 16
43 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
44 define dso_local <16 x i8> @ld_unalign16_vector(i8* nocapture readonly %ptr) {
45 ; CHECK-LABEL: ld_unalign16_vector:
46 ; CHECK: # %bb.0: # %entry
47 ; CHECK-NEXT: li r4, 1
48 ; CHECK-NEXT: lxvx v2, r3, r4
51 ; CHECK-P8-LE-LABEL: ld_unalign16_vector:
52 ; CHECK-P8-LE: # %bb.0: # %entry
53 ; CHECK-P8-LE-NEXT: addi r3, r3, 1
54 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
55 ; CHECK-P8-LE-NEXT: blr
57 ; CHECK-P8-BE-LABEL: ld_unalign16_vector:
58 ; CHECK-P8-BE: # %bb.0: # %entry
59 ; CHECK-P8-BE-NEXT: addi r3, r3, 1
60 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
61 ; CHECK-P8-BE-NEXT: blr
63 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
64 %0 = bitcast i8* %add.ptr to <16 x i8>*
65 %1 = load <16 x i8>, <16 x i8>* %0, align 16
69 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
70 define dso_local <16 x i8> @ld_align16_vector(i8* nocapture readonly %ptr) {
71 ; CHECK-LABEL: ld_align16_vector:
72 ; CHECK: # %bb.0: # %entry
73 ; CHECK-NEXT: li r4, 8
74 ; CHECK-NEXT: lxvx v2, r3, r4
77 ; CHECK-P8-LE-LABEL: ld_align16_vector:
78 ; CHECK-P8-LE: # %bb.0: # %entry
79 ; CHECK-P8-LE-NEXT: addi r3, r3, 8
80 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
81 ; CHECK-P8-LE-NEXT: blr
83 ; CHECK-P8-BE-LABEL: ld_align16_vector:
84 ; CHECK-P8-BE: # %bb.0: # %entry
85 ; CHECK-P8-BE-NEXT: addi r3, r3, 8
86 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
87 ; CHECK-P8-BE-NEXT: blr
89 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
90 %0 = bitcast i8* %add.ptr to <16 x i8>*
91 %1 = load <16 x i8>, <16 x i8>* %0, align 16
95 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
96 define dso_local <16 x i8> @ld_unalign32_vector(i8* nocapture readonly %ptr) {
97 ; CHECK-P10-LABEL: ld_unalign32_vector:
98 ; CHECK-P10: # %bb.0: # %entry
99 ; CHECK-P10-NEXT: pli r4, 99999
100 ; CHECK-P10-NEXT: lxvx v2, r3, r4
101 ; CHECK-P10-NEXT: blr
103 ; CHECK-P9-LABEL: ld_unalign32_vector:
104 ; CHECK-P9: # %bb.0: # %entry
105 ; CHECK-P9-NEXT: lis r4, 1
106 ; CHECK-P9-NEXT: ori r4, r4, 34463
107 ; CHECK-P9-NEXT: lxvx v2, r3, r4
110 ; CHECK-P8-LE-LABEL: ld_unalign32_vector:
111 ; CHECK-P8-LE: # %bb.0: # %entry
112 ; CHECK-P8-LE-NEXT: lis r4, 1
113 ; CHECK-P8-LE-NEXT: ori r4, r4, 34463
114 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
115 ; CHECK-P8-LE-NEXT: blr
117 ; CHECK-P8-BE-LABEL: ld_unalign32_vector:
118 ; CHECK-P8-BE: # %bb.0: # %entry
119 ; CHECK-P8-BE-NEXT: lis r4, 1
120 ; CHECK-P8-BE-NEXT: ori r4, r4, 34463
121 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
122 ; CHECK-P8-BE-NEXT: blr
124 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
125 %0 = bitcast i8* %add.ptr to <16 x i8>*
126 %1 = load <16 x i8>, <16 x i8>* %0, align 16
130 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
131 define dso_local <16 x i8> @ld_align32_vector(i8* nocapture readonly %ptr) {
132 ; CHECK-P10-LABEL: ld_align32_vector:
133 ; CHECK-P10: # %bb.0: # %entry
134 ; CHECK-P10-NEXT: pli r4, 99999000
135 ; CHECK-P10-NEXT: lxvx v2, r3, r4
136 ; CHECK-P10-NEXT: blr
138 ; CHECK-P9-LABEL: ld_align32_vector:
139 ; CHECK-P9: # %bb.0: # %entry
140 ; CHECK-P9-NEXT: lis r4, 1525
141 ; CHECK-P9-NEXT: ori r4, r4, 56600
142 ; CHECK-P9-NEXT: lxvx v2, r3, r4
145 ; CHECK-P8-LE-LABEL: ld_align32_vector:
146 ; CHECK-P8-LE: # %bb.0: # %entry
147 ; CHECK-P8-LE-NEXT: lis r4, 1525
148 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
149 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
150 ; CHECK-P8-LE-NEXT: blr
152 ; CHECK-P8-BE-LABEL: ld_align32_vector:
153 ; CHECK-P8-BE: # %bb.0: # %entry
154 ; CHECK-P8-BE-NEXT: lis r4, 1525
155 ; CHECK-P8-BE-NEXT: ori r4, r4, 56600
156 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
157 ; CHECK-P8-BE-NEXT: blr
159 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
160 %0 = bitcast i8* %add.ptr to <16 x i8>*
161 %1 = load <16 x i8>, <16 x i8>* %0, align 16
165 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
166 define dso_local <16 x i8> @ld_unalign64_vector(i8* nocapture readonly %ptr) {
167 ; CHECK-P10-LABEL: ld_unalign64_vector:
168 ; CHECK-P10: # %bb.0: # %entry
169 ; CHECK-P10-NEXT: pli r4, 232
170 ; CHECK-P10-NEXT: pli r5, 3567587329
171 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
172 ; CHECK-P10-NEXT: lxvx v2, r3, r5
173 ; CHECK-P10-NEXT: blr
175 ; CHECK-P9-LABEL: ld_unalign64_vector:
176 ; CHECK-P9: # %bb.0: # %entry
177 ; CHECK-P9-NEXT: li r4, 29
178 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
179 ; CHECK-P9-NEXT: oris r4, r4, 54437
180 ; CHECK-P9-NEXT: ori r4, r4, 4097
181 ; CHECK-P9-NEXT: lxvx v2, r3, r4
184 ; CHECK-P8-LE-LABEL: ld_unalign64_vector:
185 ; CHECK-P8-LE: # %bb.0: # %entry
186 ; CHECK-P8-LE-NEXT: li r4, 29
187 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
188 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
189 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
190 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
191 ; CHECK-P8-LE-NEXT: blr
193 ; CHECK-P8-BE-LABEL: ld_unalign64_vector:
194 ; CHECK-P8-BE: # %bb.0: # %entry
195 ; CHECK-P8-BE-NEXT: li r4, 29
196 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
197 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
198 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
199 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
200 ; CHECK-P8-BE-NEXT: blr
202 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
203 %0 = bitcast i8* %add.ptr to <16 x i8>*
204 %1 = load <16 x i8>, <16 x i8>* %0, align 16
208 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
209 define dso_local <16 x i8> @ld_align64_vector(i8* nocapture readonly %ptr) {
210 ; CHECK-P10-LABEL: ld_align64_vector:
211 ; CHECK-P10: # %bb.0: # %entry
212 ; CHECK-P10-NEXT: pli r4, 244140625
213 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
214 ; CHECK-P10-NEXT: lxvx v2, r3, r4
215 ; CHECK-P10-NEXT: blr
217 ; CHECK-P9-LABEL: ld_align64_vector:
218 ; CHECK-P9: # %bb.0: # %entry
219 ; CHECK-P9-NEXT: lis r4, 3725
220 ; CHECK-P9-NEXT: ori r4, r4, 19025
221 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
222 ; CHECK-P9-NEXT: lxvx v2, r3, r4
225 ; CHECK-P8-LE-LABEL: ld_align64_vector:
226 ; CHECK-P8-LE: # %bb.0: # %entry
227 ; CHECK-P8-LE-NEXT: lis r4, 3725
228 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
229 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
230 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
231 ; CHECK-P8-LE-NEXT: blr
233 ; CHECK-P8-BE-LABEL: ld_align64_vector:
234 ; CHECK-P8-BE: # %bb.0: # %entry
235 ; CHECK-P8-BE-NEXT: lis r4, 3725
236 ; CHECK-P8-BE-NEXT: ori r4, r4, 19025
237 ; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
238 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
239 ; CHECK-P8-BE-NEXT: blr
241 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
242 %0 = bitcast i8* %add.ptr to <16 x i8>*
243 %1 = load <16 x i8>, <16 x i8>* %0, align 16
247 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
248 define dso_local <16 x i8> @ld_reg_vector(i8* nocapture readonly %ptr, i64 %off) {
249 ; CHECK-LABEL: ld_reg_vector:
250 ; CHECK: # %bb.0: # %entry
251 ; CHECK-NEXT: lxvx v2, r3, r4
254 ; CHECK-P8-LE-LABEL: ld_reg_vector:
255 ; CHECK-P8-LE: # %bb.0: # %entry
256 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
257 ; CHECK-P8-LE-NEXT: blr
259 ; CHECK-P8-BE-LABEL: ld_reg_vector:
260 ; CHECK-P8-BE: # %bb.0: # %entry
261 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
262 ; CHECK-P8-BE-NEXT: blr
264 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
265 %0 = bitcast i8* %add.ptr to <16 x i8>*
266 %1 = load <16 x i8>, <16 x i8>* %0, align 16
270 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
271 define dso_local <16 x i8> @ld_or_vector(i64 %ptr, i8 zeroext %off) {
272 ; CHECK-LABEL: ld_or_vector:
273 ; CHECK: # %bb.0: # %entry
274 ; CHECK-NEXT: or r3, r4, r3
275 ; CHECK-NEXT: lxv v2, 0(r3)
278 ; CHECK-P8-LE-LABEL: ld_or_vector:
279 ; CHECK-P8-LE: # %bb.0: # %entry
280 ; CHECK-P8-LE-NEXT: or r3, r4, r3
281 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
282 ; CHECK-P8-LE-NEXT: blr
284 ; CHECK-P8-BE-LABEL: ld_or_vector:
285 ; CHECK-P8-BE: # %bb.0: # %entry
286 ; CHECK-P8-BE-NEXT: or r3, r4, r3
287 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
288 ; CHECK-P8-BE-NEXT: blr
290 %conv = zext i8 %off to i64
291 %or = or i64 %conv, %ptr
292 %0 = inttoptr i64 %or to <16 x i8>*
293 %1 = load <16 x i8>, <16 x i8>* %0, align 16
297 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
298 define dso_local <16 x i8> @ld_or2_vector(i64 %ptr, i8 zeroext %off) {
299 ; CHECK-LABEL: ld_or2_vector:
300 ; CHECK: # %bb.0: # %entry
301 ; CHECK-NEXT: rldicr r3, r3, 0, 51
302 ; CHECK-NEXT: lxvx v2, r3, r4
305 ; CHECK-P8-LE-LABEL: ld_or2_vector:
306 ; CHECK-P8-LE: # %bb.0: # %entry
307 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
308 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
309 ; CHECK-P8-LE-NEXT: blr
311 ; CHECK-P8-BE-LABEL: ld_or2_vector:
312 ; CHECK-P8-BE: # %bb.0: # %entry
313 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
314 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
315 ; CHECK-P8-BE-NEXT: blr
317 %and = and i64 %ptr, -4096
318 %conv = zext i8 %off to i64
319 %or = or i64 %and, %conv
320 %0 = inttoptr i64 %or to <16 x i8>*
321 %1 = load <16 x i8>, <16 x i8>* %0, align 16
325 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
326 define dso_local <16 x i8> @ld_not_disjoint16_vector(i64 %ptr) {
327 ; CHECK-LABEL: ld_not_disjoint16_vector:
328 ; CHECK: # %bb.0: # %entry
329 ; CHECK-NEXT: ori r3, r3, 6
330 ; CHECK-NEXT: lxv v2, 0(r3)
333 ; CHECK-P8-LE-LABEL: ld_not_disjoint16_vector:
334 ; CHECK-P8-LE: # %bb.0: # %entry
335 ; CHECK-P8-LE-NEXT: ori r3, r3, 6
336 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
337 ; CHECK-P8-LE-NEXT: blr
339 ; CHECK-P8-BE-LABEL: ld_not_disjoint16_vector:
340 ; CHECK-P8-BE: # %bb.0: # %entry
341 ; CHECK-P8-BE-NEXT: ori r3, r3, 6
342 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
343 ; CHECK-P8-BE-NEXT: blr
346 %0 = inttoptr i64 %or to <16 x i8>*
347 %1 = load <16 x i8>, <16 x i8>* %0, align 16
351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
352 define dso_local <16 x i8> @ld_disjoint_unalign16_vector(i64 %ptr) {
353 ; CHECK-LABEL: ld_disjoint_unalign16_vector:
354 ; CHECK: # %bb.0: # %entry
355 ; CHECK-NEXT: rldicr r3, r3, 0, 51
356 ; CHECK-NEXT: li r4, 6
357 ; CHECK-NEXT: lxvx v2, r3, r4
360 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign16_vector:
361 ; CHECK-P8-LE: # %bb.0: # %entry
362 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
363 ; CHECK-P8-LE-NEXT: ori r3, r3, 6
364 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
365 ; CHECK-P8-LE-NEXT: blr
367 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign16_vector:
368 ; CHECK-P8-BE: # %bb.0: # %entry
369 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
370 ; CHECK-P8-BE-NEXT: ori r3, r3, 6
371 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
372 ; CHECK-P8-BE-NEXT: blr
374 %and = and i64 %ptr, -4096
376 %0 = inttoptr i64 %or to <16 x i8>*
377 %1 = load <16 x i8>, <16 x i8>* %0, align 16
381 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
382 define dso_local <16 x i8> @ld_disjoint_align16_vector(i64 %ptr) {
383 ; CHECK-LABEL: ld_disjoint_align16_vector:
384 ; CHECK: # %bb.0: # %entry
385 ; CHECK-NEXT: rldicr r3, r3, 0, 51
386 ; CHECK-NEXT: li r4, 24
387 ; CHECK-NEXT: lxvx v2, r3, r4
390 ; CHECK-P8-LE-LABEL: ld_disjoint_align16_vector:
391 ; CHECK-P8-LE: # %bb.0: # %entry
392 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
393 ; CHECK-P8-LE-NEXT: ori r3, r3, 24
394 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
395 ; CHECK-P8-LE-NEXT: blr
397 ; CHECK-P8-BE-LABEL: ld_disjoint_align16_vector:
398 ; CHECK-P8-BE: # %bb.0: # %entry
399 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
400 ; CHECK-P8-BE-NEXT: ori r3, r3, 24
401 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
402 ; CHECK-P8-BE-NEXT: blr
404 %and = and i64 %ptr, -4096
405 %or = or i64 %and, 24
406 %0 = inttoptr i64 %or to <16 x i8>*
407 %1 = load <16 x i8>, <16 x i8>* %0, align 16
411 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
412 define dso_local <16 x i8> @ld_not_disjoint32_vector(i64 %ptr) {
413 ; CHECK-LABEL: ld_not_disjoint32_vector:
414 ; CHECK: # %bb.0: # %entry
415 ; CHECK-NEXT: ori r3, r3, 34463
416 ; CHECK-NEXT: oris r3, r3, 1
417 ; CHECK-NEXT: lxv v2, 0(r3)
420 ; CHECK-P8-LE-LABEL: ld_not_disjoint32_vector:
421 ; CHECK-P8-LE: # %bb.0: # %entry
422 ; CHECK-P8-LE-NEXT: ori r3, r3, 34463
423 ; CHECK-P8-LE-NEXT: oris r3, r3, 1
424 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
425 ; CHECK-P8-LE-NEXT: blr
427 ; CHECK-P8-BE-LABEL: ld_not_disjoint32_vector:
428 ; CHECK-P8-BE: # %bb.0: # %entry
429 ; CHECK-P8-BE-NEXT: ori r3, r3, 34463
430 ; CHECK-P8-BE-NEXT: oris r3, r3, 1
431 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
432 ; CHECK-P8-BE-NEXT: blr
434 %or = or i64 %ptr, 99999
435 %0 = inttoptr i64 %or to <16 x i8>*
436 %1 = load <16 x i8>, <16 x i8>* %0, align 16
440 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
441 define dso_local <16 x i8> @ld_disjoint_unalign32_vector(i64 %ptr) {
442 ; CHECK-P10-LABEL: ld_disjoint_unalign32_vector:
443 ; CHECK-P10: # %bb.0: # %entry
444 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
445 ; CHECK-P10-NEXT: pli r4, 99999
446 ; CHECK-P10-NEXT: lxvx v2, r3, r4
447 ; CHECK-P10-NEXT: blr
449 ; CHECK-P9-LABEL: ld_disjoint_unalign32_vector:
450 ; CHECK-P9: # %bb.0: # %entry
451 ; CHECK-P9-NEXT: lis r4, 1
452 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 43
453 ; CHECK-P9-NEXT: ori r4, r4, 34463
454 ; CHECK-P9-NEXT: lxvx v2, r3, r4
457 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign32_vector:
458 ; CHECK-P8-LE: # %bb.0: # %entry
459 ; CHECK-P8-LE-NEXT: lis r4, 1
460 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 43
461 ; CHECK-P8-LE-NEXT: ori r4, r4, 34463
462 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
463 ; CHECK-P8-LE-NEXT: blr
465 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign32_vector:
466 ; CHECK-P8-BE: # %bb.0: # %entry
467 ; CHECK-P8-BE-NEXT: lis r4, 1
468 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 43
469 ; CHECK-P8-BE-NEXT: ori r4, r4, 34463
470 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
471 ; CHECK-P8-BE-NEXT: blr
473 %and = and i64 %ptr, -1048576
474 %or = or i64 %and, 99999
475 %0 = inttoptr i64 %or to <16 x i8>*
476 %1 = load <16 x i8>, <16 x i8>* %0, align 16
480 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
481 define dso_local <16 x i8> @ld_disjoint_align32_vector(i64 %ptr) {
482 ; CHECK-P10-LABEL: ld_disjoint_align32_vector:
483 ; CHECK-P10: # %bb.0: # %entry
484 ; CHECK-P10-NEXT: lis r4, -15264
485 ; CHECK-P10-NEXT: and r3, r3, r4
486 ; CHECK-P10-NEXT: pli r4, 999990000
487 ; CHECK-P10-NEXT: lxvx v2, r3, r4
488 ; CHECK-P10-NEXT: blr
490 ; CHECK-P9-LABEL: ld_disjoint_align32_vector:
491 ; CHECK-P9: # %bb.0: # %entry
492 ; CHECK-P9-NEXT: lis r4, -15264
493 ; CHECK-P9-NEXT: and r3, r3, r4
494 ; CHECK-P9-NEXT: lis r4, 15258
495 ; CHECK-P9-NEXT: ori r4, r4, 41712
496 ; CHECK-P9-NEXT: lxvx v2, r3, r4
499 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_vector:
500 ; CHECK-P8-LE: # %bb.0: # %entry
501 ; CHECK-P8-LE-NEXT: lis r4, -15264
502 ; CHECK-P8-LE-NEXT: lis r5, 15258
503 ; CHECK-P8-LE-NEXT: and r3, r3, r4
504 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
505 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
506 ; CHECK-P8-LE-NEXT: blr
508 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_vector:
509 ; CHECK-P8-BE: # %bb.0: # %entry
510 ; CHECK-P8-BE-NEXT: lis r4, -15264
511 ; CHECK-P8-BE-NEXT: lis r5, 15258
512 ; CHECK-P8-BE-NEXT: and r3, r3, r4
513 ; CHECK-P8-BE-NEXT: ori r4, r5, 41712
514 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
515 ; CHECK-P8-BE-NEXT: blr
517 %and = and i64 %ptr, -1000341504
518 %or = or i64 %and, 999990000
519 %0 = inttoptr i64 %or to <16 x i8>*
520 %1 = load <16 x i8>, <16 x i8>* %0, align 16
524 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
525 define dso_local <16 x i8> @ld_not_disjoint64_vector(i64 %ptr) {
526 ; CHECK-P10-LABEL: ld_not_disjoint64_vector:
527 ; CHECK-P10: # %bb.0: # %entry
528 ; CHECK-P10-NEXT: pli r4, 232
529 ; CHECK-P10-NEXT: pli r5, 3567587329
530 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
531 ; CHECK-P10-NEXT: or r3, r3, r5
532 ; CHECK-P10-NEXT: lxv v2, 0(r3)
533 ; CHECK-P10-NEXT: blr
535 ; CHECK-P9-LABEL: ld_not_disjoint64_vector:
536 ; CHECK-P9: # %bb.0: # %entry
537 ; CHECK-P9-NEXT: li r4, 29
538 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
539 ; CHECK-P9-NEXT: oris r4, r4, 54437
540 ; CHECK-P9-NEXT: ori r4, r4, 4097
541 ; CHECK-P9-NEXT: or r3, r3, r4
542 ; CHECK-P9-NEXT: lxv v2, 0(r3)
545 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_vector:
546 ; CHECK-P8-LE: # %bb.0: # %entry
547 ; CHECK-P8-LE-NEXT: li r4, 29
548 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
549 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
550 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
551 ; CHECK-P8-LE-NEXT: or r3, r3, r4
552 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
553 ; CHECK-P8-LE-NEXT: blr
555 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_vector:
556 ; CHECK-P8-BE: # %bb.0: # %entry
557 ; CHECK-P8-BE-NEXT: li r4, 29
558 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
559 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
560 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
561 ; CHECK-P8-BE-NEXT: or r3, r3, r4
562 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
563 ; CHECK-P8-BE-NEXT: blr
565 %or = or i64 %ptr, 1000000000001
566 %0 = inttoptr i64 %or to <16 x i8>*
567 %1 = load <16 x i8>, <16 x i8>* %0, align 16
571 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
572 define dso_local <16 x i8> @ld_disjoint_unalign64_vector(i64 %ptr) {
573 ; CHECK-P10-LABEL: ld_disjoint_unalign64_vector:
574 ; CHECK-P10: # %bb.0: # %entry
575 ; CHECK-P10-NEXT: pli r4, 232
576 ; CHECK-P10-NEXT: pli r5, 3567587329
577 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
578 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
579 ; CHECK-P10-NEXT: lxvx v2, r3, r5
580 ; CHECK-P10-NEXT: blr
582 ; CHECK-P9-LABEL: ld_disjoint_unalign64_vector:
583 ; CHECK-P9: # %bb.0: # %entry
584 ; CHECK-P9-NEXT: li r4, 29
585 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
586 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
587 ; CHECK-P9-NEXT: oris r4, r4, 54437
588 ; CHECK-P9-NEXT: ori r4, r4, 4097
589 ; CHECK-P9-NEXT: lxvx v2, r3, r4
592 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_vector:
593 ; CHECK-P8-LE: # %bb.0: # %entry
594 ; CHECK-P8-LE-NEXT: li r4, 29
595 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
596 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
597 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
598 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
599 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
600 ; CHECK-P8-LE-NEXT: blr
602 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_vector:
603 ; CHECK-P8-BE: # %bb.0: # %entry
604 ; CHECK-P8-BE-NEXT: li r4, 29
605 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
606 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
607 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
608 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
609 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
610 ; CHECK-P8-BE-NEXT: blr
612 %and = and i64 %ptr, -1099511627776
613 %or = or i64 %and, 1000000000001
614 %0 = inttoptr i64 %or to <16 x i8>*
615 %1 = load <16 x i8>, <16 x i8>* %0, align 16
619 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
620 define dso_local <16 x i8> @ld_disjoint_align64_vector(i64 %ptr) {
621 ; CHECK-P10-LABEL: ld_disjoint_align64_vector:
622 ; CHECK-P10: # %bb.0: # %entry
623 ; CHECK-P10-NEXT: pli r4, 244140625
624 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
625 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
626 ; CHECK-P10-NEXT: lxvx v2, r3, r4
627 ; CHECK-P10-NEXT: blr
629 ; CHECK-P9-LABEL: ld_disjoint_align64_vector:
630 ; CHECK-P9: # %bb.0: # %entry
631 ; CHECK-P9-NEXT: lis r4, 3725
632 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
633 ; CHECK-P9-NEXT: ori r4, r4, 19025
634 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
635 ; CHECK-P9-NEXT: lxvx v2, r3, r4
638 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_vector:
639 ; CHECK-P8-LE: # %bb.0: # %entry
640 ; CHECK-P8-LE-NEXT: lis r4, 3725
641 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
642 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
643 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
644 ; CHECK-P8-LE-NEXT: lvx v2, r3, r4
645 ; CHECK-P8-LE-NEXT: blr
647 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_vector:
648 ; CHECK-P8-BE: # %bb.0: # %entry
649 ; CHECK-P8-BE-NEXT: lis r4, 3725
650 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
651 ; CHECK-P8-BE-NEXT: ori r4, r4, 19025
652 ; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
653 ; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
654 ; CHECK-P8-BE-NEXT: blr
656 %and = and i64 %ptr, -1099511627776
657 %or = or i64 %and, 1000000000000
658 %0 = inttoptr i64 %or to <16 x i8>*
659 %1 = load <16 x i8>, <16 x i8>* %0, align 4096
663 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
664 define dso_local <16 x i8> @ld_cst_unalign16_vector() {
665 ; CHECK-LABEL: ld_cst_unalign16_vector:
666 ; CHECK: # %bb.0: # %entry
667 ; CHECK-NEXT: li r3, 255
668 ; CHECK-NEXT: lxv v2, 0(r3)
671 ; CHECK-P8-LE-LABEL: ld_cst_unalign16_vector:
672 ; CHECK-P8-LE: # %bb.0: # %entry
673 ; CHECK-P8-LE-NEXT: li r3, 255
674 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
675 ; CHECK-P8-LE-NEXT: blr
677 ; CHECK-P8-BE-LABEL: ld_cst_unalign16_vector:
678 ; CHECK-P8-BE: # %bb.0: # %entry
679 ; CHECK-P8-BE-NEXT: li r3, 255
680 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
681 ; CHECK-P8-BE-NEXT: blr
683 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 255 to <16 x i8>*), align 16
687 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
688 define dso_local <16 x i8> @ld_cst_align16_vector() {
689 ; CHECK-LABEL: ld_cst_align16_vector:
690 ; CHECK: # %bb.0: # %entry
691 ; CHECK-NEXT: lxv v2, 4080(0)
694 ; CHECK-P8-LE-LABEL: ld_cst_align16_vector:
695 ; CHECK-P8-LE: # %bb.0: # %entry
696 ; CHECK-P8-LE-NEXT: li r3, 4080
697 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
698 ; CHECK-P8-LE-NEXT: blr
700 ; CHECK-P8-BE-LABEL: ld_cst_align16_vector:
701 ; CHECK-P8-BE: # %bb.0: # %entry
702 ; CHECK-P8-BE-NEXT: li r3, 4080
703 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
704 ; CHECK-P8-BE-NEXT: blr
706 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 4080 to <16 x i8>*), align 16
710 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
711 define dso_local <16 x i8> @ld_cst_unalign32_vector() {
712 ; CHECK-P10-LABEL: ld_cst_unalign32_vector:
713 ; CHECK-P10: # %bb.0: # %entry
714 ; CHECK-P10-NEXT: pli r3, 99999
715 ; CHECK-P10-NEXT: lxv v2, 0(r3)
716 ; CHECK-P10-NEXT: blr
718 ; CHECK-P9-LABEL: ld_cst_unalign32_vector:
719 ; CHECK-P9: # %bb.0: # %entry
720 ; CHECK-P9-NEXT: lis r3, 1
721 ; CHECK-P9-NEXT: ori r3, r3, 34463
722 ; CHECK-P9-NEXT: lxv v2, 0(r3)
725 ; CHECK-P8-LE-LABEL: ld_cst_unalign32_vector:
726 ; CHECK-P8-LE: # %bb.0: # %entry
727 ; CHECK-P8-LE-NEXT: lis r3, 1
728 ; CHECK-P8-LE-NEXT: ori r3, r3, 34463
729 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
730 ; CHECK-P8-LE-NEXT: blr
732 ; CHECK-P8-BE-LABEL: ld_cst_unalign32_vector:
733 ; CHECK-P8-BE: # %bb.0: # %entry
734 ; CHECK-P8-BE-NEXT: lis r3, 1
735 ; CHECK-P8-BE-NEXT: ori r3, r3, 34463
736 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
737 ; CHECK-P8-BE-NEXT: blr
739 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 99999 to <16 x i8>*), align 16
743 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
744 define dso_local <16 x i8> @ld_cst_align32_vector() {
745 ; CHECK-P10-LABEL: ld_cst_align32_vector:
746 ; CHECK-P10: # %bb.0: # %entry
747 ; CHECK-P10-NEXT: pli r3, 9999900
748 ; CHECK-P10-NEXT: lxv v2, 0(r3)
749 ; CHECK-P10-NEXT: blr
751 ; CHECK-P9-LABEL: ld_cst_align32_vector:
752 ; CHECK-P9: # %bb.0: # %entry
753 ; CHECK-P9-NEXT: lis r3, 152
754 ; CHECK-P9-NEXT: ori r3, r3, 38428
755 ; CHECK-P9-NEXT: lxv v2, 0(r3)
758 ; CHECK-P8-LE-LABEL: ld_cst_align32_vector:
759 ; CHECK-P8-LE: # %bb.0: # %entry
760 ; CHECK-P8-LE-NEXT: lis r3, 152
761 ; CHECK-P8-LE-NEXT: ori r3, r3, 38428
762 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
763 ; CHECK-P8-LE-NEXT: blr
765 ; CHECK-P8-BE-LABEL: ld_cst_align32_vector:
766 ; CHECK-P8-BE: # %bb.0: # %entry
767 ; CHECK-P8-BE-NEXT: lis r3, 152
768 ; CHECK-P8-BE-NEXT: ori r3, r3, 38428
769 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
770 ; CHECK-P8-BE-NEXT: blr
772 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 9999900 to <16 x i8>*), align 16
776 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
777 define dso_local <16 x i8> @ld_cst_unalign64_vector() {
778 ; CHECK-P10-LABEL: ld_cst_unalign64_vector:
779 ; CHECK-P10: # %bb.0: # %entry
780 ; CHECK-P10-NEXT: pli r3, 232
781 ; CHECK-P10-NEXT: pli r4, 3567587329
782 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
783 ; CHECK-P10-NEXT: lxv v2, 0(r4)
784 ; CHECK-P10-NEXT: blr
786 ; CHECK-P9-LABEL: ld_cst_unalign64_vector:
787 ; CHECK-P9: # %bb.0: # %entry
788 ; CHECK-P9-NEXT: li r3, 29
789 ; CHECK-P9-NEXT: rldic r3, r3, 35, 24
790 ; CHECK-P9-NEXT: oris r3, r3, 54437
791 ; CHECK-P9-NEXT: ori r3, r3, 4097
792 ; CHECK-P9-NEXT: lxv v2, 0(r3)
795 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_vector:
796 ; CHECK-P8-LE: # %bb.0: # %entry
797 ; CHECK-P8-LE-NEXT: li r3, 29
798 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
799 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
800 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
801 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
802 ; CHECK-P8-LE-NEXT: blr
804 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_vector:
805 ; CHECK-P8-BE: # %bb.0: # %entry
806 ; CHECK-P8-BE-NEXT: li r3, 29
807 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
808 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
809 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
810 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
811 ; CHECK-P8-BE-NEXT: blr
813 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 1000000000001 to <16 x i8>*), align 16
817 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
818 define dso_local <16 x i8> @ld_cst_align64_vector() {
819 ; CHECK-P10-LABEL: ld_cst_align64_vector:
820 ; CHECK-P10: # %bb.0: # %entry
821 ; CHECK-P10-NEXT: pli r3, 244140625
822 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
823 ; CHECK-P10-NEXT: lxv v2, 0(r3)
824 ; CHECK-P10-NEXT: blr
826 ; CHECK-P9-LABEL: ld_cst_align64_vector:
827 ; CHECK-P9: # %bb.0: # %entry
828 ; CHECK-P9-NEXT: lis r3, 3725
829 ; CHECK-P9-NEXT: ori r3, r3, 19025
830 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
831 ; CHECK-P9-NEXT: lxv v2, 0(r3)
834 ; CHECK-P8-LE-LABEL: ld_cst_align64_vector:
835 ; CHECK-P8-LE: # %bb.0: # %entry
836 ; CHECK-P8-LE-NEXT: lis r3, 3725
837 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
838 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
839 ; CHECK-P8-LE-NEXT: lvx v2, 0, r3
840 ; CHECK-P8-LE-NEXT: blr
842 ; CHECK-P8-BE-LABEL: ld_cst_align64_vector:
843 ; CHECK-P8-BE: # %bb.0: # %entry
844 ; CHECK-P8-BE-NEXT: lis r3, 3725
845 ; CHECK-P8-BE-NEXT: ori r3, r3, 19025
846 ; CHECK-P8-BE-NEXT: rldic r3, r3, 12, 24
847 ; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
848 ; CHECK-P8-BE-NEXT: blr
850 %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 1000000000000 to <16 x i8>*), align 4096
854 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
855 define dso_local void @st_0_vector(i64 %ptr, <16 x i8> %str) {
856 ; CHECK-LABEL: st_0_vector:
857 ; CHECK: # %bb.0: # %entry
858 ; CHECK-NEXT: stxv v2, 0(r3)
861 ; CHECK-P8-LE-LABEL: st_0_vector:
862 ; CHECK-P8-LE: # %bb.0: # %entry
863 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
864 ; CHECK-P8-LE-NEXT: blr
866 ; CHECK-P8-BE-LABEL: st_0_vector:
867 ; CHECK-P8-BE: # %bb.0: # %entry
868 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
869 ; CHECK-P8-BE-NEXT: blr
871 %0 = inttoptr i64 %ptr to <16 x i8>*
872 store <16 x i8> %str, <16 x i8>* %0, align 16
876 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
877 define dso_local void @st_unalign16_vector(i8* nocapture %ptr, <16 x i8> %str) {
878 ; CHECK-LABEL: st_unalign16_vector:
879 ; CHECK: # %bb.0: # %entry
880 ; CHECK-NEXT: li r4, 1
881 ; CHECK-NEXT: stxvx v2, r3, r4
884 ; CHECK-P8-LE-LABEL: st_unalign16_vector:
885 ; CHECK-P8-LE: # %bb.0: # %entry
886 ; CHECK-P8-LE-NEXT: addi r3, r3, 1
887 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
888 ; CHECK-P8-LE-NEXT: blr
890 ; CHECK-P8-BE-LABEL: st_unalign16_vector:
891 ; CHECK-P8-BE: # %bb.0: # %entry
892 ; CHECK-P8-BE-NEXT: addi r3, r3, 1
893 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
894 ; CHECK-P8-BE-NEXT: blr
896 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
897 %0 = bitcast i8* %add.ptr to <16 x i8>*
898 store <16 x i8> %str, <16 x i8>* %0, align 16
902 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
903 define dso_local void @st_align16_vector(i8* nocapture %ptr, <16 x i8> %str) {
904 ; CHECK-LABEL: st_align16_vector:
905 ; CHECK: # %bb.0: # %entry
906 ; CHECK-NEXT: li r4, 8
907 ; CHECK-NEXT: stxvx v2, r3, r4
910 ; CHECK-P8-LE-LABEL: st_align16_vector:
911 ; CHECK-P8-LE: # %bb.0: # %entry
912 ; CHECK-P8-LE-NEXT: addi r3, r3, 8
913 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
914 ; CHECK-P8-LE-NEXT: blr
916 ; CHECK-P8-BE-LABEL: st_align16_vector:
917 ; CHECK-P8-BE: # %bb.0: # %entry
918 ; CHECK-P8-BE-NEXT: addi r3, r3, 8
919 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
920 ; CHECK-P8-BE-NEXT: blr
922 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
923 %0 = bitcast i8* %add.ptr to <16 x i8>*
924 store <16 x i8> %str, <16 x i8>* %0, align 16
928 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
929 define dso_local void @st_unalign32_vector(i8* nocapture %ptr, <16 x i8> %str) {
930 ; CHECK-P10-LABEL: st_unalign32_vector:
931 ; CHECK-P10: # %bb.0: # %entry
932 ; CHECK-P10-NEXT: pli r4, 99999
933 ; CHECK-P10-NEXT: stxvx v2, r3, r4
934 ; CHECK-P10-NEXT: blr
936 ; CHECK-P9-LABEL: st_unalign32_vector:
937 ; CHECK-P9: # %bb.0: # %entry
938 ; CHECK-P9-NEXT: lis r4, 1
939 ; CHECK-P9-NEXT: ori r4, r4, 34463
940 ; CHECK-P9-NEXT: stxvx v2, r3, r4
943 ; CHECK-P8-LE-LABEL: st_unalign32_vector:
944 ; CHECK-P8-LE: # %bb.0: # %entry
945 ; CHECK-P8-LE-NEXT: lis r4, 1
946 ; CHECK-P8-LE-NEXT: ori r4, r4, 34463
947 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
948 ; CHECK-P8-LE-NEXT: blr
950 ; CHECK-P8-BE-LABEL: st_unalign32_vector:
951 ; CHECK-P8-BE: # %bb.0: # %entry
952 ; CHECK-P8-BE-NEXT: lis r4, 1
953 ; CHECK-P8-BE-NEXT: ori r4, r4, 34463
954 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
955 ; CHECK-P8-BE-NEXT: blr
957 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
958 %0 = bitcast i8* %add.ptr to <16 x i8>*
959 store <16 x i8> %str, <16 x i8>* %0, align 16
963 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
964 define dso_local void @st_align32_vector(i8* nocapture %ptr, <16 x i8> %str) {
965 ; CHECK-P10-LABEL: st_align32_vector:
966 ; CHECK-P10: # %bb.0: # %entry
967 ; CHECK-P10-NEXT: pli r4, 99999000
968 ; CHECK-P10-NEXT: stxvx v2, r3, r4
969 ; CHECK-P10-NEXT: blr
971 ; CHECK-P9-LABEL: st_align32_vector:
972 ; CHECK-P9: # %bb.0: # %entry
973 ; CHECK-P9-NEXT: lis r4, 1525
974 ; CHECK-P9-NEXT: ori r4, r4, 56600
975 ; CHECK-P9-NEXT: stxvx v2, r3, r4
978 ; CHECK-P8-LE-LABEL: st_align32_vector:
979 ; CHECK-P8-LE: # %bb.0: # %entry
980 ; CHECK-P8-LE-NEXT: lis r4, 1525
981 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
982 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
983 ; CHECK-P8-LE-NEXT: blr
985 ; CHECK-P8-BE-LABEL: st_align32_vector:
986 ; CHECK-P8-BE: # %bb.0: # %entry
987 ; CHECK-P8-BE-NEXT: lis r4, 1525
988 ; CHECK-P8-BE-NEXT: ori r4, r4, 56600
989 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
990 ; CHECK-P8-BE-NEXT: blr
992 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
993 %0 = bitcast i8* %add.ptr to <16 x i8>*
994 store <16 x i8> %str, <16 x i8>* %0, align 16
998 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
999 define dso_local void @st_unalign64_vector(i8* nocapture %ptr, <16 x i8> %str) {
1000 ; CHECK-P10-LABEL: st_unalign64_vector:
1001 ; CHECK-P10: # %bb.0: # %entry
1002 ; CHECK-P10-NEXT: pli r4, 232
1003 ; CHECK-P10-NEXT: pli r5, 3567587329
1004 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1005 ; CHECK-P10-NEXT: stxvx v2, r3, r5
1006 ; CHECK-P10-NEXT: blr
1008 ; CHECK-P9-LABEL: st_unalign64_vector:
1009 ; CHECK-P9: # %bb.0: # %entry
1010 ; CHECK-P9-NEXT: li r4, 29
1011 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1012 ; CHECK-P9-NEXT: oris r4, r4, 54437
1013 ; CHECK-P9-NEXT: ori r4, r4, 4097
1014 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1015 ; CHECK-P9-NEXT: blr
1017 ; CHECK-P8-LE-LABEL: st_unalign64_vector:
1018 ; CHECK-P8-LE: # %bb.0: # %entry
1019 ; CHECK-P8-LE-NEXT: li r4, 29
1020 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1021 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1022 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1023 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1024 ; CHECK-P8-LE-NEXT: blr
1026 ; CHECK-P8-BE-LABEL: st_unalign64_vector:
1027 ; CHECK-P8-BE: # %bb.0: # %entry
1028 ; CHECK-P8-BE-NEXT: li r4, 29
1029 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1030 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1031 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1032 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1033 ; CHECK-P8-BE-NEXT: blr
1035 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
1036 %0 = bitcast i8* %add.ptr to <16 x i8>*
1037 store <16 x i8> %str, <16 x i8>* %0, align 16
1041 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1042 define dso_local void @st_align64_vector(i8* nocapture %ptr, <16 x i8> %str) {
1043 ; CHECK-P10-LABEL: st_align64_vector:
1044 ; CHECK-P10: # %bb.0: # %entry
1045 ; CHECK-P10-NEXT: pli r4, 244140625
1046 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1047 ; CHECK-P10-NEXT: stxvx v2, r3, r4
1048 ; CHECK-P10-NEXT: blr
1050 ; CHECK-P9-LABEL: st_align64_vector:
1051 ; CHECK-P9: # %bb.0: # %entry
1052 ; CHECK-P9-NEXT: lis r4, 3725
1053 ; CHECK-P9-NEXT: ori r4, r4, 19025
1054 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1055 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1056 ; CHECK-P9-NEXT: blr
1058 ; CHECK-P8-LE-LABEL: st_align64_vector:
1059 ; CHECK-P8-LE: # %bb.0: # %entry
1060 ; CHECK-P8-LE-NEXT: lis r4, 3725
1061 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1062 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1063 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1064 ; CHECK-P8-LE-NEXT: blr
1066 ; CHECK-P8-BE-LABEL: st_align64_vector:
1067 ; CHECK-P8-BE: # %bb.0: # %entry
1068 ; CHECK-P8-BE-NEXT: lis r4, 3725
1069 ; CHECK-P8-BE-NEXT: ori r4, r4, 19025
1070 ; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
1071 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1072 ; CHECK-P8-BE-NEXT: blr
1074 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1075 %0 = bitcast i8* %add.ptr to <16 x i8>*
1076 store <16 x i8> %str, <16 x i8>* %0, align 16
1080 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1081 define dso_local void @st_reg_vector(i8* nocapture %ptr, i64 %off, <16 x i8> %str) {
1082 ; CHECK-LABEL: st_reg_vector:
1083 ; CHECK: # %bb.0: # %entry
1084 ; CHECK-NEXT: stxvx v2, r3, r4
1087 ; CHECK-P8-LE-LABEL: st_reg_vector:
1088 ; CHECK-P8-LE: # %bb.0: # %entry
1089 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1090 ; CHECK-P8-LE-NEXT: blr
1092 ; CHECK-P8-BE-LABEL: st_reg_vector:
1093 ; CHECK-P8-BE: # %bb.0: # %entry
1094 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1095 ; CHECK-P8-BE-NEXT: blr
1097 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1098 %0 = bitcast i8* %add.ptr to <16 x i8>*
1099 store <16 x i8> %str, <16 x i8>* %0, align 16
1103 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1104 define dso_local void @st_or1_vector(i64 %ptr, i8 zeroext %off, <16 x i8> %str) {
1105 ; CHECK-LABEL: st_or1_vector:
1106 ; CHECK: # %bb.0: # %entry
1107 ; CHECK-NEXT: or r3, r4, r3
1108 ; CHECK-NEXT: stxv v2, 0(r3)
1111 ; CHECK-P8-LE-LABEL: st_or1_vector:
1112 ; CHECK-P8-LE: # %bb.0: # %entry
1113 ; CHECK-P8-LE-NEXT: or r3, r4, r3
1114 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1115 ; CHECK-P8-LE-NEXT: blr
1117 ; CHECK-P8-BE-LABEL: st_or1_vector:
1118 ; CHECK-P8-BE: # %bb.0: # %entry
1119 ; CHECK-P8-BE-NEXT: or r3, r4, r3
1120 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1121 ; CHECK-P8-BE-NEXT: blr
1123 %conv = zext i8 %off to i64
1124 %or = or i64 %conv, %ptr
1125 %0 = inttoptr i64 %or to <16 x i8>*
1126 store <16 x i8> %str, <16 x i8>* %0, align 16
1130 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1131 define dso_local void @st_or2_vector(i64 %ptr, i8 zeroext %off, <16 x i8> %str) {
1132 ; CHECK-LABEL: st_or2_vector:
1133 ; CHECK: # %bb.0: # %entry
1134 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1135 ; CHECK-NEXT: stxvx v2, r3, r4
1138 ; CHECK-P8-LE-LABEL: st_or2_vector:
1139 ; CHECK-P8-LE: # %bb.0: # %entry
1140 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
1141 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1142 ; CHECK-P8-LE-NEXT: blr
1144 ; CHECK-P8-BE-LABEL: st_or2_vector:
1145 ; CHECK-P8-BE: # %bb.0: # %entry
1146 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
1147 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1148 ; CHECK-P8-BE-NEXT: blr
1150 %and = and i64 %ptr, -4096
1151 %conv = zext i8 %off to i64
1152 %or = or i64 %and, %conv
1153 %0 = inttoptr i64 %or to <16 x i8>*
1154 store <16 x i8> %str, <16 x i8>* %0, align 16
1158 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1159 define dso_local void @st_not_disjoint16_vector(i64 %ptr, <16 x i8> %str) {
1160 ; CHECK-LABEL: st_not_disjoint16_vector:
1161 ; CHECK: # %bb.0: # %entry
1162 ; CHECK-NEXT: ori r3, r3, 6
1163 ; CHECK-NEXT: stxv v2, 0(r3)
1166 ; CHECK-P8-LE-LABEL: st_not_disjoint16_vector:
1167 ; CHECK-P8-LE: # %bb.0: # %entry
1168 ; CHECK-P8-LE-NEXT: ori r3, r3, 6
1169 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1170 ; CHECK-P8-LE-NEXT: blr
1172 ; CHECK-P8-BE-LABEL: st_not_disjoint16_vector:
1173 ; CHECK-P8-BE: # %bb.0: # %entry
1174 ; CHECK-P8-BE-NEXT: ori r3, r3, 6
1175 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1176 ; CHECK-P8-BE-NEXT: blr
1178 %or = or i64 %ptr, 6
1179 %0 = inttoptr i64 %or to <16 x i8>*
1180 store <16 x i8> %str, <16 x i8>* %0, align 16
1184 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1185 define dso_local void @st_disjoint_unalign16_vector(i64 %ptr, <16 x i8> %str) {
1186 ; CHECK-LABEL: st_disjoint_unalign16_vector:
1187 ; CHECK: # %bb.0: # %entry
1188 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1189 ; CHECK-NEXT: li r4, 6
1190 ; CHECK-NEXT: stxvx v2, r3, r4
1193 ; CHECK-P8-LE-LABEL: st_disjoint_unalign16_vector:
1194 ; CHECK-P8-LE: # %bb.0: # %entry
1195 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
1196 ; CHECK-P8-LE-NEXT: ori r3, r3, 6
1197 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1198 ; CHECK-P8-LE-NEXT: blr
1200 ; CHECK-P8-BE-LABEL: st_disjoint_unalign16_vector:
1201 ; CHECK-P8-BE: # %bb.0: # %entry
1202 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
1203 ; CHECK-P8-BE-NEXT: ori r3, r3, 6
1204 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1205 ; CHECK-P8-BE-NEXT: blr
1207 %and = and i64 %ptr, -4096
1208 %or = or i64 %and, 6
1209 %0 = inttoptr i64 %or to <16 x i8>*
1210 store <16 x i8> %str, <16 x i8>* %0, align 16
1214 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1215 define dso_local void @st_disjoint_align16_vector(i64 %ptr, <16 x i8> %str) {
1216 ; CHECK-LABEL: st_disjoint_align16_vector:
1217 ; CHECK: # %bb.0: # %entry
1218 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1219 ; CHECK-NEXT: li r4, 24
1220 ; CHECK-NEXT: stxvx v2, r3, r4
1223 ; CHECK-P8-LE-LABEL: st_disjoint_align16_vector:
1224 ; CHECK-P8-LE: # %bb.0: # %entry
1225 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
1226 ; CHECK-P8-LE-NEXT: ori r3, r3, 24
1227 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1228 ; CHECK-P8-LE-NEXT: blr
1230 ; CHECK-P8-BE-LABEL: st_disjoint_align16_vector:
1231 ; CHECK-P8-BE: # %bb.0: # %entry
1232 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
1233 ; CHECK-P8-BE-NEXT: ori r3, r3, 24
1234 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1235 ; CHECK-P8-BE-NEXT: blr
1237 %and = and i64 %ptr, -4096
1238 %or = or i64 %and, 24
1239 %0 = inttoptr i64 %or to <16 x i8>*
1240 store <16 x i8> %str, <16 x i8>* %0, align 16
1244 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1245 define dso_local void @st_not_disjoint32_vector(i64 %ptr, <16 x i8> %str) {
1246 ; CHECK-LABEL: st_not_disjoint32_vector:
1247 ; CHECK: # %bb.0: # %entry
1248 ; CHECK-NEXT: ori r3, r3, 34463
1249 ; CHECK-NEXT: oris r3, r3, 1
1250 ; CHECK-NEXT: stxv v2, 0(r3)
1253 ; CHECK-P8-LE-LABEL: st_not_disjoint32_vector:
1254 ; CHECK-P8-LE: # %bb.0: # %entry
1255 ; CHECK-P8-LE-NEXT: ori r3, r3, 34463
1256 ; CHECK-P8-LE-NEXT: oris r3, r3, 1
1257 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1258 ; CHECK-P8-LE-NEXT: blr
1260 ; CHECK-P8-BE-LABEL: st_not_disjoint32_vector:
1261 ; CHECK-P8-BE: # %bb.0: # %entry
1262 ; CHECK-P8-BE-NEXT: ori r3, r3, 34463
1263 ; CHECK-P8-BE-NEXT: oris r3, r3, 1
1264 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1265 ; CHECK-P8-BE-NEXT: blr
1267 %or = or i64 %ptr, 99999
1268 %0 = inttoptr i64 %or to <16 x i8>*
1269 store <16 x i8> %str, <16 x i8>* %0, align 16
1273 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1274 define dso_local void @st_disjoint_unalign32_vector(i64 %ptr, <16 x i8> %str) {
1275 ; CHECK-P10-LABEL: st_disjoint_unalign32_vector:
1276 ; CHECK-P10: # %bb.0: # %entry
1277 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1278 ; CHECK-P10-NEXT: pli r4, 99999
1279 ; CHECK-P10-NEXT: stxvx v2, r3, r4
1280 ; CHECK-P10-NEXT: blr
1282 ; CHECK-P9-LABEL: st_disjoint_unalign32_vector:
1283 ; CHECK-P9: # %bb.0: # %entry
1284 ; CHECK-P9-NEXT: lis r4, 1
1285 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 43
1286 ; CHECK-P9-NEXT: ori r4, r4, 34463
1287 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1288 ; CHECK-P9-NEXT: blr
1290 ; CHECK-P8-LE-LABEL: st_disjoint_unalign32_vector:
1291 ; CHECK-P8-LE: # %bb.0: # %entry
1292 ; CHECK-P8-LE-NEXT: lis r4, 1
1293 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 43
1294 ; CHECK-P8-LE-NEXT: ori r4, r4, 34463
1295 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1296 ; CHECK-P8-LE-NEXT: blr
1298 ; CHECK-P8-BE-LABEL: st_disjoint_unalign32_vector:
1299 ; CHECK-P8-BE: # %bb.0: # %entry
1300 ; CHECK-P8-BE-NEXT: lis r4, 1
1301 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 43
1302 ; CHECK-P8-BE-NEXT: ori r4, r4, 34463
1303 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1304 ; CHECK-P8-BE-NEXT: blr
1306 %and = and i64 %ptr, -1048576
1307 %or = or i64 %and, 99999
1308 %0 = inttoptr i64 %or to <16 x i8>*
1309 store <16 x i8> %str, <16 x i8>* %0, align 16
1313 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1314 define dso_local void @st_disjoint_align32_vector(i64 %ptr, <16 x i8> %str) {
1315 ; CHECK-P10-LABEL: st_disjoint_align32_vector:
1316 ; CHECK-P10: # %bb.0: # %entry
1317 ; CHECK-P10-NEXT: lis r4, -15264
1318 ; CHECK-P10-NEXT: and r3, r3, r4
1319 ; CHECK-P10-NEXT: pli r4, 999990000
1320 ; CHECK-P10-NEXT: stxvx v2, r3, r4
1321 ; CHECK-P10-NEXT: blr
1323 ; CHECK-P9-LABEL: st_disjoint_align32_vector:
1324 ; CHECK-P9: # %bb.0: # %entry
1325 ; CHECK-P9-NEXT: lis r4, -15264
1326 ; CHECK-P9-NEXT: and r3, r3, r4
1327 ; CHECK-P9-NEXT: lis r4, 15258
1328 ; CHECK-P9-NEXT: ori r4, r4, 41712
1329 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1330 ; CHECK-P9-NEXT: blr
1332 ; CHECK-P8-LE-LABEL: st_disjoint_align32_vector:
1333 ; CHECK-P8-LE: # %bb.0: # %entry
1334 ; CHECK-P8-LE-NEXT: lis r4, -15264
1335 ; CHECK-P8-LE-NEXT: lis r5, 15258
1336 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1337 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
1338 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1339 ; CHECK-P8-LE-NEXT: blr
1341 ; CHECK-P8-BE-LABEL: st_disjoint_align32_vector:
1342 ; CHECK-P8-BE: # %bb.0: # %entry
1343 ; CHECK-P8-BE-NEXT: lis r4, -15264
1344 ; CHECK-P8-BE-NEXT: lis r5, 15258
1345 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1346 ; CHECK-P8-BE-NEXT: ori r4, r5, 41712
1347 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1348 ; CHECK-P8-BE-NEXT: blr
1350 %and = and i64 %ptr, -1000341504
1351 %or = or i64 %and, 999990000
1352 %0 = inttoptr i64 %or to <16 x i8>*
1353 store <16 x i8> %str, <16 x i8>* %0, align 16
1357 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1358 define dso_local void @st_not_disjoint64_vector(i64 %ptr, <16 x i8> %str) {
1359 ; CHECK-P10-LABEL: st_not_disjoint64_vector:
1360 ; CHECK-P10: # %bb.0: # %entry
1361 ; CHECK-P10-NEXT: pli r4, 232
1362 ; CHECK-P10-NEXT: pli r5, 3567587329
1363 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1364 ; CHECK-P10-NEXT: or r3, r3, r5
1365 ; CHECK-P10-NEXT: stxv v2, 0(r3)
1366 ; CHECK-P10-NEXT: blr
1368 ; CHECK-P9-LABEL: st_not_disjoint64_vector:
1369 ; CHECK-P9: # %bb.0: # %entry
1370 ; CHECK-P9-NEXT: li r4, 29
1371 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1372 ; CHECK-P9-NEXT: oris r4, r4, 54437
1373 ; CHECK-P9-NEXT: ori r4, r4, 4097
1374 ; CHECK-P9-NEXT: or r3, r3, r4
1375 ; CHECK-P9-NEXT: stxv v2, 0(r3)
1376 ; CHECK-P9-NEXT: blr
1378 ; CHECK-P8-LE-LABEL: st_not_disjoint64_vector:
1379 ; CHECK-P8-LE: # %bb.0: # %entry
1380 ; CHECK-P8-LE-NEXT: li r4, 29
1381 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1382 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1383 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1384 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1385 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1386 ; CHECK-P8-LE-NEXT: blr
1388 ; CHECK-P8-BE-LABEL: st_not_disjoint64_vector:
1389 ; CHECK-P8-BE: # %bb.0: # %entry
1390 ; CHECK-P8-BE-NEXT: li r4, 29
1391 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1392 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1393 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1394 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1395 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1396 ; CHECK-P8-BE-NEXT: blr
1398 %or = or i64 %ptr, 1000000000001
1399 %0 = inttoptr i64 %or to <16 x i8>*
1400 store <16 x i8> %str, <16 x i8>* %0, align 16
1404 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1405 define dso_local void @st_disjoint_unalign64_vector(i64 %ptr, <16 x i8> %str) {
1406 ; CHECK-P10-LABEL: st_disjoint_unalign64_vector:
1407 ; CHECK-P10: # %bb.0: # %entry
1408 ; CHECK-P10-NEXT: pli r4, 232
1409 ; CHECK-P10-NEXT: pli r5, 3567587329
1410 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1411 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1412 ; CHECK-P10-NEXT: stxvx v2, r3, r5
1413 ; CHECK-P10-NEXT: blr
1415 ; CHECK-P9-LABEL: st_disjoint_unalign64_vector:
1416 ; CHECK-P9: # %bb.0: # %entry
1417 ; CHECK-P9-NEXT: li r4, 29
1418 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1419 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1420 ; CHECK-P9-NEXT: oris r4, r4, 54437
1421 ; CHECK-P9-NEXT: ori r4, r4, 4097
1422 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1423 ; CHECK-P9-NEXT: blr
1425 ; CHECK-P8-LE-LABEL: st_disjoint_unalign64_vector:
1426 ; CHECK-P8-LE: # %bb.0: # %entry
1427 ; CHECK-P8-LE-NEXT: li r4, 29
1428 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1429 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1430 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1431 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1432 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1433 ; CHECK-P8-LE-NEXT: blr
1435 ; CHECK-P8-BE-LABEL: st_disjoint_unalign64_vector:
1436 ; CHECK-P8-BE: # %bb.0: # %entry
1437 ; CHECK-P8-BE-NEXT: li r4, 29
1438 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1439 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1440 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1441 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1442 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1443 ; CHECK-P8-BE-NEXT: blr
1445 %and = and i64 %ptr, -1099511627776
1446 %or = or i64 %and, 1000000000001
1447 %0 = inttoptr i64 %or to <16 x i8>*
1448 store <16 x i8> %str, <16 x i8>* %0, align 16
1452 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1453 define dso_local void @st_disjoint_align64_vector(i64 %ptr, <16 x i8> %str) {
1454 ; CHECK-P10-LABEL: st_disjoint_align64_vector:
1455 ; CHECK-P10: # %bb.0: # %entry
1456 ; CHECK-P10-NEXT: pli r4, 244140625
1457 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1458 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1459 ; CHECK-P10-NEXT: stxvx v2, r3, r4
1460 ; CHECK-P10-NEXT: blr
1462 ; CHECK-P9-LABEL: st_disjoint_align64_vector:
1463 ; CHECK-P9: # %bb.0: # %entry
1464 ; CHECK-P9-NEXT: lis r4, 3725
1465 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1466 ; CHECK-P9-NEXT: ori r4, r4, 19025
1467 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1468 ; CHECK-P9-NEXT: stxvx v2, r3, r4
1469 ; CHECK-P9-NEXT: blr
1471 ; CHECK-P8-LE-LABEL: st_disjoint_align64_vector:
1472 ; CHECK-P8-LE: # %bb.0: # %entry
1473 ; CHECK-P8-LE-NEXT: lis r4, 3725
1474 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1475 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1476 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1477 ; CHECK-P8-LE-NEXT: stvx v2, r3, r4
1478 ; CHECK-P8-LE-NEXT: blr
1480 ; CHECK-P8-BE-LABEL: st_disjoint_align64_vector:
1481 ; CHECK-P8-BE: # %bb.0: # %entry
1482 ; CHECK-P8-BE-NEXT: lis r4, 3725
1483 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1484 ; CHECK-P8-BE-NEXT: ori r4, r4, 19025
1485 ; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
1486 ; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
1487 ; CHECK-P8-BE-NEXT: blr
1489 %and = and i64 %ptr, -1099511627776
1490 %or = or i64 %and, 1000000000000
1491 %0 = inttoptr i64 %or to <16 x i8>*
1492 store <16 x i8> %str, <16 x i8>* %0, align 4096
1496 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1497 define dso_local void @st_cst_unalign16_vector(<16 x i8> %str) {
1498 ; CHECK-LABEL: st_cst_unalign16_vector:
1499 ; CHECK: # %bb.0: # %entry
1500 ; CHECK-NEXT: li r3, 255
1501 ; CHECK-NEXT: stxv v2, 0(r3)
1504 ; CHECK-P8-LE-LABEL: st_cst_unalign16_vector:
1505 ; CHECK-P8-LE: # %bb.0: # %entry
1506 ; CHECK-P8-LE-NEXT: li r3, 255
1507 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1508 ; CHECK-P8-LE-NEXT: blr
1510 ; CHECK-P8-BE-LABEL: st_cst_unalign16_vector:
1511 ; CHECK-P8-BE: # %bb.0: # %entry
1512 ; CHECK-P8-BE-NEXT: li r3, 255
1513 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1514 ; CHECK-P8-BE-NEXT: blr
1516 store <16 x i8> %str, <16 x i8>* inttoptr (i64 255 to <16 x i8>*), align 16
1520 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1521 define dso_local void @st_cst_align16_vector(<16 x i8> %str) {
1522 ; CHECK-LABEL: st_cst_align16_vector:
1523 ; CHECK: # %bb.0: # %entry
1524 ; CHECK-NEXT: stxv v2, 4080(0)
1527 ; CHECK-P8-LE-LABEL: st_cst_align16_vector:
1528 ; CHECK-P8-LE: # %bb.0: # %entry
1529 ; CHECK-P8-LE-NEXT: li r3, 4080
1530 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1531 ; CHECK-P8-LE-NEXT: blr
1533 ; CHECK-P8-BE-LABEL: st_cst_align16_vector:
1534 ; CHECK-P8-BE: # %bb.0: # %entry
1535 ; CHECK-P8-BE-NEXT: li r3, 4080
1536 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1537 ; CHECK-P8-BE-NEXT: blr
1539 store <16 x i8> %str, <16 x i8>* inttoptr (i64 4080 to <16 x i8>*), align 16
1543 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1544 define dso_local void @st_cst_unalign32_vector(<16 x i8> %str) {
1545 ; CHECK-P10-LABEL: st_cst_unalign32_vector:
1546 ; CHECK-P10: # %bb.0: # %entry
1547 ; CHECK-P10-NEXT: pli r3, 99999
1548 ; CHECK-P10-NEXT: stxv v2, 0(r3)
1549 ; CHECK-P10-NEXT: blr
1551 ; CHECK-P9-LABEL: st_cst_unalign32_vector:
1552 ; CHECK-P9: # %bb.0: # %entry
1553 ; CHECK-P9-NEXT: lis r3, 1
1554 ; CHECK-P9-NEXT: ori r3, r3, 34463
1555 ; CHECK-P9-NEXT: stxv v2, 0(r3)
1556 ; CHECK-P9-NEXT: blr
1558 ; CHECK-P8-LE-LABEL: st_cst_unalign32_vector:
1559 ; CHECK-P8-LE: # %bb.0: # %entry
1560 ; CHECK-P8-LE-NEXT: lis r3, 1
1561 ; CHECK-P8-LE-NEXT: ori r3, r3, 34463
1562 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1563 ; CHECK-P8-LE-NEXT: blr
1565 ; CHECK-P8-BE-LABEL: st_cst_unalign32_vector:
1566 ; CHECK-P8-BE: # %bb.0: # %entry
1567 ; CHECK-P8-BE-NEXT: lis r3, 1
1568 ; CHECK-P8-BE-NEXT: ori r3, r3, 34463
1569 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1570 ; CHECK-P8-BE-NEXT: blr
1572 store <16 x i8> %str, <16 x i8>* inttoptr (i64 99999 to <16 x i8>*), align 16
1576 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1577 define dso_local void @st_cst_align32_vector(<16 x i8> %str) {
1578 ; CHECK-P10-LABEL: st_cst_align32_vector:
1579 ; CHECK-P10: # %bb.0: # %entry
1580 ; CHECK-P10-NEXT: pli r3, 9999900
1581 ; CHECK-P10-NEXT: stxv v2, 0(r3)
1582 ; CHECK-P10-NEXT: blr
1584 ; CHECK-P9-LABEL: st_cst_align32_vector:
1585 ; CHECK-P9: # %bb.0: # %entry
1586 ; CHECK-P9-NEXT: lis r3, 152
1587 ; CHECK-P9-NEXT: ori r3, r3, 38428
1588 ; CHECK-P9-NEXT: stxv v2, 0(r3)
1589 ; CHECK-P9-NEXT: blr
1591 ; CHECK-P8-LE-LABEL: st_cst_align32_vector:
1592 ; CHECK-P8-LE: # %bb.0: # %entry
1593 ; CHECK-P8-LE-NEXT: lis r3, 152
1594 ; CHECK-P8-LE-NEXT: ori r3, r3, 38428
1595 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1596 ; CHECK-P8-LE-NEXT: blr
1598 ; CHECK-P8-BE-LABEL: st_cst_align32_vector:
1599 ; CHECK-P8-BE: # %bb.0: # %entry
1600 ; CHECK-P8-BE-NEXT: lis r3, 152
1601 ; CHECK-P8-BE-NEXT: ori r3, r3, 38428
1602 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1603 ; CHECK-P8-BE-NEXT: blr
1605 store <16 x i8> %str, <16 x i8>* inttoptr (i64 9999900 to <16 x i8>*), align 16
1609 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1610 define dso_local void @st_cst_unalign64_vector(<16 x i8> %str) {
1611 ; CHECK-P10-LABEL: st_cst_unalign64_vector:
1612 ; CHECK-P10: # %bb.0: # %entry
1613 ; CHECK-P10-NEXT: pli r3, 232
1614 ; CHECK-P10-NEXT: pli r4, 3567587329
1615 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1616 ; CHECK-P10-NEXT: stxv v2, 0(r4)
1617 ; CHECK-P10-NEXT: blr
1619 ; CHECK-P9-LABEL: st_cst_unalign64_vector:
1620 ; CHECK-P9: # %bb.0: # %entry
1621 ; CHECK-P9-NEXT: li r3, 29
1622 ; CHECK-P9-NEXT: rldic r3, r3, 35, 24
1623 ; CHECK-P9-NEXT: oris r3, r3, 54437
1624 ; CHECK-P9-NEXT: ori r3, r3, 4097
1625 ; CHECK-P9-NEXT: stxv v2, 0(r3)
1626 ; CHECK-P9-NEXT: blr
1628 ; CHECK-P8-LE-LABEL: st_cst_unalign64_vector:
1629 ; CHECK-P8-LE: # %bb.0: # %entry
1630 ; CHECK-P8-LE-NEXT: li r3, 29
1631 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
1632 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
1633 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
1634 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1635 ; CHECK-P8-LE-NEXT: blr
1637 ; CHECK-P8-BE-LABEL: st_cst_unalign64_vector:
1638 ; CHECK-P8-BE: # %bb.0: # %entry
1639 ; CHECK-P8-BE-NEXT: li r3, 29
1640 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1641 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1642 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
1643 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1644 ; CHECK-P8-BE-NEXT: blr
1646 store <16 x i8> %str, <16 x i8>* inttoptr (i64 1000000000001 to <16 x i8>*), align 16
1650 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
1651 define dso_local void @st_cst_align64_vector(<16 x i8> %str) {
1652 ; CHECK-P10-LABEL: st_cst_align64_vector:
1653 ; CHECK-P10: # %bb.0: # %entry
1654 ; CHECK-P10-NEXT: pli r3, 244140625
1655 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1656 ; CHECK-P10-NEXT: stxv v2, 0(r3)
1657 ; CHECK-P10-NEXT: blr
1659 ; CHECK-P9-LABEL: st_cst_align64_vector:
1660 ; CHECK-P9: # %bb.0: # %entry
1661 ; CHECK-P9-NEXT: lis r3, 3725
1662 ; CHECK-P9-NEXT: ori r3, r3, 19025
1663 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
1664 ; CHECK-P9-NEXT: stxv v2, 0(r3)
1665 ; CHECK-P9-NEXT: blr
1667 ; CHECK-P8-LE-LABEL: st_cst_align64_vector:
1668 ; CHECK-P8-LE: # %bb.0: # %entry
1669 ; CHECK-P8-LE-NEXT: lis r3, 3725
1670 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1671 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1672 ; CHECK-P8-LE-NEXT: stvx v2, 0, r3
1673 ; CHECK-P8-LE-NEXT: blr
1675 ; CHECK-P8-BE-LABEL: st_cst_align64_vector:
1676 ; CHECK-P8-BE: # %bb.0: # %entry
1677 ; CHECK-P8-BE-NEXT: lis r3, 3725
1678 ; CHECK-P8-BE-NEXT: ori r3, r3, 19025
1679 ; CHECK-P8-BE-NEXT: rldic r3, r3, 12, 24
1680 ; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
1681 ; CHECK-P8-BE-NEXT: blr
1683 store <16 x i8> %str, <16 x i8>* inttoptr (i64 1000000000000 to <16 x i8>*), align 4096