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 void @test_none_v8i16(ptr %a) {
29 ; CHECK-LE-P8-LABEL: test_none_v8i16:
30 ; CHECK-LE-P8: # %bb.0: # %entry
31 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI0_0@toc@ha
32 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r3
33 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI0_0@toc@l
34 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
35 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
36 ; CHECK-LE-P8-NEXT: mtvsrd v3, r4
37 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
38 ; CHECK-LE-P8-NEXT: vperm v2, v3, v4, v2
39 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
40 ; CHECK-LE-P8-NEXT: stfdx f0, 0, r3
41 ; CHECK-LE-P8-NEXT: blr
43 ; CHECK-LE-P9-LABEL: test_none_v8i16:
44 ; CHECK-LE-P9: # %bb.0: # %entry
45 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r3
46 ; CHECK-LE-P9-NEXT: lfd f1, 0(r3)
47 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI0_0@toc@ha
48 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI0_0@toc@l
49 ; CHECK-LE-P9-NEXT: lxv vs2, 0(r3)
50 ; CHECK-LE-P9-NEXT: xxperm vs1, vs0, vs2
51 ; CHECK-LE-P9-NEXT: xxswapd vs0, vs1
52 ; CHECK-LE-P9-NEXT: stfd f0, 0(r3)
53 ; CHECK-LE-P9-NEXT: blr
55 ; CHECK-BE-P8-LABEL: test_none_v8i16:
56 ; CHECK-BE-P8: # %bb.0: # %entry
57 ; CHECK-BE-P8-NEXT: lhz r4, 0(r3)
58 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
59 ; CHECK-BE-P8-NEXT: sldi r4, r4, 48
60 ; CHECK-BE-P8-NEXT: mtfprd f0, r4
61 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs1, vs0
62 ; CHECK-BE-P8-NEXT: stfdx f0, 0, r3
63 ; CHECK-BE-P8-NEXT: blr
65 ; CHECK-BE-P9-LABEL: test_none_v8i16:
66 ; CHECK-BE-P9: # %bb.0: # %entry
67 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
68 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
69 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
70 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, v2
71 ; CHECK-BE-P9-NEXT: stfd f0, 0(r3)
72 ; CHECK-BE-P9-NEXT: blr
74 ; CHECK-AIX-64-P8-LABEL: test_none_v8i16:
75 ; CHECK-AIX-64-P8: # %bb.0: # %entry
76 ; CHECK-AIX-64-P8-NEXT: lhz r4, 0(r3)
77 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
78 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 48
79 ; CHECK-AIX-64-P8-NEXT: mtfprd f0, r4
80 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs1, vs0
81 ; CHECK-AIX-64-P8-NEXT: stfdx f0, 0, r3
82 ; CHECK-AIX-64-P8-NEXT: blr
84 ; CHECK-AIX-64-P9-LABEL: test_none_v8i16:
85 ; CHECK-AIX-64-P9: # %bb.0: # %entry
86 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
87 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
88 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
89 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, v2
90 ; CHECK-AIX-64-P9-NEXT: stfd f0, 0(r3)
91 ; CHECK-AIX-64-P9-NEXT: blr
93 ; CHECK-AIX-32-P8-LABEL: test_none_v8i16:
94 ; CHECK-AIX-32-P8: # %bb.0: # %entry
95 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
96 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
97 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
98 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
99 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r4
100 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -16
101 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r4
102 ; CHECK-AIX-32-P8-NEXT: stw r3, 0(r3)
103 ; CHECK-AIX-32-P8-NEXT: lwz r3, -16(r1)
104 ; CHECK-AIX-32-P8-NEXT: stw r3, 0(r3)
105 ; CHECK-AIX-32-P8-NEXT: blr
107 ; CHECK-AIX-32-P9-LABEL: test_none_v8i16:
108 ; CHECK-AIX-32-P9: # %bb.0: # %entry
109 ; CHECK-AIX-32-P9-NEXT: lhz r4, 0(r3)
110 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
111 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -32(r1)
112 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
113 ; CHECK-AIX-32-P9-NEXT: stw r3, 0(r3)
114 ; CHECK-AIX-32-P9-NEXT: stxv vs0, -16(r1)
115 ; CHECK-AIX-32-P9-NEXT: lwz r3, -16(r1)
116 ; CHECK-AIX-32-P9-NEXT: stw r3, 0(r3)
117 ; CHECK-AIX-32-P9-NEXT: blr
119 %0 = load <2 x i8>, ptr undef, align 1
120 %tmp0_1 = bitcast <2 x i8> %0 to i16
121 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
122 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
123 %1 = load <2 x i32>, ptr %a
124 %tmp1_1 = shufflevector <2 x i32> %1, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
125 %2 = shufflevector <4 x i32> %tmp0_3, <4 x i32> %tmp1_1, <2 x i32> <i32 4, i32 0>
126 store <2 x i32> %2, ptr undef, align 4
130 define void @test_v8i16_none(ptr %a) {
131 ; CHECK-LE-P8-LABEL: test_v8i16_none:
132 ; CHECK-LE-P8: # %bb.0: # %entry
133 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
134 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
135 ; CHECK-LE-P8-NEXT: mtfprd f1, r3
136 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
137 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs0, vs1
138 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
139 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
140 ; CHECK-LE-P8-NEXT: blr
142 ; CHECK-LE-P9-LABEL: test_v8i16_none:
143 ; CHECK-LE-P9: # %bb.0: # %entry
144 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r3
145 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
146 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs1, vs0
147 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
148 ; CHECK-LE-P9-NEXT: blr
150 ; CHECK-BE-P8-LABEL: test_v8i16_none:
151 ; CHECK-BE-P8: # %bb.0: # %entry
152 ; CHECK-BE-P8-NEXT: lhz r4, 0(r3)
153 ; CHECK-BE-P8-NEXT: lxvw4x vs1, 0, r3
154 ; CHECK-BE-P8-NEXT: mtfprwz f0, r4
155 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
156 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
157 ; CHECK-BE-P8-NEXT: blr
159 ; CHECK-BE-P9-LABEL: test_v8i16_none:
160 ; CHECK-BE-P9: # %bb.0: # %entry
161 ; CHECK-BE-P9-NEXT: lxsihzx f0, 0, r3
162 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
163 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, vs1
164 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
165 ; CHECK-BE-P9-NEXT: blr
167 ; CHECK-AIX-64-P8-LABEL: test_v8i16_none:
168 ; CHECK-AIX-64-P8: # %bb.0: # %entry
169 ; CHECK-AIX-64-P8-NEXT: lhz r4, 0(r3)
170 ; CHECK-AIX-64-P8-NEXT: lxvw4x vs1, 0, r3
171 ; CHECK-AIX-64-P8-NEXT: mtfprwz f0, r4
172 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
173 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
174 ; CHECK-AIX-64-P8-NEXT: blr
176 ; CHECK-AIX-64-P9-LABEL: test_v8i16_none:
177 ; CHECK-AIX-64-P9: # %bb.0: # %entry
178 ; CHECK-AIX-64-P9-NEXT: lxsihzx f0, 0, r3
179 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
180 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, vs1
181 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
182 ; CHECK-AIX-64-P9-NEXT: blr
184 ; CHECK-AIX-32-P8-LABEL: test_v8i16_none:
185 ; CHECK-AIX-32-P8: # %bb.0: # %entry
186 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
187 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
188 ; CHECK-AIX-32-P8-NEXT: mtfprwz f0, r4
189 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs0, vs1
190 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
191 ; CHECK-AIX-32-P8-NEXT: blr
193 ; CHECK-AIX-32-P9-LABEL: test_v8i16_none:
194 ; CHECK-AIX-32-P9: # %bb.0: # %entry
195 ; CHECK-AIX-32-P9-NEXT: lxsihzx f0, 0, r3
196 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
197 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs0, vs1
198 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
199 ; CHECK-AIX-32-P9-NEXT: blr
201 %0 = load <2 x i8>, ptr undef, align 1
202 %tmp0_1 = bitcast <2 x i8> %0 to i16
203 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
204 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
205 %1 = load <4 x i32>, ptr %a, align 1
206 %2 = shufflevector <4 x i32> %tmp0_3, <4 x i32> %1, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
207 store <4 x i32> %2, ptr undef, align 4
211 define void @test_none_v4i32(<2 x i32> %vec, ptr %ptr1) {
212 ; CHECK-LE-P8-LABEL: test_none_v4i32:
213 ; CHECK-LE-P8: # %bb.0: # %entry
214 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI2_0@toc@ha
215 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
216 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI2_0@toc@l
217 ; CHECK-LE-P8-NEXT: lxvd2x vs1, 0, r3
218 ; CHECK-LE-P8-NEXT: mffprwz r3, f0
219 ; CHECK-LE-P8-NEXT: mtvsrwz v4, r3
220 ; CHECK-LE-P8-NEXT: xxswapd v3, vs1
221 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
222 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
223 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r5
224 ; CHECK-LE-P8-NEXT: blr
226 ; CHECK-LE-P9-LABEL: test_none_v4i32:
227 ; CHECK-LE-P9: # %bb.0: # %entry
228 ; CHECK-LE-P9-NEXT: li r3, 0
229 ; CHECK-LE-P9-NEXT: vextuwrx r3, r3, v2
230 ; CHECK-LE-P9-NEXT: mtfprwz f0, r3
231 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
232 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
233 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
234 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
235 ; CHECK-LE-P9-NEXT: stxv v2, 0(r5)
236 ; CHECK-LE-P9-NEXT: blr
238 ; CHECK-BE-P8-LABEL: test_none_v4i32:
239 ; CHECK-BE-P8: # %bb.0: # %entry
240 ; CHECK-BE-P8-NEXT: xxsldwi vs0, v2, v2, 3
241 ; CHECK-BE-P8-NEXT: mffprwz r3, f0
242 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
243 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI2_0@toc@ha
244 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI2_0@toc@l
245 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
246 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
247 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r5
248 ; CHECK-BE-P8-NEXT: blr
250 ; CHECK-BE-P9-LABEL: test_none_v4i32:
251 ; CHECK-BE-P9: # %bb.0: # %entry
252 ; CHECK-BE-P9-NEXT: li r3, 0
253 ; CHECK-BE-P9-NEXT: vextuwlx r3, r3, v2
254 ; CHECK-BE-P9-NEXT: mtfprwz f0, r3
255 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
256 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
257 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
258 ; CHECK-BE-P9-NEXT: xxperm vs0, v2, vs1
259 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r5)
260 ; CHECK-BE-P9-NEXT: blr
262 ; CHECK-AIX-64-P8-LABEL: test_none_v4i32:
263 ; CHECK-AIX-64-P8: # %bb.0: # %entry
264 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, v2, v2, 3
265 ; CHECK-AIX-64-P8-NEXT: mffprwz r4, f0
266 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r4
267 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C0(r2) # %const.0
268 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r4
269 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
270 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
271 ; CHECK-AIX-64-P8-NEXT: blr
273 ; CHECK-AIX-64-P9-LABEL: test_none_v4i32:
274 ; CHECK-AIX-64-P9: # %bb.0: # %entry
275 ; CHECK-AIX-64-P9-NEXT: li r4, 0
276 ; CHECK-AIX-64-P9-NEXT: vextuwlx r4, r4, v2
277 ; CHECK-AIX-64-P9-NEXT: mtfprwz f0, r4
278 ; CHECK-AIX-64-P9-NEXT: ld r4, L..C0(r2) # %const.0
279 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r4)
280 ; CHECK-AIX-64-P9-NEXT: xxperm vs0, v2, vs1
281 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
282 ; CHECK-AIX-64-P9-NEXT: blr
284 ; CHECK-AIX-32-P8-LABEL: test_none_v4i32:
285 ; CHECK-AIX-32-P8: # %bb.0: # %entry
286 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -16
287 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r4
288 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
289 ; CHECK-AIX-32-P8-NEXT: lwz r4, L..C0(r2) # %const.0
290 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r4
291 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
292 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
293 ; CHECK-AIX-32-P8-NEXT: blr
295 ; CHECK-AIX-32-P9-LABEL: test_none_v4i32:
296 ; CHECK-AIX-32-P9: # %bb.0: # %entry
297 ; CHECK-AIX-32-P9-NEXT: addi r4, r1, -16
298 ; CHECK-AIX-32-P9-NEXT: stxv v2, -16(r1)
299 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r4
300 ; CHECK-AIX-32-P9-NEXT: lwz r4, L..C0(r2) # %const.0
301 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r4)
302 ; CHECK-AIX-32-P9-NEXT: xxperm vs0, v2, vs1
303 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
304 ; CHECK-AIX-32-P9-NEXT: blr
306 %0 = extractelement <2 x i32> %vec, i64 0
307 %1 = bitcast i32 %0 to <2 x i16>
308 %2 = shufflevector <2 x i16> %1, <2 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
309 %3 = shufflevector <2 x i32> %vec, <2 x i32> %vec, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
310 %4 = bitcast <4 x i32> %3 to <8 x i16>
311 %5 = shufflevector <8 x i16> %4, <8 x i16> %2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 9>
312 store <8 x i16> %5, ptr %ptr1, align 16
316 define void @test_v4i32_none(<2 x i32> %vec, ptr %ptr1) {
317 ; CHECK-LE-P8-LABEL: test_v4i32_none:
318 ; CHECK-LE-P8: # %bb.0: # %entry
319 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI3_0@toc@ha
320 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
321 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI3_0@toc@l
322 ; CHECK-LE-P8-NEXT: lxvd2x vs1, 0, r3
323 ; CHECK-LE-P8-NEXT: mffprwz r3, f0
324 ; CHECK-LE-P8-NEXT: mtvsrwz v4, r3
325 ; CHECK-LE-P8-NEXT: xxswapd v3, vs1
326 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
327 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
328 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r5
329 ; CHECK-LE-P8-NEXT: blr
331 ; CHECK-LE-P9-LABEL: test_v4i32_none:
332 ; CHECK-LE-P9: # %bb.0: # %entry
333 ; CHECK-LE-P9-NEXT: li r3, 0
334 ; CHECK-LE-P9-NEXT: vextuwrx r3, r3, v2
335 ; CHECK-LE-P9-NEXT: mtfprwz f0, r3
336 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI3_0@toc@ha
337 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI3_0@toc@l
338 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
339 ; CHECK-LE-P9-NEXT: xxperm vs0, v2, vs1
340 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r5)
341 ; CHECK-LE-P9-NEXT: blr
343 ; CHECK-BE-P8-LABEL: test_v4i32_none:
344 ; CHECK-BE-P8: # %bb.0: # %entry
345 ; CHECK-BE-P8-NEXT: xxsldwi vs0, v2, v2, 3
346 ; CHECK-BE-P8-NEXT: mffprwz r3, f0
347 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
348 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI3_0@toc@ha
349 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI3_0@toc@l
350 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
351 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
352 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r5
353 ; CHECK-BE-P8-NEXT: blr
355 ; CHECK-BE-P9-LABEL: test_v4i32_none:
356 ; CHECK-BE-P9: # %bb.0: # %entry
357 ; CHECK-BE-P9-NEXT: li r3, 0
358 ; CHECK-BE-P9-NEXT: vextuwlx r3, r3, v2
359 ; CHECK-BE-P9-NEXT: mtfprwz f0, r3
360 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI3_0@toc@ha
361 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI3_0@toc@l
362 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
363 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
364 ; CHECK-BE-P9-NEXT: stxv v2, 0(r5)
365 ; CHECK-BE-P9-NEXT: blr
367 ; CHECK-AIX-64-P8-LABEL: test_v4i32_none:
368 ; CHECK-AIX-64-P8: # %bb.0: # %entry
369 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, v2, v2, 3
370 ; CHECK-AIX-64-P8-NEXT: mffprwz r4, f0
371 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r4
372 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C1(r2) # %const.0
373 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r4
374 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
375 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
376 ; CHECK-AIX-64-P8-NEXT: blr
378 ; CHECK-AIX-64-P9-LABEL: test_v4i32_none:
379 ; CHECK-AIX-64-P9: # %bb.0: # %entry
380 ; CHECK-AIX-64-P9-NEXT: li r4, 0
381 ; CHECK-AIX-64-P9-NEXT: vextuwlx r4, r4, v2
382 ; CHECK-AIX-64-P9-NEXT: mtfprwz f0, r4
383 ; CHECK-AIX-64-P9-NEXT: ld r4, L..C1(r2) # %const.0
384 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r4)
385 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
386 ; CHECK-AIX-64-P9-NEXT: stxv v2, 0(r3)
387 ; CHECK-AIX-64-P9-NEXT: blr
389 ; CHECK-AIX-32-P8-LABEL: test_v4i32_none:
390 ; CHECK-AIX-32-P8: # %bb.0: # %entry
391 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -16
392 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r4
393 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
394 ; CHECK-AIX-32-P8-NEXT: lwz r4, L..C1(r2) # %const.0
395 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r4
396 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
397 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
398 ; CHECK-AIX-32-P8-NEXT: blr
400 ; CHECK-AIX-32-P9-LABEL: test_v4i32_none:
401 ; CHECK-AIX-32-P9: # %bb.0: # %entry
402 ; CHECK-AIX-32-P9-NEXT: addi r4, r1, -16
403 ; CHECK-AIX-32-P9-NEXT: stxv v2, -16(r1)
404 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r4
405 ; CHECK-AIX-32-P9-NEXT: lwz r4, L..C1(r2) # %const.0
406 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r4)
407 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
408 ; CHECK-AIX-32-P9-NEXT: stxv v2, 0(r3)
409 ; CHECK-AIX-32-P9-NEXT: blr
411 %0 = extractelement <2 x i32> %vec, i64 0
412 %1 = bitcast i32 %0 to <2 x i16>
413 %2 = shufflevector <2 x i16> %1, <2 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
414 %3 = shufflevector <2 x i32> %vec, <2 x i32> %vec, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
415 %4 = bitcast <4 x i32> %3 to <8 x i16>
416 %5 = shufflevector <8 x i16> %2, <8 x i16> %4, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13>
417 store <8 x i16> %5, ptr %ptr1, align 16
421 define void @test_none_v2i64(ptr %ptr, i32 %v1, <2 x i32> %vec) local_unnamed_addr #0 {
422 ; CHECK-LE-P8-LABEL: test_none_v2i64:
423 ; CHECK-LE-P8: # %bb.0: # %entry
424 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI4_0@toc@ha
425 ; CHECK-LE-P8-NEXT: mtvsrwz v4, r4
426 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI4_1@toc@ha
427 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI4_0@toc@l
428 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI4_1@toc@l
429 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
430 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
431 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
432 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
433 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r3
434 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
435 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
436 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
437 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
439 ; CHECK-LE-P9-LABEL: test_none_v2i64:
440 ; CHECK-LE-P9: # %bb.0: # %entry
441 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
442 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI4_0@toc@ha
443 ; CHECK-LE-P9-NEXT: mtfprwz f1, r4
444 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI4_0@toc@l
445 ; CHECK-LE-P9-NEXT: xxinsertw v2, vs1, 12
446 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
447 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
448 ; CHECK-LE-P9-NEXT: stxv v2, 0(r3)
450 ; CHECK-BE-P8-LABEL: test_none_v2i64:
451 ; CHECK-BE-P8: # %bb.0: # %entry
452 ; CHECK-BE-P8-NEXT: addis r5, r2, .LCPI4_0@toc@ha
453 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r4
454 ; CHECK-BE-P8-NEXT: addi r5, r5, .LCPI4_0@toc@l
455 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r5
456 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
457 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r3
458 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI4_1@toc@ha
459 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI4_1@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: stxvw4x v2, 0, r3
464 ; CHECK-BE-P9-LABEL: test_none_v2i64:
465 ; CHECK-BE-P9: # %bb.0: # %entry
466 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
467 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI4_0@toc@ha
468 ; CHECK-BE-P9-NEXT: mtfprwz f1, r4
469 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI4_0@toc@l
470 ; CHECK-BE-P9-NEXT: xxinsertw v2, vs1, 0
471 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
472 ; CHECK-BE-P9-NEXT: xxperm vs0, v2, vs1
473 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
475 ; CHECK-AIX-64-P8-LABEL: test_none_v2i64:
476 ; CHECK-AIX-64-P8: # %bb.0: # %entry
477 ; CHECK-AIX-64-P8-NEXT: ld r5, L..C2(r2) # %const.0
478 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r4
479 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r5
480 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
481 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r3
482 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C3(r2) # %const.1
483 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
484 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
485 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
487 ; CHECK-AIX-64-P9-LABEL: test_none_v2i64:
488 ; CHECK-AIX-64-P9: # %bb.0: # %entry
489 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
490 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C2(r2) # %const.0
491 ; CHECK-AIX-64-P9-NEXT: mtfprwz f1, r4
492 ; CHECK-AIX-64-P9-NEXT: xxinsertw v2, vs1, 0
493 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
494 ; CHECK-AIX-64-P9-NEXT: xxperm vs0, v2, vs1
495 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
497 ; CHECK-AIX-32-P8-LABEL: test_none_v2i64:
498 ; CHECK-AIX-32-P8: # %bb.0: # %entry
499 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r3
500 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C2(r2) # %const.0
501 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
502 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
503 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
504 ; CHECK-AIX-32-P8-NEXT: lxvw4x v5, 0, r3
505 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C3(r2) # %const.1
506 ; CHECK-AIX-32-P8-NEXT: vperm v2, v5, v2, v4
507 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
508 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
509 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
511 ; CHECK-AIX-32-P9-LABEL: test_none_v2i64:
512 ; CHECK-AIX-32-P9: # %bb.0: # %entry
513 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
514 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C2(r2) # %const.0
515 ; CHECK-AIX-32-P9-NEXT: mtfprwz f1, r4
516 ; CHECK-AIX-32-P9-NEXT: xxinsertw v2, vs1, 0
517 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
518 ; CHECK-AIX-32-P9-NEXT: xxperm vs0, v2, vs1
519 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
521 %0 = load <2 x i32>, ptr %ptr, align 4
522 %tmp = insertelement <2 x i32> %vec, i32 %v1, i32 0
523 %1 = shufflevector <2 x i32> %0, <2 x i32> %tmp, <4 x i32> <i32 3, i32 2, i32 2, i32 0>
524 store <4 x i32> %1, ptr undef, align 4
528 define void @test_v2i64_none() {
529 ; CHECK-LE-P8-LABEL: test_v2i64_none:
530 ; CHECK-LE-P8: # %bb.0: # %entry
531 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r3
532 ; CHECK-LE-P8-NEXT: xxmrghw vs0, vs0, vs0
533 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
534 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
535 ; CHECK-LE-P8-NEXT: blr
537 ; CHECK-LE-P9-LABEL: test_v2i64_none:
538 ; CHECK-LE-P9: # %bb.0: # %entry
539 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
540 ; CHECK-LE-P9-NEXT: xxmrghw vs0, vs0, vs0
541 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
542 ; CHECK-LE-P9-NEXT: blr
544 ; CHECK-BE-P8-LABEL: test_v2i64_none:
545 ; CHECK-BE-P8: # %bb.0: # %entry
546 ; CHECK-BE-P8-NEXT: lfdx f0, 0, r3
547 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs0
548 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
549 ; CHECK-BE-P8-NEXT: blr
551 ; CHECK-BE-P9-LABEL: test_v2i64_none:
552 ; CHECK-BE-P9: # %bb.0: # %entry
553 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
554 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, vs0
555 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
556 ; CHECK-BE-P9-NEXT: blr
558 ; CHECK-AIX-64-P8-LABEL: test_v2i64_none:
559 ; CHECK-AIX-64-P8: # %bb.0: # %entry
560 ; CHECK-AIX-64-P8-NEXT: lfdx f0, 0, r3
561 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs0
562 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
563 ; CHECK-AIX-64-P8-NEXT: blr
565 ; CHECK-AIX-64-P9-LABEL: test_v2i64_none:
566 ; CHECK-AIX-64-P9: # %bb.0: # %entry
567 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
568 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, vs0
569 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
570 ; CHECK-AIX-64-P9-NEXT: blr
572 ; CHECK-AIX-32-P8-LABEL: test_v2i64_none:
573 ; CHECK-AIX-32-P8: # %bb.0: # %entry
574 ; CHECK-AIX-32-P8-NEXT: lfiwzx f0, 0, r3
575 ; CHECK-AIX-32-P8-NEXT: xxspltw vs0, vs0, 1
576 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
577 ; CHECK-AIX-32-P8-NEXT: blr
579 ; CHECK-AIX-32-P9-LABEL: test_v2i64_none:
580 ; CHECK-AIX-32-P9: # %bb.0: # %entry
581 ; CHECK-AIX-32-P9-NEXT: lxvwsx vs0, 0, r3
582 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
583 ; CHECK-AIX-32-P9-NEXT: blr
585 %0 = load <2 x i32>, ptr undef, align 4
586 %1 = shufflevector <2 x i32> %0, <2 x i32> undef, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
587 store <4 x i32> %1, ptr undef, align 4
591 define void @test_v8i16_v8i16(ptr %a) {
592 ; CHECK-LE-P8-LABEL: test_v8i16_v8i16:
593 ; CHECK-LE-P8: # %bb.0: # %entry
594 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
595 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
596 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
597 ; CHECK-LE-P8-NEXT: mtfprd f1, r3
598 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs1, vs0
599 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
600 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
601 ; CHECK-LE-P8-NEXT: blr
603 ; CHECK-LE-P9-LABEL: test_v8i16_v8i16:
604 ; CHECK-LE-P9: # %bb.0: # %entry
605 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r3
606 ; CHECK-LE-P9-NEXT: lxsihzx f1, 0, r3
607 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs1, vs0
608 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
609 ; CHECK-LE-P9-NEXT: blr
611 ; CHECK-BE-P8-LABEL: test_v8i16_v8i16:
612 ; CHECK-BE-P8: # %bb.0: # %entry
613 ; CHECK-BE-P8-NEXT: lhz r4, 0(r3)
614 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
615 ; CHECK-BE-P8-NEXT: mtfprwz f0, r4
616 ; CHECK-BE-P8-NEXT: mtfprwz f1, r3
617 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
618 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
619 ; CHECK-BE-P8-NEXT: blr
621 ; CHECK-BE-P9-LABEL: test_v8i16_v8i16:
622 ; CHECK-BE-P9: # %bb.0: # %entry
623 ; CHECK-BE-P9-NEXT: lxsihzx f0, 0, r3
624 ; CHECK-BE-P9-NEXT: lxsihzx f1, 0, r3
625 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, vs1
626 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
627 ; CHECK-BE-P9-NEXT: blr
629 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v8i16:
630 ; CHECK-AIX-64-P8: # %bb.0: # %entry
631 ; CHECK-AIX-64-P8-NEXT: lhz r4, 0(r3)
632 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
633 ; CHECK-AIX-64-P8-NEXT: mtfprwz f0, r4
634 ; CHECK-AIX-64-P8-NEXT: mtfprwz f1, r3
635 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
636 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
637 ; CHECK-AIX-64-P8-NEXT: blr
639 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v8i16:
640 ; CHECK-AIX-64-P9: # %bb.0: # %entry
641 ; CHECK-AIX-64-P9-NEXT: lxsihzx f0, 0, r3
642 ; CHECK-AIX-64-P9-NEXT: lxsihzx f1, 0, r3
643 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, vs1
644 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
645 ; CHECK-AIX-64-P9-NEXT: blr
647 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v8i16:
648 ; CHECK-AIX-32-P8: # %bb.0: # %entry
649 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
650 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
651 ; CHECK-AIX-32-P8-NEXT: mtfprwz f0, r4
652 ; CHECK-AIX-32-P8-NEXT: mtfprwz f1, r3
653 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs0, vs1
654 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
655 ; CHECK-AIX-32-P8-NEXT: blr
657 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v8i16:
658 ; CHECK-AIX-32-P9: # %bb.0: # %entry
659 ; CHECK-AIX-32-P9-NEXT: lxsihzx f0, 0, r3
660 ; CHECK-AIX-32-P9-NEXT: lxsihzx f1, 0, r3
661 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs0, vs1
662 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
663 ; CHECK-AIX-32-P9-NEXT: blr
665 %0 = load <2 x i8>, ptr undef, align 1
666 %tmp0_1 = bitcast <2 x i8> %0 to i16
667 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
668 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
669 %1 = load <2 x i8>, ptr %a, align 1
670 %tmp1_1 = bitcast <2 x i8> %1 to i16
671 %tmp1_2 = insertelement <8 x i16> undef, i16 %tmp1_1, i32 0
672 %tmp1_3 = bitcast <8 x i16> %tmp1_2 to <4 x i32>
673 %2 = shufflevector <4 x i32> %tmp0_3, <4 x i32> %tmp1_3, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
674 store <4 x i32> %2, ptr undef, align 4
678 define void @test_v8i16_v4i32(ptr %a) {
679 ; CHECK-LE-P8-LABEL: test_v8i16_v4i32:
680 ; CHECK-LE-P8: # %bb.0: # %entry
681 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
682 ; CHECK-LE-P8-NEXT: lfiwzx f1, 0, r3
683 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
684 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
685 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
686 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs1, vs0
687 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
688 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
689 ; CHECK-LE-P8-NEXT: blr
691 ; CHECK-LE-P9-LABEL: test_v8i16_v4i32:
692 ; CHECK-LE-P9: # %bb.0: # %entry
693 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
694 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
695 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
696 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
697 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs0, v2
698 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
699 ; CHECK-LE-P9-NEXT: blr
701 ; CHECK-BE-P8-LABEL: test_v8i16_v4i32:
702 ; CHECK-BE-P8: # %bb.0: # %entry
703 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
704 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
705 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
706 ; CHECK-BE-P8-NEXT: mtfprd f1, r3
707 ; CHECK-BE-P8-NEXT: xxsldwi vs0, f0, f0, 1
708 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs1, vs0
709 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
710 ; CHECK-BE-P8-NEXT: blr
712 ; CHECK-BE-P9-LABEL: test_v8i16_v4i32:
713 ; CHECK-BE-P9: # %bb.0: # %entry
714 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
715 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
716 ; CHECK-BE-P9-NEXT: xxsldwi vs0, f0, f0, 1
717 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
718 ; CHECK-BE-P9-NEXT: xxmrghw vs0, v2, vs0
719 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
720 ; CHECK-BE-P9-NEXT: blr
722 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v4i32:
723 ; CHECK-AIX-64-P8: # %bb.0: # %entry
724 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
725 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
726 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
727 ; CHECK-AIX-64-P8-NEXT: mtfprd f1, r3
728 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, f0, f0, 1
729 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs1, vs0
730 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
731 ; CHECK-AIX-64-P8-NEXT: blr
733 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v4i32:
734 ; CHECK-AIX-64-P9: # %bb.0: # %entry
735 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
736 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
737 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs0, f0, f0, 1
738 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
739 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, v2, vs0
740 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
741 ; CHECK-AIX-64-P9-NEXT: blr
743 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v4i32:
744 ; CHECK-AIX-32-P8: # %bb.0: # %entry
745 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
746 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
747 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
748 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
749 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r4
750 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
751 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
752 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
753 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs0, vs1
754 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
755 ; CHECK-AIX-32-P8-NEXT: blr
757 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v4i32:
758 ; CHECK-AIX-32-P9: # %bb.0: # %entry
759 ; CHECK-AIX-32-P9-NEXT: lhz r4, 0(r3)
760 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
761 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
762 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -32(r1)
763 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
764 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
765 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs0, vs1
766 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
767 ; CHECK-AIX-32-P9-NEXT: blr
769 %0 = load <2 x i8>, ptr undef, align 1
770 %tmp0_1 = bitcast <2 x i8> %0 to i16
771 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
772 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
773 %1 = load <2 x i16>, ptr %a, align 4
774 %tmp1_1 = bitcast <2 x i16> %1 to i32
775 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
776 %2 = shufflevector <4 x i32> %tmp0_3, <4 x i32> %tmp1_2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
777 store <4 x i32> %2, ptr undef, align 4
781 define void @test_v8i16_v2i64(ptr %a) {
782 ; CHECK-LE-P8-LABEL: test_v8i16_v2i64:
783 ; CHECK-LE-P8: # %bb.0: # %entry
784 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
785 ; CHECK-LE-P8-NEXT: lfdx f1, 0, r3
786 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
787 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
788 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
789 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs1, vs0
790 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
791 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
792 ; CHECK-LE-P8-NEXT: blr
794 ; CHECK-LE-P9-LABEL: test_v8i16_v2i64:
795 ; CHECK-LE-P9: # %bb.0: # %entry
796 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
797 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
798 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
799 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
800 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs0, v2
801 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
802 ; CHECK-LE-P9-NEXT: blr
804 ; CHECK-BE-P8-LABEL: test_v8i16_v2i64:
805 ; CHECK-BE-P8: # %bb.0: # %entry
806 ; CHECK-BE-P8-NEXT: lhz r4, 0(r3)
807 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
808 ; CHECK-BE-P8-NEXT: sldi r4, r4, 48
809 ; CHECK-BE-P8-NEXT: mtfprd f0, r4
810 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
811 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
812 ; CHECK-BE-P8-NEXT: blr
814 ; CHECK-BE-P9-LABEL: test_v8i16_v2i64:
815 ; CHECK-BE-P9: # %bb.0: # %entry
816 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
817 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
818 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
819 ; CHECK-BE-P9-NEXT: xxmrghw vs0, v2, vs0
820 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
821 ; CHECK-BE-P9-NEXT: blr
823 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v2i64:
824 ; CHECK-AIX-64-P8: # %bb.0: # %entry
825 ; CHECK-AIX-64-P8-NEXT: lhz r4, 0(r3)
826 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
827 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 48
828 ; CHECK-AIX-64-P8-NEXT: mtfprd f0, r4
829 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
830 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
831 ; CHECK-AIX-64-P8-NEXT: blr
833 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v2i64:
834 ; CHECK-AIX-64-P9: # %bb.0: # %entry
835 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
836 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
837 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
838 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, v2, vs0
839 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
840 ; CHECK-AIX-64-P9-NEXT: blr
842 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v2i64:
843 ; CHECK-AIX-32-P8: # %bb.0: # %entry
844 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
845 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
846 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
847 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
848 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r4
849 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
850 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
851 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
852 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs0, vs1
853 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
854 ; CHECK-AIX-32-P8-NEXT: blr
856 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v2i64:
857 ; CHECK-AIX-32-P9: # %bb.0: # %entry
858 ; CHECK-AIX-32-P9-NEXT: lhz r4, 0(r3)
859 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
860 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
861 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -32(r1)
862 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
863 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
864 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs0, vs1
865 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
866 ; CHECK-AIX-32-P9-NEXT: blr
868 %0 = load <2 x i8>, ptr undef, align 1
869 %tmp0_1 = bitcast <2 x i8> %0 to i16
870 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
871 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
872 %1 = load <2 x i16>, ptr %a, align 8
873 %tmp1_1 = bitcast <2 x i16> %1 to i32
874 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
875 %2 = shufflevector <4 x i32> %tmp0_3, <4 x i32> %tmp1_2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
876 store <4 x i32> %2, ptr undef, align 4
880 define <16 x i8> @test_v4i32_v4i32(ptr %a, ptr %b) {
881 ; CHECK-LE-P8-LABEL: test_v4i32_v4i32:
882 ; CHECK-LE-P8: # %bb.0: # %entry
883 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI9_0@toc@ha
884 ; CHECK-LE-P8-NEXT: lxsiwzx v3, 0, r3
885 ; CHECK-LE-P8-NEXT: lxsiwzx v4, 0, r4
886 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI9_0@toc@l
887 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
888 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
889 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
890 ; CHECK-LE-P8-NEXT: blr
892 ; CHECK-LE-P9-LABEL: test_v4i32_v4i32:
893 ; CHECK-LE-P9: # %bb.0: # %entry
894 ; CHECK-LE-P9-NEXT: lxsiwzx v2, 0, r3
895 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI9_0@toc@ha
896 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r4
897 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI9_0@toc@l
898 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
899 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
900 ; CHECK-LE-P9-NEXT: blr
902 ; CHECK-BE-P8-LABEL: test_v4i32_v4i32:
903 ; CHECK-BE-P8: # %bb.0: # %entry
904 ; CHECK-BE-P8-NEXT: lxsiwzx v2, 0, r3
905 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
906 ; CHECK-BE-P8-NEXT: lxsiwzx v3, 0, r4
907 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
908 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
909 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
910 ; CHECK-BE-P8-NEXT: blr
912 ; CHECK-BE-P9-LABEL: test_v4i32_v4i32:
913 ; CHECK-BE-P9: # %bb.0: # %entry
914 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
915 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI9_0@toc@ha
916 ; CHECK-BE-P9-NEXT: lxsiwzx v2, 0, r4
917 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI9_0@toc@l
918 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
919 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
920 ; CHECK-BE-P9-NEXT: blr
922 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v4i32:
923 ; CHECK-AIX-64-P8: # %bb.0: # %entry
924 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v2, 0, r3
925 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C4(r2) # %const.0
926 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v3, 0, r4
927 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
928 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
929 ; CHECK-AIX-64-P8-NEXT: blr
931 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v4i32:
932 ; CHECK-AIX-64-P9: # %bb.0: # %entry
933 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
934 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C3(r2) # %const.0
935 ; CHECK-AIX-64-P9-NEXT: lxsiwzx v2, 0, r4
936 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
937 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
938 ; CHECK-AIX-64-P9-NEXT: blr
940 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v4i32:
941 ; CHECK-AIX-32-P8: # %bb.0: # %entry
942 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
943 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C4(r2) # %const.0
944 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
945 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
946 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
947 ; CHECK-AIX-32-P8-NEXT: blr
949 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v4i32:
950 ; CHECK-AIX-32-P9: # %bb.0: # %entry
951 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
952 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C3(r2) # %const.0
953 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
954 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
955 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
956 ; CHECK-AIX-32-P9-NEXT: blr
958 %load1 = load <4 x i8>, ptr %a
959 %load2 = load <4 x i8>, ptr %b
960 %shuffle1 = shufflevector <4 x i8> %load1, <4 x i8> %load2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
961 %shuffle2 = shufflevector <8 x i8> %shuffle1, <8 x i8> %shuffle1, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
962 ret <16 x i8> %shuffle2
965 define void @test_v4i32_v8i16(ptr %a) {
966 ; CHECK-LE-P8-LABEL: test_v4i32_v8i16:
967 ; CHECK-LE-P8: # %bb.0: # %entry
968 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
969 ; CHECK-LE-P8-NEXT: lfiwzx f1, 0, r3
970 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
971 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
972 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
973 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs0, vs1
974 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
975 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
976 ; CHECK-LE-P8-NEXT: blr
978 ; CHECK-LE-P9-LABEL: test_v4i32_v8i16:
979 ; CHECK-LE-P9: # %bb.0: # %entry
980 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
981 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
982 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
983 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
984 ; CHECK-LE-P9-NEXT: xxmrglw vs0, v2, vs0
985 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
986 ; CHECK-LE-P9-NEXT: blr
988 ; CHECK-BE-P8-LABEL: test_v4i32_v8i16:
989 ; CHECK-BE-P8: # %bb.0: # %entry
990 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
991 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
992 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
993 ; CHECK-BE-P8-NEXT: mtfprd f1, r3
994 ; CHECK-BE-P8-NEXT: xxsldwi vs0, f0, f0, 1
995 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
996 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
997 ; CHECK-BE-P8-NEXT: blr
999 ; CHECK-BE-P9-LABEL: test_v4i32_v8i16:
1000 ; CHECK-BE-P9: # %bb.0: # %entry
1001 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
1002 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
1003 ; CHECK-BE-P9-NEXT: xxsldwi vs0, f0, f0, 1
1004 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
1005 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, v2
1006 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
1007 ; CHECK-BE-P9-NEXT: blr
1009 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v8i16:
1010 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1011 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
1012 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
1013 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1014 ; CHECK-AIX-64-P8-NEXT: mtfprd f1, r3
1015 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, f0, f0, 1
1016 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
1017 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
1018 ; CHECK-AIX-64-P8-NEXT: blr
1020 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v8i16:
1021 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1022 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
1023 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
1024 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs0, f0, f0, 1
1025 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
1026 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, v2
1027 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
1028 ; CHECK-AIX-64-P9-NEXT: blr
1030 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v8i16:
1031 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1032 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
1033 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
1034 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
1035 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
1036 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r4
1037 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1038 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1039 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1040 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1041 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
1042 ; CHECK-AIX-32-P8-NEXT: blr
1044 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v8i16:
1045 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1046 ; CHECK-AIX-32-P9-NEXT: lhz r4, 0(r3)
1047 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
1048 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
1049 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -32(r1)
1050 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1051 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
1052 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1053 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
1054 ; CHECK-AIX-32-P9-NEXT: blr
1056 %0 = load <2 x i8>, ptr undef, align 1
1057 %tmp0_1 = bitcast <2 x i8> %0 to i16
1058 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
1059 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
1060 %1 = load <2 x i16>, ptr %a, align 4
1061 %tmp1_1 = bitcast <2 x i16> %1 to i32
1062 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
1063 %2 = shufflevector <4 x i32> %tmp1_2, <4 x i32> %tmp0_3, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1064 store <4 x i32> %2, ptr undef, align 4
1068 define void @test_v4i32_v2i64(ptr %a) {
1069 ; CHECK-LE-P8-LABEL: test_v4i32_v2i64:
1070 ; CHECK-LE-P8: # %bb.0: # %entry
1071 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r3
1072 ; CHECK-LE-P8-NEXT: lfiwzx f1, 0, r3
1073 ; CHECK-LE-P8-NEXT: xxswapd vs0, f0
1074 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
1075 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs0, vs1
1076 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1077 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
1078 ; CHECK-LE-P8-NEXT: blr
1080 ; CHECK-LE-P9-LABEL: test_v4i32_v2i64:
1081 ; CHECK-LE-P9: # %bb.0: # %entry
1082 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
1083 ; CHECK-LE-P9-NEXT: lfiwzx f1, 0, r3
1084 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
1085 ; CHECK-LE-P9-NEXT: xxswapd vs1, f1
1086 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs0, vs1
1087 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
1088 ; CHECK-LE-P9-NEXT: blr
1090 ; CHECK-BE-P8-LABEL: test_v4i32_v2i64:
1091 ; CHECK-BE-P8: # %bb.0: # %entry
1092 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
1093 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
1094 ; CHECK-BE-P8-NEXT: xxsldwi vs0, f0, f0, 1
1095 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
1096 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
1097 ; CHECK-BE-P8-NEXT: blr
1099 ; CHECK-BE-P9-LABEL: test_v4i32_v2i64:
1100 ; CHECK-BE-P9: # %bb.0: # %entry
1101 ; CHECK-BE-P9-NEXT: lfiwzx f1, 0, r3
1102 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
1103 ; CHECK-BE-P9-NEXT: xxsldwi vs1, f1, f1, 1
1104 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs1, vs0
1105 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
1106 ; CHECK-BE-P9-NEXT: blr
1108 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v2i64:
1109 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1110 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
1111 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
1112 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, f0, f0, 1
1113 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
1114 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
1115 ; CHECK-AIX-64-P8-NEXT: blr
1117 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v2i64:
1118 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1119 ; CHECK-AIX-64-P9-NEXT: lfiwzx f1, 0, r3
1120 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
1121 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs1, f1, f1, 1
1122 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs1, vs0
1123 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
1124 ; CHECK-AIX-64-P9-NEXT: blr
1126 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v2i64:
1127 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1128 ; CHECK-AIX-32-P8-NEXT: lwz r4, 0(r3)
1129 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
1130 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1131 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1132 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
1133 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1134 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1135 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1136 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1137 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
1138 ; CHECK-AIX-32-P8-NEXT: blr
1140 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v2i64:
1141 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1142 ; CHECK-AIX-32-P9-NEXT: lwz r4, 0(r3)
1143 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
1144 ; CHECK-AIX-32-P9-NEXT: stw r4, -16(r1)
1145 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1146 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1147 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1148 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1149 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
1150 ; CHECK-AIX-32-P9-NEXT: blr
1152 %0 = load <2 x i16>, ptr undef, align 8
1153 %tmp0_1 = bitcast <2 x i16> %0 to i32
1154 %tmp0_2 = insertelement <4 x i32> undef, i32 %tmp0_1, i32 0
1155 %1 = load <2 x i16>, ptr %a, align 4
1156 %tmp1_1 = bitcast <2 x i16> %1 to i32
1157 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
1158 %2 = shufflevector <4 x i32> %tmp1_2, <4 x i32> %tmp0_2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1159 store <4 x i32> %2, ptr undef, align 4
1163 define void @test_v2i64_v2i64(ptr %a) {
1164 ; CHECK-LE-P8-LABEL: test_v2i64_v2i64:
1165 ; CHECK-LE-P8: # %bb.0: # %entry
1166 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r3
1167 ; CHECK-LE-P8-NEXT: lfdx f1, 0, r3
1168 ; CHECK-LE-P8-NEXT: xxmrghw vs0, vs1, vs0
1169 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1170 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
1171 ; CHECK-LE-P8-NEXT: blr
1173 ; CHECK-LE-P9-LABEL: test_v2i64_v2i64:
1174 ; CHECK-LE-P9: # %bb.0: # %entry
1175 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
1176 ; CHECK-LE-P9-NEXT: lfd f1, 0(r3)
1177 ; CHECK-LE-P9-NEXT: xxmrghw vs0, vs1, vs0
1178 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
1179 ; CHECK-LE-P9-NEXT: blr
1181 ; CHECK-BE-P8-LABEL: test_v2i64_v2i64:
1182 ; CHECK-BE-P8: # %bb.0: # %entry
1183 ; CHECK-BE-P8-NEXT: lfdx f0, 0, r3
1184 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
1185 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs0, vs1
1186 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
1187 ; CHECK-BE-P8-NEXT: blr
1189 ; CHECK-BE-P9-LABEL: test_v2i64_v2i64:
1190 ; CHECK-BE-P9: # %bb.0: # %entry
1191 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
1192 ; CHECK-BE-P9-NEXT: lfd f1, 0(r3)
1193 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, vs1
1194 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
1195 ; CHECK-BE-P9-NEXT: blr
1197 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v2i64:
1198 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1199 ; CHECK-AIX-64-P8-NEXT: lfdx f0, 0, r3
1200 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
1201 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs0, vs1
1202 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
1203 ; CHECK-AIX-64-P8-NEXT: blr
1205 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v2i64:
1206 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1207 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
1208 ; CHECK-AIX-64-P9-NEXT: lfd f1, 0(r3)
1209 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, vs1
1210 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
1211 ; CHECK-AIX-64-P9-NEXT: blr
1213 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v2i64:
1214 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1215 ; CHECK-AIX-32-P8-NEXT: lwz r4, 4(r3)
1216 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
1217 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
1218 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
1219 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1220 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1221 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1222 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1223 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1224 ; CHECK-AIX-32-P8-NEXT: lfiwzx f1, 0, r3
1225 ; CHECK-AIX-32-P8-NEXT: xxspltw vs1, vs1, 1
1226 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1227 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
1228 ; CHECK-AIX-32-P8-NEXT: blr
1230 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v2i64:
1231 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1232 ; CHECK-AIX-32-P9-NEXT: lwz r4, 4(r3)
1233 ; CHECK-AIX-32-P9-NEXT: stw r4, -16(r1)
1234 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
1235 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1236 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
1237 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1238 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1239 ; CHECK-AIX-32-P9-NEXT: lxvwsx vs1, 0, r3
1240 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1241 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
1242 ; CHECK-AIX-32-P9-NEXT: blr
1244 %0 = load <2 x i32>, ptr undef, align 4
1245 %1 = load <2 x i32>, ptr %a, align 4
1246 %2 = shufflevector <2 x i32> %0, <2 x i32> %1, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
1247 store <4 x i32> %2, ptr undef, align 4
1251 define void @test_v2i64_v4i32(ptr %a) {
1252 ; CHECK-LE-P8-LABEL: test_v2i64_v4i32:
1253 ; CHECK-LE-P8: # %bb.0: # %entry
1254 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r3
1255 ; CHECK-LE-P8-NEXT: lfiwzx f1, 0, r3
1256 ; CHECK-LE-P8-NEXT: xxswapd vs0, f0
1257 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
1258 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs1, vs0
1259 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1260 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
1261 ; CHECK-LE-P8-NEXT: blr
1263 ; CHECK-LE-P9-LABEL: test_v2i64_v4i32:
1264 ; CHECK-LE-P9: # %bb.0: # %entry
1265 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
1266 ; CHECK-LE-P9-NEXT: lfiwzx f1, 0, r3
1267 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
1268 ; CHECK-LE-P9-NEXT: xxswapd vs1, f1
1269 ; CHECK-LE-P9-NEXT: xxmrglw vs0, vs1, vs0
1270 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
1271 ; CHECK-LE-P9-NEXT: blr
1273 ; CHECK-BE-P8-LABEL: test_v2i64_v4i32:
1274 ; CHECK-BE-P8: # %bb.0: # %entry
1275 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
1276 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
1277 ; CHECK-BE-P8-NEXT: xxsldwi vs0, f0, f0, 1
1278 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs1, vs0
1279 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
1280 ; CHECK-BE-P8-NEXT: blr
1282 ; CHECK-BE-P9-LABEL: test_v2i64_v4i32:
1283 ; CHECK-BE-P9: # %bb.0: # %entry
1284 ; CHECK-BE-P9-NEXT: lfiwzx f1, 0, r3
1285 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
1286 ; CHECK-BE-P9-NEXT: xxsldwi vs1, f1, f1, 1
1287 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, vs1
1288 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
1289 ; CHECK-BE-P9-NEXT: blr
1291 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v4i32:
1292 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1293 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
1294 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
1295 ; CHECK-AIX-64-P8-NEXT: xxsldwi vs0, f0, f0, 1
1296 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs1, vs0
1297 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
1298 ; CHECK-AIX-64-P8-NEXT: blr
1300 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v4i32:
1301 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1302 ; CHECK-AIX-64-P9-NEXT: lfiwzx f1, 0, r3
1303 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
1304 ; CHECK-AIX-64-P9-NEXT: xxsldwi vs1, f1, f1, 1
1305 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, vs1
1306 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
1307 ; CHECK-AIX-64-P9-NEXT: blr
1309 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v4i32:
1310 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1311 ; CHECK-AIX-32-P8-NEXT: lwz r4, 0(r3)
1312 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
1313 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1314 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1315 ; CHECK-AIX-32-P8-NEXT: stw r4, -32(r1)
1316 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
1317 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1318 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1319 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1320 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
1321 ; CHECK-AIX-32-P8-NEXT: blr
1323 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v4i32:
1324 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1325 ; CHECK-AIX-32-P9-NEXT: lwz r4, 0(r3)
1326 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
1327 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1328 ; CHECK-AIX-32-P9-NEXT: stw r4, -32(r1)
1329 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
1330 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
1331 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1332 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
1333 ; CHECK-AIX-32-P9-NEXT: blr
1335 %0 = load <2 x i16>, ptr undef, align 8
1336 %tmp0_1 = bitcast <2 x i16> %0 to i32
1337 %tmp0_2 = insertelement <4 x i32> undef, i32 %tmp0_1, i32 0
1338 %1 = load <2 x i16>, ptr %a, align 4
1339 %tmp1_1 = bitcast <2 x i16> %1 to i32
1340 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
1341 %2 = shufflevector <4 x i32> %tmp0_2, <4 x i32> %tmp1_2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1342 store <4 x i32> %2, ptr undef, align 4
1346 define void @test_v2i64_v8i16(ptr %a) {
1347 ; CHECK-LE-P8-LABEL: test_v2i64_v8i16:
1348 ; CHECK-LE-P8: # %bb.0: # %entry
1349 ; CHECK-LE-P8-NEXT: lhz r4, 0(r3)
1350 ; CHECK-LE-P8-NEXT: lfdx f1, 0, r3
1351 ; CHECK-LE-P8-NEXT: mtfprd f0, r4
1352 ; CHECK-LE-P8-NEXT: xxswapd vs1, f1
1353 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1354 ; CHECK-LE-P8-NEXT: xxmrglw vs0, vs0, vs1
1355 ; CHECK-LE-P8-NEXT: xxswapd vs0, vs0
1356 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
1357 ; CHECK-LE-P8-NEXT: blr
1359 ; CHECK-LE-P9-LABEL: test_v2i64_v8i16:
1360 ; CHECK-LE-P9: # %bb.0: # %entry
1361 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
1362 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
1363 ; CHECK-LE-P9-NEXT: xxswapd vs0, f0
1364 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
1365 ; CHECK-LE-P9-NEXT: xxmrglw vs0, v2, vs0
1366 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
1367 ; CHECK-LE-P9-NEXT: blr
1369 ; CHECK-BE-P8-LABEL: test_v2i64_v8i16:
1370 ; CHECK-BE-P8: # %bb.0: # %entry
1371 ; CHECK-BE-P8-NEXT: lhz r4, 0(r3)
1372 ; CHECK-BE-P8-NEXT: lfdx f1, 0, r3
1373 ; CHECK-BE-P8-NEXT: sldi r4, r4, 48
1374 ; CHECK-BE-P8-NEXT: mtfprd f0, r4
1375 ; CHECK-BE-P8-NEXT: xxmrghw vs0, vs1, vs0
1376 ; CHECK-BE-P8-NEXT: stxvw4x vs0, 0, r3
1377 ; CHECK-BE-P8-NEXT: blr
1379 ; CHECK-BE-P9-LABEL: test_v2i64_v8i16:
1380 ; CHECK-BE-P9: # %bb.0: # %entry
1381 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
1382 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
1383 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
1384 ; CHECK-BE-P9-NEXT: xxmrghw vs0, vs0, v2
1385 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
1386 ; CHECK-BE-P9-NEXT: blr
1388 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v8i16:
1389 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1390 ; CHECK-AIX-64-P8-NEXT: lhz r4, 0(r3)
1391 ; CHECK-AIX-64-P8-NEXT: lfdx f1, 0, r3
1392 ; CHECK-AIX-64-P8-NEXT: sldi r4, r4, 48
1393 ; CHECK-AIX-64-P8-NEXT: mtfprd f0, r4
1394 ; CHECK-AIX-64-P8-NEXT: xxmrghw vs0, vs1, vs0
1395 ; CHECK-AIX-64-P8-NEXT: stxvw4x vs0, 0, r3
1396 ; CHECK-AIX-64-P8-NEXT: blr
1398 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v8i16:
1399 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1400 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
1401 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
1402 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
1403 ; CHECK-AIX-64-P9-NEXT: xxmrghw vs0, vs0, v2
1404 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
1405 ; CHECK-AIX-64-P9-NEXT: blr
1407 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v8i16:
1408 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1409 ; CHECK-AIX-32-P8-NEXT: lhz r4, 0(r3)
1410 ; CHECK-AIX-32-P8-NEXT: sth r4, -32(r1)
1411 ; CHECK-AIX-32-P8-NEXT: addi r4, r1, -32
1412 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
1413 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r4
1414 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1415 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1416 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
1417 ; CHECK-AIX-32-P8-NEXT: xxmrghw vs0, vs1, vs0
1418 ; CHECK-AIX-32-P8-NEXT: stxvw4x vs0, 0, r3
1419 ; CHECK-AIX-32-P8-NEXT: blr
1421 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v8i16:
1422 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1423 ; CHECK-AIX-32-P9-NEXT: lhz r4, 0(r3)
1424 ; CHECK-AIX-32-P9-NEXT: sth r4, -32(r1)
1425 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
1426 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -32(r1)
1427 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1428 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -16(r1)
1429 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
1430 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
1431 ; CHECK-AIX-32-P9-NEXT: blr
1433 %0 = load <2 x i8>, ptr undef, align 1
1434 %tmp0_1 = bitcast <2 x i8> %0 to i16
1435 %tmp0_2 = insertelement <8 x i16> undef, i16 %tmp0_1, i32 0
1436 %tmp0_3 = bitcast <8 x i16> %tmp0_2 to <4 x i32>
1437 %1 = load <2 x i16>, ptr %a, align 8
1438 %tmp1_1 = bitcast <2 x i16> %1 to i32
1439 %tmp1_2 = insertelement <4 x i32> undef, i32 %tmp1_1, i32 0
1440 %2 = shufflevector <4 x i32> %tmp1_2, <4 x i32> %tmp0_3, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1441 store <4 x i32> %2, ptr undef, align 4