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 %a0, ptr %a1, <16 x i8> %a, <8 x i16> %b, i8 %arg) {
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: lhz r3, 0(r3)
33 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI0_0@toc@l
34 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
35 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
36 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
37 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
38 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
39 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
40 ; CHECK-LE-P8-NEXT: blr
42 ; CHECK-LE-P9-LABEL: test_none_v8i16:
43 ; CHECK-LE-P9: # %bb.0: # %entry
44 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r3
45 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI0_0@toc@ha
46 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI0_0@toc@l
47 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
48 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
49 ; CHECK-LE-P9-NEXT: stxv v2, 0(r3)
50 ; CHECK-LE-P9-NEXT: blr
52 ; CHECK-BE-P8-LABEL: test_none_v8i16:
53 ; CHECK-BE-P8: # %bb.0: # %entry
54 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
55 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
56 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI0_0@toc@ha
57 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI0_0@toc@l
58 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
59 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
60 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
61 ; CHECK-BE-P8-NEXT: blr
63 ; CHECK-BE-P9-LABEL: test_none_v8i16:
64 ; CHECK-BE-P9: # %bb.0: # %entry
65 ; CHECK-BE-P9-NEXT: lxsihzx f0, 0, r3
66 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI0_0@toc@ha
67 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI0_0@toc@l
68 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
69 ; CHECK-BE-P9-NEXT: xxperm vs0, v2, vs1
70 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
71 ; CHECK-BE-P9-NEXT: blr
73 ; CHECK-AIX-64-P8-LABEL: test_none_v8i16:
74 ; CHECK-AIX-64-P8: # %bb.0: # %entry
75 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
76 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
77 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C0(r2) # %const.0
78 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
79 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
80 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
81 ; CHECK-AIX-64-P8-NEXT: blr
83 ; CHECK-AIX-64-P9-LABEL: test_none_v8i16:
84 ; CHECK-AIX-64-P9: # %bb.0: # %entry
85 ; CHECK-AIX-64-P9-NEXT: lxsihzx f0, 0, r3
86 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C0(r2) # %const.0
87 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
88 ; CHECK-AIX-64-P9-NEXT: xxperm vs0, v2, vs1
89 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
90 ; CHECK-AIX-64-P9-NEXT: blr
92 ; CHECK-AIX-32-P8-LABEL: test_none_v8i16:
93 ; CHECK-AIX-32-P8: # %bb.0: # %entry
94 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
95 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r3
96 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C0(r2) # %const.0
97 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
98 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
99 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
100 ; CHECK-AIX-32-P8-NEXT: blr
102 ; CHECK-AIX-32-P9-LABEL: test_none_v8i16:
103 ; CHECK-AIX-32-P9: # %bb.0: # %entry
104 ; CHECK-AIX-32-P9-NEXT: lxsihzx f0, 0, r3
105 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C0(r2) # %const.0
106 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
107 ; CHECK-AIX-32-P9-NEXT: xxperm vs0, v2, vs1
108 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
109 ; CHECK-AIX-32-P9-NEXT: blr
111 %load0.tmp = load <2 x i8>, ptr %a0
112 %load0.tmp1 = bitcast <2 x i8> %load0.tmp to i16
113 %load0 = insertelement <8 x i16> %b, i16 %load0.tmp1, i64 0
114 %load1.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
115 %load1 = bitcast <16 x i8> %load1.tmp to <8 x i16>
116 %shuff = shufflevector <8 x i16> %load0, <8 x i16> %load1, <8 x i32> <i32 9, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
117 store <8 x i16> %shuff, ptr undef
121 define void @test_v8i16_none(ptr %a0, ptr %a1, <16 x i8> %a, <8 x i16> %b, i8 %arg) {
122 ; CHECK-LE-P8-LABEL: test_v8i16_none:
123 ; CHECK-LE-P8: # %bb.0: # %entry
124 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI1_0@toc@ha
125 ; CHECK-LE-P8-NEXT: mtvsrd v4, r9
126 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
127 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI1_0@toc@l
128 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
129 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI1_1@toc@ha
130 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI1_1@toc@l
131 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
132 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
133 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
134 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
135 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
136 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
137 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
138 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
139 ; CHECK-LE-P8-NEXT: blr
141 ; CHECK-LE-P9-LABEL: test_v8i16_none:
142 ; CHECK-LE-P9: # %bb.0: # %entry
143 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r3
144 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI1_0@toc@ha
145 ; CHECK-LE-P9-NEXT: mtvsrwz v3, r9
146 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI1_0@toc@l
147 ; CHECK-LE-P9-NEXT: vinsertb v2, v3, 15
148 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
149 ; CHECK-LE-P9-NEXT: xxperm vs0, v2, vs1
150 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
151 ; CHECK-LE-P9-NEXT: blr
153 ; CHECK-BE-P8-LABEL: test_v8i16_none:
154 ; CHECK-BE-P8: # %bb.0: # %entry
155 ; CHECK-BE-P8-NEXT: addis r4, r2, .LCPI1_0@toc@ha
156 ; CHECK-BE-P8-NEXT: mtvsrwz v4, r9
157 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
158 ; CHECK-BE-P8-NEXT: addi r4, r4, .LCPI1_0@toc@l
159 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r4
160 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
161 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
162 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI1_1@toc@ha
163 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI1_1@toc@l
164 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
165 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
166 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
167 ; CHECK-BE-P8-NEXT: blr
169 ; CHECK-BE-P9-LABEL: test_v8i16_none:
170 ; CHECK-BE-P9: # %bb.0: # %entry
171 ; CHECK-BE-P9-NEXT: lxsihzx f0, 0, r3
172 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI1_0@toc@ha
173 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r9
174 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI1_0@toc@l
175 ; CHECK-BE-P9-NEXT: vinsertb v2, v3, 0
176 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
177 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
178 ; CHECK-BE-P9-NEXT: stxv v2, 0(r3)
179 ; CHECK-BE-P9-NEXT: blr
181 ; CHECK-AIX-64-P8-LABEL: test_v8i16_none:
182 ; CHECK-AIX-64-P8: # %bb.0: # %entry
183 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C1(r2) # %const.0
184 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v4, r5
185 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
186 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
187 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
188 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
189 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C2(r2) # %const.1
190 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
191 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
192 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
193 ; CHECK-AIX-64-P8-NEXT: blr
195 ; CHECK-AIX-64-P9-LABEL: test_v8i16_none:
196 ; CHECK-AIX-64-P9: # %bb.0: # %entry
197 ; CHECK-AIX-64-P9-NEXT: lxsihzx f0, 0, r3
198 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C1(r2) # %const.0
199 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r5
200 ; CHECK-AIX-64-P9-NEXT: vinsertb v2, v3, 0
201 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
202 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
203 ; CHECK-AIX-64-P9-NEXT: stxv v2, 0(r3)
204 ; CHECK-AIX-64-P9-NEXT: blr
206 ; CHECK-AIX-32-P8-LABEL: test_v8i16_none:
207 ; CHECK-AIX-32-P8: # %bb.0: # %entry
208 ; CHECK-AIX-32-P8-NEXT: lwz r4, L..C1(r2) # %const.0
209 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v4, r5
210 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
211 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r4
212 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
213 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r3
214 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C2(r2) # %const.1
215 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
216 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
217 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
218 ; CHECK-AIX-32-P8-NEXT: blr
220 ; CHECK-AIX-32-P9-LABEL: test_v8i16_none:
221 ; CHECK-AIX-32-P9: # %bb.0: # %entry
222 ; CHECK-AIX-32-P9-NEXT: lxsihzx f0, 0, r3
223 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C1(r2) # %const.0
224 ; CHECK-AIX-32-P9-NEXT: mtvsrwz v3, r5
225 ; CHECK-AIX-32-P9-NEXT: vinsertb v2, v3, 0
226 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
227 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
228 ; CHECK-AIX-32-P9-NEXT: stxv v2, 0(r3)
229 ; CHECK-AIX-32-P9-NEXT: blr
231 %load0.tmp = load <2 x i8>, ptr %a0
232 %load0.tmp1 = bitcast <2 x i8> %load0.tmp to i16
233 %load0 = insertelement <8 x i16> %b, i16 %load0.tmp1, i64 0
234 %load1.tmp = insertelement <16 x i8> %a, i8 %arg, i32 0
235 %load1 = bitcast <16 x i8> %load1.tmp to <8 x i16>
236 %shuff = shufflevector <8 x i16> %load0, <8 x i16> %load1, <8 x i32> <i32 0, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14>
237 store <8 x i16> %shuff, ptr undef
241 define void @test_none_v4i32(ptr %ptr, ptr %ptr2, i8 %v3) local_unnamed_addr #0 {
242 ; CHECK-LE-P8-LABEL: test_none_v4i32:
243 ; CHECK-LE-P8: # %bb.0: # %entry
244 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI2_0@toc@ha
245 ; CHECK-LE-P8-NEXT: mtvsrd v3, r5
246 ; CHECK-LE-P8-NEXT: lxsiwzx v4, 0, r3
247 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI2_0@toc@l
248 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
249 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI2_1@toc@ha
250 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI2_1@toc@l
251 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
252 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
253 ; CHECK-LE-P8-NEXT: vperm v2, v3, v3, v2
254 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
255 ; CHECK-LE-P8-NEXT: vperm v2, v2, v4, v3
256 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
257 ; CHECK-LE-P8-NEXT: stfdx f0, 0, r3
258 ; CHECK-LE-P8-NEXT: blr
260 ; CHECK-LE-P9-LABEL: test_none_v4i32:
261 ; CHECK-LE-P9: # %bb.0: # %entry
262 ; CHECK-LE-P9-NEXT: lxsiwzx v2, 0, r3
263 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
264 ; CHECK-LE-P9-NEXT: mtvsrd v3, r5
265 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
266 ; CHECK-LE-P9-NEXT: lxv vs0, 0(r3)
267 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI2_1@toc@ha
268 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI2_1@toc@l
269 ; CHECK-LE-P9-NEXT: lxv v4, 0(r3)
270 ; CHECK-LE-P9-NEXT: xxperm v3, v3, vs0
271 ; CHECK-LE-P9-NEXT: vperm v2, v3, v2, v4
272 ; CHECK-LE-P9-NEXT: xxswapd vs0, v2
273 ; CHECK-LE-P9-NEXT: stfd f0, 0(r3)
274 ; CHECK-LE-P9-NEXT: blr
276 ; CHECK-BE-P8-LABEL: test_none_v4i32:
277 ; CHECK-BE-P8: # %bb.0: # %entry
278 ; CHECK-BE-P8-NEXT: addis r4, r2, .LCPI2_0@toc@ha
279 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r5
280 ; CHECK-BE-P8-NEXT: addi r4, r4, .LCPI2_0@toc@l
281 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r4
282 ; CHECK-BE-P8-NEXT: vperm v2, v2, v2, v3
283 ; CHECK-BE-P8-NEXT: lxsiwzx v3, 0, r3
284 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI2_1@toc@ha
285 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI2_1@toc@l
286 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
287 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
288 ; CHECK-BE-P8-NEXT: stxsdx v2, 0, r3
289 ; CHECK-BE-P8-NEXT: blr
291 ; CHECK-BE-P9-LABEL: test_none_v4i32:
292 ; CHECK-BE-P9: # %bb.0: # %entry
293 ; CHECK-BE-P9-NEXT: lxsiwzx v2, 0, r3
294 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI2_0@toc@ha
295 ; CHECK-BE-P9-NEXT: mtvsrwz v3, r5
296 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI2_0@toc@l
297 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r3)
298 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI2_1@toc@ha
299 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI2_1@toc@l
300 ; CHECK-BE-P9-NEXT: lxv v4, 0(r3)
301 ; CHECK-BE-P9-NEXT: xxperm v3, v3, vs0
302 ; CHECK-BE-P9-NEXT: vperm v2, v2, v3, v4
303 ; CHECK-BE-P9-NEXT: stxsd v2, 0(r3)
304 ; CHECK-BE-P9-NEXT: blr
306 ; CHECK-AIX-64-P8-LABEL: test_none_v4i32:
307 ; CHECK-AIX-64-P8: # %bb.0: # %entry
308 ; CHECK-AIX-64-P8-NEXT: ld r4, L..C3(r2) # %const.0
309 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r5
310 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
311 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v2, v3
312 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v3, 0, r3
313 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C4(r2) # %const.1
314 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
315 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
316 ; CHECK-AIX-64-P8-NEXT: stxsdx v2, 0, r3
317 ; CHECK-AIX-64-P8-NEXT: blr
319 ; CHECK-AIX-64-P9-LABEL: test_none_v4i32:
320 ; CHECK-AIX-64-P9: # %bb.0: # %entry
321 ; CHECK-AIX-64-P9-NEXT: lxsiwzx v2, 0, r3
322 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C2(r2) # %const.0
323 ; CHECK-AIX-64-P9-NEXT: mtvsrwz v3, r5
324 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r3)
325 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C3(r2) # %const.1
326 ; CHECK-AIX-64-P9-NEXT: lxv v4, 0(r3)
327 ; CHECK-AIX-64-P9-NEXT: xxperm v3, v3, vs0
328 ; CHECK-AIX-64-P9-NEXT: vperm v2, v2, v3, v4
329 ; CHECK-AIX-64-P9-NEXT: stxsd v2, 0(r3)
330 ; CHECK-AIX-64-P9-NEXT: blr
332 ; CHECK-AIX-32-P8-LABEL: test_none_v4i32:
333 ; CHECK-AIX-32-P8: # %bb.0: # %entry
334 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
335 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
336 ; CHECK-AIX-32-P8-NEXT: stb r5, -32(r1)
337 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
338 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C3(r2) # %const.0
339 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
340 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
341 ; CHECK-AIX-32-P8-NEXT: vmrghh v3, v3, v3
342 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
343 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
344 ; CHECK-AIX-32-P8-NEXT: lwz r3, -12(r1)
345 ; CHECK-AIX-32-P8-NEXT: stw r3, 0(r3)
346 ; CHECK-AIX-32-P8-NEXT: lwz r3, -16(r1)
347 ; CHECK-AIX-32-P8-NEXT: stw r3, 0(r3)
348 ; CHECK-AIX-32-P8-NEXT: blr
350 ; CHECK-AIX-32-P9-LABEL: test_none_v4i32:
351 ; CHECK-AIX-32-P9: # %bb.0: # %entry
352 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r3
353 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C2(r2) # %const.0
354 ; CHECK-AIX-32-P9-NEXT: stb r5, -32(r1)
355 ; CHECK-AIX-32-P9-NEXT: lxv v3, -32(r1)
356 ; CHECK-AIX-32-P9-NEXT: lxv v4, 0(r3)
357 ; CHECK-AIX-32-P9-NEXT: vmrghh v3, v3, v3
358 ; CHECK-AIX-32-P9-NEXT: vperm v2, v2, v3, v4
359 ; CHECK-AIX-32-P9-NEXT: stxv v2, -16(r1)
360 ; CHECK-AIX-32-P9-NEXT: lwz r3, -12(r1)
361 ; CHECK-AIX-32-P9-NEXT: stw r3, 0(r3)
362 ; CHECK-AIX-32-P9-NEXT: lwz r3, -16(r1)
363 ; CHECK-AIX-32-P9-NEXT: stw r3, 0(r3)
364 ; CHECK-AIX-32-P9-NEXT: blr
366 %0 = load <2 x i16>, ptr %ptr, align 4
367 %tmp = insertelement <4 x i8> undef, i8 %v3, i32 0
368 %tmp0 = bitcast <4 x i8> %tmp to <2 x i16>
369 %1 = shufflevector <2 x i16> %0, <2 x i16> %tmp0, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
370 store <4 x i16> %1, ptr undef, align 4
374 define void @test_v4i32_none(ptr nocapture readonly %ptr1, ptr nocapture readonly %ptr2) {
375 ; CHECK-LE-P8-LABEL: test_v4i32_none:
376 ; CHECK-LE-P8: # %bb.0: # %entry
377 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI3_0@toc@ha
378 ; CHECK-LE-P8-NEXT: lxsiwzx v3, 0, r3
379 ; CHECK-LE-P8-NEXT: xxlxor v4, v4, v4
380 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI3_0@toc@l
381 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
382 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
383 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
384 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
385 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
386 ; CHECK-LE-P8-NEXT: blr
388 ; CHECK-LE-P9-LABEL: test_v4i32_none:
389 ; CHECK-LE-P9: # %bb.0: # %entry
390 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
391 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI3_0@toc@ha
392 ; CHECK-LE-P9-NEXT: xxlxor vs2, vs2, vs2
393 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI3_0@toc@l
394 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
395 ; CHECK-LE-P9-NEXT: xxperm vs0, vs2, vs1
396 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
397 ; CHECK-LE-P9-NEXT: blr
399 ; CHECK-BE-P8-LABEL: test_v4i32_none:
400 ; CHECK-BE-P8: # %bb.0: # %entry
401 ; CHECK-BE-P8-NEXT: lxsiwzx v2, 0, r3
402 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI3_0@toc@ha
403 ; CHECK-BE-P8-NEXT: xxlxor v4, v4, v4
404 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI3_0@toc@l
405 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
406 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
407 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
408 ; CHECK-BE-P8-NEXT: blr
410 ; CHECK-BE-P9-LABEL: test_v4i32_none:
411 ; CHECK-BE-P9: # %bb.0: # %entry
412 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
413 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI3_0@toc@ha
414 ; CHECK-BE-P9-NEXT: xxlxor vs2, vs2, vs2
415 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI3_0@toc@l
416 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
417 ; CHECK-BE-P9-NEXT: xxperm vs0, vs2, vs1
418 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
419 ; CHECK-BE-P9-NEXT: blr
421 ; CHECK-AIX-64-P8-LABEL: test_v4i32_none:
422 ; CHECK-AIX-64-P8: # %bb.0: # %entry
423 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v2, 0, r3
424 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C5(r2) # %const.0
425 ; CHECK-AIX-64-P8-NEXT: xxlxor v4, v4, v4
426 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r3
427 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
428 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
429 ; CHECK-AIX-64-P8-NEXT: blr
431 ; CHECK-AIX-64-P9-LABEL: test_v4i32_none:
432 ; CHECK-AIX-64-P9: # %bb.0: # %entry
433 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
434 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C4(r2) # %const.0
435 ; CHECK-AIX-64-P9-NEXT: xxlxor vs2, vs2, vs2
436 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
437 ; CHECK-AIX-64-P9-NEXT: xxperm vs0, vs2, vs1
438 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
439 ; CHECK-AIX-64-P9-NEXT: blr
441 ; CHECK-AIX-32-P8-LABEL: test_v4i32_none:
442 ; CHECK-AIX-32-P8: # %bb.0: # %entry
443 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
444 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C4(r2) # %const.0
445 ; CHECK-AIX-32-P8-NEXT: xxlxor v4, v4, v4
446 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
447 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
448 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
449 ; CHECK-AIX-32-P8-NEXT: blr
451 ; CHECK-AIX-32-P9-LABEL: test_v4i32_none:
452 ; CHECK-AIX-32-P9: # %bb.0: # %entry
453 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
454 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C3(r2) # %const.0
455 ; CHECK-AIX-32-P9-NEXT: xxlxor vs2, vs2, vs2
456 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
457 ; CHECK-AIX-32-P9-NEXT: xxperm vs0, vs2, vs1
458 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
459 ; CHECK-AIX-32-P9-NEXT: blr
461 %0 = load <2 x i16>, ptr %ptr1, align 1
462 %1 = load <2 x i16>, ptr %ptr2, align 1
463 %shuffle1 = shufflevector <2 x i16> %0, <2 x i16> %1, <4 x i32> <i32 1, i32 0, i32 1, i32 0>
464 %2 = zext <4 x i16> %shuffle1 to <4 x i32>
465 store <4 x i32> %2, ptr undef, align 16
469 define void @test_none_v2i64(ptr nocapture readonly %ptr1, ptr nocapture readonly %ptr2) {
470 ; CHECK-LE-P8-LABEL: test_none_v2i64:
471 ; CHECK-LE-P8: # %bb.0: # %entry
472 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
473 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI4_0@toc@ha
474 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r3
475 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI4_1@toc@ha
476 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI4_0@toc@l
477 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI4_1@toc@l
478 ; CHECK-LE-P8-NEXT: lxvd2x vs1, 0, r4
479 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
480 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
481 ; CHECK-LE-P8-NEXT: xxswapd v3, vs1
482 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
483 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
484 ; CHECK-LE-P8-NEXT: xxlxor v4, v4, v4
485 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
486 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
487 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
488 ; CHECK-LE-P8-NEXT: blr
490 ; CHECK-LE-P9-LABEL: test_none_v2i64:
491 ; CHECK-LE-P9: # %bb.0: # %entry
492 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
493 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI4_0@toc@ha
494 ; CHECK-LE-P9-NEXT: lxv v2, 0(r4)
495 ; CHECK-LE-P9-NEXT: xxlxor v4, v4, v4
496 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI4_0@toc@l
497 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
498 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI4_1@toc@ha
499 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI4_1@toc@l
500 ; CHECK-LE-P9-NEXT: lxv v3, 0(r3)
501 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
502 ; CHECK-LE-P9-NEXT: vperm v2, v4, v2, v3
503 ; CHECK-LE-P9-NEXT: stxv v2, 0(r3)
504 ; CHECK-LE-P9-NEXT: blr
506 ; CHECK-BE-P8-LABEL: test_none_v2i64:
507 ; CHECK-BE-P8: # %bb.0: # %entry
508 ; CHECK-BE-P8-NEXT: lxsdx v2, 0, r3
509 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI4_0@toc@ha
510 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r4
511 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI4_0@toc@l
512 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
513 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
514 ; CHECK-BE-P8-NEXT: xxlxor v3, v3, v3
515 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
516 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
517 ; CHECK-BE-P8-NEXT: blr
519 ; CHECK-BE-P9-LABEL: test_none_v2i64:
520 ; CHECK-BE-P9: # %bb.0: # %entry
521 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
522 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI4_0@toc@ha
523 ; CHECK-BE-P9-NEXT: lxv vs0, 0(r4)
524 ; CHECK-BE-P9-NEXT: xxlxor v3, v3, v3
525 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI4_0@toc@l
526 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
527 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
528 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
529 ; CHECK-BE-P9-NEXT: stxv v2, 0(r3)
530 ; CHECK-BE-P9-NEXT: blr
532 ; CHECK-AIX-64-P8-LABEL: test_none_v2i64:
533 ; CHECK-AIX-64-P8: # %bb.0: # %entry
534 ; CHECK-AIX-64-P8-NEXT: lxsdx v2, 0, r3
535 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C6(r2) # %const.0
536 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r4
537 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
538 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
539 ; CHECK-AIX-64-P8-NEXT: xxlxor v3, v3, v3
540 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
541 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
542 ; CHECK-AIX-64-P8-NEXT: blr
544 ; CHECK-AIX-64-P9-LABEL: test_none_v2i64:
545 ; CHECK-AIX-64-P9: # %bb.0: # %entry
546 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
547 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C5(r2) # %const.0
548 ; CHECK-AIX-64-P9-NEXT: lxv vs0, 0(r4)
549 ; CHECK-AIX-64-P9-NEXT: xxlxor v3, v3, v3
550 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
551 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
552 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
553 ; CHECK-AIX-64-P9-NEXT: stxv v2, 0(r3)
554 ; CHECK-AIX-64-P9-NEXT: blr
556 ; CHECK-AIX-32-P8-LABEL: test_none_v2i64:
557 ; CHECK-AIX-32-P8: # %bb.0: # %entry
558 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
559 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C5(r2) # %const.0
560 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r4
561 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
562 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
563 ; CHECK-AIX-32-P8-NEXT: xxlxor v3, v3, v3
564 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
565 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
566 ; CHECK-AIX-32-P8-NEXT: blr
568 ; CHECK-AIX-32-P9-LABEL: test_none_v2i64:
569 ; CHECK-AIX-32-P9: # %bb.0: # %entry
570 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r3
571 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C4(r2) # %const.0
572 ; CHECK-AIX-32-P9-NEXT: lxv vs0, 0(r4)
573 ; CHECK-AIX-32-P9-NEXT: xxlxor v3, v3, v3
574 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
575 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
576 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
577 ; CHECK-AIX-32-P9-NEXT: stxv v2, 0(r3)
578 ; CHECK-AIX-32-P9-NEXT: blr
580 %0 = load <4 x i16>, ptr %ptr1, align 1
581 %1 = load <4 x i32>, ptr %ptr2, align 1
582 %bc = trunc <4 x i32> %1 to <4 x i16>
583 %shuffle1 = shufflevector <4 x i16> %0, <4 x i16> %bc, <4 x i32> <i32 4, i32 5, i32 1, i32 0>
584 %2 = zext <4 x i16> %shuffle1 to <4 x i32>
585 store <4 x i32> %2, ptr undef, align 16
589 define void @test_v2i64_none(ptr nocapture readonly %ptr1) {
590 ; CHECK-LE-P8-LABEL: test_v2i64_none:
591 ; CHECK-LE-P8: # %bb.0: # %entry
592 ; CHECK-LE-P8-NEXT: addis r4, r2, .LCPI5_0@toc@ha
593 ; CHECK-LE-P8-NEXT: lxsdx v3, 0, r3
594 ; CHECK-LE-P8-NEXT: xxlxor v4, v4, v4
595 ; CHECK-LE-P8-NEXT: addi r4, r4, .LCPI5_0@toc@l
596 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r4
597 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
598 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
599 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
600 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
601 ; CHECK-LE-P8-NEXT: blr
603 ; CHECK-LE-P9-LABEL: test_v2i64_none:
604 ; CHECK-LE-P9: # %bb.0: # %entry
605 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
606 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
607 ; CHECK-LE-P9-NEXT: xxlxor vs2, vs2, vs2
608 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
609 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
610 ; CHECK-LE-P9-NEXT: xxperm vs0, vs2, vs1
611 ; CHECK-LE-P9-NEXT: stxv vs0, 0(r3)
612 ; CHECK-LE-P9-NEXT: blr
614 ; CHECK-BE-P8-LABEL: test_v2i64_none:
615 ; CHECK-BE-P8: # %bb.0: # %entry
616 ; CHECK-BE-P8-NEXT: lxsdx v2, 0, r3
617 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI5_0@toc@ha
618 ; CHECK-BE-P8-NEXT: xxlxor v4, v4, v4
619 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI5_0@toc@l
620 ; CHECK-BE-P8-NEXT: lxvw4x v3, 0, r3
621 ; CHECK-BE-P8-NEXT: vperm v2, v4, v2, v3
622 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
623 ; CHECK-BE-P8-NEXT: blr
625 ; CHECK-BE-P9-LABEL: test_v2i64_none:
626 ; CHECK-BE-P9: # %bb.0: # %entry
627 ; CHECK-BE-P9-NEXT: lfd f0, 0(r3)
628 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI5_0@toc@ha
629 ; CHECK-BE-P9-NEXT: xxlxor vs2, vs2, vs2
630 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI5_0@toc@l
631 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
632 ; CHECK-BE-P9-NEXT: xxperm vs0, vs2, vs1
633 ; CHECK-BE-P9-NEXT: stxv vs0, 0(r3)
634 ; CHECK-BE-P9-NEXT: blr
636 ; CHECK-AIX-64-P8-LABEL: test_v2i64_none:
637 ; CHECK-AIX-64-P8: # %bb.0: # %entry
638 ; CHECK-AIX-64-P8-NEXT: lxsdx v2, 0, r3
639 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C7(r2) # %const.0
640 ; CHECK-AIX-64-P8-NEXT: xxlxor v4, v4, v4
641 ; CHECK-AIX-64-P8-NEXT: lxvw4x v3, 0, r3
642 ; CHECK-AIX-64-P8-NEXT: vperm v2, v4, v2, v3
643 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
644 ; CHECK-AIX-64-P8-NEXT: blr
646 ; CHECK-AIX-64-P9-LABEL: test_v2i64_none:
647 ; CHECK-AIX-64-P9: # %bb.0: # %entry
648 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r3)
649 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C6(r2) # %const.0
650 ; CHECK-AIX-64-P9-NEXT: xxlxor vs2, vs2, vs2
651 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
652 ; CHECK-AIX-64-P9-NEXT: xxperm vs0, vs2, vs1
653 ; CHECK-AIX-64-P9-NEXT: stxv vs0, 0(r3)
654 ; CHECK-AIX-64-P9-NEXT: blr
656 ; CHECK-AIX-32-P8-LABEL: test_v2i64_none:
657 ; CHECK-AIX-32-P8: # %bb.0: # %entry
658 ; CHECK-AIX-32-P8-NEXT: lwz r4, 4(r3)
659 ; CHECK-AIX-32-P8-NEXT: xxlxor v4, v4, v4
660 ; CHECK-AIX-32-P8-NEXT: stw r4, -16(r1)
661 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r3)
662 ; CHECK-AIX-32-P8-NEXT: stw r3, -32(r1)
663 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
664 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs0, 0, r3
665 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
666 ; CHECK-AIX-32-P8-NEXT: lxvw4x vs1, 0, r3
667 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C6(r2) # %const.0
668 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
669 ; CHECK-AIX-32-P8-NEXT: xxmrghw v2, vs1, vs0
670 ; CHECK-AIX-32-P8-NEXT: vperm v2, v4, v2, v3
671 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
672 ; CHECK-AIX-32-P8-NEXT: blr
674 ; CHECK-AIX-32-P9-LABEL: test_v2i64_none:
675 ; CHECK-AIX-32-P9: # %bb.0: # %entry
676 ; CHECK-AIX-32-P9-NEXT: lwz r4, 4(r3)
677 ; CHECK-AIX-32-P9-NEXT: xxlxor vs2, vs2, vs2
678 ; CHECK-AIX-32-P9-NEXT: stw r4, -16(r1)
679 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r3)
680 ; CHECK-AIX-32-P9-NEXT: lxv vs0, -16(r1)
681 ; CHECK-AIX-32-P9-NEXT: stw r3, -32(r1)
682 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C5(r2) # %const.0
683 ; CHECK-AIX-32-P9-NEXT: lxv vs1, -32(r1)
684 ; CHECK-AIX-32-P9-NEXT: xxmrghw vs0, vs1, vs0
685 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
686 ; CHECK-AIX-32-P9-NEXT: xxperm vs0, vs2, vs1
687 ; CHECK-AIX-32-P9-NEXT: stxv vs0, 0(r3)
688 ; CHECK-AIX-32-P9-NEXT: blr
690 %0 = load <4 x i16>, ptr %ptr1, align 1
691 %shuffle1 = shufflevector <4 x i16> %0, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
692 %1 = zext <4 x i16> %shuffle1 to <4 x i32>
693 store <4 x i32> %1, ptr undef, align 16
697 define <16 x i8> @test_v8i16_v8i16(ptr %a, ptr %b) {
698 ; CHECK-LE-P8-LABEL: test_v8i16_v8i16:
699 ; CHECK-LE-P8: # %bb.0: # %entry
700 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI6_0@toc@ha
701 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
702 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI6_0@toc@l
703 ; CHECK-LE-P8-NEXT: mtvsrd v3, r3
704 ; CHECK-LE-P8-NEXT: lhz r3, 0(r4)
705 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
706 ; CHECK-LE-P8-NEXT: mtvsrd v4, r3
707 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
708 ; CHECK-LE-P8-NEXT: vperm v2, v4, v3, v2
709 ; CHECK-LE-P8-NEXT: blr
711 ; CHECK-LE-P9-LABEL: test_v8i16_v8i16:
712 ; CHECK-LE-P9: # %bb.0: # %entry
713 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
714 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI6_0@toc@ha
715 ; CHECK-LE-P9-NEXT: lxsihzx f0, 0, r4
716 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI6_0@toc@l
717 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
718 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
719 ; CHECK-LE-P9-NEXT: blr
721 ; CHECK-BE-P8-LABEL: test_v8i16_v8i16:
722 ; CHECK-BE-P8: # %bb.0: # %entry
723 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
724 ; CHECK-BE-P8-NEXT: mtvsrwz v2, r3
725 ; CHECK-BE-P8-NEXT: lhz r3, 0(r4)
726 ; CHECK-BE-P8-NEXT: mtvsrwz v3, r3
727 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI6_0@toc@ha
728 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI6_0@toc@l
729 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
730 ; CHECK-BE-P8-NEXT: vperm v2, v2, v3, v4
731 ; CHECK-BE-P8-NEXT: blr
733 ; CHECK-BE-P9-LABEL: test_v8i16_v8i16:
734 ; CHECK-BE-P9: # %bb.0: # %entry
735 ; CHECK-BE-P9-NEXT: lxsihzx f0, 0, r3
736 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI6_0@toc@ha
737 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r4
738 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI6_0@toc@l
739 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
740 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
741 ; CHECK-BE-P9-NEXT: blr
743 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v8i16:
744 ; CHECK-AIX-64-P8: # %bb.0: # %entry
745 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
746 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v2, r3
747 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r4)
748 ; CHECK-AIX-64-P8-NEXT: mtvsrwz v3, r3
749 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C8(r2) # %const.0
750 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
751 ; CHECK-AIX-64-P8-NEXT: vperm v2, v2, v3, v4
752 ; CHECK-AIX-64-P8-NEXT: blr
754 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v8i16:
755 ; CHECK-AIX-64-P9: # %bb.0: # %entry
756 ; CHECK-AIX-64-P9-NEXT: lxsihzx f0, 0, r3
757 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C7(r2) # %const.0
758 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r4
759 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
760 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
761 ; CHECK-AIX-64-P9-NEXT: blr
763 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v8i16:
764 ; CHECK-AIX-32-P8: # %bb.0: # %entry
765 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
766 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v2, r3
767 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r4)
768 ; CHECK-AIX-32-P8-NEXT: mtvsrwz v3, r3
769 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C7(r2) # %const.0
770 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
771 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
772 ; CHECK-AIX-32-P8-NEXT: blr
774 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v8i16:
775 ; CHECK-AIX-32-P9: # %bb.0: # %entry
776 ; CHECK-AIX-32-P9-NEXT: lxsihzx f0, 0, r3
777 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C6(r2) # %const.0
778 ; CHECK-AIX-32-P9-NEXT: lxsihzx v2, 0, r4
779 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
780 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
781 ; CHECK-AIX-32-P9-NEXT: blr
783 %load1 = load <2 x i8>, ptr %a
784 %load2 = load <2 x i8>, ptr %b
785 %shuffle1 = shufflevector <2 x i8> %load1, <2 x i8> %load2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
786 %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>
787 ret <16 x i8> %shuffle2
790 define <16 x i8> @test_v8i16_v4i32(ptr %a, ptr %b) local_unnamed_addr {
791 ; CHECK-LE-P8-LABEL: test_v8i16_v4i32:
792 ; CHECK-LE-P8: # %bb.0: # %entry
793 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
794 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
795 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
796 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r4
797 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
798 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
799 ; CHECK-LE-P8-NEXT: blr
801 ; CHECK-LE-P9-LABEL: test_v8i16_v4i32:
802 ; CHECK-LE-P9: # %bb.0: # %entry
803 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
804 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r4
805 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
806 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
807 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
808 ; CHECK-LE-P9-NEXT: blr
810 ; CHECK-BE-P8-LABEL: test_v8i16_v4i32:
811 ; CHECK-BE-P8: # %bb.0: # %entry
812 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
813 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r4
814 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
815 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
816 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
817 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
818 ; CHECK-BE-P8-NEXT: blr
820 ; CHECK-BE-P9-LABEL: test_v8i16_v4i32:
821 ; CHECK-BE-P9: # %bb.0: # %entry
822 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
823 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r4
824 ; CHECK-BE-P9-NEXT: xxsldwi v3, f0, f0, 1
825 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
826 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
827 ; CHECK-BE-P9-NEXT: blr
829 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v4i32:
830 ; CHECK-AIX-64-P8: # %bb.0: # %entry
831 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
832 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r4
833 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
834 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
835 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
836 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
837 ; CHECK-AIX-64-P8-NEXT: blr
839 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v4i32:
840 ; CHECK-AIX-64-P9: # %bb.0: # %entry
841 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
842 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r4
843 ; CHECK-AIX-64-P9-NEXT: xxsldwi v3, f0, f0, 1
844 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
845 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
846 ; CHECK-AIX-64-P9-NEXT: blr
848 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v4i32:
849 ; CHECK-AIX-32-P8: # %bb.0: # %entry
850 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
851 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
852 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
853 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
854 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
855 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
856 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
857 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
858 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
859 ; CHECK-AIX-32-P8-NEXT: blr
861 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v4i32:
862 ; CHECK-AIX-32-P9: # %bb.0: # %entry
863 ; CHECK-AIX-32-P9-NEXT: lhz r3, 0(r3)
864 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
865 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
866 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
867 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
868 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
869 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
870 ; CHECK-AIX-32-P9-NEXT: blr
872 %0 = load <2 x i8>, ptr %a
873 %bc1 = bitcast <2 x i8> %0 to i16
874 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
875 %1 = load <2 x i8>, ptr %b, align 4
876 %bc2 = bitcast <2 x i8> %1 to i16
877 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
878 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
879 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
880 %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>
881 ret <16 x i8> %shuffle
884 define <16 x i8> @test_v8i16_v2i64(ptr %a, ptr %b) local_unnamed_addr {
885 ; CHECK-LE-P8-LABEL: test_v8i16_v2i64:
886 ; CHECK-LE-P8: # %bb.0: # %entry
887 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
888 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
889 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
890 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
891 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
892 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
893 ; CHECK-LE-P8-NEXT: blr
895 ; CHECK-LE-P9-LABEL: test_v8i16_v2i64:
896 ; CHECK-LE-P9: # %bb.0: # %entry
897 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
898 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
899 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
900 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
901 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
902 ; CHECK-LE-P9-NEXT: blr
904 ; CHECK-BE-P8-LABEL: test_v8i16_v2i64:
905 ; CHECK-BE-P8: # %bb.0: # %entry
906 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
907 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
908 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
909 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
910 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
911 ; CHECK-BE-P8-NEXT: blr
913 ; CHECK-BE-P9-LABEL: test_v8i16_v2i64:
914 ; CHECK-BE-P9: # %bb.0: # %entry
915 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
916 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
917 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
918 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
919 ; CHECK-BE-P9-NEXT: blr
921 ; CHECK-AIX-64-P8-LABEL: test_v8i16_v2i64:
922 ; CHECK-AIX-64-P8: # %bb.0: # %entry
923 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
924 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
925 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
926 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
927 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
928 ; CHECK-AIX-64-P8-NEXT: blr
930 ; CHECK-AIX-64-P9-LABEL: test_v8i16_v2i64:
931 ; CHECK-AIX-64-P9: # %bb.0: # %entry
932 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
933 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
934 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
935 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
936 ; CHECK-AIX-64-P9-NEXT: blr
938 ; CHECK-AIX-32-P8-LABEL: test_v8i16_v2i64:
939 ; CHECK-AIX-32-P8: # %bb.0: # %entry
940 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
941 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
942 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
943 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
944 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
945 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
946 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
947 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
948 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v2, v3
949 ; CHECK-AIX-32-P8-NEXT: blr
951 ; CHECK-AIX-32-P9-LABEL: test_v8i16_v2i64:
952 ; CHECK-AIX-32-P9: # %bb.0: # %entry
953 ; CHECK-AIX-32-P9-NEXT: lhz r3, 0(r3)
954 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
955 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
956 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
957 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
958 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
959 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v2, v3
960 ; CHECK-AIX-32-P9-NEXT: blr
962 %0 = load <2 x i8>, ptr %a
963 %bc1 = bitcast <2 x i8> %0 to i16
964 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
965 %1 = load <2 x i8>, ptr %b, align 8
966 %bc2 = bitcast <2 x i8> %1 to i16
967 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
968 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
969 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
970 %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>
971 ret <16 x i8> %shuffle
974 define void @test_v4i32_v4i32(ptr nocapture readonly %ptr1, ptr nocapture readonly %ptr2) {
975 ; CHECK-LE-P8-LABEL: test_v4i32_v4i32:
976 ; CHECK-LE-P8: # %bb.0: # %entry
977 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI9_0@toc@ha
978 ; CHECK-LE-P8-NEXT: lxsiwzx v3, 0, r3
979 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI9_1@toc@ha
980 ; CHECK-LE-P8-NEXT: lxsiwzx v4, 0, r4
981 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI9_0@toc@l
982 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI9_1@toc@l
983 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
984 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
985 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
986 ; CHECK-LE-P8-NEXT: vperm v2, v3, v4, v2
987 ; CHECK-LE-P8-NEXT: xxlxor v4, v4, v4
988 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
989 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
990 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
991 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
992 ; CHECK-LE-P8-NEXT: blr
994 ; CHECK-LE-P9-LABEL: test_v4i32_v4i32:
995 ; CHECK-LE-P9: # %bb.0: # %entry
996 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
997 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI9_0@toc@ha
998 ; CHECK-LE-P9-NEXT: lxsiwzx v2, 0, r4
999 ; CHECK-LE-P9-NEXT: xxlxor v4, v4, v4
1000 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI9_0@toc@l
1001 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1002 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI9_1@toc@ha
1003 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI9_1@toc@l
1004 ; CHECK-LE-P9-NEXT: lxv v3, 0(r3)
1005 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1006 ; CHECK-LE-P9-NEXT: vperm v2, v4, v2, v3
1007 ; CHECK-LE-P9-NEXT: stxv v2, 0(r3)
1008 ; CHECK-LE-P9-NEXT: blr
1010 ; CHECK-BE-P8-LABEL: test_v4i32_v4i32:
1011 ; CHECK-BE-P8: # %bb.0: # %entry
1012 ; CHECK-BE-P8-NEXT: lxsiwzx v2, 0, r3
1013 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI9_0@toc@ha
1014 ; CHECK-BE-P8-NEXT: lxsiwzx v3, 0, r4
1015 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI9_0@toc@l
1016 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
1017 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
1018 ; CHECK-BE-P8-NEXT: xxlxor v3, v3, v3
1019 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1020 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
1021 ; CHECK-BE-P8-NEXT: blr
1023 ; CHECK-BE-P9-LABEL: test_v4i32_v4i32:
1024 ; CHECK-BE-P9: # %bb.0: # %entry
1025 ; CHECK-BE-P9-NEXT: lxsiwzx v2, 0, r3
1026 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI9_0@toc@ha
1027 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r4
1028 ; CHECK-BE-P9-NEXT: xxlxor v3, v3, v3
1029 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI9_0@toc@l
1030 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
1031 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
1032 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1033 ; CHECK-BE-P9-NEXT: stxv v2, 0(r3)
1034 ; CHECK-BE-P9-NEXT: blr
1036 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v4i32:
1037 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1038 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v2, 0, r3
1039 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C9(r2) # %const.0
1040 ; CHECK-AIX-64-P8-NEXT: lxsiwzx v3, 0, r4
1041 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
1042 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
1043 ; CHECK-AIX-64-P8-NEXT: xxlxor v3, v3, v3
1044 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1045 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
1046 ; CHECK-AIX-64-P8-NEXT: blr
1048 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v4i32:
1049 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1050 ; CHECK-AIX-64-P9-NEXT: lxsiwzx v2, 0, r3
1051 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C8(r2) # %const.0
1052 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r4
1053 ; CHECK-AIX-64-P9-NEXT: xxlxor v3, v3, v3
1054 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
1055 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
1056 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1057 ; CHECK-AIX-64-P9-NEXT: stxv v2, 0(r3)
1058 ; CHECK-AIX-64-P9-NEXT: blr
1060 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v4i32:
1061 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1062 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
1063 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C8(r2) # %const.0
1064 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1065 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1066 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
1067 ; CHECK-AIX-32-P8-NEXT: xxlxor v3, v3, v3
1068 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1069 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
1070 ; CHECK-AIX-32-P8-NEXT: blr
1072 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v4i32:
1073 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1074 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r3
1075 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C7(r2) # %const.0
1076 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r4
1077 ; CHECK-AIX-32-P9-NEXT: xxlxor v3, v3, v3
1078 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1079 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1080 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1081 ; CHECK-AIX-32-P9-NEXT: stxv v2, 0(r3)
1082 ; CHECK-AIX-32-P9-NEXT: blr
1084 %0 = load <2 x i16>, ptr %ptr1, align 1
1085 %1 = load <2 x i16>, ptr %ptr2, align 1
1086 %shuffle1 = shufflevector <2 x i16> %0, <2 x i16> %1, <4 x i32> <i32 2, i32 3, i32 1, i32 0>
1087 %2 = zext <4 x i16> %shuffle1 to <4 x i32>
1088 store <4 x i32> %2, ptr undef, align 16
1092 define <16 x i8> @test_v4i32_v8i16(ptr %a, ptr %b) local_unnamed_addr {
1093 ; CHECK-LE-P8-LABEL: test_v4i32_v8i16:
1094 ; CHECK-LE-P8: # %bb.0: # %entry
1095 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
1096 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1097 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1098 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r4
1099 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1100 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
1101 ; CHECK-LE-P8-NEXT: blr
1103 ; CHECK-LE-P9-LABEL: test_v4i32_v8i16:
1104 ; CHECK-LE-P9: # %bb.0: # %entry
1105 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
1106 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r4
1107 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
1108 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
1109 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
1110 ; CHECK-LE-P9-NEXT: blr
1112 ; CHECK-BE-P8-LABEL: test_v4i32_v8i16:
1113 ; CHECK-BE-P8: # %bb.0: # %entry
1114 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
1115 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r4
1116 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
1117 ; CHECK-BE-P8-NEXT: mtvsrd v3, r3
1118 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
1119 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1120 ; CHECK-BE-P8-NEXT: blr
1122 ; CHECK-BE-P9-LABEL: test_v4i32_v8i16:
1123 ; CHECK-BE-P9: # %bb.0: # %entry
1124 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
1125 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r4
1126 ; CHECK-BE-P9-NEXT: xxsldwi v3, f0, f0, 1
1127 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
1128 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1129 ; CHECK-BE-P9-NEXT: blr
1131 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v8i16:
1132 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1133 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
1134 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r4
1135 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1136 ; CHECK-AIX-64-P8-NEXT: mtvsrd v3, r3
1137 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
1138 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1139 ; CHECK-AIX-64-P8-NEXT: blr
1141 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v8i16:
1142 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1143 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
1144 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r4
1145 ; CHECK-AIX-64-P9-NEXT: xxsldwi v3, f0, f0, 1
1146 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
1147 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1148 ; CHECK-AIX-64-P9-NEXT: blr
1150 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v8i16:
1151 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1152 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
1153 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
1154 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1155 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1156 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
1157 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1158 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1159 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1160 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1161 ; CHECK-AIX-32-P8-NEXT: blr
1163 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v8i16:
1164 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1165 ; CHECK-AIX-32-P9-NEXT: lhz r3, 0(r3)
1166 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
1167 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
1168 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
1169 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1170 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
1171 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1172 ; CHECK-AIX-32-P9-NEXT: blr
1174 %0 = load <2 x i8>, ptr %a
1175 %bc1 = bitcast <2 x i8> %0 to i16
1176 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
1177 %1 = load <2 x i8>, ptr %b, align 4
1178 %bc2 = bitcast <2 x i8> %1 to i16
1179 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1180 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
1181 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1182 %shuffle = shufflevector <16 x i8> %3, <16 x i8> %2, <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>
1183 ret <16 x i8> %shuffle
1186 define <16 x i8> @test_v4i32_v2i64(ptr %a, ptr %b) local_unnamed_addr {
1187 ; CHECK-LE-P8-LABEL: test_v4i32_v2i64:
1188 ; CHECK-LE-P8: # %bb.0: # %entry
1189 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r3
1190 ; CHECK-LE-P8-NEXT: xxswapd v2, f0
1191 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
1192 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1193 ; CHECK-LE-P8-NEXT: vmrglh v2, v3, v2
1194 ; CHECK-LE-P8-NEXT: blr
1196 ; CHECK-LE-P9-LABEL: test_v4i32_v2i64:
1197 ; CHECK-LE-P9: # %bb.0: # %entry
1198 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
1199 ; CHECK-LE-P9-NEXT: xxswapd v2, f0
1200 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1201 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
1202 ; CHECK-LE-P9-NEXT: vmrglh v2, v3, v2
1203 ; CHECK-LE-P9-NEXT: blr
1205 ; CHECK-BE-P8-LABEL: test_v4i32_v2i64:
1206 ; CHECK-BE-P8: # %bb.0: # %entry
1207 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
1208 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1209 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
1210 ; CHECK-BE-P8-NEXT: vmrghh v2, v2, v3
1211 ; CHECK-BE-P8-NEXT: blr
1213 ; CHECK-BE-P9-LABEL: test_v4i32_v2i64:
1214 ; CHECK-BE-P9: # %bb.0: # %entry
1215 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
1216 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1217 ; CHECK-BE-P9-NEXT: xxsldwi v2, f0, f0, 1
1218 ; CHECK-BE-P9-NEXT: vmrghh v2, v2, v3
1219 ; CHECK-BE-P9-NEXT: blr
1221 ; CHECK-AIX-64-P8-LABEL: test_v4i32_v2i64:
1222 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1223 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
1224 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1225 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
1226 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v2, v3
1227 ; CHECK-AIX-64-P8-NEXT: blr
1229 ; CHECK-AIX-64-P9-LABEL: test_v4i32_v2i64:
1230 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1231 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
1232 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1233 ; CHECK-AIX-64-P9-NEXT: xxsldwi v2, f0, f0, 1
1234 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v2, v3
1235 ; CHECK-AIX-64-P9-NEXT: blr
1237 ; CHECK-AIX-32-P8-LABEL: test_v4i32_v2i64:
1238 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1239 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
1240 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C9(r2) # %const.0
1241 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1242 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1243 ; CHECK-AIX-32-P8-NEXT: vperm v2, v2, v3, v4
1244 ; CHECK-AIX-32-P8-NEXT: blr
1246 ; CHECK-AIX-32-P9-LABEL: test_v4i32_v2i64:
1247 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1248 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r3
1249 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C8(r2) # %const.0
1250 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r4
1251 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1252 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1253 ; CHECK-AIX-32-P9-NEXT: blr
1255 %0 = load <2 x i8>, ptr %a, align 4
1256 %bc1 = bitcast <2 x i8> %0 to i16
1257 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
1258 %1 = load <2 x i8>, ptr %b, align 8
1259 %bc2 = bitcast <2 x i8> %1 to i16
1260 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1261 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
1262 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1263 %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>
1264 ret <16 x i8> %shuffle
1267 define void @test_v2i64_v2i64(ptr nocapture readonly %ptr1, ptr nocapture readonly %ptr2) {
1268 ; CHECK-LE-P8-LABEL: test_v2i64_v2i64:
1269 ; CHECK-LE-P8: # %bb.0: # %entry
1270 ; CHECK-LE-P8-NEXT: addis r5, r2, .LCPI12_0@toc@ha
1271 ; CHECK-LE-P8-NEXT: lxsdx v3, 0, r3
1272 ; CHECK-LE-P8-NEXT: addis r3, r2, .LCPI12_1@toc@ha
1273 ; CHECK-LE-P8-NEXT: lxsdx v4, 0, r4
1274 ; CHECK-LE-P8-NEXT: addi r5, r5, .LCPI12_0@toc@l
1275 ; CHECK-LE-P8-NEXT: addi r3, r3, .LCPI12_1@toc@l
1276 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r5
1277 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1278 ; CHECK-LE-P8-NEXT: lxvd2x vs0, 0, r3
1279 ; CHECK-LE-P8-NEXT: vperm v2, v3, v4, v2
1280 ; CHECK-LE-P8-NEXT: xxlxor v4, v4, v4
1281 ; CHECK-LE-P8-NEXT: xxswapd v3, vs0
1282 ; CHECK-LE-P8-NEXT: vperm v2, v4, v2, v3
1283 ; CHECK-LE-P8-NEXT: xxswapd vs0, v2
1284 ; CHECK-LE-P8-NEXT: stxvd2x vs0, 0, r3
1285 ; CHECK-LE-P8-NEXT: blr
1287 ; CHECK-LE-P9-LABEL: test_v2i64_v2i64:
1288 ; CHECK-LE-P9: # %bb.0: # %entry
1289 ; CHECK-LE-P9-NEXT: lfd f0, 0(r3)
1290 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI12_0@toc@ha
1291 ; CHECK-LE-P9-NEXT: lxsd v2, 0(r4)
1292 ; CHECK-LE-P9-NEXT: xxlxor v4, v4, v4
1293 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI12_0@toc@l
1294 ; CHECK-LE-P9-NEXT: lxv vs1, 0(r3)
1295 ; CHECK-LE-P9-NEXT: addis r3, r2, .LCPI12_1@toc@ha
1296 ; CHECK-LE-P9-NEXT: addi r3, r3, .LCPI12_1@toc@l
1297 ; CHECK-LE-P9-NEXT: lxv v3, 0(r3)
1298 ; CHECK-LE-P9-NEXT: xxperm v2, vs0, vs1
1299 ; CHECK-LE-P9-NEXT: vperm v2, v4, v2, v3
1300 ; CHECK-LE-P9-NEXT: stxv v2, 0(r3)
1301 ; CHECK-LE-P9-NEXT: blr
1303 ; CHECK-BE-P8-LABEL: test_v2i64_v2i64:
1304 ; CHECK-BE-P8: # %bb.0: # %entry
1305 ; CHECK-BE-P8-NEXT: lxsdx v2, 0, r3
1306 ; CHECK-BE-P8-NEXT: addis r3, r2, .LCPI12_0@toc@ha
1307 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1308 ; CHECK-BE-P8-NEXT: addi r3, r3, .LCPI12_0@toc@l
1309 ; CHECK-BE-P8-NEXT: lxvw4x v4, 0, r3
1310 ; CHECK-BE-P8-NEXT: vperm v2, v3, v2, v4
1311 ; CHECK-BE-P8-NEXT: xxlxor v3, v3, v3
1312 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1313 ; CHECK-BE-P8-NEXT: stxvw4x v2, 0, r3
1314 ; CHECK-BE-P8-NEXT: blr
1316 ; CHECK-BE-P9-LABEL: test_v2i64_v2i64:
1317 ; CHECK-BE-P9: # %bb.0: # %entry
1318 ; CHECK-BE-P9-NEXT: lxsd v2, 0(r3)
1319 ; CHECK-BE-P9-NEXT: addis r3, r2, .LCPI12_0@toc@ha
1320 ; CHECK-BE-P9-NEXT: lfd f0, 0(r4)
1321 ; CHECK-BE-P9-NEXT: xxlxor v3, v3, v3
1322 ; CHECK-BE-P9-NEXT: addi r3, r3, .LCPI12_0@toc@l
1323 ; CHECK-BE-P9-NEXT: lxv vs1, 0(r3)
1324 ; CHECK-BE-P9-NEXT: xxperm v2, vs0, vs1
1325 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1326 ; CHECK-BE-P9-NEXT: stxv v2, 0(r3)
1327 ; CHECK-BE-P9-NEXT: blr
1329 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v2i64:
1330 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1331 ; CHECK-AIX-64-P8-NEXT: lxsdx v2, 0, r3
1332 ; CHECK-AIX-64-P8-NEXT: ld r3, L..C10(r2) # %const.0
1333 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1334 ; CHECK-AIX-64-P8-NEXT: lxvw4x v4, 0, r3
1335 ; CHECK-AIX-64-P8-NEXT: vperm v2, v3, v2, v4
1336 ; CHECK-AIX-64-P8-NEXT: xxlxor v3, v3, v3
1337 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1338 ; CHECK-AIX-64-P8-NEXT: stxvw4x v2, 0, r3
1339 ; CHECK-AIX-64-P8-NEXT: blr
1341 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v2i64:
1342 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1343 ; CHECK-AIX-64-P9-NEXT: lxsd v2, 0(r3)
1344 ; CHECK-AIX-64-P9-NEXT: ld r3, L..C9(r2) # %const.0
1345 ; CHECK-AIX-64-P9-NEXT: lfd f0, 0(r4)
1346 ; CHECK-AIX-64-P9-NEXT: xxlxor v3, v3, v3
1347 ; CHECK-AIX-64-P9-NEXT: lxv vs1, 0(r3)
1348 ; CHECK-AIX-64-P9-NEXT: xxperm v2, vs0, vs1
1349 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1350 ; CHECK-AIX-64-P9-NEXT: stxv v2, 0(r3)
1351 ; CHECK-AIX-64-P9-NEXT: blr
1353 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v2i64:
1354 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1355 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
1356 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C10(r2) # %const.0
1357 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1358 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1359 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
1360 ; CHECK-AIX-32-P8-NEXT: xxlxor v3, v3, v3
1361 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1362 ; CHECK-AIX-32-P8-NEXT: stxvw4x v2, 0, r3
1363 ; CHECK-AIX-32-P8-NEXT: blr
1365 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v2i64:
1366 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1367 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r3
1368 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C9(r2) # %const.0
1369 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r4
1370 ; CHECK-AIX-32-P9-NEXT: xxlxor v3, v3, v3
1371 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1372 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1373 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1374 ; CHECK-AIX-32-P9-NEXT: stxv v2, 0(r3)
1375 ; CHECK-AIX-32-P9-NEXT: blr
1377 %0 = load <4 x i16>, ptr %ptr1, align 1
1378 %1 = load <4 x i16>, ptr %ptr2, align 1
1379 %shuffle1 = shufflevector <4 x i16> %0, <4 x i16> %1, <4 x i32> <i32 4, i32 5, i32 1, i32 0>
1380 %2 = zext <4 x i16> %shuffle1 to <4 x i32>
1381 store <4 x i32> %2, ptr undef, align 16
1385 define <16 x i8> @test_v2i64_v4i32(ptr %a, ptr %b) local_unnamed_addr {
1386 ; CHECK-LE-P8-LABEL: test_v2i64_v4i32:
1387 ; CHECK-LE-P8: # %bb.0: # %entry
1388 ; CHECK-LE-P8-NEXT: lfiwzx f0, 0, r3
1389 ; CHECK-LE-P8-NEXT: xxswapd v2, f0
1390 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
1391 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1392 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
1393 ; CHECK-LE-P8-NEXT: blr
1395 ; CHECK-LE-P9-LABEL: test_v2i64_v4i32:
1396 ; CHECK-LE-P9: # %bb.0: # %entry
1397 ; CHECK-LE-P9-NEXT: lfiwzx f0, 0, r3
1398 ; CHECK-LE-P9-NEXT: xxswapd v2, f0
1399 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1400 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
1401 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
1402 ; CHECK-LE-P9-NEXT: blr
1404 ; CHECK-BE-P8-LABEL: test_v2i64_v4i32:
1405 ; CHECK-BE-P8: # %bb.0: # %entry
1406 ; CHECK-BE-P8-NEXT: lfiwzx f0, 0, r3
1407 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1408 ; CHECK-BE-P8-NEXT: xxsldwi v2, f0, f0, 1
1409 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1410 ; CHECK-BE-P8-NEXT: blr
1412 ; CHECK-BE-P9-LABEL: test_v2i64_v4i32:
1413 ; CHECK-BE-P9: # %bb.0: # %entry
1414 ; CHECK-BE-P9-NEXT: lfiwzx f0, 0, r3
1415 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1416 ; CHECK-BE-P9-NEXT: xxsldwi v2, f0, f0, 1
1417 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1418 ; CHECK-BE-P9-NEXT: blr
1420 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v4i32:
1421 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1422 ; CHECK-AIX-64-P8-NEXT: lfiwzx f0, 0, r3
1423 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1424 ; CHECK-AIX-64-P8-NEXT: xxsldwi v2, f0, f0, 1
1425 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1426 ; CHECK-AIX-64-P8-NEXT: blr
1428 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v4i32:
1429 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1430 ; CHECK-AIX-64-P9-NEXT: lfiwzx f0, 0, r3
1431 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1432 ; CHECK-AIX-64-P9-NEXT: xxsldwi v2, f0, f0, 1
1433 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1434 ; CHECK-AIX-64-P9-NEXT: blr
1436 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v4i32:
1437 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1438 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v2, 0, r3
1439 ; CHECK-AIX-32-P8-NEXT: lwz r3, L..C11(r2) # %const.0
1440 ; CHECK-AIX-32-P8-NEXT: lxsiwzx v3, 0, r4
1441 ; CHECK-AIX-32-P8-NEXT: lxvw4x v4, 0, r3
1442 ; CHECK-AIX-32-P8-NEXT: vperm v2, v3, v2, v4
1443 ; CHECK-AIX-32-P8-NEXT: blr
1445 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v4i32:
1446 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1447 ; CHECK-AIX-32-P9-NEXT: lxsiwzx v2, 0, r3
1448 ; CHECK-AIX-32-P9-NEXT: lwz r3, L..C10(r2) # %const.0
1449 ; CHECK-AIX-32-P9-NEXT: lfiwzx f0, 0, r4
1450 ; CHECK-AIX-32-P9-NEXT: lxv vs1, 0(r3)
1451 ; CHECK-AIX-32-P9-NEXT: xxperm v2, vs0, vs1
1452 ; CHECK-AIX-32-P9-NEXT: blr
1454 %0 = load <2 x i8>, ptr %a, align 4
1455 %bc1 = bitcast <2 x i8> %0 to i16
1456 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
1457 %1 = load <2 x i8>, ptr %b, align 8
1458 %bc2 = bitcast <2 x i8> %1 to i16
1459 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1460 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
1461 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1462 %shuffle = shufflevector <16 x i8> %3, <16 x i8> %2, <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>
1463 ret <16 x i8> %shuffle
1466 define <16 x i8> @test_v2i64_v8i16(ptr %a, ptr %b) local_unnamed_addr {
1467 ; CHECK-LE-P8-LABEL: test_v2i64_v8i16:
1468 ; CHECK-LE-P8: # %bb.0: # %entry
1469 ; CHECK-LE-P8-NEXT: lhz r3, 0(r3)
1470 ; CHECK-LE-P8-NEXT: mtfprd f0, r3
1471 ; CHECK-LE-P8-NEXT: xxswapd v2, vs0
1472 ; CHECK-LE-P8-NEXT: lfdx f0, 0, r4
1473 ; CHECK-LE-P8-NEXT: xxswapd v3, f0
1474 ; CHECK-LE-P8-NEXT: vmrglh v2, v2, v3
1475 ; CHECK-LE-P8-NEXT: blr
1477 ; CHECK-LE-P9-LABEL: test_v2i64_v8i16:
1478 ; CHECK-LE-P9: # %bb.0: # %entry
1479 ; CHECK-LE-P9-NEXT: lxsihzx v2, 0, r3
1480 ; CHECK-LE-P9-NEXT: lfd f0, 0(r4)
1481 ; CHECK-LE-P9-NEXT: xxswapd v3, f0
1482 ; CHECK-LE-P9-NEXT: vsplth v2, v2, 3
1483 ; CHECK-LE-P9-NEXT: vmrglh v2, v2, v3
1484 ; CHECK-LE-P9-NEXT: blr
1486 ; CHECK-BE-P8-LABEL: test_v2i64_v8i16:
1487 ; CHECK-BE-P8: # %bb.0: # %entry
1488 ; CHECK-BE-P8-NEXT: lhz r3, 0(r3)
1489 ; CHECK-BE-P8-NEXT: lxsdx v3, 0, r4
1490 ; CHECK-BE-P8-NEXT: sldi r3, r3, 48
1491 ; CHECK-BE-P8-NEXT: mtvsrd v2, r3
1492 ; CHECK-BE-P8-NEXT: vmrghh v2, v3, v2
1493 ; CHECK-BE-P8-NEXT: blr
1495 ; CHECK-BE-P9-LABEL: test_v2i64_v8i16:
1496 ; CHECK-BE-P9: # %bb.0: # %entry
1497 ; CHECK-BE-P9-NEXT: lxsihzx v2, 0, r3
1498 ; CHECK-BE-P9-NEXT: lxsd v3, 0(r4)
1499 ; CHECK-BE-P9-NEXT: vsplth v2, v2, 3
1500 ; CHECK-BE-P9-NEXT: vmrghh v2, v3, v2
1501 ; CHECK-BE-P9-NEXT: blr
1503 ; CHECK-AIX-64-P8-LABEL: test_v2i64_v8i16:
1504 ; CHECK-AIX-64-P8: # %bb.0: # %entry
1505 ; CHECK-AIX-64-P8-NEXT: lhz r3, 0(r3)
1506 ; CHECK-AIX-64-P8-NEXT: lxsdx v3, 0, r4
1507 ; CHECK-AIX-64-P8-NEXT: sldi r3, r3, 48
1508 ; CHECK-AIX-64-P8-NEXT: mtvsrd v2, r3
1509 ; CHECK-AIX-64-P8-NEXT: vmrghh v2, v3, v2
1510 ; CHECK-AIX-64-P8-NEXT: blr
1512 ; CHECK-AIX-64-P9-LABEL: test_v2i64_v8i16:
1513 ; CHECK-AIX-64-P9: # %bb.0: # %entry
1514 ; CHECK-AIX-64-P9-NEXT: lxsihzx v2, 0, r3
1515 ; CHECK-AIX-64-P9-NEXT: lxsd v3, 0(r4)
1516 ; CHECK-AIX-64-P9-NEXT: vsplth v2, v2, 3
1517 ; CHECK-AIX-64-P9-NEXT: vmrghh v2, v3, v2
1518 ; CHECK-AIX-64-P9-NEXT: blr
1520 ; CHECK-AIX-32-P8-LABEL: test_v2i64_v8i16:
1521 ; CHECK-AIX-32-P8: # %bb.0: # %entry
1522 ; CHECK-AIX-32-P8-NEXT: lhz r3, 0(r3)
1523 ; CHECK-AIX-32-P8-NEXT: sth r3, -32(r1)
1524 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -32
1525 ; CHECK-AIX-32-P8-NEXT: lxvw4x v2, 0, r3
1526 ; CHECK-AIX-32-P8-NEXT: lwz r3, 0(r4)
1527 ; CHECK-AIX-32-P8-NEXT: stw r3, -16(r1)
1528 ; CHECK-AIX-32-P8-NEXT: addi r3, r1, -16
1529 ; CHECK-AIX-32-P8-NEXT: lxvw4x v3, 0, r3
1530 ; CHECK-AIX-32-P8-NEXT: vmrghh v2, v3, v2
1531 ; CHECK-AIX-32-P8-NEXT: blr
1533 ; CHECK-AIX-32-P9-LABEL: test_v2i64_v8i16:
1534 ; CHECK-AIX-32-P9: # %bb.0: # %entry
1535 ; CHECK-AIX-32-P9-NEXT: lhz r3, 0(r3)
1536 ; CHECK-AIX-32-P9-NEXT: sth r3, -32(r1)
1537 ; CHECK-AIX-32-P9-NEXT: lwz r3, 0(r4)
1538 ; CHECK-AIX-32-P9-NEXT: lxv v2, -32(r1)
1539 ; CHECK-AIX-32-P9-NEXT: stw r3, -16(r1)
1540 ; CHECK-AIX-32-P9-NEXT: lxv v3, -16(r1)
1541 ; CHECK-AIX-32-P9-NEXT: vmrghh v2, v3, v2
1542 ; CHECK-AIX-32-P9-NEXT: blr
1544 %0 = load <2 x i8>, ptr %a
1545 %bc1 = bitcast <2 x i8> %0 to i16
1546 %vecinit3 = insertelement <8 x i16> poison, i16 %bc1, i64 0
1547 %1 = load <2 x i8>, ptr %b, align 8
1548 %bc2 = bitcast <2 x i8> %1 to i16
1549 %vecinit6 = insertelement <8 x i16> undef, i16 %bc2, i64 0
1550 %2 = bitcast <8 x i16> %vecinit3 to <16 x i8>
1551 %3 = bitcast <8 x i16> %vecinit6 to <16 x i8>
1552 %shuffle = shufflevector <16 x i8> %3, <16 x i8> %2, <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>
1553 ret <16 x i8> %shuffle