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: addis r5, r2, .LCPI2_0@toc@ha
187 ; CHECK-LE-P8-NEXT: lxvd2x v3, 0, r4
188 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
189 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI2_0@toc@l
190 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
191 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
192 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
193 ; CHECK-LE-P8-NEXT: blr
195 ; CHECK-LE-P9-LABEL: test_none_v16i8:
196 ; CHECK-LE-P9: # %bb.0: # %entry
197 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
198 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
199 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r4)
200 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
201 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
202 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
203 ; CHECK-LE-P9-NEXT: blr
205 ; CHECK-BE-P8-LABEL: test_none_v16i8:
206 ; CHECK-BE-P8: # %bb.0: # %entry
207 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
208 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI2_0@toc@ha
209 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r4
210 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI2_0@toc@l
211 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
212 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
213 ; CHECK-BE-P8-NEXT: blr
215 ; CHECK-BE-P9-LABEL: test_none_v16i8:
216 ; CHECK-BE-P9: # %bb.0: # %entry
217 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r3
218 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
219 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r4)
220 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
221 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
222 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
223 ; CHECK-BE-P9-NEXT: blr
225 ; CHECK-AIX-64-P8-LABEL: test_none_v16i8:
226 ; CHECK-AIX-64-P8: # %bb.0: # %entry
227 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
228 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C2(r2) # %const.0
229 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r4
230 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
231 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
232 ; CHECK-AIX-64-P8-NEXT: blr
234 ; CHECK-AIX-64-P9-LABEL: test_none_v16i8:
235 ; CHECK-AIX-64-P9: # %bb.0: # %entry
236 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r3
237 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C1(r2) # %const.0
238 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r4)
239 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
240 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
241 ; CHECK-AIX-64-P9-NEXT: blr
243 ; CHECK-AIX-32-P8-LABEL: test_none_v16i8:
244 ; CHECK-AIX-32-P8: # %bb.0: # %entry
245 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
246 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
247 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
248 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
249 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
250 ; CHECK-AIX-32-P8-NEXT: blr
252 ; CHECK-AIX-32-P9-LABEL: test_none_v16i8:
253 ; CHECK-AIX-32-P9: # %bb.0: # %entry
254 ; CHECK-AIX-32-P9-NEXT: lxv v2, 0(r4)
255 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
256 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
257 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
258 ; CHECK-AIX-32-P9-NEXT: blr
260 %lhs = load <16 x i8>, ptr %b, align 4
261 %rhs = insertelement <16 x i8> undef, i8 %arg, i32 0
262 %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>
263 ret <16 x i8> %shuffle
266 define <16 x i8> @test_v16i8_v8i16(i16 %arg, i8 %arg1) {
267 ; CHECK-LE-P8-LABEL: test_v16i8_v8i16:
268 ; CHECK-LE-P8: # %bb.0: # %entry
269 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
270 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
271 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
272 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
273 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
274 ; CHECK-LE-P8-NEXT: blr
276 ; CHECK-LE-P9-LABEL: test_v16i8_v8i16:
277 ; CHECK-LE-P9: # %bb.0: # %entry
278 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
279 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
280 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
281 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
282 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
283 ; CHECK-LE-P9-NEXT: blr
285 ; CHECK-BE-P8-LABEL: test_v16i8_v8i16:
286 ; CHECK-BE-P8: # %bb.0: # %entry
287 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
288 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
289 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
290 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
291 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
292 ; CHECK-BE-P8-NEXT: blr
294 ; CHECK-BE-P9-LABEL: test_v16i8_v8i16:
295 ; CHECK-BE-P9: # %bb.0: # %entry
296 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
297 ; CHECK-BE-P9-NEXT: sldi r3, r3, 48
298 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
299 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
300 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
301 ; CHECK-BE-P9-NEXT: blr
303 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v8i16:
304 ; CHECK-AIX-64-P8: # %bb.0: # %entry
305 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
306 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
307 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
308 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
309 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
310 ; CHECK-AIX-64-P8-NEXT: blr
312 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v8i16:
313 ; CHECK-AIX-64-P9: # %bb.0: # %entry
314 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
315 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
316 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
317 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
318 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
319 ; CHECK-AIX-64-P9-NEXT: blr
321 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v8i16:
322 ; CHECK-AIX-32-P8: # %bb.0: # %entry
323 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
324 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
325 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
326 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
327 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
328 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
329 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
330 ; CHECK-AIX-32-P8-NEXT: blr
332 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v8i16:
333 ; CHECK-AIX-32-P9: # %bb.0: # %entry
334 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
335 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
336 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
337 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
338 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
339 ; CHECK-AIX-32-P9-NEXT: blr
341 %lhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
342 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
343 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
344 %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>
345 ret <16 x i8> %shuffle
348 define <16 x i8> @test_v8i16_v16i8(i16 %arg, i8 %arg1) {
349 ; CHECK-LE-P8-LABEL: test_v8i16_v16i8:
350 ; CHECK-LE-P8: # %bb.0: # %entry
351 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
352 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
353 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
354 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
355 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
356 ; CHECK-LE-P8-NEXT: blr
358 ; CHECK-LE-P9-LABEL: test_v8i16_v16i8:
359 ; CHECK-LE-P9: # %bb.0: # %entry
360 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
361 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
362 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
363 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
364 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
365 ; CHECK-LE-P9-NEXT: blr
367 ; CHECK-BE-P8-LABEL: test_v8i16_v16i8:
368 ; CHECK-BE-P8: # %bb.0: # %entry
369 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
370 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
371 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
372 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
373 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
374 ; CHECK-BE-P8-NEXT: blr
376 ; CHECK-BE-P9-LABEL: test_v8i16_v16i8:
377 ; CHECK-BE-P9: # %bb.0: # %entry
378 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
379 ; CHECK-BE-P9-NEXT: sldi r3, r3, 48
380 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
381 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
382 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
383 ; CHECK-BE-P9-NEXT: blr
385 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v16i8:
386 ; CHECK-AIX-64-P8: # %bb.0: # %entry
387 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
388 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
389 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
390 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
391 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
392 ; CHECK-AIX-64-P8-NEXT: blr
394 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v16i8:
395 ; CHECK-AIX-64-P9: # %bb.0: # %entry
396 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
397 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
398 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
399 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
400 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
401 ; CHECK-AIX-64-P9-NEXT: blr
403 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v16i8:
404 ; CHECK-AIX-32-P8: # %bb.0: # %entry
405 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
406 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
407 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
408 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
409 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
410 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
411 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
412 ; CHECK-AIX-32-P8-NEXT: blr
414 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v16i8:
415 ; CHECK-AIX-32-P9: # %bb.0: # %entry
416 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
417 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
418 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
419 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
420 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
421 ; CHECK-AIX-32-P9-NEXT: blr
423 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
424 %lhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
425 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
426 %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>
427 ret <16 x i8> %shuffle
430 define <16 x i8> @test_none_v8i16(i16 %arg, ptr nocapture noundef readonly %b) {
431 ; CHECK-LE-P8-LABEL: test_none_v8i16:
432 ; CHECK-LE-P8: # %bb.0: # %entry
433 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI5_0@toc@ha
434 ; CHECK-LE-P8-NEXT: lxvd2x v3, 0, r4
435 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
436 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI5_0@toc@l
437 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
438 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
439 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
440 ; CHECK-LE-P8-NEXT: blr
442 ; CHECK-LE-P9-LABEL: test_none_v8i16:
443 ; CHECK-LE-P9: # %bb.0: # %entry
444 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
445 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
446 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r4)
447 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
448 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
449 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
450 ; CHECK-LE-P9-NEXT: blr
452 ; CHECK-BE-P8-LABEL: test_none_v8i16:
453 ; CHECK-BE-P8: # %bb.0: # %entry
454 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
455 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI5_0@toc@ha
456 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r4
457 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI5_0@toc@l
458 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
459 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
460 ; CHECK-BE-P8-NEXT: blr
462 ; CHECK-BE-P9-LABEL: test_none_v8i16:
463 ; CHECK-BE-P9: # %bb.0: # %entry
464 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r3
465 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
466 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r4)
467 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
468 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
469 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
470 ; CHECK-BE-P9-NEXT: blr
472 ; CHECK-AIX-64-P8-LABEL: test_none_v8i16:
473 ; CHECK-AIX-64-P8: # %bb.0: # %entry
474 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
475 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C3(r2) # %const.0
476 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r4
477 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
478 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
479 ; CHECK-AIX-64-P8-NEXT: blr
481 ; CHECK-AIX-64-P9-LABEL: test_none_v8i16:
482 ; CHECK-AIX-64-P9: # %bb.0: # %entry
483 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r3
484 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C2(r2) # %const.0
485 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r4)
486 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
487 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
488 ; CHECK-AIX-64-P9-NEXT: blr
490 ; CHECK-AIX-32-P8-LABEL: test_none_v8i16:
491 ; CHECK-AIX-32-P8: # %bb.0: # %entry
492 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
493 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
494 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
495 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
496 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
497 ; CHECK-AIX-32-P8-NEXT: blr
499 ; CHECK-AIX-32-P9-LABEL: test_none_v8i16:
500 ; CHECK-AIX-32-P9: # %bb.0: # %entry
501 ; CHECK-AIX-32-P9-NEXT: lxv v2, 0(r4)
502 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
503 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
504 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
505 ; CHECK-AIX-32-P9-NEXT: blr
507 %lhs = load <16 x i8>, ptr %b, align 4
508 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
509 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
510 %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>
511 ret <16 x i8> %shuffle
514 define <8 x i16> @test_v8i16_none(<8 x i16> %a, i16 %b) {
515 ; CHECK-LE-P8-LABEL: test_v8i16_none:
516 ; CHECK-LE-P8: # %bb.0: # %entry
517 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI6_0@toc@ha
518 ; CHECK-LE-P8-NEXT: mtvsrd v4, r5
519 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI6_0@toc@l
520 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
521 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
522 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
523 ; CHECK-LE-P8-NEXT: blr
525 ; CHECK-LE-P9-LABEL: test_v8i16_none:
526 ; CHECK-LE-P9: # %bb.0: # %entry
527 ; CHECK-LE-P9-NEXT: mtvsrwz v3, r5
528 ; CHECK-LE-P9-NEXT: vinserth v2, v3, 14
529 ; CHECK-LE-P9-NEXT: blr
531 ; CHECK-BE-P8-LABEL: test_v8i16_none:
532 ; CHECK-BE-P8: # %bb.0: # %entry
533 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI6_0@toc@ha
534 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r5
535 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI6_0@toc@l
536 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
537 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
538 ; CHECK-BE-P8-NEXT: blr
540 ; CHECK-BE-P9-LABEL: test_v8i16_none:
541 ; CHECK-BE-P9: # %bb.0: # %entry
542 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r5
543 ; CHECK-BE-P9-NEXT: vinserth v2, v3, 0
544 ; CHECK-BE-P9-NEXT: blr
546 ; CHECK-AIX-64-P8-LABEL: test_v8i16_none:
547 ; CHECK-AIX-64-P8: # %bb.0: # %entry
548 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C4(r2) # %const.0
549 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
550 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
551 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
552 ; CHECK-AIX-64-P8-NEXT: blr
554 ; CHECK-AIX-64-P9-LABEL: test_v8i16_none:
555 ; CHECK-AIX-64-P9: # %bb.0: # %entry
556 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r3
557 ; CHECK-AIX-64-P9-NEXT: vinserth v2, v3, 0
558 ; CHECK-AIX-64-P9-NEXT: blr
560 ; CHECK-AIX-32-P8-LABEL: test_v8i16_none:
561 ; CHECK-AIX-32-P8: # %bb.0: # %entry
562 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
563 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C2(r2) # %const.0
564 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
565 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
566 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
567 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
568 ; CHECK-AIX-32-P8-NEXT: blr
570 ; CHECK-AIX-32-P9-LABEL: test_v8i16_none:
571 ; CHECK-AIX-32-P9: # %bb.0: # %entry
572 ; CHECK-AIX-32-P9-NEXT: mtvsrwz v3, r3
573 ; CHECK-AIX-32-P9-NEXT: vinserth v2, v3, 0
574 ; CHECK-AIX-32-P9-NEXT: blr
576 %vecins = insertelement <8 x i16> %a, i16 %b, i32 0
577 ret <8 x i16> %vecins
580 define <16 x i8> @test_v16i8_v4i32(i8 %arg, i32 %arg1, <16 x i8> %a, <4 x i32> %b) {
581 ; CHECK-LE-P8-LABEL: test_v16i8_v4i32:
582 ; CHECK-LE-P8: # %bb.0: # %entry
583 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
584 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
585 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
586 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
587 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
588 ; CHECK-LE-P8-NEXT: blr
590 ; CHECK-LE-P9-LABEL: test_v16i8_v4i32:
591 ; CHECK-LE-P9: # %bb.0: # %entry
592 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
593 ; CHECK-LE-P9-NEXT: mtvsrws v3, r4
594 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
595 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
596 ; CHECK-LE-P9-NEXT: blr
598 ; CHECK-BE-P8-LABEL: test_v16i8_v4i32:
599 ; CHECK-BE-P8: # %bb.0: # %entry
600 ; CHECK-BE-P8-NEXT: sldi r3, r3, 56
601 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
602 ; CHECK-BE-P8-NEXT: sldi r3, r4, 32
603 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
604 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
605 ; CHECK-BE-P8-NEXT: blr
607 ; CHECK-BE-P9-LABEL: test_v16i8_v4i32:
608 ; CHECK-BE-P9: # %bb.0: # %entry
609 ; CHECK-BE-P9-NEXT: sldi r3, r3, 56
610 ; CHECK-BE-P9-NEXT: mtvsrws v3, r4
611 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
612 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
613 ; CHECK-BE-P9-NEXT: blr
615 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v4i32:
616 ; CHECK-AIX-64-P8: # %bb.0: # %entry
617 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 56
618 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
619 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
620 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
621 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
622 ; CHECK-AIX-64-P8-NEXT: blr
624 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v4i32:
625 ; CHECK-AIX-64-P9: # %bb.0: # %entry
626 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 56
627 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r4
628 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
629 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
630 ; CHECK-AIX-64-P9-NEXT: blr
632 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v4i32:
633 ; CHECK-AIX-32-P8: # %bb.0: # %entry
634 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
635 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
636 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
637 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
638 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
639 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
640 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
641 ; CHECK-AIX-32-P8-NEXT: blr
643 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v4i32:
644 ; CHECK-AIX-32-P9: # %bb.0: # %entry
645 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
646 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
647 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
648 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
649 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
650 ; CHECK-AIX-32-P9-NEXT: blr
652 %lhs.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
653 %lhs = bitcast <16 x i8> %lhs.tmp to <16 x i8>
654 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
655 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
656 %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>
657 ret <16 x i8> %shuffle
660 define <16 x i8> @test_v4i32_v16i8(i32 %arg, i8 %arg1) {
661 ; CHECK-LE-P8-LABEL: test_v4i32_v16i8:
662 ; CHECK-LE-P8: # %bb.0: # %entry
663 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
664 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
665 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
666 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
667 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
668 ; CHECK-LE-P8-NEXT: blr
670 ; CHECK-LE-P9-LABEL: test_v4i32_v16i8:
671 ; CHECK-LE-P9: # %bb.0: # %entry
672 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
673 ; CHECK-LE-P9-NEXT: mtvsrws v3, r3
674 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
675 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
676 ; CHECK-LE-P9-NEXT: blr
678 ; CHECK-BE-P8-LABEL: test_v4i32_v16i8:
679 ; CHECK-BE-P8: # %bb.0: # %entry
680 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
681 ; CHECK-BE-P8-NEXT: sldi r3, r3, 32
682 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
683 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
684 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
685 ; CHECK-BE-P8-NEXT: blr
687 ; CHECK-BE-P9-LABEL: test_v4i32_v16i8:
688 ; CHECK-BE-P9: # %bb.0: # %entry
689 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
690 ; CHECK-BE-P9-NEXT: mtvsrws v3, r3
691 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
692 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
693 ; CHECK-BE-P9-NEXT: blr
695 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v16i8:
696 ; CHECK-AIX-64-P8: # %bb.0: # %entry
697 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
698 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 32
699 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
700 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
701 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
702 ; CHECK-AIX-64-P8-NEXT: blr
704 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v16i8:
705 ; CHECK-AIX-64-P9: # %bb.0: # %entry
706 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
707 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r3
708 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
709 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
710 ; CHECK-AIX-64-P9-NEXT: blr
712 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v16i8:
713 ; CHECK-AIX-32-P8: # %bb.0: # %entry
714 ; CHECK-AIX-32-P8-NEXT: stb r4, -32(r1)
715 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
716 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
717 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
718 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
719 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
720 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
721 ; CHECK-AIX-32-P8-NEXT: blr
723 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v16i8:
724 ; CHECK-AIX-32-P9: # %bb.0: # %entry
725 ; CHECK-AIX-32-P9-NEXT: stb r4, -32(r1)
726 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
727 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
728 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
729 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
730 ; CHECK-AIX-32-P9-NEXT: blr
732 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
733 %lhs.tmp = insertelement <4 x i32> undef, i32 %arg, i32 0
734 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
735 %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>
736 ret <16 x i8> %shuffle
739 define <4 x i32> @test_none_v4i32(<4 x i32> %a, i64 %b) {
740 ; CHECK-LE-P8-LABEL: test_none_v4i32:
741 ; CHECK-LE-P8: # %bb.0: # %entry
742 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
743 ; CHECK-LE-P8-NEXT: mtvsrwz v4, r5
744 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
745 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
746 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI9_1@toc@ha
747 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI9_1@toc@l
748 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
749 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
750 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
751 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
752 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
753 ; CHECK-LE-P8-NEXT: blr
755 ; CHECK-LE-P9-LABEL: test_none_v4i32:
756 ; CHECK-LE-P9: # %bb.0: # %entry
757 ; CHECK-LE-P9-NEXT: mtfprwz f0, r5
758 ; CHECK-LE-P9-NEXT: xxinsertw v2, vs0, 8
759 ; CHECK-LE-P9-NEXT: xxinsertw v2, vs0, 0
760 ; CHECK-LE-P9-NEXT: blr
762 ; CHECK-BE-P8-LABEL: test_none_v4i32:
763 ; CHECK-BE-P8: # %bb.0: # %entry
764 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
765 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r5
766 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
767 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
768 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_1@toc@ha
769 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_1@toc@l
770 ; CHECK-BE-P8-NEXT: vperm v2, v2, v4, v3
771 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
772 ; CHECK-BE-P8-NEXT: vperm v2, v2, v4, v3
773 ; CHECK-BE-P8-NEXT: blr
775 ; CHECK-BE-P9-LABEL: test_none_v4i32:
776 ; CHECK-BE-P9: # %bb.0: # %entry
777 ; CHECK-BE-P9-NEXT: mtfprwz f0, r5
778 ; CHECK-BE-P9-NEXT: xxinsertw v2, vs0, 4
779 ; CHECK-BE-P9-NEXT: xxinsertw v2, vs0, 12
780 ; CHECK-BE-P9-NEXT: blr
782 ; CHECK-AIX-64-P8-LABEL: test_none_v4i32:
783 ; CHECK-AIX-64-P8: # %bb.0: # %entry
784 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C5(r2) # %const.0
785 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
786 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C6(r2) # %const.1
787 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
788 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v4, v3
789 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r3
790 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v4, v3
791 ; CHECK-AIX-64-P8-NEXT: blr
793 ; CHECK-AIX-64-P9-LABEL: test_none_v4i32:
794 ; CHECK-AIX-64-P9: # %bb.0: # %entry
795 ; CHECK-AIX-64-P9-NEXT: mtfprwz f0, r3
796 ; CHECK-AIX-64-P9-NEXT: xxinsertw v2, vs0, 4
797 ; CHECK-AIX-64-P9-NEXT: xxinsertw v2, vs0, 12
798 ; CHECK-AIX-64-P9-NEXT: blr
800 ; CHECK-AIX-32-P8-LABEL: test_none_v4i32:
801 ; CHECK-AIX-32-P8: # %bb.0: # %entry
802 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C3(r2) # %const.0
803 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
804 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
805 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
806 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
807 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C4(r2) # %const.1
808 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v4, v3
809 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
810 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v4, v3
811 ; CHECK-AIX-32-P8-NEXT: blr
813 ; CHECK-AIX-32-P9-LABEL: test_none_v4i32:
814 ; CHECK-AIX-32-P9: # %bb.0: # %entry
815 ; CHECK-AIX-32-P9-NEXT: mtfprwz f0, r4
816 ; CHECK-AIX-32-P9-NEXT: xxinsertw v2, vs0, 4
817 ; CHECK-AIX-32-P9-NEXT: xxinsertw v2, vs0, 12
818 ; CHECK-AIX-32-P9-NEXT: blr
820 %conv = trunc i64 %b to i32
821 %vecins = insertelement <4 x i32> %a, i32 %conv, i32 1
822 %vecins2 = insertelement <4 x i32> %vecins, i32 %conv, i32 3
823 ret <4 x i32> %vecins2
826 define <16 x i8> @test_v4i32_none(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
827 ; CHECK-LE-P8-LABEL: test_v4i32_none:
828 ; CHECK-LE-P8: # %bb.0: # %entry
829 ; CHECK-LE-P8-NEXT: lbzx r4, 0, r4
830 ; CHECK-LE-P8-NEXT: lxsiwzx v4, 0, r3
831 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r4
832 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI10_0@toc@ha
833 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI10_0@toc@l
834 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
835 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
836 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
837 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
838 ; CHECK-LE-P8-NEXT: blr
840 ; CHECK-LE-P9-LABEL: test_v4i32_none:
841 ; CHECK-LE-P9: # %bb.0: # %entry
842 ; CHECK-LE-P9-NEXT: lxsiwzx v2, 0, r3
843 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI10_0@toc@ha
844 ; CHECK-LE-P9-NEXT: lxsibzx v3, 0, r4
845 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI10_0@toc@l
846 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
847 ; CHECK-LE-P9-NEXT: vspltb v3, v3, 7
848 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
849 ; CHECK-LE-P9-NEXT: blr
851 ; CHECK-BE-P8-LABEL: test_v4i32_none:
852 ; CHECK-BE-P8: # %bb.0: # %entry
853 ; CHECK-BE-P8-NEXT: lbzx r4, 0, r4
854 ; CHECK-BE-P8-NEXT: lxsiwzx v3, 0, r3
855 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI10_0@toc@ha
856 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI10_0@toc@l
857 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
858 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
859 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
860 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
861 ; CHECK-BE-P8-NEXT: blr
863 ; CHECK-BE-P9-LABEL: test_v4i32_none:
864 ; CHECK-BE-P9: # %bb.0: # %entry
865 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
866 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI10_0@toc@ha
867 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r4
868 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI10_0@toc@l
869 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
870 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
871 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
872 ; CHECK-BE-P9-NEXT: blr
874 ; CHECK-AIX-64-P8-LABEL: test_v4i32_none:
875 ; CHECK-AIX-64-P8: # %bb.0: # %entry
876 ; CHECK-AIX-64-P8-NEXT: lbzx r4, 0, r4
877 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v3, 0, r3
878 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C7(r2) # %const.0
879 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
880 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
881 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
882 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
883 ; CHECK-AIX-64-P8-NEXT: blr
885 ; CHECK-AIX-64-P9-LABEL: test_v4i32_none:
886 ; CHECK-AIX-64-P9: # %bb.0: # %entry
887 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
888 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C3(r2) # %const.0
889 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r4
890 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
891 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
892 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
893 ; CHECK-AIX-64-P9-NEXT: blr
895 ; CHECK-AIX-32-P8-LABEL: test_v4i32_none:
896 ; CHECK-AIX-32-P8: # %bb.0: # %entry
897 ; CHECK-AIX-32-P8-NEXT: lbzx r4, 0, r4
898 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r3
899 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C5(r2) # %const.0
900 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r4
901 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
902 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
903 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
904 ; CHECK-AIX-32-P8-NEXT: blr
906 ; CHECK-AIX-32-P9-LABEL: test_v4i32_none:
907 ; CHECK-AIX-32-P9: # %bb.0: # %entry
908 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
909 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C1(r2) # %const.0
910 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r4
911 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
912 ; CHECK-AIX-32-P9-NEXT: vspltb v2, v2, 7
913 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
914 ; CHECK-AIX-32-P9-NEXT: blr
916 %0 = load <4 x i8>, ptr %a, align 4
917 %bc1 = bitcast <4 x i8> %0 to i32
918 %vecinit3 = insertelement <4 x i32> poison, i32 %bc1, i64 0
919 %1 = load <1 x i8>, ptr %b, align 8
920 %bc2 = bitcast <1 x i8> %1 to i8
921 %vecinit6 = insertelement <16 x i8> undef, i8 %bc2, i64 0
922 %2 = bitcast <4 x i32> %vecinit3 to <16 x i8>
923 %3 = bitcast <16 x i8> %vecinit6 to <16 x i8>
924 %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>
925 ret <16 x i8> %shuffle
928 define <16 x i8> @test_v16i8_v2i64(i8 %arg, i64 %arg1, <16 x i8> %a, <2 x i64> %b) {
929 ; CHECK-LE-P8-LABEL: test_v16i8_v2i64:
930 ; CHECK-LE-P8: # %bb.0: # %entry
931 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
932 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
933 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
934 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
935 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
936 ; CHECK-LE-P8-NEXT: blr
938 ; CHECK-LE-P9-LABEL: test_v16i8_v2i64:
939 ; CHECK-LE-P9: # %bb.0: # %entry
940 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
941 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
942 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
943 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
944 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
945 ; CHECK-LE-P9-NEXT: blr
947 ; CHECK-BE-P8-LABEL: test_v16i8_v2i64:
948 ; CHECK-BE-P8: # %bb.0: # %entry
949 ; CHECK-BE-P8-NEXT: sldi r3, r3, 56
950 ; CHECK-BE-P8-NEXT: mtvsrd v3, r4
951 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
952 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
953 ; CHECK-BE-P8-NEXT: blr
955 ; CHECK-BE-P9-LABEL: test_v16i8_v2i64:
956 ; CHECK-BE-P9: # %bb.0: # %entry
957 ; CHECK-BE-P9-NEXT: sldi r3, r3, 56
958 ; CHECK-BE-P9-NEXT: mtvsrd v3, r4
959 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
960 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
961 ; CHECK-BE-P9-NEXT: blr
963 ; CHECK-AIX-64-P8-LABEL: test_v16i8_v2i64:
964 ; CHECK-AIX-64-P8: # %bb.0: # %entry
965 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 56
966 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r4
967 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
968 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
969 ; CHECK-AIX-64-P8-NEXT: blr
971 ; CHECK-AIX-64-P9-LABEL: test_v16i8_v2i64:
972 ; CHECK-AIX-64-P9: # %bb.0: # %entry
973 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 56
974 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r4
975 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
976 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
977 ; CHECK-AIX-64-P9-NEXT: blr
979 ; CHECK-AIX-32-P8-LABEL: test_v16i8_v2i64:
980 ; CHECK-AIX-32-P8: # %bb.0: # %entry
981 ; CHECK-AIX-32-P8-NEXT: stb r3, -16(r1)
982 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
983 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
984 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
985 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
986 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
987 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
988 ; CHECK-AIX-32-P8-NEXT: blr
990 ; CHECK-AIX-32-P9-LABEL: test_v16i8_v2i64:
991 ; CHECK-AIX-32-P9: # %bb.0: # %entry
992 ; CHECK-AIX-32-P9-NEXT: stb r3, -16(r1)
993 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
994 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
995 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
996 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
997 ; CHECK-AIX-32-P9-NEXT: blr
999 %lhs.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
1000 %lhs = bitcast <16 x i8> %lhs.tmp to <16 x i8>
1001 %rhs.tmp = insertelement <2 x i64> %b, i64 %arg1, i32 0
1002 %rhs = bitcast <2 x i64> %rhs.tmp to <16 x i8>
1003 %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>
1004 ret <16 x i8> %shuffle
1007 define <16 x i8> @test_v2i64_v16i8(i64 %arg, i8 %arg1) {
1008 ; CHECK-LE-P8-LABEL: test_v2i64_v16i8:
1009 ; CHECK-LE-P8: # %bb.0: # %entry
1010 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1011 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1012 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1013 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1014 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
1015 ; CHECK-LE-P8-NEXT: blr
1017 ; CHECK-LE-P9-LABEL: test_v2i64_v16i8:
1018 ; CHECK-LE-P9: # %bb.0: # %entry
1019 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1020 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1021 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1022 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1023 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
1024 ; CHECK-LE-P9-NEXT: blr
1026 ; CHECK-BE-P8-LABEL: test_v2i64_v16i8:
1027 ; CHECK-BE-P8: # %bb.0: # %entry
1028 ; CHECK-BE-P8-NEXT: sldi r4, r4, 56
1029 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1030 ; CHECK-BE-P8-NEXT: mtvsrd v2, r4
1031 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1032 ; CHECK-BE-P8-NEXT: blr
1034 ; CHECK-BE-P9-LABEL: test_v2i64_v16i8:
1035 ; CHECK-BE-P9: # %bb.0: # %entry
1036 ; CHECK-BE-P9-NEXT: sldi r4, r4, 56
1037 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1038 ; CHECK-BE-P9-NEXT: mtvsrd v2, r4
1039 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1040 ; CHECK-BE-P9-NEXT: blr
1042 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v16i8:
1043 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1044 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 56
1045 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1046 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r4
1047 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1048 ; CHECK-AIX-64-P8-NEXT: blr
1050 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v16i8:
1051 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1052 ; CHECK-AIX-64-P9-NEXT: sldi r4, r4, 56
1053 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1054 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r4
1055 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1056 ; CHECK-AIX-64-P9-NEXT: blr
1058 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v16i8:
1059 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1060 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
1061 ; CHECK-AIX-32-P8-NEXT: stb r5, -32(r1)
1062 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r4
1063 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1064 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1065 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1066 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1067 ; CHECK-AIX-32-P8-NEXT: blr
1069 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v16i8:
1070 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1071 ; CHECK-AIX-32-P9-NEXT: stb r5, -32(r1)
1072 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1073 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
1074 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
1075 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1076 ; CHECK-AIX-32-P9-NEXT: blr
1078 %rhs = insertelement <16 x i8> undef, i8 %arg1, i32 0
1079 %lhs.tmp = insertelement <2 x i64> undef, i64 %arg, i32 0
1080 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1081 %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>
1082 ret <16 x i8> %shuffle
1085 define dso_local <16 x i8> @test_1_2(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr {
1086 ; CHECK-LE-P8-LABEL: test_1_2:
1087 ; CHECK-LE-P8: # %bb.0: # %entry
1088 ; CHECK-LE-P8-NEXT: lbzx r3, 0, r3
1089 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r4
1090 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r3
1091 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI13_0@toc@ha
1092 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI13_0@toc@l
1093 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1094 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1095 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1096 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
1097 ; CHECK-LE-P8-NEXT: blr
1099 ; CHECK-LE-P9-LABEL: test_1_2:
1100 ; CHECK-LE-P9: # %bb.0: # %entry
1101 ; CHECK-LE-P9-NEXT: lxsibzx v2, 0, r3
1102 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI13_0@toc@ha
1103 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1104 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI13_0@toc@l
1105 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1106 ; CHECK-LE-P9-NEXT: vspltb v2, v2, 7
1107 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1108 ; CHECK-LE-P9-NEXT: blr
1110 ; CHECK-BE-P8-LABEL: test_1_2:
1111 ; CHECK-BE-P8: # %bb.0: # %entry
1112 ; CHECK-BE-P8-NEXT: lbzx r3, 0, r3
1113 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1114 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r3
1115 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1116 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1117 ; CHECK-BE-P8-NEXT: blr
1119 ; CHECK-BE-P9-LABEL: test_1_2:
1120 ; CHECK-BE-P9: # %bb.0: # %entry
1121 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r3
1122 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1123 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
1124 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1125 ; CHECK-BE-P9-NEXT: blr
1127 ; CHECK-AIX-64-P8-LABEL: test_1_2:
1128 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1129 ; CHECK-AIX-64-P8-NEXT: lbzx r3, 0, r3
1130 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1131 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r3
1132 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1133 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1134 ; CHECK-AIX-64-P8-NEXT: blr
1136 ; CHECK-AIX-64-P9-LABEL: test_1_2:
1137 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1138 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r3
1139 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1140 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
1141 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1142 ; CHECK-AIX-64-P9-NEXT: blr
1144 ; CHECK-AIX-32-P8-LABEL: test_1_2:
1145 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1146 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r3
1147 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1148 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r3
1149 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C6(r2) # %const.0
1150 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1151 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
1152 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1153 ; CHECK-AIX-32-P8-NEXT: blr
1155 ; CHECK-AIX-32-P9-LABEL: test_1_2:
1156 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1157 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r3
1158 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C2(r2) # %const.0
1159 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v2, 7
1160 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1161 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
1162 ; CHECK-AIX-32-P9-NEXT: xxperm v2, v3, vs0
1163 ; CHECK-AIX-32-P9-NEXT: blr
1165 %0 = load <1 x i8>, ptr %a, align 4
1166 %bc1 = bitcast <1 x i8> %0 to i8
1167 %vecinit3 = insertelement <16 x i8> poison, i8 %bc1, i64 0
1168 %1 = load <2 x i8>, ptr %b, align 8
1169 %bc2 = bitcast <2 x i8> %1 to i16
1170 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1171 %2 = bitcast <16 x i8> %vecinit3 to <16 x i8>
1172 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1173 %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>
1174 ret <16 x i8> %shuffle
1177 define <16 x i8> @test_none_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1178 ; CHECK-LE-P8-LABEL: test_none_v2i64:
1179 ; CHECK-LE-P8: # %bb.0: # %entry
1180 ; CHECK-LE-P8-NEXT: lbzx r3, 0, r3
1181 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r4
1182 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r3
1183 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI14_0@toc@ha
1184 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI14_0@toc@l
1185 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1186 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1187 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1188 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
1189 ; CHECK-LE-P8-NEXT: blr
1191 ; CHECK-LE-P9-LABEL: test_none_v2i64:
1192 ; CHECK-LE-P9: # %bb.0: # %entry
1193 ; CHECK-LE-P9-NEXT: lxsibzx v2, 0, r3
1194 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI14_0@toc@ha
1195 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1196 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI14_0@toc@l
1197 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1198 ; CHECK-LE-P9-NEXT: vspltb v2, v2, 7
1199 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1200 ; CHECK-LE-P9-NEXT: blr
1202 ; CHECK-BE-P8-LABEL: test_none_v2i64:
1203 ; CHECK-BE-P8: # %bb.0: # %entry
1204 ; CHECK-BE-P8-NEXT: lbzx r3, 0, r3
1205 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1206 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r3
1207 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1208 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1209 ; CHECK-BE-P8-NEXT: blr
1211 ; CHECK-BE-P9-LABEL: test_none_v2i64:
1212 ; CHECK-BE-P9: # %bb.0: # %entry
1213 ; CHECK-BE-P9-NEXT: lxsibzx v2, 0, r3
1214 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1215 ; CHECK-BE-P9-NEXT: vspltb v2, v2, 7
1216 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1217 ; CHECK-BE-P9-NEXT: blr
1219 ; CHECK-AIX-64-P8-LABEL: test_none_v2i64:
1220 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1221 ; CHECK-AIX-64-P8-NEXT: lbzx r3, 0, r3
1222 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1223 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r3
1224 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1225 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1226 ; CHECK-AIX-64-P8-NEXT: blr
1228 ; CHECK-AIX-64-P9-LABEL: test_none_v2i64:
1229 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1230 ; CHECK-AIX-64-P9-NEXT: lxsibzx v2, 0, r3
1231 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1232 ; CHECK-AIX-64-P9-NEXT: vspltb v2, v2, 7
1233 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1234 ; CHECK-AIX-64-P9-NEXT: blr
1236 ; CHECK-AIX-32-P8-LABEL: test_none_v2i64:
1237 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1238 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r3
1239 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1240 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r3
1241 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C7(r2) # %const.0
1242 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1243 ; CHECK-AIX-32-P8-NEXT: vspltb v2, v2, 7
1244 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1245 ; CHECK-AIX-32-P8-NEXT: blr
1247 ; CHECK-AIX-32-P9-LABEL: test_none_v2i64:
1248 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1249 ; CHECK-AIX-32-P9-NEXT: lxsibzx v2, 0, r3
1250 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C3(r2) # %const.0
1251 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v2, 7
1252 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1253 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r3)
1254 ; CHECK-AIX-32-P9-NEXT: xxperm v2, v3, vs0
1255 ; CHECK-AIX-32-P9-NEXT: blr
1257 %0 = load <1 x i8>, ptr %a, align 4
1258 %bc1 = bitcast <1 x i8> %0 to i8
1259 %vecinit3 = insertelement <16 x i8> poison, i8 %bc1, i64 0
1260 %1 = load <2 x i8>, ptr %b, align 8
1261 %bc2 = bitcast <2 x i8> %1 to i16
1262 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1263 %2 = bitcast <16 x i8> %vecinit3 to <16 x i8>
1264 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1265 %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>
1266 ret <16 x i8> %shuffle
1269 define <16 x i8> @test_v2i64_none(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1270 ; CHECK-LE-P8-LABEL: test_v2i64_none:
1271 ; CHECK-LE-P8: # %bb.0: # %entry
1272 ; CHECK-LE-P8-NEXT: lbzx r4, 0, r4
1273 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r3
1274 ; CHECK-LE-P8-NEXT: mtvsrwz v2, r4
1275 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI15_0@toc@ha
1276 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI15_0@toc@l
1277 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
1278 ; CHECK-LE-P8-NEXT: vspltb v2, v2, 7
1279 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1280 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
1281 ; CHECK-LE-P8-NEXT: blr
1283 ; CHECK-LE-P9-LABEL: test_v2i64_none:
1284 ; CHECK-LE-P9: # %bb.0: # %entry
1285 ; CHECK-LE-P9-NEXT: lxsd v2, 0(r3)
1286 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI15_0@toc@ha
1287 ; CHECK-LE-P9-NEXT: lxsibzx v3, 0, r4
1288 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI15_0@toc@l
1289 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
1290 ; CHECK-LE-P9-NEXT: vspltb v3, v3, 7
1291 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
1292 ; CHECK-LE-P9-NEXT: blr
1294 ; CHECK-BE-P8-LABEL: test_v2i64_none:
1295 ; CHECK-BE-P8: # %bb.0: # %entry
1296 ; CHECK-BE-P8-NEXT: lbzx r4, 0, r4
1297 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r3
1298 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
1299 ; CHECK-BE-P8-NEXT: vspltb v2, v2, 7
1300 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1301 ; CHECK-BE-P8-NEXT: blr
1303 ; CHECK-BE-P9-LABEL: test_v2i64_none:
1304 ; CHECK-BE-P9: # %bb.0: # %entry
1305 ; CHECK-BE-P9-NEXT: lxsibzx v3, 0, r4
1306 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
1307 ; CHECK-BE-P9-NEXT: vspltb v3, v3, 7
1308 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1309 ; CHECK-BE-P9-NEXT: blr
1311 ; CHECK-AIX-64-P8-LABEL: test_v2i64_none:
1312 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1313 ; CHECK-AIX-64-P8-NEXT: lbzx r4, 0, r4
1314 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r3
1315 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
1316 ; CHECK-AIX-64-P8-NEXT: vspltb v2, v2, 7
1317 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1318 ; CHECK-AIX-64-P8-NEXT: blr
1320 ; CHECK-AIX-64-P9-LABEL: test_v2i64_none:
1321 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1322 ; CHECK-AIX-64-P9-NEXT: lxsibzx v3, 0, r4
1323 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
1324 ; CHECK-AIX-64-P9-NEXT: vspltb v3, v3, 7
1325 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1326 ; CHECK-AIX-64-P9-NEXT: blr
1328 ; CHECK-AIX-32-P8-LABEL: test_v2i64_none:
1329 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1330 ; CHECK-AIX-32-P8-NEXT: lfiwzx f0, 0, r3
1331 ; CHECK-AIX-32-P8-NEXT: lbzx r3, 0, r4
1332 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r3
1333 ; CHECK-AIX-32-P8-NEXT: xxspltw v2, vs0, 1
1334 ; CHECK-AIX-32-P8-NEXT: vspltb v3, v3, 7
1335 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1336 ; CHECK-AIX-32-P8-NEXT: blr
1338 ; CHECK-AIX-32-P9-LABEL: test_v2i64_none:
1339 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1340 ; CHECK-AIX-32-P9-NEXT: lxsibzx v3, 0, r4
1341 ; CHECK-AIX-32-P9-NEXT: lxvwsx v2, 0, r3
1342 ; CHECK-AIX-32-P9-NEXT: vspltb v3, v3, 7
1343 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1344 ; CHECK-AIX-32-P9-NEXT: blr
1346 %0 = load <8 x i8>, ptr %a, align 4
1347 %bc1 = bitcast <8 x i8> %0 to i64
1348 %vecinit3 = insertelement <2 x i64> poison, i64 %bc1, i64 0
1349 %1 = load <1 x i8>, ptr %b, align 8
1350 %bc2 = bitcast <1 x i8> %1 to i8
1351 %vecinit6 = insertelement <16 x i8> undef, i8 %bc2, i64 0
1352 %2 = bitcast <2 x i64> %vecinit3 to <16 x i8>
1353 %3 = bitcast <16 x i8> %vecinit6 to <16 x i8>
1354 %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>
1355 ret <16 x i8> %shuffle
1358 define <16 x i8> @test_v8i16_v8i16rhs(i16 %arg, i16 %arg1) {
1359 ; CHECK-LE-P8-LABEL: test_v8i16_v8i16rhs:
1360 ; CHECK-LE-P8: # %bb.0: # %entry
1361 ; CHECK-LE-P8-NEXT: mtvsrd v2, r3
1362 ; CHECK-LE-P8-NEXT: mtvsrd v3, r4
1363 ; CHECK-LE-P8-NEXT: vmrghh v2, v3, v2
1364 ; CHECK-LE-P8-NEXT: blr
1366 ; CHECK-LE-P9-LABEL: test_v8i16_v8i16rhs:
1367 ; CHECK-LE-P9: # %bb.0: # %entry
1368 ; CHECK-LE-P9-NEXT: mtvsrd v2, r3
1369 ; CHECK-LE-P9-NEXT: mtvsrd v3, r4
1370 ; CHECK-LE-P9-NEXT: vmrghh v2, v3, v2
1371 ; CHECK-LE-P9-NEXT: blr
1373 ; CHECK-BE-P8-LABEL: test_v8i16_v8i16rhs:
1374 ; CHECK-BE-P8: # %bb.0: # %entry
1375 ; CHECK-BE-P8-NEXT: addis r5, r2, .LCPI16_0@toc@ha
1376 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r4
1377 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r3
1378 ; CHECK-BE-P8-NEXT: addi r5, r5, .LCPI16_0@toc@l
1379 ; CHECK-BE-P8-NEXT: lxvw4x v2, 0, r5
1380 ; CHECK-BE-P8-NEXT: vperm v2, v4, v3, v2
1381 ; CHECK-BE-P8-NEXT: blr
1383 ; CHECK-BE-P9-LABEL: test_v8i16_v8i16rhs:
1384 ; CHECK-BE-P9: # %bb.0: # %entry
1385 ; CHECK-BE-P9-NEXT: addis r5, r2, .LCPI16_0@toc@ha
1386 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r4
1387 ; CHECK-BE-P9-NEXT: mtfprwz f1, r3
1388 ; CHECK-BE-P9-NEXT: addi r5, r5, .LCPI16_0@toc@l
1389 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r5)
1390 ; CHECK-BE-P9-NEXT: xxperm v2, vs1, vs0
1391 ; CHECK-BE-P9-NEXT: blr
1393 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v8i16rhs:
1394 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1395 ; CHECK-AIX-64-P8-NEXT: ld r5, L..C8(r2) # %const.0
1396 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r4
1397 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r3
1398 ; CHECK-AIX-64-P8-NEXT: lxvw4x v2, 0, r5
1399 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v3, v2
1400 ; CHECK-AIX-64-P8-NEXT: blr
1402 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v8i16rhs:
1403 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1404 ; CHECK-AIX-64-P9-NEXT: ld r5, L..C4(r2) # %const.0
1405 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r4
1406 ; CHECK-AIX-64-P9-NEXT: mtfprwz f1, r3
1407 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r5)
1408 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs1, vs0
1409 ; CHECK-AIX-64-P9-NEXT: blr
1411 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v8i16rhs:
1412 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1413 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
1414 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1415 ; CHECK-AIX-32-P8-NEXT: sth r4, -16(r1)
1416 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1417 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1418 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1419 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1420 ; CHECK-AIX-32-P8-NEXT: blr
1422 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v8i16rhs:
1423 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1424 ; CHECK-AIX-32-P9-NEXT: sth r4, -16(r1)
1425 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
1426 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1427 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1428 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1429 ; CHECK-AIX-32-P9-NEXT: blr
1431 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1432 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1433 %lhs.tmp = insertelement <8 x i16> undef, i16 %arg, i32 0
1434 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1435 %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>
1436 ret <16 x i8> %shuffle
1439 define <16 x i8> @test_v8i16_v4i32(<8 x i16> %a, <4 x i32> %b, i16 %arg, i32 %arg1) {
1440 ; CHECK-LE-P8-LABEL: test_v8i16_v4i32:
1441 ; CHECK-LE-P8: # %bb.0: # %entry
1442 ; CHECK-LE-P8-NEXT: mtfprd f0, r7
1443 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1444 ; CHECK-LE-P8-NEXT: mtfprd f0, r8
1445 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1446 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
1447 ; CHECK-LE-P8-NEXT: blr
1449 ; CHECK-LE-P9-LABEL: test_v8i16_v4i32:
1450 ; CHECK-LE-P9: # %bb.0: # %entry
1451 ; CHECK-LE-P9-NEXT: mtfprd f0, r7
1452 ; CHECK-LE-P9-NEXT: mtvsrws v3, r8
1453 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1454 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
1455 ; CHECK-LE-P9-NEXT: blr
1457 ; CHECK-BE-P8-LABEL: test_v8i16_v4i32:
1458 ; CHECK-BE-P8: # %bb.0: # %entry
1459 ; CHECK-BE-P8-NEXT: sldi r3, r7, 48
1460 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1461 ; CHECK-BE-P8-NEXT: sldi r3, r8, 32
1462 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1463 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
1464 ; CHECK-BE-P8-NEXT: blr
1466 ; CHECK-BE-P9-LABEL: test_v8i16_v4i32:
1467 ; CHECK-BE-P9: # %bb.0: # %entry
1468 ; CHECK-BE-P9-NEXT: sldi r3, r7, 48
1469 ; CHECK-BE-P9-NEXT: mtvsrws v3, r8
1470 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1471 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
1472 ; CHECK-BE-P9-NEXT: blr
1474 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v4i32:
1475 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1476 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1477 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1478 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
1479 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1480 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
1481 ; CHECK-AIX-64-P8-NEXT: blr
1483 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v4i32:
1484 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1485 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
1486 ; CHECK-AIX-64-P9-NEXT: mtvsrws v3, r4
1487 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1488 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
1489 ; CHECK-AIX-64-P9-NEXT: blr
1491 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v4i32:
1492 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1493 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
1494 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1495 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1496 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1497 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
1498 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1499 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
1500 ; CHECK-AIX-32-P8-NEXT: blr
1502 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v4i32:
1503 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1504 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
1505 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
1506 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1507 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1508 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
1509 ; CHECK-AIX-32-P9-NEXT: blr
1511 %lhs.tmp = insertelement <8 x i16> %a, i16 %arg, i32 0
1512 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1513 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1514 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1515 %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>
1516 ret <16 x i8> %shuffle
1519 define <16 x i8> @test_v8i16_v2i64(<8 x i16> %a, <2 x i64> %b, i16 %arg, i64 %arg1) {
1520 ; CHECK-LE-P8-LABEL: test_v8i16_v2i64:
1521 ; CHECK-LE-P8: # %bb.0: # %entry
1522 ; CHECK-LE-P8-NEXT: mtfprd f0, r7
1523 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1524 ; CHECK-LE-P8-NEXT: mtfprd f0, r8
1525 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1526 ; CHECK-LE-P8-NEXT: vmrglb v2, v3, v2
1527 ; CHECK-LE-P8-NEXT: blr
1529 ; CHECK-LE-P9-LABEL: test_v8i16_v2i64:
1530 ; CHECK-LE-P9: # %bb.0: # %entry
1531 ; CHECK-LE-P9-NEXT: mtfprd f0, r7
1532 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1533 ; CHECK-LE-P9-NEXT: mtfprd f0, r8
1534 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1535 ; CHECK-LE-P9-NEXT: vmrglb v2, v3, v2
1536 ; CHECK-LE-P9-NEXT: blr
1538 ; CHECK-BE-P8-LABEL: test_v8i16_v2i64:
1539 ; CHECK-BE-P8: # %bb.0: # %entry
1540 ; CHECK-BE-P8-NEXT: sldi r3, r7, 48
1541 ; CHECK-BE-P8-NEXT: mtvsrd v3, r8
1542 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1543 ; CHECK-BE-P8-NEXT: vmrghb v2, v2, v3
1544 ; CHECK-BE-P8-NEXT: blr
1546 ; CHECK-BE-P9-LABEL: test_v8i16_v2i64:
1547 ; CHECK-BE-P9: # %bb.0: # %entry
1548 ; CHECK-BE-P9-NEXT: sldi r3, r7, 48
1549 ; CHECK-BE-P9-NEXT: mtvsrd v3, r8
1550 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1551 ; CHECK-BE-P9-NEXT: vmrghb v2, v2, v3
1552 ; CHECK-BE-P9-NEXT: blr
1554 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v2i64:
1555 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1556 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1557 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r4
1558 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1559 ; CHECK-AIX-64-P8-NEXT: vmrghb v2, v2, v3
1560 ; CHECK-AIX-64-P8-NEXT: blr
1562 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v2i64:
1563 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1564 ; CHECK-AIX-64-P9-NEXT: sldi r3, r3, 48
1565 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r4
1566 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1567 ; CHECK-AIX-64-P9-NEXT: vmrghb v2, v2, v3
1568 ; CHECK-AIX-64-P9-NEXT: blr
1570 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v2i64:
1571 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1572 ; CHECK-AIX-32-P8-NEXT: sth r3, -16(r1)
1573 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1574 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1575 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1576 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
1577 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1578 ; CHECK-AIX-32-P8-NEXT: vmrghb v2, v2, v3
1579 ; CHECK-AIX-32-P8-NEXT: blr
1581 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v2i64:
1582 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1583 ; CHECK-AIX-32-P9-NEXT: sth r3, -16(r1)
1584 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
1585 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1586 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1587 ; CHECK-AIX-32-P9-NEXT: vmrghb v2, v2, v3
1588 ; CHECK-AIX-32-P9-NEXT: blr
1590 %lhs.tmp = insertelement <8 x i16> %a, i16 %arg, i32 0
1591 %lhs = bitcast <8 x i16> %lhs.tmp to <16 x i8>
1592 %rhs.tmp = insertelement <2 x i64> %b, i64 %arg1, i32 0
1593 %rhs = bitcast <2 x i64> %rhs.tmp to <16 x i8>
1594 %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>
1595 ret <16 x i8> %shuffle
1598 define <16 x i8> @test_v4i32_v4i32(i32 %arg, i32 %arg1, <4 x i32> %a, <4 x i32> %b) {
1599 ; CHECK-LE-P8-LABEL: test_v4i32_v4i32:
1600 ; CHECK-LE-P8: # %bb.0: # %entry
1601 ; CHECK-LE-P8-NEXT: mtfprwz f0, r3
1602 ; CHECK-LE-P8-NEXT: mtfprwz f1, r4
1603 ; CHECK-LE-P8-NEXT: xxmrghw v2, vs1, vs0
1604 ; CHECK-LE-P8-NEXT: blr
1606 ; CHECK-LE-P9-LABEL: test_v4i32_v4i32:
1607 ; CHECK-LE-P9: # %bb.0: # %entry
1608 ; CHECK-LE-P9-NEXT: mtfprwz f0, r3
1609 ; CHECK-LE-P9-NEXT: mtfprwz f1, r4
1610 ; CHECK-LE-P9-NEXT: xxmrghw v2, vs1, vs0
1611 ; CHECK-LE-P9-NEXT: blr
1613 ; CHECK-BE-P8-LABEL: test_v4i32_v4i32:
1614 ; CHECK-BE-P8: # %bb.0: # %entry
1615 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r4
1616 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
1617 ; CHECK-BE-P8-NEXT: vmrgow v2, v3, v2
1618 ; CHECK-BE-P8-NEXT: blr
1620 ; CHECK-BE-P9-LABEL: test_v4i32_v4i32:
1621 ; CHECK-BE-P9: # %bb.0: # %entry
1622 ; CHECK-BE-P9-NEXT: mtvsrwz v2, r4
1623 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r3
1624 ; CHECK-BE-P9-NEXT: vmrgow v2, v3, v2
1625 ; CHECK-BE-P9-NEXT: blr
1627 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v4i32:
1628 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1629 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r4
1630 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
1631 ; CHECK-AIX-64-P8-NEXT: vmrgow v2, v3, v2
1632 ; CHECK-AIX-64-P8-NEXT: blr
1634 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v4i32:
1635 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1636 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v2, r4
1637 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r3
1638 ; CHECK-AIX-64-P9-NEXT: vmrgow v2, v3, v2
1639 ; CHECK-AIX-64-P9-NEXT: blr
1641 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v4i32:
1642 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1643 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1644 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1645 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
1646 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1647 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1648 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1649 ; CHECK-AIX-32-P8-NEXT: xxmrghw v2, vs1, vs0
1650 ; CHECK-AIX-32-P8-NEXT: blr
1652 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v4i32:
1653 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1654 ; CHECK-AIX-32-P9-NEXT: stw r4, -16(r1)
1655 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1656 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1657 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1658 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs1, vs0
1659 ; CHECK-AIX-32-P9-NEXT: blr
1661 %lhs.tmp = insertelement <4 x i32> %a, i32 %arg, i32 0
1662 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
1663 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1664 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1665 %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>
1666 ret <16 x i8> %shuffle
1669 define <16 x i8> @test_v4i32_v8i16(i32 %arg, i16 %arg1) {
1670 ; CHECK-LE-P8-LABEL: test_v4i32_v8i16:
1671 ; CHECK-LE-P8: # %bb.0: # %entry
1672 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1673 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1674 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1675 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1676 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
1677 ; CHECK-LE-P8-NEXT: blr
1679 ; CHECK-LE-P9-LABEL: test_v4i32_v8i16:
1680 ; CHECK-LE-P9: # %bb.0: # %entry
1681 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1682 ; CHECK-LE-P9-NEXT: mtvsrws v2, r3
1683 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1684 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
1685 ; CHECK-LE-P9-NEXT: blr
1687 ; CHECK-BE-P8-LABEL: test_v4i32_v8i16:
1688 ; CHECK-BE-P8: # %bb.0: # %entry
1689 ; CHECK-BE-P8-NEXT: sldi r3, r3, 32
1690 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1691 ; CHECK-BE-P8-NEXT: sldi r3, r4, 48
1692 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1693 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1694 ; CHECK-BE-P8-NEXT: blr
1696 ; CHECK-BE-P9-LABEL: test_v4i32_v8i16:
1697 ; CHECK-BE-P9: # %bb.0: # %entry
1698 ; CHECK-BE-P9-NEXT: mtvsrws v2, r3
1699 ; CHECK-BE-P9-NEXT: sldi r3, r4, 48
1700 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1701 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1702 ; CHECK-BE-P9-NEXT: blr
1704 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v8i16:
1705 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1706 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 32
1707 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1708 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 48
1709 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1710 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1711 ; CHECK-AIX-64-P8-NEXT: blr
1713 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v8i16:
1714 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1715 ; CHECK-AIX-64-P9-NEXT: mtvsrws v2, r3
1716 ; CHECK-AIX-64-P9-NEXT: sldi r3, r4, 48
1717 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1718 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1719 ; CHECK-AIX-64-P9-NEXT: blr
1721 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v8i16:
1722 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1723 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1724 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1725 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1726 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1727 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
1728 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1729 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1730 ; CHECK-AIX-32-P8-NEXT: blr
1732 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v8i16:
1733 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1734 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1735 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
1736 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1737 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1738 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1739 ; CHECK-AIX-32-P9-NEXT: blr
1741 %lhs.tmp = insertelement <4 x i32> undef, i32 %arg, i32 0
1742 %lhs = bitcast <4 x i32> %lhs.tmp to <16 x i8>
1743 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1744 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1745 %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>
1746 ret <16 x i8> %shuffle
1749 define <16 x i8> @test_v2i64_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1750 ; CHECK-LE-P8-LABEL: test_v2i64_v2i64:
1751 ; CHECK-LE-P8: # %bb.0: # %entry
1752 ; CHECK-LE-P8-NEXT: lxsdx v2, 0, r3
1753 ; CHECK-LE-P8-NEXT: lxsdx v3, 0, r4
1754 ; CHECK-LE-P8-NEXT: vmrghh v2, v3, v2
1755 ; CHECK-LE-P8-NEXT: blr
1757 ; CHECK-LE-P9-LABEL: test_v2i64_v2i64:
1758 ; CHECK-LE-P9: # %bb.0: # %entry
1759 ; CHECK-LE-P9-NEXT: lxsd v2, 0(r3)
1760 ; CHECK-LE-P9-NEXT: lxsd v3, 0(r4)
1761 ; CHECK-LE-P9-NEXT: vmrghh v2, v3, v2
1762 ; CHECK-LE-P9-NEXT: blr
1764 ; CHECK-BE-P8-LABEL: test_v2i64_v2i64:
1765 ; CHECK-BE-P8: # %bb.0: # %entry
1766 ; CHECK-BE-P8-NEXT: lxsdx v2, 0, r3
1767 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1768 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1769 ; CHECK-BE-P8-NEXT: blr
1771 ; CHECK-BE-P9-LABEL: test_v2i64_v2i64:
1772 ; CHECK-BE-P9: # %bb.0: # %entry
1773 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
1774 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1775 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1776 ; CHECK-BE-P9-NEXT: blr
1778 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v2i64:
1779 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1780 ; CHECK-AIX-64-P8-NEXT: lxsdx v2, 0, r3
1781 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1782 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1783 ; CHECK-AIX-64-P8-NEXT: blr
1785 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v2i64:
1786 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1787 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
1788 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1789 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1790 ; CHECK-AIX-64-P9-NEXT: blr
1792 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v2i64:
1793 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1794 ; CHECK-AIX-32-P8-NEXT: lfiwzx f0, 0, r3
1795 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C8(r2) # %const.0
1796 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1797 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1798 ; CHECK-AIX-32-P8-NEXT: xxspltw v2, vs0, 1
1799 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1800 ; CHECK-AIX-32-P8-NEXT: blr
1802 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v2i64:
1803 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1804 ; CHECK-AIX-32-P9-NEXT: lxvwsx vs0, 0, r3
1805 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C4(r2) # %const.0
1806 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1807 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1808 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1809 ; CHECK-AIX-32-P9-NEXT: blr
1811 %0 = load <8 x i8>, ptr %a, align 4
1812 %bc1 = bitcast <8 x i8> %0 to i64
1813 %vecinit3 = insertelement <2 x i64> poison, i64 %bc1, i64 0
1814 %1 = load <2 x i8>, ptr %b, align 8
1815 %bc2 = bitcast <2 x i8> %1 to i16
1816 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1817 %2 = bitcast <2 x i64> %vecinit3 to <16 x i8>
1818 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1819 %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>
1820 ret <16 x i8> %shuffle
1823 define <16 x i8> @test_v2i64_v4i32(i64 %arg, i32 %arg1, <2 x i64> %a, <4 x i32> %b) {
1824 ; CHECK-LE-P8-LABEL: test_v2i64_v4i32:
1825 ; CHECK-LE-P8: # %bb.0: # %entry
1826 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1827 ; CHECK-LE-P8-NEXT: mtfprd f1, r4
1828 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1829 ; CHECK-LE-P8-NEXT: xxswapd vs1, vs1
1830 ; CHECK-LE-P8-NEXT: xxmrglw v2, vs1, vs0
1831 ; CHECK-LE-P8-NEXT: blr
1833 ; CHECK-LE-P9-LABEL: test_v2i64_v4i32:
1834 ; CHECK-LE-P9: # %bb.0: # %entry
1835 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1836 ; CHECK-LE-P9-NEXT: mtvsrws vs1, r4
1837 ; CHECK-LE-P9-NEXT: xxswapd vs0, vs0
1838 ; CHECK-LE-P9-NEXT: xxmrglw v2, vs1, vs0
1839 ; CHECK-LE-P9-NEXT: blr
1841 ; CHECK-BE-P8-LABEL: test_v2i64_v4i32:
1842 ; CHECK-BE-P8: # %bb.0: # %entry
1843 ; CHECK-BE-P8-NEXT: mtfprd f0, r3
1844 ; CHECK-BE-P8-NEXT: sldi r3, r4, 32
1845 ; CHECK-BE-P8-NEXT: mtfprd f1, r3
1846 ; CHECK-BE-P8-NEXT: xxmrghw v2, vs0, vs1
1847 ; CHECK-BE-P8-NEXT: blr
1849 ; CHECK-BE-P9-LABEL: test_v2i64_v4i32:
1850 ; CHECK-BE-P9: # %bb.0: # %entry
1851 ; CHECK-BE-P9-NEXT: mtvsrws vs1, r4
1852 ; CHECK-BE-P9-NEXT: mtfprd f0, r3
1853 ; CHECK-BE-P9-NEXT: xxmrghw v2, vs0, vs1
1854 ; CHECK-BE-P9-NEXT: blr
1856 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v4i32:
1857 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1858 ; CHECK-AIX-64-P8-NEXT: mtfprd f0, r3
1859 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 32
1860 ; CHECK-AIX-64-P8-NEXT: mtfprd f1, r3
1861 ; CHECK-AIX-64-P8-NEXT: xxmrghw v2, vs0, vs1
1862 ; CHECK-AIX-64-P8-NEXT: blr
1864 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v4i32:
1865 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1866 ; CHECK-AIX-64-P9-NEXT: mtvsrws vs1, r4
1867 ; CHECK-AIX-64-P9-NEXT: mtfprd f0, r3
1868 ; CHECK-AIX-64-P9-NEXT: xxmrghw v2, vs0, vs1
1869 ; CHECK-AIX-64-P9-NEXT: blr
1871 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v4i32:
1872 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1873 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1874 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1875 ; CHECK-AIX-32-P8-NEXT: stw r5, -16(r1)
1876 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1877 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1878 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1879 ; CHECK-AIX-32-P8-NEXT: xxmrghw v2, vs1, vs0
1880 ; CHECK-AIX-32-P8-NEXT: blr
1882 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v4i32:
1883 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1884 ; CHECK-AIX-32-P9-NEXT: stw r5, -16(r1)
1885 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1886 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1887 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1888 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs1, vs0
1889 ; CHECK-AIX-32-P9-NEXT: blr
1891 %lhs.tmp = insertelement <2 x i64> %a, i64 %arg, i32 0
1892 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1893 %rhs.tmp = insertelement <4 x i32> %b, i32 %arg1, i32 0
1894 %rhs = bitcast <4 x i32> %rhs.tmp to <16 x i8>
1895 %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>
1896 ret <16 x i8> %shuffle
1899 define <16 x i8> @test_v2i64_v8i16(i64 %arg, i16 %arg1) {
1900 ; CHECK-LE-P8-LABEL: test_v2i64_v8i16:
1901 ; CHECK-LE-P8: # %bb.0: # %entry
1902 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1903 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1904 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1905 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1906 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
1907 ; CHECK-LE-P8-NEXT: blr
1909 ; CHECK-LE-P9-LABEL: test_v2i64_v8i16:
1910 ; CHECK-LE-P9: # %bb.0: # %entry
1911 ; CHECK-LE-P9-NEXT: mtfprd f0, r3
1912 ; CHECK-LE-P9-NEXT: xxswapd v2, vs0
1913 ; CHECK-LE-P9-NEXT: mtfprd f0, r4
1914 ; CHECK-LE-P9-NEXT: xxswapd v3, vs0
1915 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
1916 ; CHECK-LE-P9-NEXT: blr
1918 ; CHECK-BE-P8-LABEL: test_v2i64_v8i16:
1919 ; CHECK-BE-P8: # %bb.0: # %entry
1920 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1921 ; CHECK-BE-P8-NEXT: sldi r3, r4, 48
1922 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1923 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1924 ; CHECK-BE-P8-NEXT: blr
1926 ; CHECK-BE-P9-LABEL: test_v2i64_v8i16:
1927 ; CHECK-BE-P9: # %bb.0: # %entry
1928 ; CHECK-BE-P9-NEXT: mtvsrd v2, r3
1929 ; CHECK-BE-P9-NEXT: sldi r3, r4, 48
1930 ; CHECK-BE-P9-NEXT: mtvsrd v3, r3
1931 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1932 ; CHECK-BE-P9-NEXT: blr
1934 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v8i16:
1935 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1936 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1937 ; CHECK-AIX-64-P8-NEXT: sldi r3, r4, 48
1938 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1939 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1940 ; CHECK-AIX-64-P8-NEXT: blr
1942 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v8i16:
1943 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1944 ; CHECK-AIX-64-P9-NEXT: mtvsrd v2, r3
1945 ; CHECK-AIX-64-P9-NEXT: sldi r3, r4, 48
1946 ; CHECK-AIX-64-P9-NEXT: mtvsrd v3, r3
1947 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1948 ; CHECK-AIX-64-P9-NEXT: blr
1950 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v8i16:
1951 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1952 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1953 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1954 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1955 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1956 ; CHECK-AIX-32-P8-NEXT: sth r5, -32(r1)
1957 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1958 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
1959 ; CHECK-AIX-32-P8-NEXT: blr
1961 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v8i16:
1962 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1963 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1964 ; CHECK-AIX-32-P9-NEXT: sth r5, -32(r1)
1965 ; CHECK-AIX-32-P9-NEXT: lxv v2, -16(r1)
1966 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
1967 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
1968 ; CHECK-AIX-32-P9-NEXT: blr
1970 %lhs.tmp = insertelement <2 x i64> undef, i64 %arg, i32 0
1971 %lhs = bitcast <2 x i64> %lhs.tmp to <16 x i8>
1972 %rhs.tmp = insertelement <8 x i16> undef, i16 %arg1, i32 0
1973 %rhs = bitcast <8 x i16> %rhs.tmp to <16 x i8>
1974 %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>
1975 ret <16 x i8> %shuffle
1978 define <16 x i8> @test_v4i32_v2i64(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) {
1979 ; CHECK-LE-P8-LABEL: test_v4i32_v2i64:
1980 ; CHECK-LE-P8: # %bb.0: # %entry
1981 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r3
1982 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
1983 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI24_0@toc@l
1984 ; CHECK-LE-P8-NEXT: xxswapd v2, f0
1985 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
1986 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1987 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1988 ; CHECK-LE-P8-NEXT: xxswapd v4, vs0
1989 ; CHECK-LE-P8-NEXT: vperm v2, v3, v2, v4
1990 ; CHECK-LE-P8-NEXT: blr
1992 ; CHECK-LE-P9-LABEL: test_v4i32_v2i64:
1993 ; CHECK-LE-P9: # %bb.0: # %entry
1994 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
1995 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
1996 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI24_0@toc@l
1997 ; CHECK-LE-P9-NEXT: xxswapd v2, f0
1998 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1999 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
2000 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
2001 ; CHECK-LE-P9-NEXT: xxperm v2, v3, vs0
2002 ; CHECK-LE-P9-NEXT: blr
2004 ; CHECK-BE-P8-LABEL: test_v4i32_v2i64:
2005 ; CHECK-BE-P8: # %bb.0: # %entry
2006 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
2007 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI24_0@toc@ha
2008 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
2009 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI24_0@toc@l
2010 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
2011 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
2012 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
2013 ; CHECK-BE-P8-NEXT: blr
2015 ; CHECK-BE-P9-LABEL: test_v4i32_v2i64:
2016 ; CHECK-BE-P9: # %bb.0: # %entry
2017 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
2018 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI24_0@toc@ha
2019 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r4)
2020 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI24_0@toc@l
2021 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
2022 ; CHECK-BE-P9-NEXT: xxsldwi vs0, f0, f0, 1
2023 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
2024 ; CHECK-BE-P9-NEXT: blr
2026 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v2i64:
2027 ; CHECK-AIX-64-P8: # %bb.0: # %entry
2028 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
2029 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C9(r2) # %const.0
2030 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
2031 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
2032 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
2033 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
2034 ; CHECK-AIX-64-P8-NEXT: blr
2036 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v2i64:
2037 ; CHECK-AIX-64-P9: # %bb.0: # %entry
2038 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
2039 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C5(r2) # %const.0
2040 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r4)
2041 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs0, f0, f0, 1
2042 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
2043 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
2044 ; CHECK-AIX-64-P9-NEXT: blr
2046 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v2i64:
2047 ; CHECK-AIX-32-P8: # %bb.0: # %entry
2048 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
2049 ; CHECK-AIX-32-P8-NEXT: lwz r3, 4(r4)
2050 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
2051 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
2052 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
2053 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
2054 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
2055 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
2056 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
2057 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C9(r2) # %const.0
2058 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
2059 ; CHECK-AIX-32-P8-NEXT: xxmrghw v3, vs1, vs0
2060 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
2061 ; CHECK-AIX-32-P8-NEXT: blr
2063 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v2i64:
2064 ; CHECK-AIX-32-P9: # %bb.0: # %entry
2065 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
2066 ; CHECK-AIX-32-P9-NEXT: lwz r3, 4(r4)
2067 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
2068 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
2069 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
2070 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
2071 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C5(r2) # %const.0
2072 ; CHECK-AIX-32-P9-NEXT: lxv vs2, -32(r1)
2073 ; CHECK-AIX-32-P9-NEXT: xxmrghw v2, vs2, vs1
2074 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
2075 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
2076 ; CHECK-AIX-32-P9-NEXT: blr
2078 %0 = load <4 x i8>, ptr %a, align 4
2079 %bc1 = bitcast <4 x i8> %0 to i32
2080 %vecinit3 = insertelement <4 x i32> poison, i32 %bc1, i64 0
2081 %1 = load <8 x i8>, ptr %b, align 8
2082 %bc2 = bitcast <8 x i8> %1 to i64
2083 %vecinit6 = insertelement <2 x i64> undef, i64 %bc2, i64 0
2084 %2 = bitcast <4 x i32> %vecinit3 to <16 x i8>
2085 %3 = bitcast <2 x i64> %vecinit6 to <16 x i8>
2086 %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>
2087 ret <16 x i8> %shuffle