1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming-compatible-sve < %s | FileCheck %s
6 target triple = "aarch64-unknown-linux-gnu"
8 define void @zip1_v32i8(ptr %a, ptr %b) {
9 ; CHECK-LABEL: zip1_v32i8:
11 ; CHECK-NEXT: sub sp, sp, #16
12 ; CHECK-NEXT: .cfi_def_cfa_offset 16
13 ; CHECK-NEXT: ldr q0, [x0, #16]
14 ; CHECK-NEXT: ldr q0, [x0]
15 ; CHECK-NEXT: ldr q1, [x1, #16]
16 ; CHECK-NEXT: ldr q1, [x1]
17 ; CHECK-NEXT: mov z2.b, z0.b[15]
18 ; CHECK-NEXT: mov z3.b, z0.b[14]
19 ; CHECK-NEXT: mov z4.b, z0.b[13]
20 ; CHECK-NEXT: fmov w8, s2
21 ; CHECK-NEXT: fmov w9, s3
22 ; CHECK-NEXT: mov z3.b, z0.b[11]
23 ; CHECK-NEXT: mov z2.b, z0.b[12]
24 ; CHECK-NEXT: strb w8, [sp, #14]
25 ; CHECK-NEXT: fmov w8, s4
26 ; CHECK-NEXT: mov z4.b, z0.b[10]
27 ; CHECK-NEXT: strb w9, [sp, #12]
28 ; CHECK-NEXT: fmov w9, s2
29 ; CHECK-NEXT: mov z2.b, z0.b[9]
30 ; CHECK-NEXT: strb w8, [sp, #10]
31 ; CHECK-NEXT: fmov w8, s3
32 ; CHECK-NEXT: mov z3.b, z0.b[8]
33 ; CHECK-NEXT: strb w9, [sp, #8]
34 ; CHECK-NEXT: zip1 z0.b, z0.b, z1.b
35 ; CHECK-NEXT: strb w8, [sp, #6]
36 ; CHECK-NEXT: fmov w8, s4
37 ; CHECK-NEXT: mov z4.b, z1.b[15]
38 ; CHECK-NEXT: strb w8, [sp, #4]
39 ; CHECK-NEXT: fmov w8, s2
40 ; CHECK-NEXT: mov z2.b, z1.b[14]
41 ; CHECK-NEXT: strb w8, [sp, #2]
42 ; CHECK-NEXT: fmov w8, s3
43 ; CHECK-NEXT: mov z3.b, z1.b[13]
44 ; CHECK-NEXT: strb w8, [sp]
45 ; CHECK-NEXT: fmov w8, s4
46 ; CHECK-NEXT: mov z4.b, z1.b[12]
47 ; CHECK-NEXT: strb w8, [sp, #15]
48 ; CHECK-NEXT: fmov w8, s2
49 ; CHECK-NEXT: mov z2.b, z1.b[11]
50 ; CHECK-NEXT: strb w8, [sp, #13]
51 ; CHECK-NEXT: fmov w8, s3
52 ; CHECK-NEXT: mov z3.b, z1.b[10]
53 ; CHECK-NEXT: strb w8, [sp, #11]
54 ; CHECK-NEXT: fmov w8, s4
55 ; CHECK-NEXT: mov z4.b, z1.b[9]
56 ; CHECK-NEXT: fmov w9, s3
57 ; CHECK-NEXT: strb w8, [sp, #9]
58 ; CHECK-NEXT: fmov w8, s2
59 ; CHECK-NEXT: mov z2.b, z1.b[8]
60 ; CHECK-NEXT: strb w9, [sp, #5]
61 ; CHECK-NEXT: strb w8, [sp, #7]
62 ; CHECK-NEXT: fmov w8, s4
63 ; CHECK-NEXT: strb w8, [sp, #3]
64 ; CHECK-NEXT: fmov w8, s2
65 ; CHECK-NEXT: strb w8, [sp, #1]
66 ; CHECK-NEXT: ldr q1, [sp]
67 ; CHECK-NEXT: str q0, [x0]
68 ; CHECK-NEXT: str q1, [x0, #16]
69 ; CHECK-NEXT: add sp, sp, #16
71 %tmp1 = load volatile <32 x i8>, ptr %a
72 %tmp2 = load volatile <32 x i8>, ptr %b
73 %tmp3 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 0, i32 32, i32 1, i32 33, i32 2, i32 34, i32 3, i32 35, i32 4, i32 36, i32 5, i32 37, i32 6, i32 38, i32 7, i32 39, i32 8, i32 40, i32 9, i32 41, i32 10, i32 42, i32 11, i32 43, i32 12, i32 44, i32 13, i32 45, i32 14, i32 46, i32 15, i32 47>
74 store volatile <32 x i8> %tmp3, ptr %a
78 define void @zip_v32i16(ptr %a, ptr %b) {
79 ; CHECK-LABEL: zip_v32i16:
81 ; CHECK-NEXT: sub sp, sp, #64
82 ; CHECK-NEXT: .cfi_def_cfa_offset 64
83 ; CHECK-NEXT: ldp q1, q3, [x1]
84 ; CHECK-NEXT: ldp q0, q4, [x0]
85 ; CHECK-NEXT: ldp q2, q6, [x0, #32]
86 ; CHECK-NEXT: mov z16.h, z3.h[7]
87 ; CHECK-NEXT: mov z18.h, z3.h[6]
88 ; CHECK-NEXT: mov z17.h, z4.h[7]
89 ; CHECK-NEXT: ldp q5, q7, [x1, #32]
90 ; CHECK-NEXT: mov z19.h, z4.h[6]
91 ; CHECK-NEXT: fmov w8, s16
92 ; CHECK-NEXT: mov z16.h, z3.h[5]
93 ; CHECK-NEXT: fmov w9, s17
94 ; CHECK-NEXT: mov z17.h, z4.h[5]
95 ; CHECK-NEXT: mov z20.h, z7.h[6]
96 ; CHECK-NEXT: strh w8, [sp, #30]
97 ; CHECK-NEXT: fmov w8, s18
98 ; CHECK-NEXT: mov z18.h, z3.h[4]
99 ; CHECK-NEXT: strh w9, [sp, #28]
100 ; CHECK-NEXT: fmov w9, s19
101 ; CHECK-NEXT: mov z19.h, z6.h[7]
102 ; CHECK-NEXT: zip1 z3.h, z4.h, z3.h
103 ; CHECK-NEXT: strh w8, [sp, #26]
104 ; CHECK-NEXT: fmov w8, s16
105 ; CHECK-NEXT: mov z16.h, z4.h[4]
106 ; CHECK-NEXT: strh w9, [sp, #24]
107 ; CHECK-NEXT: zip1 z4.h, z6.h, z7.h
108 ; CHECK-NEXT: strh w8, [sp, #22]
109 ; CHECK-NEXT: fmov w8, s17
110 ; CHECK-NEXT: mov z17.h, z1.h[7]
111 ; CHECK-NEXT: add z3.h, z3.h, z4.h
112 ; CHECK-NEXT: strh w8, [sp, #20]
113 ; CHECK-NEXT: fmov w8, s18
114 ; CHECK-NEXT: mov z18.h, z0.h[7]
115 ; CHECK-NEXT: strh w8, [sp, #18]
116 ; CHECK-NEXT: fmov w8, s16
117 ; CHECK-NEXT: mov z16.h, z1.h[6]
118 ; CHECK-NEXT: strh w8, [sp, #16]
119 ; CHECK-NEXT: fmov w8, s17
120 ; CHECK-NEXT: mov z17.h, z0.h[6]
121 ; CHECK-NEXT: strh w8, [sp, #62]
122 ; CHECK-NEXT: fmov w8, s18
123 ; CHECK-NEXT: mov z18.h, z1.h[5]
124 ; CHECK-NEXT: strh w8, [sp, #60]
125 ; CHECK-NEXT: fmov w8, s16
126 ; CHECK-NEXT: mov z16.h, z0.h[5]
127 ; CHECK-NEXT: strh w8, [sp, #58]
128 ; CHECK-NEXT: fmov w8, s17
129 ; CHECK-NEXT: mov z17.h, z1.h[4]
130 ; CHECK-NEXT: strh w8, [sp, #56]
131 ; CHECK-NEXT: fmov w8, s18
132 ; CHECK-NEXT: mov z18.h, z0.h[4]
133 ; CHECK-NEXT: zip1 z0.h, z0.h, z1.h
134 ; CHECK-NEXT: zip1 z1.h, z2.h, z5.h
135 ; CHECK-NEXT: strh w8, [sp, #54]
136 ; CHECK-NEXT: fmov w8, s16
137 ; CHECK-NEXT: ldr q16, [sp, #16]
138 ; CHECK-NEXT: add z0.h, z0.h, z1.h
139 ; CHECK-NEXT: strh w8, [sp, #52]
140 ; CHECK-NEXT: fmov w8, s17
141 ; CHECK-NEXT: strh w8, [sp, #50]
142 ; CHECK-NEXT: fmov w8, s18
143 ; CHECK-NEXT: mov z18.h, z7.h[7]
144 ; CHECK-NEXT: strh w8, [sp, #48]
145 ; CHECK-NEXT: fmov w8, s18
146 ; CHECK-NEXT: mov z18.h, z6.h[6]
147 ; CHECK-NEXT: ldr q17, [sp, #48]
148 ; CHECK-NEXT: strh w8, [sp, #46]
149 ; CHECK-NEXT: fmov w8, s19
150 ; CHECK-NEXT: mov z19.h, z7.h[5]
151 ; CHECK-NEXT: strh w8, [sp, #44]
152 ; CHECK-NEXT: fmov w8, s20
153 ; CHECK-NEXT: mov z20.h, z6.h[5]
154 ; CHECK-NEXT: strh w8, [sp, #42]
155 ; CHECK-NEXT: fmov w8, s18
156 ; CHECK-NEXT: mov z18.h, z7.h[4]
157 ; CHECK-NEXT: strh w8, [sp, #40]
158 ; CHECK-NEXT: fmov w8, s19
159 ; CHECK-NEXT: mov z19.h, z6.h[4]
160 ; CHECK-NEXT: strh w8, [sp, #38]
161 ; CHECK-NEXT: fmov w8, s20
162 ; CHECK-NEXT: mov z20.h, z5.h[7]
163 ; CHECK-NEXT: strh w8, [sp, #36]
164 ; CHECK-NEXT: fmov w8, s18
165 ; CHECK-NEXT: mov z18.h, z2.h[7]
166 ; CHECK-NEXT: strh w8, [sp, #34]
167 ; CHECK-NEXT: fmov w8, s19
168 ; CHECK-NEXT: mov z19.h, z5.h[6]
169 ; CHECK-NEXT: strh w8, [sp, #32]
170 ; CHECK-NEXT: fmov w8, s20
171 ; CHECK-NEXT: mov z20.h, z2.h[6]
172 ; CHECK-NEXT: strh w8, [sp, #14]
173 ; CHECK-NEXT: fmov w8, s18
174 ; CHECK-NEXT: mov z18.h, z5.h[5]
175 ; CHECK-NEXT: strh w8, [sp, #12]
176 ; CHECK-NEXT: fmov w8, s19
177 ; CHECK-NEXT: mov z19.h, z2.h[5]
178 ; CHECK-NEXT: strh w8, [sp, #10]
179 ; CHECK-NEXT: fmov w8, s20
180 ; CHECK-NEXT: mov z20.h, z5.h[4]
181 ; CHECK-NEXT: fmov w9, s19
182 ; CHECK-NEXT: strh w8, [sp, #8]
183 ; CHECK-NEXT: fmov w8, s18
184 ; CHECK-NEXT: mov z18.h, z2.h[4]
185 ; CHECK-NEXT: strh w9, [sp, #4]
186 ; CHECK-NEXT: ldr q2, [sp, #32]
187 ; CHECK-NEXT: strh w8, [sp, #6]
188 ; CHECK-NEXT: fmov w8, s20
189 ; CHECK-NEXT: add z2.h, z16.h, z2.h
190 ; CHECK-NEXT: strh w8, [sp, #2]
191 ; CHECK-NEXT: fmov w8, s18
192 ; CHECK-NEXT: strh w8, [sp]
193 ; CHECK-NEXT: ldr q4, [sp]
194 ; CHECK-NEXT: stp q3, q2, [x0, #32]
195 ; CHECK-NEXT: add z1.h, z17.h, z4.h
196 ; CHECK-NEXT: stp q0, q1, [x0]
197 ; CHECK-NEXT: add sp, sp, #64
199 %tmp1 = load <32 x i16>, ptr %a
200 %tmp2 = load <32 x i16>, ptr %b
201 %tmp3 = shufflevector <32 x i16> %tmp1, <32 x i16> %tmp2, <32 x i32> <i32 0, i32 32, i32 1, i32 33, i32 2, i32 34, i32 3, i32 35, i32 4, i32 36, i32 5, i32 37, i32 6, i32 38, i32 7, i32 39, i32 8, i32 40, i32 9, i32 41, i32 10, i32 42, i32 11, i32 43, i32 12, i32 44, i32 13, i32 45, i32 14, i32 46, i32 15, i32 47>
202 %tmp4 = shufflevector <32 x i16> %tmp1, <32 x i16> %tmp2, <32 x i32> <i32 16, i32 48, i32 17, i32 49, i32 18, i32 50, i32 19, i32 51, i32 20, i32 52, i32 21, i32 53, i32 22, i32 54, i32 23, i32 55, i32 24, i32 56, i32 25, i32 57, i32 26, i32 58, i32 27, i32 59, i32 28, i32 60, i32 29, i32 61, i32 30, i32 62, i32 31, i32 63>
203 %tmp5 = add <32 x i16> %tmp3, %tmp4
204 store <32 x i16> %tmp5, ptr %a
208 define void @zip1_v16i16(ptr %a, ptr %b) {
209 ; CHECK-LABEL: zip1_v16i16:
211 ; CHECK-NEXT: sub sp, sp, #16
212 ; CHECK-NEXT: .cfi_def_cfa_offset 16
213 ; CHECK-NEXT: ldr q0, [x0, #16]
214 ; CHECK-NEXT: ldr q0, [x0]
215 ; CHECK-NEXT: ldr q1, [x1, #16]
216 ; CHECK-NEXT: ldr q1, [x1]
217 ; CHECK-NEXT: mov z2.h, z0.h[7]
218 ; CHECK-NEXT: mov z3.h, z0.h[6]
219 ; CHECK-NEXT: mov z4.h, z0.h[5]
220 ; CHECK-NEXT: fmov w8, s2
221 ; CHECK-NEXT: mov z2.h, z0.h[4]
222 ; CHECK-NEXT: fmov w9, s3
223 ; CHECK-NEXT: mov z3.h, z1.h[7]
224 ; CHECK-NEXT: zip1 z0.h, z0.h, z1.h
225 ; CHECK-NEXT: strh w8, [sp, #12]
226 ; CHECK-NEXT: fmov w8, s4
227 ; CHECK-NEXT: mov z4.h, z1.h[6]
228 ; CHECK-NEXT: strh w9, [sp, #8]
229 ; CHECK-NEXT: fmov w9, s2
230 ; CHECK-NEXT: mov z2.h, z1.h[5]
231 ; CHECK-NEXT: strh w8, [sp, #4]
232 ; CHECK-NEXT: fmov w8, s3
233 ; CHECK-NEXT: mov z3.h, z1.h[4]
234 ; CHECK-NEXT: strh w9, [sp]
235 ; CHECK-NEXT: fmov w9, s4
236 ; CHECK-NEXT: strh w8, [sp, #14]
237 ; CHECK-NEXT: fmov w8, s2
238 ; CHECK-NEXT: strh w9, [sp, #10]
239 ; CHECK-NEXT: strh w8, [sp, #6]
240 ; CHECK-NEXT: fmov w8, s3
241 ; CHECK-NEXT: strh w8, [sp, #2]
242 ; CHECK-NEXT: ldr q1, [sp]
243 ; CHECK-NEXT: str q0, [x0]
244 ; CHECK-NEXT: str q1, [x0, #16]
245 ; CHECK-NEXT: add sp, sp, #16
247 %tmp1 = load volatile <16 x i16>, ptr %a
248 %tmp2 = load volatile <16 x i16>, ptr %b
249 %tmp3 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
250 store volatile <16 x i16> %tmp3, ptr %a
254 define void @zip1_v8i32(ptr %a, ptr %b) {
255 ; CHECK-LABEL: zip1_v8i32:
257 ; CHECK-NEXT: sub sp, sp, #16
258 ; CHECK-NEXT: .cfi_def_cfa_offset 16
259 ; CHECK-NEXT: ldr q0, [x0, #16]
260 ; CHECK-NEXT: ldr q0, [x0]
261 ; CHECK-NEXT: ldr q1, [x1, #16]
262 ; CHECK-NEXT: ldr q1, [x1]
263 ; CHECK-NEXT: mov z2.s, z0.s[3]
264 ; CHECK-NEXT: mov z4.s, z0.s[2]
265 ; CHECK-NEXT: mov z3.s, z1.s[3]
266 ; CHECK-NEXT: zip1 z0.s, z0.s, z1.s
267 ; CHECK-NEXT: fmov w8, s2
268 ; CHECK-NEXT: mov z2.s, z1.s[2]
269 ; CHECK-NEXT: fmov w9, s3
270 ; CHECK-NEXT: stp w8, w9, [sp, #8]
271 ; CHECK-NEXT: fmov w8, s4
272 ; CHECK-NEXT: fmov w9, s2
273 ; CHECK-NEXT: stp w8, w9, [sp]
274 ; CHECK-NEXT: ldr q1, [sp]
275 ; CHECK-NEXT: str q0, [x0]
276 ; CHECK-NEXT: str q1, [x0, #16]
277 ; CHECK-NEXT: add sp, sp, #16
279 %tmp1 = load volatile <8 x i32>, ptr %a
280 %tmp2 = load volatile <8 x i32>, ptr %b
281 %tmp3 = shufflevector <8 x i32> %tmp1, <8 x i32> %tmp2, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
282 store volatile <8 x i32> %tmp3, ptr %a
286 define void @zip_v4f64(ptr %a, ptr %b) {
287 ; CHECK-LABEL: zip_v4f64:
289 ; CHECK-NEXT: ldp q1, q0, [x0]
290 ; CHECK-NEXT: ptrue p0.d, vl2
291 ; CHECK-NEXT: ldp q3, q2, [x1]
292 ; CHECK-NEXT: zip1 z4.d, z1.d, z3.d
293 ; CHECK-NEXT: zip1 z5.d, z0.d, z2.d
294 ; CHECK-NEXT: trn2 z1.d, z1.d, z3.d
295 ; CHECK-NEXT: trn2 z0.d, z0.d, z2.d
296 ; CHECK-NEXT: movprfx z2, z4
297 ; CHECK-NEXT: fadd z2.d, p0/m, z2.d, z5.d
298 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z1.d
299 ; CHECK-NEXT: stp q2, q0, [x0]
301 %tmp1 = load <4 x double>, ptr %a
302 %tmp2 = load <4 x double>, ptr %b
303 %tmp3 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
304 %tmp4 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
305 %tmp5 = fadd <4 x double> %tmp3, %tmp4
306 store <4 x double> %tmp5, ptr %a
310 define void @zip_v4i32(ptr %a, ptr %b) {
311 ; CHECK-LABEL: zip_v4i32:
313 ; CHECK-NEXT: sub sp, sp, #16
314 ; CHECK-NEXT: .cfi_def_cfa_offset 16
315 ; CHECK-NEXT: ldr q0, [x1]
316 ; CHECK-NEXT: ldr q1, [x0]
317 ; CHECK-NEXT: mov z2.s, z0.s[3]
318 ; CHECK-NEXT: mov z3.s, z1.s[3]
319 ; CHECK-NEXT: mov z4.s, z0.s[2]
320 ; CHECK-NEXT: zip1 z0.s, z1.s, z0.s
321 ; CHECK-NEXT: fmov w8, s2
322 ; CHECK-NEXT: mov z2.s, z1.s[2]
323 ; CHECK-NEXT: fmov w9, s3
324 ; CHECK-NEXT: stp w9, w8, [sp, #8]
325 ; CHECK-NEXT: fmov w8, s4
326 ; CHECK-NEXT: fmov w9, s2
327 ; CHECK-NEXT: stp w9, w8, [sp]
328 ; CHECK-NEXT: ldr q1, [sp]
329 ; CHECK-NEXT: add z0.s, z0.s, z1.s
330 ; CHECK-NEXT: str q0, [x0]
331 ; CHECK-NEXT: add sp, sp, #16
333 %tmp1 = load <4 x i32>, ptr %a
334 %tmp2 = load <4 x i32>, ptr %b
335 %tmp3 = shufflevector <4 x i32> %tmp1, <4 x i32> %tmp2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
336 %tmp4 = shufflevector <4 x i32> %tmp1, <4 x i32> %tmp2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
337 %tmp5 = add <4 x i32> %tmp3, %tmp4
338 store <4 x i32> %tmp5, ptr %a
342 define void @zip1_v8i32_undef(ptr %a) {
343 ; CHECK-LABEL: zip1_v8i32_undef:
345 ; CHECK-NEXT: sub sp, sp, #16
346 ; CHECK-NEXT: .cfi_def_cfa_offset 16
347 ; CHECK-NEXT: ldr q0, [x0, #16]
348 ; CHECK-NEXT: ldr q0, [x0]
349 ; CHECK-NEXT: mov z1.s, z0.s[3]
350 ; CHECK-NEXT: mov z2.s, z0.s[2]
351 ; CHECK-NEXT: zip1 z0.s, z0.s, z0.s
352 ; CHECK-NEXT: fmov w8, s1
353 ; CHECK-NEXT: fmov w9, s2
354 ; CHECK-NEXT: stp w8, w8, [sp, #8]
355 ; CHECK-NEXT: stp w9, w9, [sp]
356 ; CHECK-NEXT: ldr q1, [sp]
357 ; CHECK-NEXT: str q0, [x0]
358 ; CHECK-NEXT: str q1, [x0, #16]
359 ; CHECK-NEXT: add sp, sp, #16
361 %tmp1 = load volatile <8 x i32>, ptr %a
362 %tmp2 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3>
363 store volatile <8 x i32> %tmp2, ptr %a
367 define void @trn_v32i8(ptr %a, ptr %b) {
368 ; CHECK-LABEL: trn_v32i8:
370 ; CHECK-NEXT: ldp q0, q2, [x0]
371 ; CHECK-NEXT: ldp q1, q3, [x1]
372 ; CHECK-NEXT: trn1 z4.b, z0.b, z1.b
373 ; CHECK-NEXT: trn2 z0.b, z0.b, z1.b
374 ; CHECK-NEXT: trn1 z1.b, z2.b, z3.b
375 ; CHECK-NEXT: trn2 z2.b, z2.b, z3.b
376 ; CHECK-NEXT: add z0.b, z4.b, z0.b
377 ; CHECK-NEXT: add z1.b, z1.b, z2.b
378 ; CHECK-NEXT: stp q0, q1, [x0]
380 %tmp1 = load <32 x i8>, ptr %a
381 %tmp2 = load <32 x i8>, ptr %b
382 %tmp3 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 0, i32 32, i32 2, i32 34, i32 4, i32 36, i32 6, i32 38, i32 8, i32 40, i32 10, i32 42, i32 12, i32 44, i32 14, i32 46, i32 16, i32 48, i32 18, i32 50, i32 20, i32 52, i32 22, i32 54, i32 24, i32 56, i32 26, i32 58, i32 28, i32 60, i32 30, i32 62>
383 %tmp4 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 1, i32 33, i32 3, i32 35, i32 undef, i32 37, i32 7, i32 undef, i32 undef, i32 41, i32 11, i32 43, i32 13, i32 45, i32 15, i32 47, i32 17, i32 49, i32 19, i32 51, i32 21, i32 53, i32 23, i32 55, i32 25, i32 57, i32 27, i32 59, i32 29, i32 61, i32 31, i32 63>
384 %tmp5 = add <32 x i8> %tmp3, %tmp4
385 store <32 x i8> %tmp5, ptr %a
389 define void @trn_v8i16(ptr %a, ptr %b) {
390 ; CHECK-LABEL: trn_v8i16:
392 ; CHECK-NEXT: ldr q0, [x0]
393 ; CHECK-NEXT: fmov w8, s0
394 ; CHECK-NEXT: mov z1.h, z0.h[3]
395 ; CHECK-NEXT: mov z2.h, z0.h[1]
396 ; CHECK-NEXT: mov z3.h, z0.h[5]
397 ; CHECK-NEXT: mov z4.h, z0.h[4]
398 ; CHECK-NEXT: strh w8, [sp, #-32]!
399 ; CHECK-NEXT: .cfi_def_cfa_offset 32
400 ; CHECK-NEXT: fmov w8, s1
401 ; CHECK-NEXT: mov z1.h, z0.h[2]
402 ; CHECK-NEXT: fmov w9, s2
403 ; CHECK-NEXT: mov z2.h, z0.h[6]
404 ; CHECK-NEXT: mov z0.h, z0.h[7]
405 ; CHECK-NEXT: fmov w10, s3
406 ; CHECK-NEXT: fmov w11, s4
407 ; CHECK-NEXT: fmov w12, s1
408 ; CHECK-NEXT: strh w8, [sp, #14]
409 ; CHECK-NEXT: fmov w13, s2
410 ; CHECK-NEXT: strh w9, [sp, #12]
411 ; CHECK-NEXT: strh w10, [sp, #10]
412 ; CHECK-NEXT: strh w12, [sp, #4]
413 ; CHECK-NEXT: fmov w12, s0
414 ; CHECK-NEXT: strh w11, [sp, #8]
415 ; CHECK-NEXT: strh w13, [sp, #6]
416 ; CHECK-NEXT: strh w12, [sp, #2]
417 ; CHECK-NEXT: strh w12, [sp, #28]
418 ; CHECK-NEXT: strh w11, [sp, #26]
419 ; CHECK-NEXT: strh w10, [sp, #22]
420 ; CHECK-NEXT: strh w8, [sp, #20]
421 ; CHECK-NEXT: strh w13, [sp, #18]
422 ; CHECK-NEXT: strh w9, [sp, #16]
423 ; CHECK-NEXT: ldp q0, q1, [sp]
424 ; CHECK-NEXT: add z0.h, z0.h, z1.h
425 ; CHECK-NEXT: str q0, [x0]
426 ; CHECK-NEXT: add sp, sp, #32
428 %tmp1 = load <8 x i16>, ptr %a
429 %tmp2 = load <8 x i16>, ptr %b
430 %tmp3 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 0, i32 7, i32 2, i32 6, i32 4, i32 5, i32 1, i32 3>
431 %tmp4 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 1, i32 6, i32 3, i32 5, i32 undef, i32 4, i32 7, i32 undef>
432 %tmp5 = add <8 x i16> %tmp3, %tmp4
433 store <8 x i16> %tmp5, ptr %a
437 define void @trn_v16i16(ptr %a, ptr %b) {
438 ; CHECK-LABEL: trn_v16i16:
440 ; CHECK-NEXT: ldp q0, q2, [x0]
441 ; CHECK-NEXT: ldp q1, q3, [x1]
442 ; CHECK-NEXT: trn1 z4.h, z0.h, z1.h
443 ; CHECK-NEXT: trn2 z0.h, z0.h, z1.h
444 ; CHECK-NEXT: trn1 z1.h, z2.h, z3.h
445 ; CHECK-NEXT: trn2 z2.h, z2.h, z3.h
446 ; CHECK-NEXT: add z0.h, z4.h, z0.h
447 ; CHECK-NEXT: add z1.h, z1.h, z2.h
448 ; CHECK-NEXT: stp q0, q1, [x0]
450 %tmp1 = load <16 x i16>, ptr %a
451 %tmp2 = load <16 x i16>, ptr %b
452 %tmp3 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
453 %tmp4 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
454 %tmp5 = add <16 x i16> %tmp3, %tmp4
455 store <16 x i16> %tmp5, ptr %a
459 define void @trn_v8i32(ptr %a, ptr %b) {
460 ; CHECK-LABEL: trn_v8i32:
462 ; CHECK-NEXT: ldp q0, q2, [x0]
463 ; CHECK-NEXT: ldp q1, q3, [x1]
464 ; CHECK-NEXT: zip1 z4.s, z0.s, z1.s
465 ; CHECK-NEXT: trn2 z0.s, z0.s, z1.s
466 ; CHECK-NEXT: trn1 z1.s, z2.s, z3.s
467 ; CHECK-NEXT: trn2 z2.s, z2.s, z3.s
468 ; CHECK-NEXT: add z0.s, z4.s, z0.s
469 ; CHECK-NEXT: add z1.s, z1.s, z2.s
470 ; CHECK-NEXT: stp q0, q1, [x0]
472 %tmp1 = load <8 x i32>, ptr %a
473 %tmp2 = load <8 x i32>, ptr %b
474 %tmp3 = shufflevector <8 x i32> %tmp1, <8 x i32> %tmp2, <8 x i32> <i32 0, i32 8, i32 undef, i32 undef, i32 4, i32 12, i32 6, i32 14>
475 %tmp4 = shufflevector <8 x i32> %tmp1, <8 x i32> %tmp2, <8 x i32> <i32 1, i32 undef, i32 3, i32 11, i32 5, i32 13, i32 undef, i32 undef>
476 %tmp5 = add <8 x i32> %tmp3, %tmp4
477 store <8 x i32> %tmp5, ptr %a
481 define void @trn_v4f64(ptr %a, ptr %b) {
482 ; CHECK-LABEL: trn_v4f64:
484 ; CHECK-NEXT: ldp q0, q2, [x0]
485 ; CHECK-NEXT: ptrue p0.d, vl2
486 ; CHECK-NEXT: ldp q1, q3, [x1]
487 ; CHECK-NEXT: zip1 z4.d, z0.d, z1.d
488 ; CHECK-NEXT: trn2 z0.d, z0.d, z1.d
489 ; CHECK-NEXT: zip1 z1.d, z2.d, z3.d
490 ; CHECK-NEXT: trn2 z2.d, z2.d, z3.d
491 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z4.d
492 ; CHECK-NEXT: fadd z1.d, p0/m, z1.d, z2.d
493 ; CHECK-NEXT: stp q0, q1, [x0]
495 %tmp1 = load <4 x double>, ptr %a
496 %tmp2 = load <4 x double>, ptr %b
497 %tmp3 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
498 %tmp4 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
499 %tmp5 = fadd <4 x double> %tmp3, %tmp4
500 store <4 x double> %tmp5, ptr %a
504 define void @trn_v4f32(ptr %a, ptr %b) {
505 ; CHECK-LABEL: trn_v4f32:
507 ; CHECK-NEXT: ptrue p0.s, vl4
508 ; CHECK-NEXT: ldr q0, [x0]
509 ; CHECK-NEXT: ldr q1, [x1]
510 ; CHECK-NEXT: trn1 z2.s, z0.s, z1.s
511 ; CHECK-NEXT: trn2 z0.s, z0.s, z1.s
512 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z2.s
513 ; CHECK-NEXT: str q0, [x0]
515 %tmp1 = load <4 x float>, ptr %a
516 %tmp2 = load <4 x float>, ptr %b
517 %tmp3 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
518 %tmp4 = shufflevector <4 x float> %tmp1, <4 x float> %tmp2, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
519 %tmp5 = fadd <4 x float> %tmp3, %tmp4
520 store <4 x float> %tmp5, ptr %a
524 define void @trn_v8i32_undef(ptr %a) {
525 ; CHECK-LABEL: trn_v8i32_undef:
527 ; CHECK-NEXT: ldp q0, q1, [x0]
528 ; CHECK-NEXT: trn1 z2.s, z0.s, z0.s
529 ; CHECK-NEXT: trn2 z0.s, z0.s, z0.s
530 ; CHECK-NEXT: trn1 z3.s, z1.s, z1.s
531 ; CHECK-NEXT: trn2 z1.s, z1.s, z1.s
532 ; CHECK-NEXT: add z0.s, z2.s, z0.s
533 ; CHECK-NEXT: add z1.s, z3.s, z1.s
534 ; CHECK-NEXT: stp q0, q1, [x0]
536 %tmp1 = load <8 x i32>, ptr %a
537 %tmp3 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6>
538 %tmp4 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7>
539 %tmp5 = add <8 x i32> %tmp3, %tmp4
540 store <8 x i32> %tmp5, ptr %a
544 define void @zip2_v32i8(ptr %a, ptr %b) #0{
545 ; CHECK-LABEL: zip2_v32i8:
547 ; CHECK-NEXT: sub sp, sp, #16
548 ; CHECK-NEXT: .cfi_def_cfa_offset 16
549 ; CHECK-NEXT: ldr q0, [x0]
550 ; CHECK-NEXT: ldr q0, [x0, #16]
551 ; CHECK-NEXT: ldr q1, [x1]
552 ; CHECK-NEXT: ldr q1, [x1, #16]
553 ; CHECK-NEXT: mov z2.b, z0.b[15]
554 ; CHECK-NEXT: mov z3.b, z0.b[14]
555 ; CHECK-NEXT: mov z4.b, z0.b[13]
556 ; CHECK-NEXT: fmov w8, s2
557 ; CHECK-NEXT: fmov w9, s3
558 ; CHECK-NEXT: mov z3.b, z0.b[11]
559 ; CHECK-NEXT: mov z2.b, z0.b[12]
560 ; CHECK-NEXT: strb w8, [sp, #14]
561 ; CHECK-NEXT: fmov w8, s4
562 ; CHECK-NEXT: mov z4.b, z0.b[10]
563 ; CHECK-NEXT: strb w9, [sp, #12]
564 ; CHECK-NEXT: fmov w9, s2
565 ; CHECK-NEXT: mov z2.b, z0.b[9]
566 ; CHECK-NEXT: strb w8, [sp, #10]
567 ; CHECK-NEXT: fmov w8, s3
568 ; CHECK-NEXT: mov z3.b, z0.b[8]
569 ; CHECK-NEXT: strb w9, [sp, #8]
570 ; CHECK-NEXT: zip1 z0.b, z0.b, z1.b
571 ; CHECK-NEXT: strb w8, [sp, #6]
572 ; CHECK-NEXT: fmov w8, s4
573 ; CHECK-NEXT: mov z4.b, z1.b[15]
574 ; CHECK-NEXT: strb w8, [sp, #4]
575 ; CHECK-NEXT: fmov w8, s2
576 ; CHECK-NEXT: mov z2.b, z1.b[14]
577 ; CHECK-NEXT: strb w8, [sp, #2]
578 ; CHECK-NEXT: fmov w8, s3
579 ; CHECK-NEXT: mov z3.b, z1.b[13]
580 ; CHECK-NEXT: strb w8, [sp]
581 ; CHECK-NEXT: fmov w8, s4
582 ; CHECK-NEXT: mov z4.b, z1.b[12]
583 ; CHECK-NEXT: strb w8, [sp, #15]
584 ; CHECK-NEXT: fmov w8, s2
585 ; CHECK-NEXT: mov z2.b, z1.b[11]
586 ; CHECK-NEXT: strb w8, [sp, #13]
587 ; CHECK-NEXT: fmov w8, s3
588 ; CHECK-NEXT: mov z3.b, z1.b[10]
589 ; CHECK-NEXT: strb w8, [sp, #11]
590 ; CHECK-NEXT: fmov w8, s4
591 ; CHECK-NEXT: mov z4.b, z1.b[9]
592 ; CHECK-NEXT: fmov w9, s3
593 ; CHECK-NEXT: strb w8, [sp, #9]
594 ; CHECK-NEXT: fmov w8, s2
595 ; CHECK-NEXT: mov z2.b, z1.b[8]
596 ; CHECK-NEXT: strb w9, [sp, #5]
597 ; CHECK-NEXT: strb w8, [sp, #7]
598 ; CHECK-NEXT: fmov w8, s4
599 ; CHECK-NEXT: strb w8, [sp, #3]
600 ; CHECK-NEXT: fmov w8, s2
601 ; CHECK-NEXT: strb w8, [sp, #1]
602 ; CHECK-NEXT: ldr q1, [sp]
603 ; CHECK-NEXT: str q0, [x0]
604 ; CHECK-NEXT: str q1, [x0, #16]
605 ; CHECK-NEXT: add sp, sp, #16
607 %tmp1 = load volatile <32 x i8>, ptr %a
608 %tmp2 = load volatile <32 x i8>, ptr %b
609 %tmp3 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 16, i32 48, i32 17, i32 49, i32 18, i32 50, i32 19, i32 51, i32 20, i32 52, i32 21, i32 53, i32 22, i32 54, i32 23, i32 55, i32 24, i32 56, i32 25, i32 57, i32 26, i32 58, i32 27, i32 59, i32 28, i32 60, i32 29, i32 61, i32 30, i32 62, i32 31, i32 63>
610 store volatile <32 x i8> %tmp3, ptr %a
614 define void @zip2_v16i16(ptr %a, ptr %b) #0{
615 ; CHECK-LABEL: zip2_v16i16:
617 ; CHECK-NEXT: sub sp, sp, #16
618 ; CHECK-NEXT: .cfi_def_cfa_offset 16
619 ; CHECK-NEXT: ldr q0, [x0]
620 ; CHECK-NEXT: ldr q0, [x0, #16]
621 ; CHECK-NEXT: ldr q1, [x1]
622 ; CHECK-NEXT: ldr q1, [x1, #16]
623 ; CHECK-NEXT: mov z2.h, z0.h[7]
624 ; CHECK-NEXT: mov z3.h, z0.h[6]
625 ; CHECK-NEXT: mov z4.h, z0.h[5]
626 ; CHECK-NEXT: fmov w8, s2
627 ; CHECK-NEXT: mov z2.h, z0.h[4]
628 ; CHECK-NEXT: fmov w9, s3
629 ; CHECK-NEXT: mov z3.h, z1.h[7]
630 ; CHECK-NEXT: zip1 z0.h, z0.h, z1.h
631 ; CHECK-NEXT: strh w8, [sp, #12]
632 ; CHECK-NEXT: fmov w8, s4
633 ; CHECK-NEXT: mov z4.h, z1.h[6]
634 ; CHECK-NEXT: strh w9, [sp, #8]
635 ; CHECK-NEXT: fmov w9, s2
636 ; CHECK-NEXT: mov z2.h, z1.h[5]
637 ; CHECK-NEXT: strh w8, [sp, #4]
638 ; CHECK-NEXT: fmov w8, s3
639 ; CHECK-NEXT: mov z3.h, z1.h[4]
640 ; CHECK-NEXT: strh w9, [sp]
641 ; CHECK-NEXT: fmov w9, s4
642 ; CHECK-NEXT: strh w8, [sp, #14]
643 ; CHECK-NEXT: fmov w8, s2
644 ; CHECK-NEXT: strh w9, [sp, #10]
645 ; CHECK-NEXT: strh w8, [sp, #6]
646 ; CHECK-NEXT: fmov w8, s3
647 ; CHECK-NEXT: strh w8, [sp, #2]
648 ; CHECK-NEXT: ldr q1, [sp]
649 ; CHECK-NEXT: str q0, [x0]
650 ; CHECK-NEXT: str q1, [x0, #16]
651 ; CHECK-NEXT: add sp, sp, #16
653 %tmp1 = load volatile <16 x i16>, ptr %a
654 %tmp2 = load volatile <16 x i16>, ptr %b
655 %tmp3 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
656 store volatile <16 x i16> %tmp3, ptr %a
660 define void @zip2_v8i32(ptr %a, ptr %b) #0{
661 ; CHECK-LABEL: zip2_v8i32:
663 ; CHECK-NEXT: sub sp, sp, #16
664 ; CHECK-NEXT: .cfi_def_cfa_offset 16
665 ; CHECK-NEXT: ldr q0, [x0]
666 ; CHECK-NEXT: ldr q0, [x0, #16]
667 ; CHECK-NEXT: ldr q1, [x1]
668 ; CHECK-NEXT: ldr q1, [x1, #16]
669 ; CHECK-NEXT: mov z2.s, z0.s[3]
670 ; CHECK-NEXT: mov z4.s, z0.s[2]
671 ; CHECK-NEXT: mov z3.s, z1.s[3]
672 ; CHECK-NEXT: zip1 z0.s, z0.s, z1.s
673 ; CHECK-NEXT: fmov w8, s2
674 ; CHECK-NEXT: mov z2.s, z1.s[2]
675 ; CHECK-NEXT: fmov w9, s3
676 ; CHECK-NEXT: stp w8, w9, [sp, #8]
677 ; CHECK-NEXT: fmov w8, s4
678 ; CHECK-NEXT: fmov w9, s2
679 ; CHECK-NEXT: stp w8, w9, [sp]
680 ; CHECK-NEXT: ldr q1, [sp]
681 ; CHECK-NEXT: str q0, [x0]
682 ; CHECK-NEXT: str q1, [x0, #16]
683 ; CHECK-NEXT: add sp, sp, #16
685 %tmp1 = load volatile <8 x i32>, ptr %a
686 %tmp2 = load volatile <8 x i32>, ptr %b
687 %tmp3 = shufflevector <8 x i32> %tmp1, <8 x i32> %tmp2, <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
688 store volatile <8 x i32> %tmp3, ptr %a
692 define void @zip2_v8i32_undef(ptr %a) #0{
693 ; CHECK-LABEL: zip2_v8i32_undef:
695 ; CHECK-NEXT: sub sp, sp, #16
696 ; CHECK-NEXT: .cfi_def_cfa_offset 16
697 ; CHECK-NEXT: ldr q0, [x0]
698 ; CHECK-NEXT: ldr q0, [x0, #16]
699 ; CHECK-NEXT: mov z1.s, z0.s[3]
700 ; CHECK-NEXT: mov z2.s, z0.s[2]
701 ; CHECK-NEXT: zip1 z0.s, z0.s, z0.s
702 ; CHECK-NEXT: fmov w8, s1
703 ; CHECK-NEXT: fmov w9, s2
704 ; CHECK-NEXT: stp w8, w8, [sp, #8]
705 ; CHECK-NEXT: stp w9, w9, [sp]
706 ; CHECK-NEXT: ldr q1, [sp]
707 ; CHECK-NEXT: str q0, [x0]
708 ; CHECK-NEXT: str q1, [x0, #16]
709 ; CHECK-NEXT: add sp, sp, #16
711 %tmp1 = load volatile <8 x i32>, ptr %a
712 %tmp2 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 4, i32 4, i32 5, i32 5, i32 6, i32 6, i32 7, i32 7>
713 store volatile <8 x i32> %tmp2, ptr %a
717 define void @uzp_v32i8(ptr %a, ptr %b) #0{
718 ; CHECK-LABEL: uzp_v32i8:
720 ; CHECK-NEXT: sub sp, sp, #64
721 ; CHECK-NEXT: .cfi_def_cfa_offset 64
722 ; CHECK-NEXT: ldp q2, q3, [x0]
723 ; CHECK-NEXT: ldp q0, q1, [x1]
724 ; CHECK-NEXT: mov z4.b, z3.b[14]
725 ; CHECK-NEXT: fmov w8, s3
726 ; CHECK-NEXT: mov z6.b, z3.b[10]
727 ; CHECK-NEXT: mov z5.b, z3.b[12]
728 ; CHECK-NEXT: fmov w9, s2
729 ; CHECK-NEXT: mov z7.b, z3.b[8]
730 ; CHECK-NEXT: mov z17.b, z3.b[9]
731 ; CHECK-NEXT: mov z18.b, z3.b[7]
732 ; CHECK-NEXT: mov z16.b, z3.b[11]
733 ; CHECK-NEXT: strb w8, [sp, #40]
734 ; CHECK-NEXT: fmov w8, s4
735 ; CHECK-NEXT: mov z4.b, z3.b[6]
736 ; CHECK-NEXT: strb w9, [sp, #32]
737 ; CHECK-NEXT: fmov w9, s5
738 ; CHECK-NEXT: mov z5.b, z3.b[4]
739 ; CHECK-NEXT: strb w8, [sp, #47]
740 ; CHECK-NEXT: fmov w8, s6
741 ; CHECK-NEXT: mov z6.b, z3.b[2]
742 ; CHECK-NEXT: strb w9, [sp, #46]
743 ; CHECK-NEXT: fmov w9, s7
744 ; CHECK-NEXT: mov z7.b, z2.b[14]
745 ; CHECK-NEXT: strb w8, [sp, #45]
746 ; CHECK-NEXT: fmov w8, s4
747 ; CHECK-NEXT: mov z4.b, z2.b[12]
748 ; CHECK-NEXT: strb w9, [sp, #44]
749 ; CHECK-NEXT: fmov w9, s16
750 ; CHECK-NEXT: mov z16.b, z2.b[11]
751 ; CHECK-NEXT: strb w8, [sp, #43]
752 ; CHECK-NEXT: fmov w8, s5
753 ; CHECK-NEXT: mov z5.b, z2.b[10]
754 ; CHECK-NEXT: strb w9, [sp, #61]
755 ; CHECK-NEXT: fmov w9, s16
756 ; CHECK-NEXT: strb w8, [sp, #42]
757 ; CHECK-NEXT: fmov w8, s6
758 ; CHECK-NEXT: mov z6.b, z2.b[8]
759 ; CHECK-NEXT: strb w9, [sp, #53]
760 ; CHECK-NEXT: strb w8, [sp, #41]
761 ; CHECK-NEXT: fmov w8, s7
762 ; CHECK-NEXT: mov z7.b, z2.b[6]
763 ; CHECK-NEXT: strb w8, [sp, #39]
764 ; CHECK-NEXT: fmov w8, s4
765 ; CHECK-NEXT: mov z4.b, z2.b[4]
766 ; CHECK-NEXT: strb w8, [sp, #38]
767 ; CHECK-NEXT: fmov w8, s5
768 ; CHECK-NEXT: mov z5.b, z2.b[2]
769 ; CHECK-NEXT: strb w8, [sp, #37]
770 ; CHECK-NEXT: fmov w8, s6
771 ; CHECK-NEXT: mov z6.b, z1.b[10]
772 ; CHECK-NEXT: strb w8, [sp, #36]
773 ; CHECK-NEXT: fmov w8, s7
774 ; CHECK-NEXT: mov z7.b, z1.b[8]
775 ; CHECK-NEXT: strb w8, [sp, #35]
776 ; CHECK-NEXT: fmov w8, s4
777 ; CHECK-NEXT: mov z4.b, z1.b[14]
778 ; CHECK-NEXT: strb w8, [sp, #34]
779 ; CHECK-NEXT: fmov w8, s5
780 ; CHECK-NEXT: mov z5.b, z1.b[12]
781 ; CHECK-NEXT: strb w8, [sp, #33]
782 ; CHECK-NEXT: fmov w8, s1
783 ; CHECK-NEXT: strb w8, [sp, #8]
784 ; CHECK-NEXT: fmov w8, s0
785 ; CHECK-NEXT: strb w8, [sp]
786 ; CHECK-NEXT: fmov w8, s4
787 ; CHECK-NEXT: mov z4.b, z1.b[6]
788 ; CHECK-NEXT: strb w8, [sp, #15]
789 ; CHECK-NEXT: fmov w8, s5
790 ; CHECK-NEXT: mov z5.b, z1.b[4]
791 ; CHECK-NEXT: strb w8, [sp, #14]
792 ; CHECK-NEXT: fmov w8, s6
793 ; CHECK-NEXT: mov z6.b, z1.b[2]
794 ; CHECK-NEXT: strb w8, [sp, #13]
795 ; CHECK-NEXT: fmov w8, s7
796 ; CHECK-NEXT: mov z7.b, z0.b[14]
797 ; CHECK-NEXT: strb w8, [sp, #12]
798 ; CHECK-NEXT: fmov w8, s4
799 ; CHECK-NEXT: mov z4.b, z0.b[12]
800 ; CHECK-NEXT: strb w8, [sp, #11]
801 ; CHECK-NEXT: fmov w8, s5
802 ; CHECK-NEXT: mov z5.b, z0.b[10]
803 ; CHECK-NEXT: strb w8, [sp, #10]
804 ; CHECK-NEXT: fmov w8, s6
805 ; CHECK-NEXT: mov z6.b, z0.b[8]
806 ; CHECK-NEXT: strb w8, [sp, #9]
807 ; CHECK-NEXT: fmov w8, s7
808 ; CHECK-NEXT: mov z7.b, z0.b[6]
809 ; CHECK-NEXT: strb w8, [sp, #7]
810 ; CHECK-NEXT: fmov w8, s4
811 ; CHECK-NEXT: mov z4.b, z0.b[4]
812 ; CHECK-NEXT: strb w8, [sp, #6]
813 ; CHECK-NEXT: fmov w8, s5
814 ; CHECK-NEXT: mov z5.b, z0.b[2]
815 ; CHECK-NEXT: strb w8, [sp, #5]
816 ; CHECK-NEXT: fmov w8, s6
817 ; CHECK-NEXT: mov z6.b, z3.b[15]
818 ; CHECK-NEXT: strb w8, [sp, #4]
819 ; CHECK-NEXT: fmov w8, s7
820 ; CHECK-NEXT: mov z7.b, z3.b[13]
821 ; CHECK-NEXT: strb w8, [sp, #3]
822 ; CHECK-NEXT: fmov w8, s4
823 ; CHECK-NEXT: ldr q4, [sp, #32]
824 ; CHECK-NEXT: strb w8, [sp, #2]
825 ; CHECK-NEXT: fmov w8, s5
826 ; CHECK-NEXT: strb w8, [sp, #1]
827 ; CHECK-NEXT: fmov w8, s6
828 ; CHECK-NEXT: mov z6.b, z3.b[5]
829 ; CHECK-NEXT: mov z3.b, z3.b[3]
830 ; CHECK-NEXT: ldr q5, [sp]
831 ; CHECK-NEXT: strb w8, [sp, #63]
832 ; CHECK-NEXT: fmov w8, s7
833 ; CHECK-NEXT: mov z7.b, z2.b[13]
834 ; CHECK-NEXT: strb w8, [sp, #62]
835 ; CHECK-NEXT: fmov w8, s17
836 ; CHECK-NEXT: strb w8, [sp, #60]
837 ; CHECK-NEXT: fmov w8, s18
838 ; CHECK-NEXT: strb w8, [sp, #59]
839 ; CHECK-NEXT: fmov w8, s6
840 ; CHECK-NEXT: mov z6.b, z2.b[9]
841 ; CHECK-NEXT: strb w8, [sp, #58]
842 ; CHECK-NEXT: fmov w8, s3
843 ; CHECK-NEXT: mov z3.b, z2.b[5]
844 ; CHECK-NEXT: strb w8, [sp, #57]
845 ; CHECK-NEXT: fmov w8, s7
846 ; CHECK-NEXT: mov z7.b, z2.b[3]
847 ; CHECK-NEXT: mov z2.b, z2.b[1]
848 ; CHECK-NEXT: strb w8, [sp, #54]
849 ; CHECK-NEXT: fmov w8, s6
850 ; CHECK-NEXT: mov z6.b, z1.b[15]
851 ; CHECK-NEXT: strb w8, [sp, #52]
852 ; CHECK-NEXT: fmov w8, s3
853 ; CHECK-NEXT: mov z3.b, z1.b[13]
854 ; CHECK-NEXT: strb w8, [sp, #50]
855 ; CHECK-NEXT: fmov w8, s7
856 ; CHECK-NEXT: mov z7.b, z1.b[11]
857 ; CHECK-NEXT: strb w8, [sp, #49]
858 ; CHECK-NEXT: fmov w8, s2
859 ; CHECK-NEXT: mov z2.b, z1.b[9]
860 ; CHECK-NEXT: strb w8, [sp, #48]
861 ; CHECK-NEXT: fmov w8, s6
862 ; CHECK-NEXT: mov z6.b, z1.b[7]
863 ; CHECK-NEXT: fmov w9, s2
864 ; CHECK-NEXT: mov z2.b, z0.b[15]
865 ; CHECK-NEXT: strb w8, [sp, #31]
866 ; CHECK-NEXT: fmov w8, s3
867 ; CHECK-NEXT: mov z3.b, z1.b[5]
868 ; CHECK-NEXT: strb w9, [sp, #28]
869 ; CHECK-NEXT: strb w8, [sp, #30]
870 ; CHECK-NEXT: fmov w8, s7
871 ; CHECK-NEXT: mov z7.b, z1.b[3]
872 ; CHECK-NEXT: mov z1.b, z1.b[1]
873 ; CHECK-NEXT: strb w8, [sp, #29]
874 ; CHECK-NEXT: fmov w8, s6
875 ; CHECK-NEXT: mov z6.b, z0.b[11]
876 ; CHECK-NEXT: strb w8, [sp, #27]
877 ; CHECK-NEXT: fmov w8, s3
878 ; CHECK-NEXT: mov z3.b, z0.b[13]
879 ; CHECK-NEXT: strb w8, [sp, #26]
880 ; CHECK-NEXT: fmov w8, s7
881 ; CHECK-NEXT: strb w8, [sp, #25]
882 ; CHECK-NEXT: fmov w8, s1
883 ; CHECK-NEXT: mov z1.b, z0.b[9]
884 ; CHECK-NEXT: strb w8, [sp, #24]
885 ; CHECK-NEXT: fmov w8, s2
886 ; CHECK-NEXT: mov z2.b, z0.b[7]
887 ; CHECK-NEXT: strb w8, [sp, #23]
888 ; CHECK-NEXT: fmov w8, s3
889 ; CHECK-NEXT: mov z3.b, z0.b[5]
890 ; CHECK-NEXT: strb w8, [sp, #22]
891 ; CHECK-NEXT: fmov w8, s6
892 ; CHECK-NEXT: mov z6.b, z0.b[3]
893 ; CHECK-NEXT: mov z0.b, z0.b[1]
894 ; CHECK-NEXT: strb w8, [sp, #21]
895 ; CHECK-NEXT: fmov w8, s1
896 ; CHECK-NEXT: strb w8, [sp, #20]
897 ; CHECK-NEXT: fmov w8, s2
898 ; CHECK-NEXT: strb w8, [sp, #19]
899 ; CHECK-NEXT: fmov w8, s3
900 ; CHECK-NEXT: strb w8, [sp, #18]
901 ; CHECK-NEXT: fmov w8, s6
902 ; CHECK-NEXT: strb w8, [sp, #17]
903 ; CHECK-NEXT: fmov w8, s0
904 ; CHECK-NEXT: ldr q0, [sp, #48]
905 ; CHECK-NEXT: add z0.b, z4.b, z0.b
906 ; CHECK-NEXT: strb w8, [sp, #16]
907 ; CHECK-NEXT: ldr q1, [sp, #16]
908 ; CHECK-NEXT: add z1.b, z5.b, z1.b
909 ; CHECK-NEXT: stp q0, q1, [x0]
910 ; CHECK-NEXT: add sp, sp, #64
912 %tmp1 = load <32 x i8>, ptr %a
913 %tmp2 = load <32 x i8>, ptr %b
914 %tmp3 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30, i32 32, i32 34, i32 36, i32 38, i32 40, i32 42, i32 44, i32 46, i32 48, i32 50, i32 52, i32 54, i32 56, i32 58, i32 60, i32 62>
915 %tmp4 = shufflevector <32 x i8> %tmp1, <32 x i8> %tmp2, <32 x i32> <i32 1, i32 3, i32 5, i32 undef, i32 9, i32 11, i32 13, i32 undef, i32 undef, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31, i32 33, i32 35, i32 37, i32 39, i32 41, i32 43, i32 45, i32 47, i32 49, i32 51, i32 53, i32 55, i32 57, i32 59, i32 61, i32 63>
916 %tmp5 = add <32 x i8> %tmp3, %tmp4
917 store <32 x i8> %tmp5, ptr %a
921 define void @uzp_v4i16(ptr %a, ptr %b) #0{
922 ; CHECK-LABEL: uzp_v4i16:
924 ; CHECK-NEXT: ldr d0, [x0]
925 ; CHECK-NEXT: mov z1.h, z0.h[1]
926 ; CHECK-NEXT: fmov w8, s0
927 ; CHECK-NEXT: mov z2.h, z0.h[2]
928 ; CHECK-NEXT: mov z3.h, z0.h[3]
929 ; CHECK-NEXT: fmov w9, s1
930 ; CHECK-NEXT: strh w8, [sp, #-16]!
931 ; CHECK-NEXT: .cfi_def_cfa_offset 16
932 ; CHECK-NEXT: fmov w10, s2
933 ; CHECK-NEXT: fmov w11, s3
934 ; CHECK-NEXT: strh w9, [sp, #6]
935 ; CHECK-NEXT: strh w8, [sp, #10]
936 ; CHECK-NEXT: strh w9, [sp, #8]
937 ; CHECK-NEXT: strh w10, [sp, #4]
938 ; CHECK-NEXT: strh w11, [sp, #2]
939 ; CHECK-NEXT: strh w10, [sp, #12]
940 ; CHECK-NEXT: ldp d0, d1, [sp]
941 ; CHECK-NEXT: add z0.h, z0.h, z1.h
942 ; CHECK-NEXT: str d0, [x0]
943 ; CHECK-NEXT: add sp, sp, #16
945 %tmp1 = load <4 x i16>, ptr %a
946 %tmp2 = load <4 x i16>, ptr %b
947 %tmp3 = shufflevector <4 x i16> %tmp1, <4 x i16> %tmp2, <4 x i32> <i32 0, i32 3, i32 2, i32 1>
948 %tmp4 = shufflevector <4 x i16> %tmp1, <4 x i16> %tmp2, <4 x i32> <i32 1, i32 0, i32 2, i32 undef>
949 %tmp5 = add <4 x i16> %tmp3, %tmp4
950 store <4 x i16> %tmp5, ptr %a
954 define void @uzp_v16i16(ptr %a, ptr %b) #0{
955 ; CHECK-LABEL: uzp_v16i16:
957 ; CHECK-NEXT: sub sp, sp, #64
958 ; CHECK-NEXT: .cfi_def_cfa_offset 64
959 ; CHECK-NEXT: ldp q2, q3, [x0]
960 ; CHECK-NEXT: ldp q0, q1, [x1]
961 ; CHECK-NEXT: mov z4.h, z3.h[6]
962 ; CHECK-NEXT: fmov w8, s3
963 ; CHECK-NEXT: mov z6.h, z3.h[2]
964 ; CHECK-NEXT: mov z5.h, z3.h[4]
965 ; CHECK-NEXT: fmov w9, s2
966 ; CHECK-NEXT: mov z7.h, z2.h[6]
967 ; CHECK-NEXT: mov z17.h, z2.h[7]
968 ; CHECK-NEXT: mov z16.h, z3.h[1]
969 ; CHECK-NEXT: strh w8, [sp, #40]
970 ; CHECK-NEXT: fmov w8, s4
971 ; CHECK-NEXT: mov z4.h, z2.h[4]
972 ; CHECK-NEXT: strh w9, [sp, #32]
973 ; CHECK-NEXT: fmov w9, s5
974 ; CHECK-NEXT: mov z5.h, z2.h[2]
975 ; CHECK-NEXT: strh w8, [sp, #46]
976 ; CHECK-NEXT: fmov w8, s6
977 ; CHECK-NEXT: mov z6.h, z1.h[2]
978 ; CHECK-NEXT: strh w9, [sp, #44]
979 ; CHECK-NEXT: fmov w9, s7
980 ; CHECK-NEXT: mov z7.h, z0.h[6]
981 ; CHECK-NEXT: strh w8, [sp, #42]
982 ; CHECK-NEXT: fmov w8, s4
983 ; CHECK-NEXT: mov z4.h, z1.h[6]
984 ; CHECK-NEXT: strh w9, [sp, #38]
985 ; CHECK-NEXT: fmov w9, s16
986 ; CHECK-NEXT: strh w8, [sp, #36]
987 ; CHECK-NEXT: fmov w8, s5
988 ; CHECK-NEXT: mov z5.h, z1.h[4]
989 ; CHECK-NEXT: strh w9, [sp, #56]
990 ; CHECK-NEXT: strh w8, [sp, #34]
991 ; CHECK-NEXT: fmov w8, s1
992 ; CHECK-NEXT: strh w8, [sp, #8]
993 ; CHECK-NEXT: fmov w8, s0
994 ; CHECK-NEXT: strh w8, [sp]
995 ; CHECK-NEXT: fmov w8, s4
996 ; CHECK-NEXT: mov z4.h, z0.h[4]
997 ; CHECK-NEXT: strh w8, [sp, #14]
998 ; CHECK-NEXT: fmov w8, s5
999 ; CHECK-NEXT: mov z5.h, z0.h[2]
1000 ; CHECK-NEXT: strh w8, [sp, #12]
1001 ; CHECK-NEXT: fmov w8, s6
1002 ; CHECK-NEXT: mov z6.h, z3.h[7]
1003 ; CHECK-NEXT: strh w8, [sp, #10]
1004 ; CHECK-NEXT: fmov w8, s7
1005 ; CHECK-NEXT: mov z7.h, z3.h[5]
1006 ; CHECK-NEXT: strh w8, [sp, #6]
1007 ; CHECK-NEXT: fmov w8, s4
1008 ; CHECK-NEXT: strh w8, [sp, #4]
1009 ; CHECK-NEXT: fmov w8, s5
1010 ; CHECK-NEXT: mov z5.h, z3.h[3]
1011 ; CHECK-NEXT: ldr q3, [sp, #32]
1012 ; CHECK-NEXT: strh w8, [sp, #2]
1013 ; CHECK-NEXT: fmov w8, s6
1014 ; CHECK-NEXT: mov z6.h, z2.h[5]
1015 ; CHECK-NEXT: ldr q4, [sp]
1016 ; CHECK-NEXT: strh w8, [sp, #62]
1017 ; CHECK-NEXT: fmov w8, s7
1018 ; CHECK-NEXT: mov z7.h, z1.h[7]
1019 ; CHECK-NEXT: strh w8, [sp, #60]
1020 ; CHECK-NEXT: fmov w8, s5
1021 ; CHECK-NEXT: mov z5.h, z2.h[3]
1022 ; CHECK-NEXT: mov z2.h, z2.h[1]
1023 ; CHECK-NEXT: strh w8, [sp, #58]
1024 ; CHECK-NEXT: fmov w8, s17
1025 ; CHECK-NEXT: fmov w9, s2
1026 ; CHECK-NEXT: mov z2.h, z0.h[7]
1027 ; CHECK-NEXT: strh w8, [sp, #54]
1028 ; CHECK-NEXT: fmov w8, s6
1029 ; CHECK-NEXT: mov z6.h, z1.h[5]
1030 ; CHECK-NEXT: strh w9, [sp, #48]
1031 ; CHECK-NEXT: strh w8, [sp, #52]
1032 ; CHECK-NEXT: fmov w8, s5
1033 ; CHECK-NEXT: mov z5.h, z1.h[3]
1034 ; CHECK-NEXT: mov z1.h, z1.h[1]
1035 ; CHECK-NEXT: strh w8, [sp, #50]
1036 ; CHECK-NEXT: fmov w8, s7
1037 ; CHECK-NEXT: strh w8, [sp, #30]
1038 ; CHECK-NEXT: fmov w8, s6
1039 ; CHECK-NEXT: mov z6.h, z0.h[5]
1040 ; CHECK-NEXT: strh w8, [sp, #28]
1041 ; CHECK-NEXT: fmov w8, s5
1042 ; CHECK-NEXT: mov z5.h, z0.h[3]
1043 ; CHECK-NEXT: mov z0.h, z0.h[1]
1044 ; CHECK-NEXT: strh w8, [sp, #26]
1045 ; CHECK-NEXT: fmov w8, s1
1046 ; CHECK-NEXT: strh w8, [sp, #24]
1047 ; CHECK-NEXT: fmov w8, s2
1048 ; CHECK-NEXT: strh w8, [sp, #22]
1049 ; CHECK-NEXT: fmov w8, s6
1050 ; CHECK-NEXT: strh w8, [sp, #20]
1051 ; CHECK-NEXT: fmov w8, s5
1052 ; CHECK-NEXT: strh w8, [sp, #18]
1053 ; CHECK-NEXT: fmov w8, s0
1054 ; CHECK-NEXT: ldr q0, [sp, #48]
1055 ; CHECK-NEXT: add z0.h, z3.h, z0.h
1056 ; CHECK-NEXT: strh w8, [sp, #16]
1057 ; CHECK-NEXT: ldr q1, [sp, #16]
1058 ; CHECK-NEXT: add z1.h, z4.h, z1.h
1059 ; CHECK-NEXT: stp q0, q1, [x0]
1060 ; CHECK-NEXT: add sp, sp, #64
1062 %tmp1 = load <16 x i16>, ptr %a
1063 %tmp2 = load <16 x i16>, ptr %b
1064 %tmp3 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
1065 %tmp4 = shufflevector <16 x i16> %tmp1, <16 x i16> %tmp2, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
1066 %tmp5 = add <16 x i16> %tmp3, %tmp4
1067 store <16 x i16> %tmp5, ptr %a
1071 define void @uzp_v8f32(ptr %a, ptr %b) #0{
1072 ; CHECK-LABEL: uzp_v8f32:
1074 ; CHECK-NEXT: sub sp, sp, #64
1075 ; CHECK-NEXT: .cfi_def_cfa_offset 64
1076 ; CHECK-NEXT: ldp q2, q0, [x0]
1077 ; CHECK-NEXT: ptrue p0.s, vl4
1078 ; CHECK-NEXT: ldp q4, q1, [x1]
1079 ; CHECK-NEXT: mov z3.s, z0.s[2]
1080 ; CHECK-NEXT: mov z5.s, z1.s[2]
1081 ; CHECK-NEXT: stp s0, s3, [sp, #24]
1082 ; CHECK-NEXT: mov z3.s, z4.s[2]
1083 ; CHECK-NEXT: stp s5, s2, [sp, #12]
1084 ; CHECK-NEXT: mov z5.s, z0.s[3]
1085 ; CHECK-NEXT: mov z0.s, z0.s[1]
1086 ; CHECK-NEXT: stp s3, s1, [sp, #4]
1087 ; CHECK-NEXT: mov z1.s, z2.s[1]
1088 ; CHECK-NEXT: stp s0, s5, [sp, #40]
1089 ; CHECK-NEXT: mov z5.s, z4.s[3]
1090 ; CHECK-NEXT: mov z4.s, z4.s[1]
1091 ; CHECK-NEXT: ldp q3, q2, [sp]
1092 ; CHECK-NEXT: str s1, [sp, #32]
1093 ; CHECK-NEXT: stp s4, s5, [sp, #48]
1094 ; CHECK-NEXT: ldp q0, q1, [sp, #32]
1095 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z2.s
1096 ; CHECK-NEXT: fadd z1.s, p0/m, z1.s, z3.s
1097 ; CHECK-NEXT: stp q0, q1, [x0]
1098 ; CHECK-NEXT: add sp, sp, #64
1100 %tmp1 = load <8 x float>, ptr %a
1101 %tmp2 = load <8 x float>, ptr %b
1102 %tmp3 = shufflevector <8 x float> %tmp1, <8 x float> %tmp2, <8 x i32> <i32 0, i32 undef, i32 4, i32 6, i32 undef, i32 10, i32 12, i32 14>
1103 %tmp4 = shufflevector <8 x float> %tmp1, <8 x float> %tmp2, <8 x i32> <i32 1, i32 undef, i32 5, i32 7, i32 9, i32 11, i32 undef, i32 undef>
1104 %tmp5 = fadd <8 x float> %tmp3, %tmp4
1105 store <8 x float> %tmp5, ptr %a
1109 define void @uzp_v4i64(ptr %a, ptr %b) #0{
1110 ; CHECK-LABEL: uzp_v4i64:
1112 ; CHECK-NEXT: ldp q1, q0, [x0]
1113 ; CHECK-NEXT: ldp q3, q2, [x1]
1114 ; CHECK-NEXT: zip1 z4.d, z1.d, z0.d
1115 ; CHECK-NEXT: trn2 z0.d, z1.d, z0.d
1116 ; CHECK-NEXT: zip1 z1.d, z3.d, z2.d
1117 ; CHECK-NEXT: trn2 z2.d, z3.d, z2.d
1118 ; CHECK-NEXT: add z0.d, z4.d, z0.d
1119 ; CHECK-NEXT: add z1.d, z1.d, z2.d
1120 ; CHECK-NEXT: stp q0, q1, [x0]
1122 %tmp1 = load <4 x i64>, ptr %a
1123 %tmp2 = load <4 x i64>, ptr %b
1124 %tmp3 = shufflevector <4 x i64> %tmp1, <4 x i64> %tmp2, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
1125 %tmp4 = shufflevector <4 x i64> %tmp1, <4 x i64> %tmp2, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
1126 %tmp5 = add <4 x i64> %tmp3, %tmp4
1127 store <4 x i64> %tmp5, ptr %a
1131 define void @uzp_v8i16(ptr %a, ptr %b) #0{
1132 ; CHECK-LABEL: uzp_v8i16:
1134 ; CHECK-NEXT: sub sp, sp, #32
1135 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1136 ; CHECK-NEXT: ldr q1, [x1]
1137 ; CHECK-NEXT: ldr q0, [x0]
1138 ; CHECK-NEXT: mov z2.h, z1.h[6]
1139 ; CHECK-NEXT: fmov w8, s1
1140 ; CHECK-NEXT: mov z4.h, z1.h[2]
1141 ; CHECK-NEXT: mov z6.h, z0.h[4]
1142 ; CHECK-NEXT: mov z3.h, z1.h[4]
1143 ; CHECK-NEXT: fmov w9, s0
1144 ; CHECK-NEXT: mov z5.h, z0.h[6]
1145 ; CHECK-NEXT: strh w8, [sp, #8]
1146 ; CHECK-NEXT: fmov w8, s2
1147 ; CHECK-NEXT: mov z2.h, z0.h[2]
1148 ; CHECK-NEXT: strh w9, [sp]
1149 ; CHECK-NEXT: fmov w9, s3
1150 ; CHECK-NEXT: mov z3.h, z1.h[7]
1151 ; CHECK-NEXT: strh w8, [sp, #14]
1152 ; CHECK-NEXT: fmov w8, s4
1153 ; CHECK-NEXT: mov z4.h, z1.h[5]
1154 ; CHECK-NEXT: strh w9, [sp, #12]
1155 ; CHECK-NEXT: fmov w9, s5
1156 ; CHECK-NEXT: mov z5.h, z1.h[3]
1157 ; CHECK-NEXT: mov z1.h, z1.h[1]
1158 ; CHECK-NEXT: strh w8, [sp, #10]
1159 ; CHECK-NEXT: fmov w8, s6
1160 ; CHECK-NEXT: strh w9, [sp, #6]
1161 ; CHECK-NEXT: fmov w9, s1
1162 ; CHECK-NEXT: strh w8, [sp, #4]
1163 ; CHECK-NEXT: fmov w8, s2
1164 ; CHECK-NEXT: mov z2.h, z0.h[7]
1165 ; CHECK-NEXT: strh w9, [sp, #24]
1166 ; CHECK-NEXT: strh w8, [sp, #2]
1167 ; CHECK-NEXT: fmov w8, s3
1168 ; CHECK-NEXT: strh w8, [sp, #30]
1169 ; CHECK-NEXT: fmov w8, s4
1170 ; CHECK-NEXT: mov z4.h, z0.h[5]
1171 ; CHECK-NEXT: strh w8, [sp, #28]
1172 ; CHECK-NEXT: fmov w8, s5
1173 ; CHECK-NEXT: mov z5.h, z0.h[3]
1174 ; CHECK-NEXT: mov z0.h, z0.h[1]
1175 ; CHECK-NEXT: strh w8, [sp, #26]
1176 ; CHECK-NEXT: fmov w8, s2
1177 ; CHECK-NEXT: strh w8, [sp, #22]
1178 ; CHECK-NEXT: fmov w8, s4
1179 ; CHECK-NEXT: strh w8, [sp, #20]
1180 ; CHECK-NEXT: fmov w8, s5
1181 ; CHECK-NEXT: strh w8, [sp, #18]
1182 ; CHECK-NEXT: fmov w8, s0
1183 ; CHECK-NEXT: strh w8, [sp, #16]
1184 ; CHECK-NEXT: ldp q3, q0, [sp]
1185 ; CHECK-NEXT: add z0.h, z3.h, z0.h
1186 ; CHECK-NEXT: str q0, [x0]
1187 ; CHECK-NEXT: add sp, sp, #32
1189 %tmp1 = load <8 x i16>, ptr %a
1190 %tmp2 = load <8 x i16>, ptr %b
1191 %tmp3 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
1192 %tmp4 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
1193 %tmp5 = add <8 x i16> %tmp3, %tmp4
1194 store <8 x i16> %tmp5, ptr %a
1198 define void @uzp_v8i32_undef(ptr %a) #0{
1199 ; CHECK-LABEL: uzp_v8i32_undef:
1201 ; CHECK-NEXT: sub sp, sp, #32
1202 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1203 ; CHECK-NEXT: ldp q1, q0, [x0]
1204 ; CHECK-NEXT: mov z2.s, z0.s[2]
1205 ; CHECK-NEXT: fmov w8, s0
1206 ; CHECK-NEXT: mov z3.s, z1.s[2]
1207 ; CHECK-NEXT: mov z4.s, z0.s[3]
1208 ; CHECK-NEXT: mov z0.s, z0.s[1]
1209 ; CHECK-NEXT: fmov w9, s2
1210 ; CHECK-NEXT: mov z2.s, z1.s[3]
1211 ; CHECK-NEXT: stp w8, w9, [sp, #8]
1212 ; CHECK-NEXT: fmov w8, s1
1213 ; CHECK-NEXT: fmov w9, s3
1214 ; CHECK-NEXT: mov z1.s, z1.s[1]
1215 ; CHECK-NEXT: stp w8, w9, [sp]
1216 ; CHECK-NEXT: fmov w8, s4
1217 ; CHECK-NEXT: fmov w9, s0
1218 ; CHECK-NEXT: stp w9, w8, [sp, #24]
1219 ; CHECK-NEXT: fmov w8, s2
1220 ; CHECK-NEXT: fmov w9, s1
1221 ; CHECK-NEXT: stp w9, w8, [sp, #16]
1222 ; CHECK-NEXT: ldp q0, q1, [sp]
1223 ; CHECK-NEXT: add z0.s, z0.s, z1.s
1224 ; CHECK-NEXT: stp q0, q0, [x0]
1225 ; CHECK-NEXT: add sp, sp, #32
1227 %tmp1 = load <8 x i32>, ptr %a
1228 %tmp3 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 0, i32 2, i32 4, i32 6>
1229 %tmp4 = shufflevector <8 x i32> %tmp1, <8 x i32> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 1, i32 3, i32 5, i32 7>
1230 %tmp5 = add <8 x i32> %tmp3, %tmp4
1231 store <8 x i32> %tmp5, ptr %a
1235 define void @zip_vscale2_4(ptr %a, ptr %b) {
1236 ; CHECK-LABEL: zip_vscale2_4:
1238 ; CHECK-NEXT: ldp q1, q0, [x0]
1239 ; CHECK-NEXT: ptrue p0.d, vl2
1240 ; CHECK-NEXT: ldp q3, q2, [x1]
1241 ; CHECK-NEXT: zip1 z4.d, z1.d, z3.d
1242 ; CHECK-NEXT: zip1 z5.d, z0.d, z2.d
1243 ; CHECK-NEXT: trn2 z1.d, z1.d, z3.d
1244 ; CHECK-NEXT: trn2 z0.d, z0.d, z2.d
1245 ; CHECK-NEXT: movprfx z2, z4
1246 ; CHECK-NEXT: fadd z2.d, p0/m, z2.d, z5.d
1247 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z1.d
1248 ; CHECK-NEXT: stp q2, q0, [x0]
1250 %tmp1 = load <4 x double>, ptr %a
1251 %tmp2 = load <4 x double>, ptr %b
1252 %tmp3 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
1253 %tmp4 = shufflevector <4 x double> %tmp1, <4 x double> %tmp2, <4 x i32> <i32 2, i32 6, i32 3, i32 7>
1254 %tmp5 = fadd <4 x double> %tmp3, %tmp4
1255 store <4 x double> %tmp5, ptr %a