1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-asm-full-reg-names \
3 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu < %s | \
4 ; RUN: FileCheck %s --check-prefix=CHECK-LE-P8
5 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
6 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-linux-gnu < %s | \
7 ; RUN: FileCheck %s --check-prefix=CHECK-LE-P9
8 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-asm-full-reg-names \
9 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-linux-gnu < %s | \
10 ; RUN: FileCheck %s --check-prefix=CHECK-BE-P8
11 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
12 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-linux-gnu < %s | \
13 ; RUN: FileCheck %s --check-prefix=CHECK-BE-P9
15 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-asm-full-reg-names \
16 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-ibm-aix < %s | \
17 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-64-P8
18 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
19 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-ibm-aix < %s | \
20 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-64-P9
21 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -ppc-asm-full-reg-names \
22 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc-ibm-aix < %s | \
23 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-32-P8
24 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -ppc-asm-full-reg-names \
25 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc-ibm-aix < %s | \
26 ; RUN: FileCheck %s --check-prefix=CHECK-AIX-32-P9
28 define <16 x i8> @test_v16i8_v16i8(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
29 ; CHECK-LE-P8-LABEL: test_v16i8_v16i8:
30 ; CHECK-LE-P8: # %bb.0: # %entry
31 ; CHECK-LE-P8-NEXT: lbz r3, 0(r3)
32 ; CHECK-LE-P8-NEXT: lbz r4, 0(r4)
33 ; CHECK-LE-P8-NEXT: mtvsrd v2, r3
34 ; CHECK-LE-P8-NEXT: mtvsrd v3, r4
35 ; CHECK-LE-P8-NEXT: vmrghh v2, v3, v2
36 ; CHECK-LE-P8-NEXT: blr
38 ; CHECK-LE-P9-LABEL: test_v16i8_v16i8:
39 ; CHECK-LE-P9: # %bb.0: # %entry
40 ; CHECK-LE-P9-NEXT: lxsibzx v2, 0, r3
41 ; CHECK-LE-P9-NEXT: lxsibzx v3, 0, r4
42 ; CHECK-LE-P9-NEXT: vmrghh v2, v3, v2
43 ; CHECK-LE-P9-NEXT: blr
45 ; CHECK-BE-P8-LABEL: test_v16i8_v16i8:
46 ; CHECK-BE-P8: # %bb.0: # %entry
47 ; CHECK-BE-P8-NEXT: addis r5, r2, .LCPI0_0@toc@ha
48 ; CHECK-BE-P8-NEXT: lbz r3, 0(r3)
49 ; CHECK-BE-P8-NEXT: lbz r4, 0(r4)
50 ; CHECK-BE-P8-NEXT: addi r5, r5, .LCPI0_0@toc@l
51 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r4
52 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r3
53 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r5
54 ; CHECK-BE-P8-NEXT: vperm v2, v4, v3, v2
55 ; CHECK-BE-P8-NEXT: blr
57 ; CHECK-BE-P9-LABEL: test_v16i8_v16i8:
58 ; CHECK-BE-P9: # %bb.0: # %entry
59 ; CHECK-BE-P9-NEXT: addis r5, r2, .LCPI0_0@toc@ha
60 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r4
61 ; CHECK-BE-P9-NEXT: lxsibzx f1, 0, r3
62 ; CHECK-BE-P9-NEXT: addi r5, r5, .LCPI0_0@toc@l
63 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r5)
64 ; CHECK-BE-P9-NEXT: xxperm v2, vs1, vs0
65 ; CHECK-BE-P9-NEXT: blr
67 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v16i8:
68 ; CHECK-AIX-64-P8: # %bb.0: # %entry
69 ; CHECK-AIX-64-P8-NEXT: lbz r3, 0(r3)
70 ; CHECK-AIX-64-P8-NEXT: lbz r4, 0(r4)
71 ; CHECK-AIX-64-P8-NEXT: ld r5, L..C0(r2) # %const.0
72 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r5
73 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r4
74 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
75 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v3, v2
76 ; CHECK-AIX-64-P8-NEXT: blr
78 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v16i8:
79 ; CHECK-AIX-64-P9: # %bb.0: # %entry
80 ; CHECK-AIX-64-P9-NEXT: ld r5, L..C0(r2) # %const.0
81 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r4
82 ; CHECK-AIX-64-P9-NEXT: lxsibzx f1, 0, r3
83 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r5)
84 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs1, vs0
85 ; CHECK-AIX-64-P9-NEXT: blr
87 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v16i8:
88 ; CHECK-AIX-32-P8: # %bb.0: # %entry
89 ; CHECK-AIX-32-P8-NEXT: lbz r3, 0(r3)
90 ; CHECK-AIX-32-P8-NEXT: lbz r4, 0(r4)
91 ; CHECK-AIX-32-P8-NEXT: lwz r5, L..C0(r2) # %const.0
92 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r5
93 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r4
94 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v4, r3
95 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v3, v2
96 ; CHECK-AIX-32-P8-NEXT: blr
98 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v16i8:
99 ; CHECK-AIX-32-P9: # %bb.0: # %entry
100 ; CHECK-AIX-32-P9-NEXT: lwz r5, L..C0(r2) # %const.0
101 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r4
102 ; CHECK-AIX-32-P9-NEXT: lxsibzx f1, 0, r3
103 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r5)
104 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs1, vs0
105 ; CHECK-AIX-32-P9-NEXT: blr
107 %0 = load <1 x i8>, ptr %a, align 4
108 %bc1 = bitcast <1 x i8> %0 to i8
109 %vecinit3 = insertelement <16 x i8> poison, i8 %bc1, i64 0
110 %1 = load <1 x i8>, ptr %b, align 8
111 %bc2 = bitcast <1 x i8> %1 to i8
112 %vecinit6 = insertelement <16 x i8> undef, i8 %bc2, i64 0
113 %2 = bitcast <16 x i8> %vecinit3 to <16 x i8>
114 %3 = bitcast <16 x i8> %vecinit6 to <16 x i8>
115 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
116 ret <16 x i8> %shuffle
119 define <16 x i8> @test_v16i8_none(<16 x i8> %a, i8 %b) {
120 ; CHECK-LE-P8-LABEL: test_v16i8_none:
121 ; CHECK-LE-P8: # %bb.0: # %entry
122 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI1_0@toc@ha
123 ; CHECK-LE-P8-NEXT: mtvsrd v4, r5
124 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI1_0@toc@l
125 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
126 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
127 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
128 ; CHECK-LE-P8-NEXT: blr
130 ; CHECK-LE-P9-LABEL: test_v16i8_none:
131 ; CHECK-LE-P9: # %bb.0: # %entry
132 ; CHECK-LE-P9-NEXT: mtvsrwz v3, r5
133 ; CHECK-LE-P9-NEXT: vinsertb v2, v3, 15
134 ; CHECK-LE-P9-NEXT: blr
136 ; CHECK-BE-P8-LABEL: test_v16i8_none:
137 ; CHECK-BE-P8: # %bb.0: # %entry
138 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI1_0@toc@ha
139 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r5
140 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI1_0@toc@l
141 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
142 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
143 ; CHECK-BE-P8-NEXT: blr
145 ; CHECK-BE-P9-LABEL: test_v16i8_none:
146 ; CHECK-BE-P9: # %bb.0: # %entry
147 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r5
148 ; CHECK-BE-P9-NEXT: vinsertb v2, v3, 0
149 ; CHECK-BE-P9-NEXT: blr
151 ; CHECK-AIX-64-P8-LABEL: test_v16i8_none:
152 ; CHECK-AIX-64-P8: # %bb.0: # %entry
153 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C1(r2) # %const.0
154 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
155 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
156 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
157 ; CHECK-AIX-64-P8-NEXT: blr
159 ; CHECK-AIX-64-P9-LABEL: test_v16i8_none:
160 ; CHECK-AIX-64-P9: # %bb.0: # %entry
161 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r3
162 ; CHECK-AIX-64-P9-NEXT: vinsertb v2, v3, 0
163 ; CHECK-AIX-64-P9-NEXT: blr
165 ; CHECK-AIX-32-P8-LABEL: test_v16i8_none:
166 ; CHECK-AIX-32-P8: # %bb.0: # %entry
167 ; CHECK-AIX-32-P8-NEXT: lwz r4, L..C1(r2) # %const.0
168 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v4, r3
169 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r4
170 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
171 ; CHECK-AIX-32-P8-NEXT: blr
173 ; CHECK-AIX-32-P9-LABEL: test_v16i8_none:
174 ; CHECK-AIX-32-P9: # %bb.0: # %entry
175 ; CHECK-AIX-32-P9-NEXT: mtvsrwz v3, r3
176 ; CHECK-AIX-32-P9-NEXT: vinsertb v2, v3, 0
177 ; CHECK-AIX-32-P9-NEXT: blr
179 %vecins = insertelement <16 x i8> %a, i8 %b, i32 0
180 ret <16 x i8> %vecins
183 define <16 x i8> @test_none_v16i8(i8 %arg, ptr nocapture noundef readonly %b) {
184 ; CHECK-LE-P8-LABEL: test_none_v16i8:
185 ; CHECK-LE-P8: # %bb.0: # %entry
186 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
187 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI2_0@toc@ha
188 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
189 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI2_0@toc@l
190 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
191 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
192 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
193 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
194 ; CHECK-LE-P8-NEXT: blr
196 ; CHECK-LE-P9-LABEL: test_none_v16i8:
197 ; CHECK-LE-P9: # %bb.0: # %entry
198 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
199 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
200 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r4)
201 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
202 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
203 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
204 ; CHECK-LE-P9-NEXT: blr
206 ; CHECK-BE-P8-LABEL: test_none_v16i8:
207 ; CHECK-BE-P8: # %bb.0: # %entry
208 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
209 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI2_0@toc@ha
210 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r4
211 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI2_0@toc@l
212 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
213 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
214 ; CHECK-BE-P8-NEXT: blr
216 ; CHECK-BE-P9-LABEL: test_none_v16i8:
217 ; CHECK-BE-P9: # %bb.0: # %entry
218 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r3
219 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
220 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r4)
221 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
222 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
223 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
224 ; CHECK-BE-P9-NEXT: blr
226 ; CHECK-AIX-64-P8-LABEL: test_none_v16i8:
227 ; CHECK-AIX-64-P8: # %bb.0: # %entry
228 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
229 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C2(r2) # %const.0
230 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r4
231 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
232 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
233 ; CHECK-AIX-64-P8-NEXT: blr
235 ; CHECK-AIX-64-P9-LABEL: test_none_v16i8:
236 ; CHECK-AIX-64-P9: # %bb.0: # %entry
237 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r3
238 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C1(r2) # %const.0
239 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r4)
240 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
241 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
242 ; CHECK-AIX-64-P9-NEXT: blr
244 ; CHECK-AIX-32-P8-LABEL: test_none_v16i8:
245 ; CHECK-AIX-32-P8: # %bb.0: # %entry
246 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
247 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
248 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
249 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
250 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
251 ; CHECK-AIX-32-P8-NEXT: blr
253 ; CHECK-AIX-32-P9-LABEL: test_none_v16i8:
254 ; CHECK-AIX-32-P9: # %bb.0: # %entry
255 ; CHECK-AIX-32-P9-NEXT: lxv v2, 0(r4)
256 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
257 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
258 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
259 ; CHECK-AIX-32-P9-NEXT: blr
261 %lhs = load <16 x i8>, ptr %b, align 4
262 %rhs = insertelement <16 x i8> undef, i8 %arg, i32 0
263 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
264 ret <16 x i8> %shuffle
267 define <16 x i8> @test_v16i8_v8i16(i16 %arg, i8 %arg1) {
268 ; CHECK-LE-P8-LABEL: test_v16i8_v8i16:
269 ; CHECK-LE-P8: # %bb.0: # %entry
270 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
271 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
272 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
273 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
274 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
275 ; CHECK-LE-P8-NEXT: blr
277 ; CHECK-LE-P9-LABEL: test_v16i8_v8i16:
278 ; CHECK-LE-P9: # %bb.0: # %entry
279 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
280 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
281 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
282 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
283 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
284 ; CHECK-LE-P9-NEXT: blr
286 ; CHECK-BE-P8-LABEL: test_v16i8_v8i16:
287 ; CHECK-BE-P8: # %bb.0: # %entry
288 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
289 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
290 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
291 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
292 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
293 ; CHECK-BE-P8-NEXT: blr
295 ; CHECK-BE-P9-LABEL: test_v16i8_v8i16:
296 ; CHECK-BE-P9: # %bb.0: # %entry
297 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
298 ; CHECK-BE-P9-NEXT: sldi r3, r3, 48
299 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
300 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
301 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
302 ; CHECK-BE-P9-NEXT: blr
304 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v8i16:
305 ; CHECK-AIX-64-P8: # %bb.0: # %entry
306 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
307 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
308 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
309 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
310 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
311 ; CHECK-AIX-64-P8-NEXT: blr
313 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v8i16:
314 ; CHECK-AIX-64-P9: # %bb.0: # %entry
315 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
316 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
317 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
318 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
319 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
320 ; CHECK-AIX-64-P9-NEXT: blr
322 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v8i16:
323 ; CHECK-AIX-32-P8: # %bb.0: # %entry
324 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
325 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
326 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
327 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
328 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
329 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
330 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
331 ; CHECK-AIX-32-P8-NEXT: blr
333 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v8i16:
334 ; CHECK-AIX-32-P9: # %bb.0: # %entry
335 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
336 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
337 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
338 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
339 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
340 ; CHECK-AIX-32-P9-NEXT: blr
342 %lhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
343 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
344 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
345 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
346 ret <16 x i8> %shuffle
349 define <16 x i8> @test_v8i16_v16i8(i16 %arg, i8 %arg1) {
350 ; CHECK-LE-P8-LABEL: test_v8i16_v16i8:
351 ; CHECK-LE-P8: # %bb.0: # %entry
352 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
353 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
354 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
355 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
356 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
357 ; CHECK-LE-P8-NEXT: blr
359 ; CHECK-LE-P9-LABEL: test_v8i16_v16i8:
360 ; CHECK-LE-P9: # %bb.0: # %entry
361 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
362 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
363 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
364 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
365 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
366 ; CHECK-LE-P9-NEXT: blr
368 ; CHECK-BE-P8-LABEL: test_v8i16_v16i8:
369 ; CHECK-BE-P8: # %bb.0: # %entry
370 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
371 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
372 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
373 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
374 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
375 ; CHECK-BE-P8-NEXT: blr
377 ; CHECK-BE-P9-LABEL: test_v8i16_v16i8:
378 ; CHECK-BE-P9: # %bb.0: # %entry
379 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
380 ; CHECK-BE-P9-NEXT: sldi r3, r3, 48
381 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
382 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
383 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
384 ; CHECK-BE-P9-NEXT: blr
386 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v16i8:
387 ; CHECK-AIX-64-P8: # %bb.0: # %entry
388 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
389 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
390 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
391 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
392 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
393 ; CHECK-AIX-64-P8-NEXT: blr
395 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v16i8:
396 ; CHECK-AIX-64-P9: # %bb.0: # %entry
397 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
398 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
399 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
400 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
401 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
402 ; CHECK-AIX-64-P9-NEXT: blr
404 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v16i8:
405 ; CHECK-AIX-32-P8: # %bb.0: # %entry
406 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
407 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
408 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
409 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
410 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
411 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
412 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
413 ; CHECK-AIX-32-P8-NEXT: blr
415 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v16i8:
416 ; CHECK-AIX-32-P9: # %bb.0: # %entry
417 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
418 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
419 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
420 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
421 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
422 ; CHECK-AIX-32-P9-NEXT: blr
424 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
425 %lhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
426 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
427 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
428 ret <16 x i8> %shuffle
431 define <16 x i8> @test_none_v8i16(i16 %arg, ptr nocapture noundef readonly %b) {
432 ; CHECK-LE-P8-LABEL: test_none_v8i16:
433 ; CHECK-LE-P8: # %bb.0: # %entry
434 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
435 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI5_0@toc@ha
436 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
437 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI5_0@toc@l
438 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
439 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
440 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
441 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
442 ; CHECK-LE-P8-NEXT: blr
444 ; CHECK-LE-P9-LABEL: test_none_v8i16:
445 ; CHECK-LE-P9: # %bb.0: # %entry
446 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
447 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
448 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r4)
449 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
450 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
451 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
452 ; CHECK-LE-P9-NEXT: blr
454 ; CHECK-BE-P8-LABEL: test_none_v8i16:
455 ; CHECK-BE-P8: # %bb.0: # %entry
456 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
457 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI5_0@toc@ha
458 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r4
459 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI5_0@toc@l
460 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
461 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
462 ; CHECK-BE-P8-NEXT: blr
464 ; CHECK-BE-P9-LABEL: test_none_v8i16:
465 ; CHECK-BE-P9: # %bb.0: # %entry
466 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r3
467 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
468 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r4)
469 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
470 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
471 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
472 ; CHECK-BE-P9-NEXT: blr
474 ; CHECK-AIX-64-P8-LABEL: test_none_v8i16:
475 ; CHECK-AIX-64-P8: # %bb.0: # %entry
476 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
477 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C3(r2) # %const.0
478 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r4
479 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
480 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
481 ; CHECK-AIX-64-P8-NEXT: blr
483 ; CHECK-AIX-64-P9-LABEL: test_none_v8i16:
484 ; CHECK-AIX-64-P9: # %bb.0: # %entry
485 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r3
486 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C2(r2) # %const.0
487 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r4)
488 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
489 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
490 ; CHECK-AIX-64-P9-NEXT: blr
492 ; CHECK-AIX-32-P8-LABEL: test_none_v8i16:
493 ; CHECK-AIX-32-P8: # %bb.0: # %entry
494 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
495 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
496 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
497 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
498 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
499 ; CHECK-AIX-32-P8-NEXT: blr
501 ; CHECK-AIX-32-P9-LABEL: test_none_v8i16:
502 ; CHECK-AIX-32-P9: # %bb.0: # %entry
503 ; CHECK-AIX-32-P9-NEXT: lxv v2, 0(r4)
504 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
505 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
506 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
507 ; CHECK-AIX-32-P9-NEXT: blr
509 %lhs = load <16 x i8>, ptr %b, align 4
510 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
511 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
512 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
513 ret <16 x i8> %shuffle
516 define <8 x i16> @test_v8i16_none(<8 x i16> %a, i16 %b) {
517 ; CHECK-LE-P8-LABEL: test_v8i16_none:
518 ; CHECK-LE-P8: # %bb.0: # %entry
519 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI6_0@toc@ha
520 ; CHECK-LE-P8-NEXT: mtvsrd v4, r5
521 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI6_0@toc@l
522 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
523 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
524 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
525 ; CHECK-LE-P8-NEXT: blr
527 ; CHECK-LE-P9-LABEL: test_v8i16_none:
528 ; CHECK-LE-P9: # %bb.0: # %entry
529 ; CHECK-LE-P9-NEXT: mtvsrwz v3, r5
530 ; CHECK-LE-P9-NEXT: vinserth v2, v3, 14
531 ; CHECK-LE-P9-NEXT: blr
533 ; CHECK-BE-P8-LABEL: test_v8i16_none:
534 ; CHECK-BE-P8: # %bb.0: # %entry
535 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI6_0@toc@ha
536 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r5
537 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI6_0@toc@l
538 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
539 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
540 ; CHECK-BE-P8-NEXT: blr
542 ; CHECK-BE-P9-LABEL: test_v8i16_none:
543 ; CHECK-BE-P9: # %bb.0: # %entry
544 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r5
545 ; CHECK-BE-P9-NEXT: vinserth v2, v3, 0
546 ; CHECK-BE-P9-NEXT: blr
548 ; CHECK-AIX-64-P8-LABEL: test_v8i16_none:
549 ; CHECK-AIX-64-P8: # %bb.0: # %entry
550 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C4(r2) # %const.0
551 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
552 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
553 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
554 ; CHECK-AIX-64-P8-NEXT: blr
556 ; CHECK-AIX-64-P9-LABEL: test_v8i16_none:
557 ; CHECK-AIX-64-P9: # %bb.0: # %entry
558 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r3
559 ; CHECK-AIX-64-P9-NEXT: vinserth v2, v3, 0
560 ; CHECK-AIX-64-P9-NEXT: blr
562 ; CHECK-AIX-32-P8-LABEL: test_v8i16_none:
563 ; CHECK-AIX-32-P8: # %bb.0: # %entry
564 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
565 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C2(r2) # %const.0
566 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
567 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
568 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
569 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
570 ; CHECK-AIX-32-P8-NEXT: blr
572 ; CHECK-AIX-32-P9-LABEL: test_v8i16_none:
573 ; CHECK-AIX-32-P9: # %bb.0: # %entry
574 ; CHECK-AIX-32-P9-NEXT: mtvsrwz v3, r3
575 ; CHECK-AIX-32-P9-NEXT: vinserth v2, v3, 0
576 ; CHECK-AIX-32-P9-NEXT: blr
578 %vecins = insertelement <8 x i16> %a, i16 %b, i32 0
579 ret <8 x i16> %vecins
582 define <16 x i8> @test_v16i8_v4i32(i8 %arg, i32 %arg1, <16 x i8> %a, <4 x i32> %b) {
583 ; CHECK-LE-P8-LABEL: test_v16i8_v4i32:
584 ; CHECK-LE-P8: # %bb.0: # %entry
585 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
586 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
587 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
588 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
589 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
590 ; CHECK-LE-P8-NEXT: blr
592 ; CHECK-LE-P9-LABEL: test_v16i8_v4i32:
593 ; CHECK-LE-P9: # %bb.0: # %entry
594 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
595 ; CHECK-LE-P9-NEXT: mtvsrws v3, r4
596 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
597 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
598 ; CHECK-LE-P9-NEXT: blr
600 ; CHECK-BE-P8-LABEL: test_v16i8_v4i32:
601 ; CHECK-BE-P8: # %bb.0: # %entry
602 ; CHECK-BE-P8-NEXT: sldi r3, r3, 56
603 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
604 ; CHECK-BE-P8-NEXT: sldi r3, r4, 32
605 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
606 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
607 ; CHECK-BE-P8-NEXT: blr
609 ; CHECK-BE-P9-LABEL: test_v16i8_v4i32:
610 ; CHECK-BE-P9: # %bb.0: # %entry
611 ; CHECK-BE-P9-NEXT: sldi r3, r3, 56
612 ; CHECK-BE-P9-NEXT: mtvsrws v3, r4
613 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
614 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
615 ; CHECK-BE-P9-NEXT: blr
617 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v4i32:
618 ; CHECK-AIX-64-P8: # %bb.0: # %entry
619 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 56
620 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
621 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
622 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
623 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
624 ; CHECK-AIX-64-P8-NEXT: blr
626 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v4i32:
627 ; CHECK-AIX-64-P9: # %bb.0: # %entry
628 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 56
629 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r4
630 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
631 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
632 ; CHECK-AIX-64-P9-NEXT: blr
634 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v4i32:
635 ; CHECK-AIX-32-P8: # %bb.0: # %entry
636 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
637 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
638 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
639 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
640 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
641 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
642 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
643 ; CHECK-AIX-32-P8-NEXT: blr
645 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v4i32:
646 ; CHECK-AIX-32-P9: # %bb.0: # %entry
647 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
648 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
649 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
650 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
651 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
652 ; CHECK-AIX-32-P9-NEXT: blr
654 %lhs.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
655 %lhs = bitcast <16 x i8> %lhs.tmp to <16 x i8>
656 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
657 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
658 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 16, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
659 ret <16 x i8> %shuffle
662 define <16 x i8> @test_v4i32_v16i8(i32 %arg, i8 %arg1) {
663 ; CHECK-LE-P8-LABEL: test_v4i32_v16i8:
664 ; CHECK-LE-P8: # %bb.0: # %entry
665 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
666 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
667 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
668 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
669 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
670 ; CHECK-LE-P8-NEXT: blr
672 ; CHECK-LE-P9-LABEL: test_v4i32_v16i8:
673 ; CHECK-LE-P9: # %bb.0: # %entry
674 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
675 ; CHECK-LE-P9-NEXT: mtvsrws v3, r3
676 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
677 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
678 ; CHECK-LE-P9-NEXT: blr
680 ; CHECK-BE-P8-LABEL: test_v4i32_v16i8:
681 ; CHECK-BE-P8: # %bb.0: # %entry
682 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
683 ; CHECK-BE-P8-NEXT: sldi r3, r3, 32
684 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
685 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
686 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
687 ; CHECK-BE-P8-NEXT: blr
689 ; CHECK-BE-P9-LABEL: test_v4i32_v16i8:
690 ; CHECK-BE-P9: # %bb.0: # %entry
691 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
692 ; CHECK-BE-P9-NEXT: mtvsrws v3, r3
693 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
694 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
695 ; CHECK-BE-P9-NEXT: blr
697 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v16i8:
698 ; CHECK-AIX-64-P8: # %bb.0: # %entry
699 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
700 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 32
701 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
702 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
703 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
704 ; CHECK-AIX-64-P8-NEXT: blr
706 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v16i8:
707 ; CHECK-AIX-64-P9: # %bb.0: # %entry
708 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
709 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r3
710 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
711 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
712 ; CHECK-AIX-64-P9-NEXT: blr
714 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v16i8:
715 ; CHECK-AIX-32-P8: # %bb.0: # %entry
716 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
717 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
718 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
719 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
720 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
721 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
722 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
723 ; CHECK-AIX-32-P8-NEXT: blr
725 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v16i8:
726 ; CHECK-AIX-32-P9: # %bb.0: # %entry
727 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
728 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
729 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
730 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
731 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
732 ; CHECK-AIX-32-P9-NEXT: blr
734 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
735 %lhs.tmp = insertelement <4 x i32> undef, i32 %arg, i32 0
736 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
737 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
738 ret <16 x i8> %shuffle
741 define <4 x i32> @test_none_v4i32(<4 x i32> %a, i64 %b) {
742 ; CHECK-LE-P8-LABEL: test_none_v4i32:
743 ; CHECK-LE-P8: # %bb.0: # %entry
744 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
745 ; CHECK-LE-P8-NEXT: mtvsrwz v4, r5
746 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
747 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
748 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI9_1@toc@ha
749 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI9_1@toc@l
750 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
751 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
752 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
753 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
754 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
755 ; CHECK-LE-P8-NEXT: blr
757 ; CHECK-LE-P9-LABEL: test_none_v4i32:
758 ; CHECK-LE-P9: # %bb.0: # %entry
759 ; CHECK-LE-P9-NEXT: mtfprwz f0, r5
760 ; CHECK-LE-P9-NEXT: xxinsertw v2, vs0, 8
761 ; CHECK-LE-P9-NEXT: xxinsertw v2, vs0, 0
762 ; CHECK-LE-P9-NEXT: blr
764 ; CHECK-BE-P8-LABEL: test_none_v4i32:
765 ; CHECK-BE-P8: # %bb.0: # %entry
766 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
767 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r5
768 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
769 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
770 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_1@toc@ha
771 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_1@toc@l
772 ; CHECK-BE-P8-NEXT: vperm v2, v2, v4, v3
773 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
774 ; CHECK-BE-P8-NEXT: vperm v2, v2, v4, v3
775 ; CHECK-BE-P8-NEXT: blr
777 ; CHECK-BE-P9-LABEL: test_none_v4i32:
778 ; CHECK-BE-P9: # %bb.0: # %entry
779 ; CHECK-BE-P9-NEXT: mtfprwz f0, r5
780 ; CHECK-BE-P9-NEXT: xxinsertw v2, vs0, 4
781 ; CHECK-BE-P9-NEXT: xxinsertw v2, vs0, 12
782 ; CHECK-BE-P9-NEXT: blr
784 ; CHECK-AIX-64-P8-LABEL: test_none_v4i32:
785 ; CHECK-AIX-64-P8: # %bb.0: # %entry
786 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C5(r2) # %const.0
787 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
788 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C6(r2) # %const.1
789 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
790 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v4, v3
791 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r3
792 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v4, v3
793 ; CHECK-AIX-64-P8-NEXT: blr
795 ; CHECK-AIX-64-P9-LABEL: test_none_v4i32:
796 ; CHECK-AIX-64-P9: # %bb.0: # %entry
797 ; CHECK-AIX-64-P9-NEXT: mtfprwz f0, r3
798 ; CHECK-AIX-64-P9-NEXT: xxinsertw v2, vs0, 4
799 ; CHECK-AIX-64-P9-NEXT: xxinsertw v2, vs0, 12
800 ; CHECK-AIX-64-P9-NEXT: blr
802 ; CHECK-AIX-32-P8-LABEL: test_none_v4i32:
803 ; CHECK-AIX-32-P8: # %bb.0: # %entry
804 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C3(r2) # %const.0
805 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
806 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
807 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
808 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
809 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C4(r2) # %const.1
810 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v4, v3
811 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
812 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v4, v3
813 ; CHECK-AIX-32-P8-NEXT: blr
815 ; CHECK-AIX-32-P9-LABEL: test_none_v4i32:
816 ; CHECK-AIX-32-P9: # %bb.0: # %entry
817 ; CHECK-AIX-32-P9-NEXT: mtfprwz f0, r4
818 ; CHECK-AIX-32-P9-NEXT: xxinsertw v2, vs0, 4
819 ; CHECK-AIX-32-P9-NEXT: xxinsertw v2, vs0, 12
820 ; CHECK-AIX-32-P9-NEXT: blr
822 %conv = trunc i64 %b to i32
823 %vecins = insertelement <4 x i32> %a, i32 %conv, i32 1
824 %vecins2 = insertelement <4 x i32> %vecins, i32 %conv, i32 3
825 ret <4 x i32> %vecins2
828 define <16 x i8> @test_v4i32_none(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
829 ; CHECK-LE-P8-LABEL: test_v4i32_none:
830 ; CHECK-LE-P8: # %bb.0: # %entry
831 ; CHECK-LE-P8-NEXT: lbzx r4, 0, r4
832 ; CHECK-LE-P8-NEXT: lxsiwzx v4, 0, r3
833 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r4
834 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI10_0@toc@ha
835 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI10_0@toc@l
836 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
837 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
838 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
839 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
840 ; CHECK-LE-P8-NEXT: blr
842 ; CHECK-LE-P9-LABEL: test_v4i32_none:
843 ; CHECK-LE-P9: # %bb.0: # %entry
844 ; CHECK-LE-P9-NEXT: lxsiwzx v2, 0, r3
845 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI10_0@toc@ha
846 ; CHECK-LE-P9-NEXT: lxsibzx v3, 0, r4
847 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI10_0@toc@l
848 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
849 ; CHECK-LE-P9-NEXT: vspltb v3, v3, 7
850 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
851 ; CHECK-LE-P9-NEXT: blr
853 ; CHECK-BE-P8-LABEL: test_v4i32_none:
854 ; CHECK-BE-P8: # %bb.0: # %entry
855 ; CHECK-BE-P8-NEXT: lbzx r4, 0, r4
856 ; CHECK-BE-P8-NEXT: lxsiwzx v3, 0, r3
857 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI10_0@toc@ha
858 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI10_0@toc@l
859 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
860 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
861 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
862 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
863 ; CHECK-BE-P8-NEXT: blr
865 ; CHECK-BE-P9-LABEL: test_v4i32_none:
866 ; CHECK-BE-P9: # %bb.0: # %entry
867 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
868 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI10_0@toc@ha
869 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r4
870 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI10_0@toc@l
871 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
872 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
873 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
874 ; CHECK-BE-P9-NEXT: blr
876 ; CHECK-AIX-64-P8-LABEL: test_v4i32_none:
877 ; CHECK-AIX-64-P8: # %bb.0: # %entry
878 ; CHECK-AIX-64-P8-NEXT: lbzx r4, 0, r4
879 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v3, 0, r3
880 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C7(r2) # %const.0
881 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
882 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
883 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
884 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
885 ; CHECK-AIX-64-P8-NEXT: blr
887 ; CHECK-AIX-64-P9-LABEL: test_v4i32_none:
888 ; CHECK-AIX-64-P9: # %bb.0: # %entry
889 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
890 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C3(r2) # %const.0
891 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r4
892 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
893 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
894 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
895 ; CHECK-AIX-64-P9-NEXT: blr
897 ; CHECK-AIX-32-P8-LABEL: test_v4i32_none:
898 ; CHECK-AIX-32-P8: # %bb.0: # %entry
899 ; CHECK-AIX-32-P8-NEXT: lbzx r4, 0, r4
900 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r3
901 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C5(r2) # %const.0
902 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r4
903 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
904 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
905 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
906 ; CHECK-AIX-32-P8-NEXT: blr
908 ; CHECK-AIX-32-P9-LABEL: test_v4i32_none:
909 ; CHECK-AIX-32-P9: # %bb.0: # %entry
910 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
911 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C1(r2) # %const.0
912 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r4
913 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
914 ; CHECK-AIX-32-P9-NEXT: vspltb v2, v2, 7
915 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
916 ; CHECK-AIX-32-P9-NEXT: blr
918 %0 = load <4 x i8>, ptr %a, align 4
919 %bc1 = bitcast <4 x i8> %0 to i32
920 %vecinit3 = insertelement <4 x i32> poison, i32 %bc1, i64 0
921 %1 = load <1 x i8>, ptr %b, align 8
922 %bc2 = bitcast <1 x i8> %1 to i8
923 %vecinit6 = insertelement <16 x i8> undef, i8 %bc2, i64 0
924 %2 = bitcast <4 x i32> %vecinit3 to <16 x i8>
925 %3 = bitcast <16 x i8> %vecinit6 to <16 x i8>
926 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
927 ret <16 x i8> %shuffle
930 define <16 x i8> @test_v16i8_v2i64(i8 %arg, i64 %arg1, <16 x i8> %a, <2 x i64> %b) {
931 ; CHECK-LE-P8-LABEL: test_v16i8_v2i64:
932 ; CHECK-LE-P8: # %bb.0: # %entry
933 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
934 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
935 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
936 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
937 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
938 ; CHECK-LE-P8-NEXT: blr
940 ; CHECK-LE-P9-LABEL: test_v16i8_v2i64:
941 ; CHECK-LE-P9: # %bb.0: # %entry
942 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
943 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
944 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
945 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
946 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
947 ; CHECK-LE-P9-NEXT: blr
949 ; CHECK-BE-P8-LABEL: test_v16i8_v2i64:
950 ; CHECK-BE-P8: # %bb.0: # %entry
951 ; CHECK-BE-P8-NEXT: sldi r3, r3, 56
952 ; CHECK-BE-P8-NEXT: mtvsrd v3, r4
953 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
954 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
955 ; CHECK-BE-P8-NEXT: blr
957 ; CHECK-BE-P9-LABEL: test_v16i8_v2i64:
958 ; CHECK-BE-P9: # %bb.0: # %entry
959 ; CHECK-BE-P9-NEXT: sldi r3, r3, 56
960 ; CHECK-BE-P9-NEXT: mtvsrd v3, r4
961 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
962 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
963 ; CHECK-BE-P9-NEXT: blr
965 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v2i64:
966 ; CHECK-AIX-64-P8: # %bb.0: # %entry
967 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 56
968 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r4
969 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
970 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
971 ; CHECK-AIX-64-P8-NEXT: blr
973 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v2i64:
974 ; CHECK-AIX-64-P9: # %bb.0: # %entry
975 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 56
976 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r4
977 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
978 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
979 ; CHECK-AIX-64-P9-NEXT: blr
981 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v2i64:
982 ; CHECK-AIX-32-P8: # %bb.0: # %entry
983 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
984 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
985 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
986 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
987 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
988 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
989 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
990 ; CHECK-AIX-32-P8-NEXT: blr
992 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v2i64:
993 ; CHECK-AIX-32-P9: # %bb.0: # %entry
994 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
995 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
996 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
997 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
998 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
999 ; CHECK-AIX-32-P9-NEXT: blr
1001 %lhs.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
1002 %lhs = bitcast <16 x i8> %lhs.tmp to <16 x i8>
1003 %rhs.tmp = insertelement <2 x i64> %b, i64 %arg1, i32 0
1004 %rhs = bitcast <2 x i64> %rhs.tmp to <16 x i8>
1005 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 16, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1006 ret <16 x i8> %shuffle
1009 define <16 x i8> @test_v2i64_v16i8(i64 %arg, i8 %arg1) {
1010 ; CHECK-LE-P8-LABEL: test_v2i64_v16i8:
1011 ; CHECK-LE-P8: # %bb.0: # %entry
1012 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1013 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1014 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1015 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1016 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
1017 ; CHECK-LE-P8-NEXT: blr
1019 ; CHECK-LE-P9-LABEL: test_v2i64_v16i8:
1020 ; CHECK-LE-P9: # %bb.0: # %entry
1021 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1022 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1023 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1024 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1025 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
1026 ; CHECK-LE-P9-NEXT: blr
1028 ; CHECK-BE-P8-LABEL: test_v2i64_v16i8:
1029 ; CHECK-BE-P8: # %bb.0: # %entry
1030 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
1031 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1032 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
1033 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1034 ; CHECK-BE-P8-NEXT: blr
1036 ; CHECK-BE-P9-LABEL: test_v2i64_v16i8:
1037 ; CHECK-BE-P9: # %bb.0: # %entry
1038 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
1039 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1040 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
1041 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1042 ; CHECK-BE-P9-NEXT: blr
1044 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v16i8:
1045 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1046 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
1047 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1048 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
1049 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1050 ; CHECK-AIX-64-P8-NEXT: blr
1052 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v16i8:
1053 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1054 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
1055 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1056 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
1057 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1058 ; CHECK-AIX-64-P9-NEXT: blr
1060 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v16i8:
1061 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1062 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
1063 ; CHECK-AIX-32-P8-NEXT: stb r5, -32(r1)
1064 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
1065 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1066 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1067 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1068 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1069 ; CHECK-AIX-32-P8-NEXT: blr
1071 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v16i8:
1072 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1073 ; CHECK-AIX-32-P9-NEXT: stb r5, -32(r1)
1074 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1075 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
1076 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
1077 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1078 ; CHECK-AIX-32-P9-NEXT: blr
1080 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
1081 %lhs.tmp = insertelement <2 x i64> undef, i64 %arg, i32 0
1082 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1083 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1084 ret <16 x i8> %shuffle
1087 define dso_local <16 x i8> @test_1_2(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr {
1088 ; CHECK-LE-P8-LABEL: test_1_2:
1089 ; CHECK-LE-P8: # %bb.0: # %entry
1090 ; CHECK-LE-P8-NEXT: lbzx r3, 0, r3
1091 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r4
1092 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r3
1093 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI13_0@toc@ha
1094 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI13_0@toc@l
1095 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1096 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1097 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1098 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
1099 ; CHECK-LE-P8-NEXT: blr
1101 ; CHECK-LE-P9-LABEL: test_1_2:
1102 ; CHECK-LE-P9: # %bb.0: # %entry
1103 ; CHECK-LE-P9-NEXT: lxsibzx v2, 0, r3
1104 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI13_0@toc@ha
1105 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1106 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI13_0@toc@l
1107 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1108 ; CHECK-LE-P9-NEXT: vspltb v2, v2, 7
1109 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1110 ; CHECK-LE-P9-NEXT: blr
1112 ; CHECK-BE-P8-LABEL: test_1_2:
1113 ; CHECK-BE-P8: # %bb.0: # %entry
1114 ; CHECK-BE-P8-NEXT: lbzx r3, 0, r3
1115 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1116 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r3
1117 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1118 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1119 ; CHECK-BE-P8-NEXT: blr
1121 ; CHECK-BE-P9-LABEL: test_1_2:
1122 ; CHECK-BE-P9: # %bb.0: # %entry
1123 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r3
1124 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1125 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
1126 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1127 ; CHECK-BE-P9-NEXT: blr
1129 ; CHECK-AIX-64-P8-LABEL: test_1_2:
1130 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1131 ; CHECK-AIX-64-P8-NEXT: lbzx r3, 0, r3
1132 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1133 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r3
1134 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1135 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1136 ; CHECK-AIX-64-P8-NEXT: blr
1138 ; CHECK-AIX-64-P9-LABEL: test_1_2:
1139 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1140 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r3
1141 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1142 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
1143 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1144 ; CHECK-AIX-64-P9-NEXT: blr
1146 ; CHECK-AIX-32-P8-LABEL: test_1_2:
1147 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1148 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r3
1149 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1150 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r3
1151 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C6(r2) # %const.0
1152 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1153 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
1154 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1155 ; CHECK-AIX-32-P8-NEXT: blr
1157 ; CHECK-AIX-32-P9-LABEL: test_1_2:
1158 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1159 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r3
1160 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C2(r2) # %const.0
1161 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v2, 7
1162 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1163 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
1164 ; CHECK-AIX-32-P9-NEXT: xxperm v2, v3, vs0
1165 ; CHECK-AIX-32-P9-NEXT: blr
1167 %0 = load <1 x i8>, ptr %a, align 4
1168 %bc1 = bitcast <1 x i8> %0 to i8
1169 %vecinit3 = insertelement <16 x i8> poison, i8 %bc1, i64 0
1170 %1 = load <2 x i8>, ptr %b, align 8
1171 %bc2 = bitcast <2 x i8> %1 to i16
1172 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1173 %2 = bitcast <16 x i8> %vecinit3 to <16 x i8>
1174 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1175 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1176 ret <16 x i8> %shuffle
1179 define <16 x i8> @test_none_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1180 ; CHECK-LE-P8-LABEL: test_none_v2i64:
1181 ; CHECK-LE-P8: # %bb.0: # %entry
1182 ; CHECK-LE-P8-NEXT: lbzx r3, 0, r3
1183 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r4
1184 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r3
1185 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI14_0@toc@ha
1186 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI14_0@toc@l
1187 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1188 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1189 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1190 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
1191 ; CHECK-LE-P8-NEXT: blr
1193 ; CHECK-LE-P9-LABEL: test_none_v2i64:
1194 ; CHECK-LE-P9: # %bb.0: # %entry
1195 ; CHECK-LE-P9-NEXT: lxsibzx v2, 0, r3
1196 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI14_0@toc@ha
1197 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1198 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI14_0@toc@l
1199 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1200 ; CHECK-LE-P9-NEXT: vspltb v2, v2, 7
1201 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1202 ; CHECK-LE-P9-NEXT: blr
1204 ; CHECK-BE-P8-LABEL: test_none_v2i64:
1205 ; CHECK-BE-P8: # %bb.0: # %entry
1206 ; CHECK-BE-P8-NEXT: lbzx r3, 0, r3
1207 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1208 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r3
1209 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1210 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1211 ; CHECK-BE-P8-NEXT: blr
1213 ; CHECK-BE-P9-LABEL: test_none_v2i64:
1214 ; CHECK-BE-P9: # %bb.0: # %entry
1215 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r3
1216 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1217 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
1218 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1219 ; CHECK-BE-P9-NEXT: blr
1221 ; CHECK-AIX-64-P8-LABEL: test_none_v2i64:
1222 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1223 ; CHECK-AIX-64-P8-NEXT: lbzx r3, 0, r3
1224 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1225 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r3
1226 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1227 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1228 ; CHECK-AIX-64-P8-NEXT: blr
1230 ; CHECK-AIX-64-P9-LABEL: test_none_v2i64:
1231 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1232 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r3
1233 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1234 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
1235 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1236 ; CHECK-AIX-64-P9-NEXT: blr
1238 ; CHECK-AIX-32-P8-LABEL: test_none_v2i64:
1239 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1240 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r3
1241 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1242 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r3
1243 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C7(r2) # %const.0
1244 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1245 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
1246 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1247 ; CHECK-AIX-32-P8-NEXT: blr
1249 ; CHECK-AIX-32-P9-LABEL: test_none_v2i64:
1250 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1251 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r3
1252 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C3(r2) # %const.0
1253 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v2, 7
1254 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1255 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
1256 ; CHECK-AIX-32-P9-NEXT: xxperm v2, v3, vs0
1257 ; CHECK-AIX-32-P9-NEXT: blr
1259 %0 = load <1 x i8>, ptr %a, align 4
1260 %bc1 = bitcast <1 x i8> %0 to i8
1261 %vecinit3 = insertelement <16 x i8> poison, i8 %bc1, i64 0
1262 %1 = load <2 x i8>, ptr %b, align 8
1263 %bc2 = bitcast <2 x i8> %1 to i16
1264 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1265 %2 = bitcast <16 x i8> %vecinit3 to <16 x i8>
1266 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1267 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1268 ret <16 x i8> %shuffle
1271 define <16 x i8> @test_v2i64_none(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1272 ; CHECK-LE-P8-LABEL: test_v2i64_none:
1273 ; CHECK-LE-P8: # %bb.0: # %entry
1274 ; CHECK-LE-P8-NEXT: lbzx r4, 0, r4
1275 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r3
1276 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r4
1277 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI15_0@toc@ha
1278 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI15_0@toc@l
1279 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
1280 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1281 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1282 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
1283 ; CHECK-LE-P8-NEXT: blr
1285 ; CHECK-LE-P9-LABEL: test_v2i64_none:
1286 ; CHECK-LE-P9: # %bb.0: # %entry
1287 ; CHECK-LE-P9-NEXT: lxsd v2, 0(r3)
1288 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI15_0@toc@ha
1289 ; CHECK-LE-P9-NEXT: lxsibzx v3, 0, r4
1290 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI15_0@toc@l
1291 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
1292 ; CHECK-LE-P9-NEXT: vspltb v3, v3, 7
1293 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
1294 ; CHECK-LE-P9-NEXT: blr
1296 ; CHECK-BE-P8-LABEL: test_v2i64_none:
1297 ; CHECK-BE-P8: # %bb.0: # %entry
1298 ; CHECK-BE-P8-NEXT: lbzx r4, 0, r4
1299 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r3
1300 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
1301 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1302 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1303 ; CHECK-BE-P8-NEXT: blr
1305 ; CHECK-BE-P9-LABEL: test_v2i64_none:
1306 ; CHECK-BE-P9: # %bb.0: # %entry
1307 ; CHECK-BE-P9-NEXT: lxsibzx v3, 0, r4
1308 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
1309 ; CHECK-BE-P9-NEXT: vspltb v3, v3, 7
1310 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1311 ; CHECK-BE-P9-NEXT: blr
1313 ; CHECK-AIX-64-P8-LABEL: test_v2i64_none:
1314 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1315 ; CHECK-AIX-64-P8-NEXT: lbzx r4, 0, r4
1316 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r3
1317 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
1318 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1319 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1320 ; CHECK-AIX-64-P8-NEXT: blr
1322 ; CHECK-AIX-64-P9-LABEL: test_v2i64_none:
1323 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1324 ; CHECK-AIX-64-P9-NEXT: lxsibzx v3, 0, r4
1325 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
1326 ; CHECK-AIX-64-P9-NEXT: vspltb v3, v3, 7
1327 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1328 ; CHECK-AIX-64-P9-NEXT: blr
1330 ; CHECK-AIX-32-P8-LABEL: test_v2i64_none:
1331 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1332 ; CHECK-AIX-32-P8-NEXT: lfiwzx f0, 0, r3
1333 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r4
1334 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r3
1335 ; CHECK-AIX-32-P8-NEXT: xxspltw v2, vs0, 1
1336 ; CHECK-AIX-32-P8-NEXT: vspltb v3, v3, 7
1337 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1338 ; CHECK-AIX-32-P8-NEXT: blr
1340 ; CHECK-AIX-32-P9-LABEL: test_v2i64_none:
1341 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1342 ; CHECK-AIX-32-P9-NEXT: lxsibzx v3, 0, r4
1343 ; CHECK-AIX-32-P9-NEXT: lxvwsx v2, 0, r3
1344 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v3, 7
1345 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1346 ; CHECK-AIX-32-P9-NEXT: blr
1348 %0 = load <8 x i8>, ptr %a, align 4
1349 %bc1 = bitcast <8 x i8> %0 to i64
1350 %vecinit3 = insertelement <2 x i64> poison, i64 %bc1, i64 0
1351 %1 = load <1 x i8>, ptr %b, align 8
1352 %bc2 = bitcast <1 x i8> %1 to i8
1353 %vecinit6 = insertelement <16 x i8> undef, i8 %bc2, i64 0
1354 %2 = bitcast <2 x i64> %vecinit3 to <16 x i8>
1355 %3 = bitcast <16 x i8> %vecinit6 to <16 x i8>
1356 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1357 ret <16 x i8> %shuffle
1360 define <16 x i8> @test_v8i16_v8i16rhs(i16 %arg, i16 %arg1) {
1361 ; CHECK-LE-P8-LABEL: test_v8i16_v8i16rhs:
1362 ; CHECK-LE-P8: # %bb.0: # %entry
1363 ; CHECK-LE-P8-NEXT: mtvsrd v2, r3
1364 ; CHECK-LE-P8-NEXT: mtvsrd v3, r4
1365 ; CHECK-LE-P8-NEXT: vmrghh v2, v3, v2
1366 ; CHECK-LE-P8-NEXT: blr
1368 ; CHECK-LE-P9-LABEL: test_v8i16_v8i16rhs:
1369 ; CHECK-LE-P9: # %bb.0: # %entry
1370 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
1371 ; CHECK-LE-P9-NEXT: mtvsrd v3, r4
1372 ; CHECK-LE-P9-NEXT: vmrghh v2, v3, v2
1373 ; CHECK-LE-P9-NEXT: blr
1375 ; CHECK-BE-P8-LABEL: test_v8i16_v8i16rhs:
1376 ; CHECK-BE-P8: # %bb.0: # %entry
1377 ; CHECK-BE-P8-NEXT: addis r5, r2, .LCPI16_0@toc@ha
1378 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r4
1379 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r3
1380 ; CHECK-BE-P8-NEXT: addi r5, r5, .LCPI16_0@toc@l
1381 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r5
1382 ; CHECK-BE-P8-NEXT: vperm v2, v4, v3, v2
1383 ; CHECK-BE-P8-NEXT: blr
1385 ; CHECK-BE-P9-LABEL: test_v8i16_v8i16rhs:
1386 ; CHECK-BE-P9: # %bb.0: # %entry
1387 ; CHECK-BE-P9-NEXT: addis r5, r2, .LCPI16_0@toc@ha
1388 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r4
1389 ; CHECK-BE-P9-NEXT: mtfprwz f1, r3
1390 ; CHECK-BE-P9-NEXT: addi r5, r5, .LCPI16_0@toc@l
1391 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r5)
1392 ; CHECK-BE-P9-NEXT: xxperm v2, vs1, vs0
1393 ; CHECK-BE-P9-NEXT: blr
1395 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v8i16rhs:
1396 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1397 ; CHECK-AIX-64-P8-NEXT: ld r5, L..C8(r2) # %const.0
1398 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r4
1399 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
1400 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r5
1401 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v3, v2
1402 ; CHECK-AIX-64-P8-NEXT: blr
1404 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v8i16rhs:
1405 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1406 ; CHECK-AIX-64-P9-NEXT: ld r5, L..C4(r2) # %const.0
1407 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r4
1408 ; CHECK-AIX-64-P9-NEXT: mtfprwz f1, r3
1409 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r5)
1410 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs1, vs0
1411 ; CHECK-AIX-64-P9-NEXT: blr
1413 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v8i16rhs:
1414 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1415 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
1416 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1417 ; CHECK-AIX-32-P8-NEXT: sth r4, -16(r1)
1418 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1419 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1420 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1421 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1422 ; CHECK-AIX-32-P8-NEXT: blr
1424 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v8i16rhs:
1425 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1426 ; CHECK-AIX-32-P9-NEXT: sth r4, -16(r1)
1427 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
1428 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1429 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1430 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1431 ; CHECK-AIX-32-P9-NEXT: blr
1433 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1434 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1435 %lhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
1436 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1437 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1438 ret <16 x i8> %shuffle
1441 define <16 x i8> @test_v8i16_v4i32(<8 x i16> %a, <4 x i32> %b, i16 %arg, i32 %arg1) {
1442 ; CHECK-LE-P8-LABEL: test_v8i16_v4i32:
1443 ; CHECK-LE-P8: # %bb.0: # %entry
1444 ; CHECK-LE-P8-NEXT: mtfprd f0, r7
1445 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1446 ; CHECK-LE-P8-NEXT: mtfprd f0, r8
1447 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1448 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
1449 ; CHECK-LE-P8-NEXT: blr
1451 ; CHECK-LE-P9-LABEL: test_v8i16_v4i32:
1452 ; CHECK-LE-P9: # %bb.0: # %entry
1453 ; CHECK-LE-P9-NEXT: mtfprd f0, r7
1454 ; CHECK-LE-P9-NEXT: mtvsrws v3, r8
1455 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1456 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
1457 ; CHECK-LE-P9-NEXT: blr
1459 ; CHECK-BE-P8-LABEL: test_v8i16_v4i32:
1460 ; CHECK-BE-P8: # %bb.0: # %entry
1461 ; CHECK-BE-P8-NEXT: sldi r3, r7, 48
1462 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1463 ; CHECK-BE-P8-NEXT: sldi r3, r8, 32
1464 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1465 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
1466 ; CHECK-BE-P8-NEXT: blr
1468 ; CHECK-BE-P9-LABEL: test_v8i16_v4i32:
1469 ; CHECK-BE-P9: # %bb.0: # %entry
1470 ; CHECK-BE-P9-NEXT: sldi r3, r7, 48
1471 ; CHECK-BE-P9-NEXT: mtvsrws v3, r8
1472 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1473 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
1474 ; CHECK-BE-P9-NEXT: blr
1476 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v4i32:
1477 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1478 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1479 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1480 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
1481 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1482 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
1483 ; CHECK-AIX-64-P8-NEXT: blr
1485 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v4i32:
1486 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1487 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
1488 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r4
1489 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1490 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
1491 ; CHECK-AIX-64-P9-NEXT: blr
1493 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v4i32:
1494 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1495 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
1496 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1497 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1498 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1499 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
1500 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1501 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
1502 ; CHECK-AIX-32-P8-NEXT: blr
1504 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v4i32:
1505 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1506 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
1507 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
1508 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1509 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1510 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
1511 ; CHECK-AIX-32-P9-NEXT: blr
1513 %lhs.tmp = insertelement <8 x i16> %a, i16 %arg, i32 0
1514 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1515 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1516 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1517 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 16, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1518 ret <16 x i8> %shuffle
1521 define <16 x i8> @test_v8i16_v2i64(<8 x i16> %a, <2 x i64> %b, i16 %arg, i64 %arg1) {
1522 ; CHECK-LE-P8-LABEL: test_v8i16_v2i64:
1523 ; CHECK-LE-P8: # %bb.0: # %entry
1524 ; CHECK-LE-P8-NEXT: mtfprd f0, r7
1525 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1526 ; CHECK-LE-P8-NEXT: mtfprd f0, r8
1527 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1528 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
1529 ; CHECK-LE-P8-NEXT: blr
1531 ; CHECK-LE-P9-LABEL: test_v8i16_v2i64:
1532 ; CHECK-LE-P9: # %bb.0: # %entry
1533 ; CHECK-LE-P9-NEXT: mtfprd f0, r7
1534 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1535 ; CHECK-LE-P9-NEXT: mtfprd f0, r8
1536 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1537 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
1538 ; CHECK-LE-P9-NEXT: blr
1540 ; CHECK-BE-P8-LABEL: test_v8i16_v2i64:
1541 ; CHECK-BE-P8: # %bb.0: # %entry
1542 ; CHECK-BE-P8-NEXT: sldi r3, r7, 48
1543 ; CHECK-BE-P8-NEXT: mtvsrd v3, r8
1544 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1545 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
1546 ; CHECK-BE-P8-NEXT: blr
1548 ; CHECK-BE-P9-LABEL: test_v8i16_v2i64:
1549 ; CHECK-BE-P9: # %bb.0: # %entry
1550 ; CHECK-BE-P9-NEXT: sldi r3, r7, 48
1551 ; CHECK-BE-P9-NEXT: mtvsrd v3, r8
1552 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1553 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
1554 ; CHECK-BE-P9-NEXT: blr
1556 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v2i64:
1557 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1558 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1559 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r4
1560 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1561 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
1562 ; CHECK-AIX-64-P8-NEXT: blr
1564 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v2i64:
1565 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1566 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
1567 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r4
1568 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1569 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
1570 ; CHECK-AIX-64-P9-NEXT: blr
1572 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v2i64:
1573 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1574 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
1575 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1576 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1577 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1578 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
1579 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1580 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
1581 ; CHECK-AIX-32-P8-NEXT: blr
1583 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v2i64:
1584 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1585 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
1586 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
1587 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1588 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1589 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
1590 ; CHECK-AIX-32-P9-NEXT: blr
1592 %lhs.tmp = insertelement <8 x i16> %a, i16 %arg, i32 0
1593 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1594 %rhs.tmp = insertelement <2 x i64> %b, i64 %arg1, i32 0
1595 %rhs = bitcast <2 x i64> %rhs.tmp to <16 x i8>
1596 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 16, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1597 ret <16 x i8> %shuffle
1600 define <16 x i8> @test_v4i32_v4i32(i32 %arg, i32 %arg1, <4 x i32> %a, <4 x i32> %b) {
1601 ; CHECK-LE-P8-LABEL: test_v4i32_v4i32:
1602 ; CHECK-LE-P8: # %bb.0: # %entry
1603 ; CHECK-LE-P8-NEXT: mtfprwz f0, r3
1604 ; CHECK-LE-P8-NEXT: mtfprwz f1, r4
1605 ; CHECK-LE-P8-NEXT: xxmrghw v2, vs1, vs0
1606 ; CHECK-LE-P8-NEXT: blr
1608 ; CHECK-LE-P9-LABEL: test_v4i32_v4i32:
1609 ; CHECK-LE-P9: # %bb.0: # %entry
1610 ; CHECK-LE-P9-NEXT: mtfprwz f0, r3
1611 ; CHECK-LE-P9-NEXT: mtfprwz f1, r4
1612 ; CHECK-LE-P9-NEXT: xxmrghw v2, vs1, vs0
1613 ; CHECK-LE-P9-NEXT: blr
1615 ; CHECK-BE-P8-LABEL: test_v4i32_v4i32:
1616 ; CHECK-BE-P8: # %bb.0: # %entry
1617 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
1618 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
1619 ; CHECK-BE-P8-NEXT: vmrgow v2, v3, v2
1620 ; CHECK-BE-P8-NEXT: blr
1622 ; CHECK-BE-P9-LABEL: test_v4i32_v4i32:
1623 ; CHECK-BE-P9: # %bb.0: # %entry
1624 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r4
1625 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r3
1626 ; CHECK-BE-P9-NEXT: vmrgow v2, v3, v2
1627 ; CHECK-BE-P9-NEXT: blr
1629 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v4i32:
1630 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1631 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
1632 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
1633 ; CHECK-AIX-64-P8-NEXT: vmrgow v2, v3, v2
1634 ; CHECK-AIX-64-P8-NEXT: blr
1636 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v4i32:
1637 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1638 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r4
1639 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r3
1640 ; CHECK-AIX-64-P9-NEXT: vmrgow v2, v3, v2
1641 ; CHECK-AIX-64-P9-NEXT: blr
1643 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v4i32:
1644 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1645 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1646 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1647 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
1648 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1649 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1650 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1651 ; CHECK-AIX-32-P8-NEXT: xxmrghw v2, vs1, vs0
1652 ; CHECK-AIX-32-P8-NEXT: blr
1654 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v4i32:
1655 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1656 ; CHECK-AIX-32-P9-NEXT: stw r4, -16(r1)
1657 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1658 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1659 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1660 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs1, vs0
1661 ; CHECK-AIX-32-P9-NEXT: blr
1663 %lhs.tmp = insertelement <4 x i32> %a, i32 %arg, i32 0
1664 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
1665 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1666 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1667 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1668 ret <16 x i8> %shuffle
1671 define <16 x i8> @test_v4i32_v8i16(i32 %arg, i16 %arg1) {
1672 ; CHECK-LE-P8-LABEL: test_v4i32_v8i16:
1673 ; CHECK-LE-P8: # %bb.0: # %entry
1674 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1675 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1676 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1677 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1678 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
1679 ; CHECK-LE-P8-NEXT: blr
1681 ; CHECK-LE-P9-LABEL: test_v4i32_v8i16:
1682 ; CHECK-LE-P9: # %bb.0: # %entry
1683 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1684 ; CHECK-LE-P9-NEXT: mtvsrws v2, r3
1685 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1686 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
1687 ; CHECK-LE-P9-NEXT: blr
1689 ; CHECK-BE-P8-LABEL: test_v4i32_v8i16:
1690 ; CHECK-BE-P8: # %bb.0: # %entry
1691 ; CHECK-BE-P8-NEXT: sldi r3, r3, 32
1692 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1693 ; CHECK-BE-P8-NEXT: sldi r3, r4, 48
1694 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1695 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1696 ; CHECK-BE-P8-NEXT: blr
1698 ; CHECK-BE-P9-LABEL: test_v4i32_v8i16:
1699 ; CHECK-BE-P9: # %bb.0: # %entry
1700 ; CHECK-BE-P9-NEXT: mtvsrws v2, r3
1701 ; CHECK-BE-P9-NEXT: sldi r3, r4, 48
1702 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1703 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1704 ; CHECK-BE-P9-NEXT: blr
1706 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v8i16:
1707 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1708 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 32
1709 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1710 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 48
1711 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1712 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1713 ; CHECK-AIX-64-P8-NEXT: blr
1715 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v8i16:
1716 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1717 ; CHECK-AIX-64-P9-NEXT: mtvsrws v2, r3
1718 ; CHECK-AIX-64-P9-NEXT: sldi r3, r4, 48
1719 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1720 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1721 ; CHECK-AIX-64-P9-NEXT: blr
1723 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v8i16:
1724 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1725 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1726 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1727 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1728 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1729 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
1730 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1731 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1732 ; CHECK-AIX-32-P8-NEXT: blr
1734 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v8i16:
1735 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1736 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1737 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
1738 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1739 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1740 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1741 ; CHECK-AIX-32-P9-NEXT: blr
1743 %lhs.tmp = insertelement <4 x i32> undef, i32 %arg, i32 0
1744 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
1745 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1746 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1747 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1748 ret <16 x i8> %shuffle
1751 define <16 x i8> @test_v2i64_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1752 ; CHECK-LE-P8-LABEL: test_v2i64_v2i64:
1753 ; CHECK-LE-P8: # %bb.0: # %entry
1754 ; CHECK-LE-P8-NEXT: lxsdx v2, 0, r3
1755 ; CHECK-LE-P8-NEXT: lxsdx v3, 0, r4
1756 ; CHECK-LE-P8-NEXT: vmrghh v2, v3, v2
1757 ; CHECK-LE-P8-NEXT: blr
1759 ; CHECK-LE-P9-LABEL: test_v2i64_v2i64:
1760 ; CHECK-LE-P9: # %bb.0: # %entry
1761 ; CHECK-LE-P9-NEXT: lxsd v2, 0(r3)
1762 ; CHECK-LE-P9-NEXT: lxsd v3, 0(r4)
1763 ; CHECK-LE-P9-NEXT: vmrghh v2, v3, v2
1764 ; CHECK-LE-P9-NEXT: blr
1766 ; CHECK-BE-P8-LABEL: test_v2i64_v2i64:
1767 ; CHECK-BE-P8: # %bb.0: # %entry
1768 ; CHECK-BE-P8-NEXT: lxsdx v2, 0, r3
1769 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1770 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1771 ; CHECK-BE-P8-NEXT: blr
1773 ; CHECK-BE-P9-LABEL: test_v2i64_v2i64:
1774 ; CHECK-BE-P9: # %bb.0: # %entry
1775 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
1776 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1777 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1778 ; CHECK-BE-P9-NEXT: blr
1780 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v2i64:
1781 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1782 ; CHECK-AIX-64-P8-NEXT: lxsdx v2, 0, r3
1783 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1784 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1785 ; CHECK-AIX-64-P8-NEXT: blr
1787 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v2i64:
1788 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1789 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
1790 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1791 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1792 ; CHECK-AIX-64-P9-NEXT: blr
1794 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v2i64:
1795 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1796 ; CHECK-AIX-32-P8-NEXT: lfiwzx f0, 0, r3
1797 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C8(r2) # %const.0
1798 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1799 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1800 ; CHECK-AIX-32-P8-NEXT: xxspltw v2, vs0, 1
1801 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1802 ; CHECK-AIX-32-P8-NEXT: blr
1804 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v2i64:
1805 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1806 ; CHECK-AIX-32-P9-NEXT: lxvwsx vs0, 0, r3
1807 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C4(r2) # %const.0
1808 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1809 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1810 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1811 ; CHECK-AIX-32-P9-NEXT: blr
1813 %0 = load <8 x i8>, ptr %a, align 4
1814 %bc1 = bitcast <8 x i8> %0 to i64
1815 %vecinit3 = insertelement <2 x i64> poison, i64 %bc1, i64 0
1816 %1 = load <2 x i8>, ptr %b, align 8
1817 %bc2 = bitcast <2 x i8> %1 to i16
1818 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1819 %2 = bitcast <2 x i64> %vecinit3 to <16 x i8>
1820 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1821 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1822 ret <16 x i8> %shuffle
1825 define <16 x i8> @test_v2i64_v4i32(i64 %arg, i32 %arg1, <2 x i64> %a, <4 x i32> %b) {
1826 ; CHECK-LE-P8-LABEL: test_v2i64_v4i32:
1827 ; CHECK-LE-P8: # %bb.0: # %entry
1828 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1829 ; CHECK-LE-P8-NEXT: mtfprd f1, r4
1830 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1831 ; CHECK-LE-P8-NEXT: xxswapd vs1, vs1
1832 ; CHECK-LE-P8-NEXT: xxmrglw v2, vs1, vs0
1833 ; CHECK-LE-P8-NEXT: blr
1835 ; CHECK-LE-P9-LABEL: test_v2i64_v4i32:
1836 ; CHECK-LE-P9: # %bb.0: # %entry
1837 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1838 ; CHECK-LE-P9-NEXT: mtvsrws vs1, r4
1839 ; CHECK-LE-P9-NEXT: xxswapd vs0, vs0
1840 ; CHECK-LE-P9-NEXT: xxmrglw v2, vs1, vs0
1841 ; CHECK-LE-P9-NEXT: blr
1843 ; CHECK-BE-P8-LABEL: test_v2i64_v4i32:
1844 ; CHECK-BE-P8: # %bb.0: # %entry
1845 ; CHECK-BE-P8-NEXT: mtfprd f0, r3
1846 ; CHECK-BE-P8-NEXT: sldi r3, r4, 32
1847 ; CHECK-BE-P8-NEXT: mtfprd f1, r3
1848 ; CHECK-BE-P8-NEXT: xxmrghw v2, vs0, vs1
1849 ; CHECK-BE-P8-NEXT: blr
1851 ; CHECK-BE-P9-LABEL: test_v2i64_v4i32:
1852 ; CHECK-BE-P9: # %bb.0: # %entry
1853 ; CHECK-BE-P9-NEXT: mtvsrws vs1, r4
1854 ; CHECK-BE-P9-NEXT: mtfprd f0, r3
1855 ; CHECK-BE-P9-NEXT: xxmrghw v2, vs0, vs1
1856 ; CHECK-BE-P9-NEXT: blr
1858 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v4i32:
1859 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1860 ; CHECK-AIX-64-P8-NEXT: mtfprd f0, r3
1861 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
1862 ; CHECK-AIX-64-P8-NEXT: mtfprd f1, r3
1863 ; CHECK-AIX-64-P8-NEXT: xxmrghw v2, vs0, vs1
1864 ; CHECK-AIX-64-P8-NEXT: blr
1866 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v4i32:
1867 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1868 ; CHECK-AIX-64-P9-NEXT: mtvsrws vs1, r4
1869 ; CHECK-AIX-64-P9-NEXT: mtfprd f0, r3
1870 ; CHECK-AIX-64-P9-NEXT: xxmrghw v2, vs0, vs1
1871 ; CHECK-AIX-64-P9-NEXT: blr
1873 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v4i32:
1874 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1875 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1876 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1877 ; CHECK-AIX-32-P8-NEXT: stw r5, -16(r1)
1878 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1879 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1880 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1881 ; CHECK-AIX-32-P8-NEXT: xxmrghw v2, vs1, vs0
1882 ; CHECK-AIX-32-P8-NEXT: blr
1884 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v4i32:
1885 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1886 ; CHECK-AIX-32-P9-NEXT: stw r5, -16(r1)
1887 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1888 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1889 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1890 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs1, vs0
1891 ; CHECK-AIX-32-P9-NEXT: blr
1893 %lhs.tmp = insertelement <2 x i64> %a, i64 %arg, i32 0
1894 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1895 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1896 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1897 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 16, i32 17, i32 18, i32 19, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1898 ret <16 x i8> %shuffle
1901 define <16 x i8> @test_v2i64_v8i16(i64 %arg, i16 %arg1) {
1902 ; CHECK-LE-P8-LABEL: test_v2i64_v8i16:
1903 ; CHECK-LE-P8: # %bb.0: # %entry
1904 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1905 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1906 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1907 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1908 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
1909 ; CHECK-LE-P8-NEXT: blr
1911 ; CHECK-LE-P9-LABEL: test_v2i64_v8i16:
1912 ; CHECK-LE-P9: # %bb.0: # %entry
1913 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1914 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1915 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1916 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1917 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
1918 ; CHECK-LE-P9-NEXT: blr
1920 ; CHECK-BE-P8-LABEL: test_v2i64_v8i16:
1921 ; CHECK-BE-P8: # %bb.0: # %entry
1922 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1923 ; CHECK-BE-P8-NEXT: sldi r3, r4, 48
1924 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1925 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1926 ; CHECK-BE-P8-NEXT: blr
1928 ; CHECK-BE-P9-LABEL: test_v2i64_v8i16:
1929 ; CHECK-BE-P9: # %bb.0: # %entry
1930 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1931 ; CHECK-BE-P9-NEXT: sldi r3, r4, 48
1932 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1933 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1934 ; CHECK-BE-P9-NEXT: blr
1936 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v8i16:
1937 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1938 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1939 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 48
1940 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1941 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1942 ; CHECK-AIX-64-P8-NEXT: blr
1944 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v8i16:
1945 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1946 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1947 ; CHECK-AIX-64-P9-NEXT: sldi r3, r4, 48
1948 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1949 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1950 ; CHECK-AIX-64-P9-NEXT: blr
1952 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v8i16:
1953 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1954 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1955 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1956 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1957 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1958 ; CHECK-AIX-32-P8-NEXT: sth r5, -32(r1)
1959 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1960 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1961 ; CHECK-AIX-32-P8-NEXT: blr
1963 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v8i16:
1964 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1965 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1966 ; CHECK-AIX-32-P9-NEXT: sth r5, -32(r1)
1967 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1968 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1969 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1970 ; CHECK-AIX-32-P9-NEXT: blr
1972 %lhs.tmp = insertelement <2 x i64> undef, i64 %arg, i32 0
1973 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1974 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1975 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1976 %shuffle = shufflevector <16 x i8> %lhs, <16 x i8> %rhs, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
1977 ret <16 x i8> %shuffle
1980 define <16 x i8> @test_v4i32_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1981 ; CHECK-LE-P8-LABEL: test_v4i32_v2i64:
1982 ; CHECK-LE-P8: # %bb.0: # %entry
1983 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r3
1984 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
1985 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI24_0@toc@l
1986 ; CHECK-LE-P8-NEXT: xxswapd v2, f0
1987 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
1988 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1989 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1990 ; CHECK-LE-P8-NEXT: xxswapd v4, vs0
1991 ; CHECK-LE-P8-NEXT: vperm v2, v3, v2, v4
1992 ; CHECK-LE-P8-NEXT: blr
1994 ; CHECK-LE-P9-LABEL: test_v4i32_v2i64:
1995 ; CHECK-LE-P9: # %bb.0: # %entry
1996 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
1997 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
1998 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI24_0@toc@l
1999 ; CHECK-LE-P9-NEXT: xxswapd v2, f0
2000 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
2001 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
2002 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
2003 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
2004 ; CHECK-LE-P9-NEXT: blr
2006 ; CHECK-BE-P8-LABEL: test_v4i32_v2i64:
2007 ; CHECK-BE-P8: # %bb.0: # %entry
2008 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
2009 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
2010 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
2011 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI24_0@toc@l
2012 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
2013 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
2014 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
2015 ; CHECK-BE-P8-NEXT: blr
2017 ; CHECK-BE-P9-LABEL: test_v4i32_v2i64:
2018 ; CHECK-BE-P9: # %bb.0: # %entry
2019 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
2020 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
2021 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r4)
2022 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI24_0@toc@l
2023 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
2024 ; CHECK-BE-P9-NEXT: xxsldwi vs0, f0, f0, 1
2025 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
2026 ; CHECK-BE-P9-NEXT: blr
2028 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v2i64:
2029 ; CHECK-AIX-64-P8: # %bb.0: # %entry
2030 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
2031 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C9(r2) # %const.0
2032 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
2033 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
2034 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
2035 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
2036 ; CHECK-AIX-64-P8-NEXT: blr
2038 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v2i64:
2039 ; CHECK-AIX-64-P9: # %bb.0: # %entry
2040 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
2041 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C5(r2) # %const.0
2042 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r4)
2043 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs0, f0, f0, 1
2044 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
2045 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
2046 ; CHECK-AIX-64-P9-NEXT: blr
2048 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v2i64:
2049 ; CHECK-AIX-32-P8: # %bb.0: # %entry
2050 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
2051 ; CHECK-AIX-32-P8-NEXT: lwz r3, 4(r4)
2052 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
2053 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
2054 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
2055 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
2056 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
2057 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
2058 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
2059 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C9(r2) # %const.0
2060 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
2061 ; CHECK-AIX-32-P8-NEXT: xxmrghw v3, vs1, vs0
2062 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
2063 ; CHECK-AIX-32-P8-NEXT: blr
2065 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v2i64:
2066 ; CHECK-AIX-32-P9: # %bb.0: # %entry
2067 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
2068 ; CHECK-AIX-32-P9-NEXT: lwz r3, 4(r4)
2069 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
2070 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
2071 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
2072 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
2073 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C5(r2) # %const.0
2074 ; CHECK-AIX-32-P9-NEXT: lxv vs2, -32(r1)
2075 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs2, vs1
2076 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
2077 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
2078 ; CHECK-AIX-32-P9-NEXT: blr
2080 %0 = load <4 x i8>, ptr %a, align 4
2081 %bc1 = bitcast <4 x i8> %0 to i32
2082 %vecinit3 = insertelement <4 x i32> poison, i32 %bc1, i64 0
2083 %1 = load <8 x i8>, ptr %b, align 8
2084 %bc2 = bitcast <8 x i8> %1 to i64
2085 %vecinit6 = insertelement <2 x i64> undef, i64 %bc2, i64 0
2086 %2 = bitcast <4 x i32> %vecinit3 to <16 x i8>
2087 %3 = bitcast <2 x i64> %vecinit6 to <16 x i8>
2088 %shuffle = shufflevector <16 x i8> %2, <16 x i8> %3, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
2089 ret <16 x i8> %shuffle