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
4 target triple = "aarch64-unknown-linux-gnu"
10 define <4 x i16> @fcvtzu_v4f16_v4i16(<4 x half> %op1) {
11 ; CHECK-LABEL: fcvtzu_v4f16_v4i16:
13 ; CHECK-NEXT: ptrue p0.h, vl4
14 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
15 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
16 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
18 %res = fptoui <4 x half> %op1 to <4 x i16>
22 define void @fcvtzu_v8f16_v8i16(ptr %a, ptr %b) {
23 ; CHECK-LABEL: fcvtzu_v8f16_v8i16:
25 ; CHECK-NEXT: ptrue p0.h, vl8
26 ; CHECK-NEXT: ldr q0, [x0]
27 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
28 ; CHECK-NEXT: str q0, [x1]
30 %op1 = load <8 x half>, ptr %a
31 %res = fptoui <8 x half> %op1 to <8 x i16>
32 store <8 x i16> %res, ptr %b
36 define void @fcvtzu_v16f16_v16i16(ptr %a, ptr %b) {
37 ; CHECK-LABEL: fcvtzu_v16f16_v16i16:
39 ; CHECK-NEXT: ptrue p0.h, vl8
40 ; CHECK-NEXT: ldp q0, q1, [x0]
41 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
42 ; CHECK-NEXT: fcvtzu z1.h, p0/m, z1.h
43 ; CHECK-NEXT: stp q0, q1, [x1]
45 %op1 = load <16 x half>, ptr %a
46 %res = fptoui <16 x half> %op1 to <16 x i16>
47 store <16 x i16> %res, ptr %b
55 define <2 x i32> @fcvtzu_v2f16_v2i32(<2 x half> %op1) {
56 ; CHECK-LABEL: fcvtzu_v2f16_v2i32:
58 ; CHECK-NEXT: ptrue p0.s, vl4
59 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
60 ; CHECK-NEXT: uunpklo z0.s, z0.h
61 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
62 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
64 %res = fptoui <2 x half> %op1 to <2 x i32>
68 define <4 x i32> @fcvtzu_v4f16_v4i32(<4 x half> %op1) {
69 ; CHECK-LABEL: fcvtzu_v4f16_v4i32:
71 ; CHECK-NEXT: ptrue p0.s, vl4
72 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
73 ; CHECK-NEXT: uunpklo z0.s, z0.h
74 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
75 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
77 %res = fptoui <4 x half> %op1 to <4 x i32>
81 define void @fcvtzu_v8f16_v8i32(ptr %a, ptr %b) {
82 ; CHECK-LABEL: fcvtzu_v8f16_v8i32:
84 ; CHECK-NEXT: ldr q0, [x0]
85 ; CHECK-NEXT: ptrue p0.s, vl4
86 ; CHECK-NEXT: uunpklo z1.s, z0.h
87 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
88 ; CHECK-NEXT: uunpklo z0.s, z0.h
89 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.h
90 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
91 ; CHECK-NEXT: stp q1, q0, [x1]
93 %op1 = load <8 x half>, ptr %a
94 %res = fptoui <8 x half> %op1 to <8 x i32>
95 store <8 x i32> %res, ptr %b
99 define void @fcvtzu_v16f16_v16i32(ptr %a, ptr %b) {
100 ; CHECK-LABEL: fcvtzu_v16f16_v16i32:
102 ; CHECK-NEXT: ldp q1, q0, [x0]
103 ; CHECK-NEXT: ptrue p0.s, vl4
104 ; CHECK-NEXT: uunpklo z2.s, z0.h
105 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
106 ; CHECK-NEXT: uunpklo z3.s, z1.h
107 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
108 ; CHECK-NEXT: uunpklo z0.s, z0.h
109 ; CHECK-NEXT: uunpklo z1.s, z1.h
110 ; CHECK-NEXT: fcvtzu z2.s, p0/m, z2.h
111 ; CHECK-NEXT: fcvtzu z3.s, p0/m, z3.h
112 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
113 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.h
114 ; CHECK-NEXT: stp q2, q0, [x1, #32]
115 ; CHECK-NEXT: stp q3, q1, [x1]
117 %op1 = load <16 x half>, ptr %a
118 %res = fptoui <16 x half> %op1 to <16 x i32>
119 store <16 x i32> %res, ptr %b
127 define <1 x i64> @fcvtzu_v1f16_v1i64(<1 x half> %op1) {
128 ; CHECK-LABEL: fcvtzu_v1f16_v1i64:
130 ; CHECK-NEXT: fcvtzu x8, h0
131 ; CHECK-NEXT: fmov d0, x8
133 %res = fptoui <1 x half> %op1 to <1 x i64>
137 define <2 x i64> @fcvtzu_v2f16_v2i64(<2 x half> %op1) {
138 ; CHECK-LABEL: fcvtzu_v2f16_v2i64:
140 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
141 ; CHECK-NEXT: mov z1.h, z0.h[1]
142 ; CHECK-NEXT: fcvtzu x8, h0
143 ; CHECK-NEXT: fcvtzu x9, h1
144 ; CHECK-NEXT: stp x8, x9, [sp, #-16]!
145 ; CHECK-NEXT: .cfi_def_cfa_offset 16
146 ; CHECK-NEXT: ldr q0, [sp], #16
148 %res = fptoui <2 x half> %op1 to <2 x i64>
152 define void @fcvtzu_v4f16_v4i64(ptr %a, ptr %b) {
153 ; CHECK-LABEL: fcvtzu_v4f16_v4i64:
155 ; CHECK-NEXT: ldr d0, [x0]
156 ; CHECK-NEXT: mov z1.h, z0.h[1]
157 ; CHECK-NEXT: fcvtzu x8, h0
158 ; CHECK-NEXT: mov z2.h, z0.h[3]
159 ; CHECK-NEXT: mov z0.h, z0.h[2]
160 ; CHECK-NEXT: fcvtzu x9, h1
161 ; CHECK-NEXT: fcvtzu x10, h2
162 ; CHECK-NEXT: fcvtzu x11, h0
163 ; CHECK-NEXT: stp x8, x9, [sp, #-32]!
164 ; CHECK-NEXT: .cfi_def_cfa_offset 32
165 ; CHECK-NEXT: stp x11, x10, [sp, #16]
166 ; CHECK-NEXT: ldp q1, q0, [sp]
167 ; CHECK-NEXT: stp q1, q0, [x1]
168 ; CHECK-NEXT: add sp, sp, #32
170 %op1 = load <4 x half>, ptr %a
171 %res = fptoui <4 x half> %op1 to <4 x i64>
172 store <4 x i64> %res, ptr %b
176 define void @fcvtzu_v8f16_v8i64(ptr %a, ptr %b) {
177 ; CHECK-LABEL: fcvtzu_v8f16_v8i64:
179 ; CHECK-NEXT: sub sp, sp, #64
180 ; CHECK-NEXT: .cfi_def_cfa_offset 64
181 ; CHECK-NEXT: ldr q0, [x0]
182 ; CHECK-NEXT: mov z1.h, z0.h[1]
183 ; CHECK-NEXT: mov z2.h, z0.h[3]
184 ; CHECK-NEXT: mov z3.h, z0.h[2]
185 ; CHECK-NEXT: fcvtzu x8, h0
186 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
187 ; CHECK-NEXT: fcvtzu x9, h1
188 ; CHECK-NEXT: fcvtzu x10, h2
189 ; CHECK-NEXT: fcvtzu x11, h3
190 ; CHECK-NEXT: mov z1.h, z0.h[1]
191 ; CHECK-NEXT: mov z2.h, z0.h[3]
192 ; CHECK-NEXT: fcvtzu x12, h0
193 ; CHECK-NEXT: mov z0.h, z0.h[2]
194 ; CHECK-NEXT: stp x8, x9, [sp, #32]
195 ; CHECK-NEXT: fcvtzu x8, h1
196 ; CHECK-NEXT: fcvtzu x9, h2
197 ; CHECK-NEXT: stp x11, x10, [sp, #48]
198 ; CHECK-NEXT: fcvtzu x10, h0
199 ; CHECK-NEXT: ldp q2, q3, [sp, #32]
200 ; CHECK-NEXT: stp x12, x8, [sp]
201 ; CHECK-NEXT: stp x10, x9, [sp, #16]
202 ; CHECK-NEXT: ldp q1, q0, [sp]
203 ; CHECK-NEXT: stp q2, q3, [x1]
204 ; CHECK-NEXT: stp q1, q0, [x1, #32]
205 ; CHECK-NEXT: add sp, sp, #64
207 %op1 = load <8 x half>, ptr %a
208 %res = fptoui <8 x half> %op1 to <8 x i64>
209 store <8 x i64> %res, ptr %b
213 define void @fcvtzu_v16f16_v16i64(ptr %a, ptr %b) {
214 ; CHECK-LABEL: fcvtzu_v16f16_v16i64:
216 ; CHECK-NEXT: sub sp, sp, #128
217 ; CHECK-NEXT: .cfi_def_cfa_offset 128
218 ; CHECK-NEXT: ldp q1, q0, [x0]
219 ; CHECK-NEXT: mov z2.h, z1.h[1]
220 ; CHECK-NEXT: mov z3.h, z1.h[3]
221 ; CHECK-NEXT: mov z4.h, z1.h[2]
222 ; CHECK-NEXT: fcvtzu x8, h1
223 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
224 ; CHECK-NEXT: mov z5.h, z0.h[3]
225 ; CHECK-NEXT: fcvtzu x10, h0
226 ; CHECK-NEXT: fcvtzu x9, h2
227 ; CHECK-NEXT: fcvtzu x11, h3
228 ; CHECK-NEXT: fcvtzu x12, h4
229 ; CHECK-NEXT: mov z2.h, z1.h[1]
230 ; CHECK-NEXT: mov z4.h, z1.h[3]
231 ; CHECK-NEXT: fcvtzu x13, h1
232 ; CHECK-NEXT: mov z1.h, z1.h[2]
233 ; CHECK-NEXT: mov z3.h, z0.h[1]
234 ; CHECK-NEXT: stp x8, x9, [sp, #32]
235 ; CHECK-NEXT: fcvtzu x8, h2
236 ; CHECK-NEXT: fcvtzu x9, h4
237 ; CHECK-NEXT: stp x12, x11, [sp, #48]
238 ; CHECK-NEXT: fcvtzu x11, h1
239 ; CHECK-NEXT: mov z2.h, z0.h[2]
240 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
241 ; CHECK-NEXT: fcvtzu x12, h3
242 ; CHECK-NEXT: stp x13, x8, [sp]
243 ; CHECK-NEXT: fcvtzu x8, h5
244 ; CHECK-NEXT: stp x11, x9, [sp, #16]
245 ; CHECK-NEXT: fcvtzu x9, h2
246 ; CHECK-NEXT: mov z1.h, z0.h[1]
247 ; CHECK-NEXT: mov z2.h, z0.h[3]
248 ; CHECK-NEXT: fcvtzu x11, h0
249 ; CHECK-NEXT: mov z0.h, z0.h[2]
250 ; CHECK-NEXT: stp x10, x12, [sp, #96]
251 ; CHECK-NEXT: ldp q3, q4, [sp]
252 ; CHECK-NEXT: fcvtzu x10, h1
253 ; CHECK-NEXT: fcvtzu x12, h2
254 ; CHECK-NEXT: stp x9, x8, [sp, #112]
255 ; CHECK-NEXT: fcvtzu x8, h0
256 ; CHECK-NEXT: ldp q0, q1, [sp, #32]
257 ; CHECK-NEXT: ldp q6, q7, [sp, #96]
258 ; CHECK-NEXT: stp x11, x10, [sp, #64]
259 ; CHECK-NEXT: stp x8, x12, [sp, #80]
260 ; CHECK-NEXT: ldp q5, q2, [sp, #64]
261 ; CHECK-NEXT: stp q0, q1, [x1]
262 ; CHECK-NEXT: stp q3, q4, [x1, #32]
263 ; CHECK-NEXT: stp q6, q7, [x1, #64]
264 ; CHECK-NEXT: stp q5, q2, [x1, #96]
265 ; CHECK-NEXT: add sp, sp, #128
267 %op1 = load <16 x half>, ptr %a
268 %res = fptoui <16 x half> %op1 to <16 x i64>
269 store <16 x i64> %res, ptr %b
277 define <2 x i16> @fcvtzu_v2f32_v2i16(<2 x float> %op1) {
278 ; CHECK-LABEL: fcvtzu_v2f32_v2i16:
280 ; CHECK-NEXT: ptrue p0.s, vl2
281 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
282 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
283 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
285 %res = fptoui <2 x float> %op1 to <2 x i16>
289 define <4 x i16> @fcvtzu_v4f32_v4i16(<4 x float> %op1) {
290 ; CHECK-LABEL: fcvtzu_v4f32_v4i16:
292 ; CHECK-NEXT: ptrue p0.s, vl4
293 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
294 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
295 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
296 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
298 %res = fptoui <4 x float> %op1 to <4 x i16>
302 define <8 x i16> @fcvtzu_v8f32_v8i16(ptr %a) {
303 ; CHECK-LABEL: fcvtzu_v8f32_v8i16:
305 ; CHECK-NEXT: ptrue p0.s, vl4
306 ; CHECK-NEXT: ldp q0, q1, [x0]
307 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
308 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
309 ; CHECK-NEXT: ptrue p0.h, vl4
310 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
311 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
312 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
313 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
315 %op1 = load <8 x float>, ptr %a
316 %res = fptoui <8 x float> %op1 to <8 x i16>
320 define void @fcvtzu_v16f32_v16i16(ptr %a, ptr %b) {
321 ; CHECK-LABEL: fcvtzu_v16f32_v16i16:
323 ; CHECK-NEXT: ptrue p0.s, vl4
324 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
325 ; CHECK-NEXT: ldp q2, q3, [x0]
326 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
327 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
328 ; CHECK-NEXT: fcvtzu z3.s, p0/m, z3.s
329 ; CHECK-NEXT: fcvtzu z2.s, p0/m, z2.s
330 ; CHECK-NEXT: ptrue p0.h, vl4
331 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
332 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
333 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
334 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
335 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
336 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
337 ; CHECK-NEXT: stp q2, q0, [x1]
339 %op1 = load <16 x float>, ptr %a
340 %res = fptoui <16 x float> %op1 to <16 x i16>
341 store <16 x i16> %res, ptr %b
349 define <2 x i32> @fcvtzu_v2f32_v2i32(<2 x float> %op1) {
350 ; CHECK-LABEL: fcvtzu_v2f32_v2i32:
352 ; CHECK-NEXT: ptrue p0.s, vl2
353 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
354 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
355 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
357 %res = fptoui <2 x float> %op1 to <2 x i32>
361 define <4 x i32> @fcvtzu_v4f32_v4i32(<4 x float> %op1) {
362 ; CHECK-LABEL: fcvtzu_v4f32_v4i32:
364 ; CHECK-NEXT: ptrue p0.s, vl4
365 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
366 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
367 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
369 %res = fptoui <4 x float> %op1 to <4 x i32>
373 define void @fcvtzu_v8f32_v8i32(ptr %a, ptr %b) {
374 ; CHECK-LABEL: fcvtzu_v8f32_v8i32:
376 ; CHECK-NEXT: ptrue p0.s, vl4
377 ; CHECK-NEXT: ldp q0, q1, [x0]
378 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
379 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
380 ; CHECK-NEXT: stp q0, q1, [x1]
382 %op1 = load <8 x float>, ptr %a
383 %res = fptoui <8 x float> %op1 to <8 x i32>
384 store <8 x i32> %res, ptr %b
392 define <1 x i64> @fcvtzu_v1f32_v1i64(<1 x float> %op1) {
393 ; CHECK-LABEL: fcvtzu_v1f32_v1i64:
395 ; CHECK-NEXT: ptrue p0.d, vl2
396 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
397 ; CHECK-NEXT: uunpklo z0.d, z0.s
398 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
399 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
401 %res = fptoui <1 x float> %op1 to <1 x i64>
405 define <2 x i64> @fcvtzu_v2f32_v2i64(<2 x float> %op1) {
406 ; CHECK-LABEL: fcvtzu_v2f32_v2i64:
408 ; CHECK-NEXT: ptrue p0.d, vl2
409 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
410 ; CHECK-NEXT: uunpklo z0.d, z0.s
411 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
412 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
414 %res = fptoui <2 x float> %op1 to <2 x i64>
418 define void @fcvtzu_v4f32_v4i64(ptr %a, ptr %b) {
419 ; CHECK-LABEL: fcvtzu_v4f32_v4i64:
421 ; CHECK-NEXT: ldr q0, [x0]
422 ; CHECK-NEXT: ptrue p0.d, vl2
423 ; CHECK-NEXT: uunpklo z1.d, z0.s
424 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
425 ; CHECK-NEXT: uunpklo z0.d, z0.s
426 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
427 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
428 ; CHECK-NEXT: stp q1, q0, [x1]
430 %op1 = load <4 x float>, ptr %a
431 %res = fptoui <4 x float> %op1 to <4 x i64>
432 store <4 x i64> %res, ptr %b
436 define void @fcvtzu_v8f32_v8i64(ptr %a, ptr %b) {
437 ; CHECK-LABEL: fcvtzu_v8f32_v8i64:
439 ; CHECK-NEXT: ldp q1, q0, [x0]
440 ; CHECK-NEXT: ptrue p0.d, vl2
441 ; CHECK-NEXT: uunpklo z2.d, z0.s
442 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
443 ; CHECK-NEXT: uunpklo z3.d, z1.s
444 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
445 ; CHECK-NEXT: uunpklo z0.d, z0.s
446 ; CHECK-NEXT: uunpklo z1.d, z1.s
447 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.s
448 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.s
449 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
450 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
451 ; CHECK-NEXT: stp q2, q0, [x1, #32]
452 ; CHECK-NEXT: stp q3, q1, [x1]
454 %op1 = load <8 x float>, ptr %a
455 %res = fptoui <8 x float> %op1 to <8 x i64>
456 store <8 x i64> %res, ptr %b
464 define <1 x i16> @fcvtzu_v1f64_v1i16(<1 x double> %op1) {
465 ; CHECK-LABEL: fcvtzu_v1f64_v1i16:
467 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
468 ; CHECK-NEXT: fcvtzs w8, d0
469 ; CHECK-NEXT: mov z0.h, w8
470 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
472 %res = fptoui <1 x double> %op1 to <1 x i16>
476 define <2 x i16> @fcvtzu_v2f64_v2i16(<2 x double> %op1) {
477 ; CHECK-LABEL: fcvtzu_v2f64_v2i16:
479 ; CHECK-NEXT: ptrue p0.d, vl2
480 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
481 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
482 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
483 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
485 %res = fptoui <2 x double> %op1 to <2 x i16>
489 define <4 x i16> @fcvtzu_v4f64_v4i16(ptr %a) {
490 ; CHECK-LABEL: fcvtzu_v4f64_v4i16:
492 ; CHECK-NEXT: sub sp, sp, #16
493 ; CHECK-NEXT: .cfi_def_cfa_offset 16
494 ; CHECK-NEXT: ptrue p0.d, vl2
495 ; CHECK-NEXT: ldp q1, q0, [x0]
496 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
497 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
498 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
499 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
500 ; CHECK-NEXT: mov z2.s, z0.s[1]
501 ; CHECK-NEXT: fmov w8, s0
502 ; CHECK-NEXT: mov z0.s, z1.s[1]
503 ; CHECK-NEXT: fmov w9, s1
504 ; CHECK-NEXT: strh w8, [sp, #12]
505 ; CHECK-NEXT: fmov w8, s2
506 ; CHECK-NEXT: strh w9, [sp, #8]
507 ; CHECK-NEXT: strh w8, [sp, #14]
508 ; CHECK-NEXT: fmov w8, s0
509 ; CHECK-NEXT: strh w8, [sp, #10]
510 ; CHECK-NEXT: ldr d0, [sp, #8]
511 ; CHECK-NEXT: add sp, sp, #16
513 %op1 = load <4 x double>, ptr %a
514 %res = fptoui <4 x double> %op1 to <4 x i16>
518 define <8 x i16> @fcvtzu_v8f64_v8i16(ptr %a) {
519 ; CHECK-LABEL: fcvtzu_v8f64_v8i16:
521 ; CHECK-NEXT: sub sp, sp, #16
522 ; CHECK-NEXT: .cfi_def_cfa_offset 16
523 ; CHECK-NEXT: ptrue p0.d, vl2
524 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
525 ; CHECK-NEXT: ldp q3, q2, [x0]
526 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
527 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
528 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
529 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
530 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
531 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
532 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
533 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
534 ; CHECK-NEXT: fmov w8, s0
535 ; CHECK-NEXT: mov z0.s, z0.s[1]
536 ; CHECK-NEXT: strh w8, [sp, #12]
537 ; CHECK-NEXT: fmov w8, s1
538 ; CHECK-NEXT: mov z1.s, z1.s[1]
539 ; CHECK-NEXT: strh w8, [sp, #8]
540 ; CHECK-NEXT: fmov w8, s2
541 ; CHECK-NEXT: mov z2.s, z2.s[1]
542 ; CHECK-NEXT: strh w8, [sp, #4]
543 ; CHECK-NEXT: fmov w8, s3
544 ; CHECK-NEXT: mov z3.s, z3.s[1]
545 ; CHECK-NEXT: strh w8, [sp]
546 ; CHECK-NEXT: fmov w8, s0
547 ; CHECK-NEXT: strh w8, [sp, #14]
548 ; CHECK-NEXT: fmov w8, s1
549 ; CHECK-NEXT: strh w8, [sp, #10]
550 ; CHECK-NEXT: fmov w8, s2
551 ; CHECK-NEXT: strh w8, [sp, #6]
552 ; CHECK-NEXT: fmov w8, s3
553 ; CHECK-NEXT: strh w8, [sp, #2]
554 ; CHECK-NEXT: ldr q0, [sp], #16
556 %op1 = load <8 x double>, ptr %a
557 %res = fptoui <8 x double> %op1 to <8 x i16>
561 define void @fcvtzu_v16f64_v16i16(ptr %a, ptr %b) {
562 ; CHECK-LABEL: fcvtzu_v16f64_v16i16:
564 ; CHECK-NEXT: sub sp, sp, #32
565 ; CHECK-NEXT: .cfi_def_cfa_offset 32
566 ; CHECK-NEXT: ptrue p0.d, vl2
567 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
568 ; CHECK-NEXT: ldp q3, q2, [x0]
569 ; CHECK-NEXT: ldr q6, [x0, #112]
570 ; CHECK-NEXT: ldp q4, q5, [x0, #80]
571 ; CHECK-NEXT: ldr q7, [x0, #64]
572 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
573 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
574 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
575 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
576 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
577 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
578 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
579 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
580 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
581 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
582 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
583 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
584 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
585 ; CHECK-NEXT: fmov w8, s1
586 ; CHECK-NEXT: mov z16.s, z1.s[1]
587 ; CHECK-NEXT: mov z1.s, z0.s[1]
588 ; CHECK-NEXT: fmov w9, s0
589 ; CHECK-NEXT: mov z0.s, z2.s[1]
590 ; CHECK-NEXT: strh w8, [sp, #12]
591 ; CHECK-NEXT: fmov w8, s2
592 ; CHECK-NEXT: mov z2.s, z3.s[1]
593 ; CHECK-NEXT: strh w9, [sp, #8]
594 ; CHECK-NEXT: fmov w9, s3
595 ; CHECK-NEXT: movprfx z3, z7
596 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z7.d
597 ; CHECK-NEXT: strh w8, [sp, #4]
598 ; CHECK-NEXT: fmov w8, s16
599 ; CHECK-NEXT: strh w9, [sp]
600 ; CHECK-NEXT: strh w8, [sp, #14]
601 ; CHECK-NEXT: fmov w8, s1
602 ; CHECK-NEXT: uzp1 z1.s, z4.s, z4.s
603 ; CHECK-NEXT: strh w8, [sp, #10]
604 ; CHECK-NEXT: fmov w8, s0
605 ; CHECK-NEXT: uzp1 z0.s, z3.s, z3.s
606 ; CHECK-NEXT: mov z3.s, z5.s[1]
607 ; CHECK-NEXT: strh w8, [sp, #6]
608 ; CHECK-NEXT: fmov w8, s2
609 ; CHECK-NEXT: mov z2.s, z6.s[1]
610 ; CHECK-NEXT: strh w8, [sp, #2]
611 ; CHECK-NEXT: fmov w8, s6
612 ; CHECK-NEXT: strh w8, [sp, #28]
613 ; CHECK-NEXT: fmov w8, s5
614 ; CHECK-NEXT: strh w8, [sp, #24]
615 ; CHECK-NEXT: fmov w8, s1
616 ; CHECK-NEXT: mov z1.s, z1.s[1]
617 ; CHECK-NEXT: strh w8, [sp, #20]
618 ; CHECK-NEXT: fmov w8, s0
619 ; CHECK-NEXT: mov z0.s, z0.s[1]
620 ; CHECK-NEXT: strh w8, [sp, #16]
621 ; CHECK-NEXT: fmov w8, s2
622 ; CHECK-NEXT: strh w8, [sp, #30]
623 ; CHECK-NEXT: fmov w8, s3
624 ; CHECK-NEXT: strh w8, [sp, #26]
625 ; CHECK-NEXT: fmov w8, s1
626 ; CHECK-NEXT: strh w8, [sp, #22]
627 ; CHECK-NEXT: fmov w8, s0
628 ; CHECK-NEXT: strh w8, [sp, #18]
629 ; CHECK-NEXT: ldp q1, q0, [sp]
630 ; CHECK-NEXT: stp q1, q0, [x1]
631 ; CHECK-NEXT: add sp, sp, #32
633 %op1 = load <16 x double>, ptr %a
634 %res = fptoui <16 x double> %op1 to <16 x i16>
635 store <16 x i16> %res, ptr %b
643 define <1 x i32> @fcvtzu_v1f64_v1i32(<1 x double> %op1) {
644 ; CHECK-LABEL: fcvtzu_v1f64_v1i32:
646 ; CHECK-NEXT: ptrue p0.d, vl2
647 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
648 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
649 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
650 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
652 %res = fptoui <1 x double> %op1 to <1 x i32>
656 define <2 x i32> @fcvtzu_v2f64_v2i32(<2 x double> %op1) {
657 ; CHECK-LABEL: fcvtzu_v2f64_v2i32:
659 ; CHECK-NEXT: ptrue p0.d, vl2
660 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
661 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
662 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
663 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
665 %res = fptoui <2 x double> %op1 to <2 x i32>
669 define <4 x i32> @fcvtzu_v4f64_v4i32(ptr %a) {
670 ; CHECK-LABEL: fcvtzu_v4f64_v4i32:
672 ; CHECK-NEXT: ptrue p0.d, vl2
673 ; CHECK-NEXT: ldp q0, q1, [x0]
674 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
675 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
676 ; CHECK-NEXT: ptrue p0.s, vl2
677 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
678 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
679 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
680 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
682 %op1 = load <4 x double>, ptr %a
683 %res = fptoui <4 x double> %op1 to <4 x i32>
687 define void @fcvtzu_v8f64_v8i32(ptr %a, ptr %b) {
688 ; CHECK-LABEL: fcvtzu_v8f64_v8i32:
690 ; CHECK-NEXT: ptrue p0.d, vl2
691 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
692 ; CHECK-NEXT: ldp q2, q3, [x0]
693 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
694 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
695 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.d
696 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.d
697 ; CHECK-NEXT: ptrue p0.s, vl2
698 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
699 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
700 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
701 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
702 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
703 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
704 ; CHECK-NEXT: stp q2, q0, [x1]
706 %op1 = load <8 x double>, ptr %a
707 %res = fptoui <8 x double> %op1 to <8 x i32>
708 store <8 x i32> %res, ptr %b
716 define <1 x i64> @fcvtzu_v1f64_v1i64(<1 x double> %op1) {
717 ; CHECK-LABEL: fcvtzu_v1f64_v1i64:
719 ; CHECK-NEXT: ptrue p0.d, vl1
720 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
721 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
722 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
724 %res = fptoui <1 x double> %op1 to <1 x i64>
728 define <2 x i64> @fcvtzu_v2f64_v2i64(<2 x double> %op1) {
729 ; CHECK-LABEL: fcvtzu_v2f64_v2i64:
731 ; CHECK-NEXT: ptrue p0.d, vl2
732 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
733 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
734 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
736 %res = fptoui <2 x double> %op1 to <2 x i64>
740 define void @fcvtzu_v4f64_v4i64(ptr %a, ptr %b) {
741 ; CHECK-LABEL: fcvtzu_v4f64_v4i64:
743 ; CHECK-NEXT: ptrue p0.d, vl2
744 ; CHECK-NEXT: ldp q0, q1, [x0]
745 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
746 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
747 ; CHECK-NEXT: stp q0, q1, [x1]
749 %op1 = load <4 x double>, ptr %a
750 %res = fptoui <4 x double> %op1 to <4 x i64>
751 store <4 x i64> %res, ptr %b
759 define <4 x i16> @fcvtzs_v4f16_v4i16(<4 x half> %op1) {
760 ; CHECK-LABEL: fcvtzs_v4f16_v4i16:
762 ; CHECK-NEXT: ptrue p0.h, vl4
763 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
764 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
765 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
767 %res = fptosi <4 x half> %op1 to <4 x i16>
771 define void @fcvtzs_v8f16_v8i16(ptr %a, ptr %b) {
772 ; CHECK-LABEL: fcvtzs_v8f16_v8i16:
774 ; CHECK-NEXT: ptrue p0.h, vl8
775 ; CHECK-NEXT: ldr q0, [x0]
776 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
777 ; CHECK-NEXT: str q0, [x1]
779 %op1 = load <8 x half>, ptr %a
780 %res = fptosi <8 x half> %op1 to <8 x i16>
781 store <8 x i16> %res, ptr %b
785 define void @fcvtzs_v16f16_v16i16(ptr %a, ptr %b) {
786 ; CHECK-LABEL: fcvtzs_v16f16_v16i16:
788 ; CHECK-NEXT: ptrue p0.h, vl8
789 ; CHECK-NEXT: ldp q0, q1, [x0]
790 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
791 ; CHECK-NEXT: fcvtzs z1.h, p0/m, z1.h
792 ; CHECK-NEXT: stp q0, q1, [x1]
794 %op1 = load <16 x half>, ptr %a
795 %res = fptosi <16 x half> %op1 to <16 x i16>
796 store <16 x i16> %res, ptr %b
804 define <2 x i32> @fcvtzs_v2f16_v2i32(<2 x half> %op1) {
805 ; CHECK-LABEL: fcvtzs_v2f16_v2i32:
807 ; CHECK-NEXT: ptrue p0.s, vl4
808 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
809 ; CHECK-NEXT: uunpklo z0.s, z0.h
810 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
811 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
813 %res = fptosi <2 x half> %op1 to <2 x i32>
817 define <4 x i32> @fcvtzs_v4f16_v4i32(<4 x half> %op1) {
818 ; CHECK-LABEL: fcvtzs_v4f16_v4i32:
820 ; CHECK-NEXT: ptrue p0.s, vl4
821 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
822 ; CHECK-NEXT: uunpklo z0.s, z0.h
823 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
824 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
826 %res = fptosi <4 x half> %op1 to <4 x i32>
830 define void @fcvtzs_v8f16_v8i32(ptr %a, ptr %b) {
831 ; CHECK-LABEL: fcvtzs_v8f16_v8i32:
833 ; CHECK-NEXT: ldr q0, [x0]
834 ; CHECK-NEXT: ptrue p0.s, vl4
835 ; CHECK-NEXT: uunpklo z1.s, z0.h
836 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
837 ; CHECK-NEXT: uunpklo z0.s, z0.h
838 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
839 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
840 ; CHECK-NEXT: stp q1, q0, [x1]
842 %op1 = load <8 x half>, ptr %a
843 %res = fptosi <8 x half> %op1 to <8 x i32>
844 store <8 x i32> %res, ptr %b
848 define void @fcvtzs_v16f16_v16i32(ptr %a, ptr %b) {
849 ; CHECK-LABEL: fcvtzs_v16f16_v16i32:
851 ; CHECK-NEXT: ldp q1, q0, [x0]
852 ; CHECK-NEXT: ptrue p0.s, vl4
853 ; CHECK-NEXT: uunpklo z2.s, z0.h
854 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
855 ; CHECK-NEXT: uunpklo z3.s, z1.h
856 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
857 ; CHECK-NEXT: uunpklo z0.s, z0.h
858 ; CHECK-NEXT: uunpklo z1.s, z1.h
859 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.h
860 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.h
861 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
862 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
863 ; CHECK-NEXT: stp q2, q0, [x1, #32]
864 ; CHECK-NEXT: stp q3, q1, [x1]
866 %op1 = load <16 x half>, ptr %a
867 %res = fptosi <16 x half> %op1 to <16 x i32>
868 store <16 x i32> %res, ptr %b
876 define <1 x i64> @fcvtzs_v1f16_v1i64(<1 x half> %op1) {
877 ; CHECK-LABEL: fcvtzs_v1f16_v1i64:
879 ; CHECK-NEXT: fcvtzs x8, h0
880 ; CHECK-NEXT: fmov d0, x8
882 %res = fptosi <1 x half> %op1 to <1 x i64>
886 ; v2f16 is not legal for NEON, so use SVE
887 define <2 x i64> @fcvtzs_v2f16_v2i64(<2 x half> %op1) {
888 ; CHECK-LABEL: fcvtzs_v2f16_v2i64:
890 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
891 ; CHECK-NEXT: mov z1.h, z0.h[1]
892 ; CHECK-NEXT: fcvtzs x8, h0
893 ; CHECK-NEXT: fcvtzs x9, h1
894 ; CHECK-NEXT: stp x8, x9, [sp, #-16]!
895 ; CHECK-NEXT: .cfi_def_cfa_offset 16
896 ; CHECK-NEXT: ldr q0, [sp], #16
898 %res = fptosi <2 x half> %op1 to <2 x i64>
902 define void @fcvtzs_v4f16_v4i64(ptr %a, ptr %b) {
903 ; CHECK-LABEL: fcvtzs_v4f16_v4i64:
905 ; CHECK-NEXT: ldr d0, [x0]
906 ; CHECK-NEXT: mov z1.h, z0.h[1]
907 ; CHECK-NEXT: fcvtzs x8, h0
908 ; CHECK-NEXT: mov z2.h, z0.h[3]
909 ; CHECK-NEXT: mov z0.h, z0.h[2]
910 ; CHECK-NEXT: fcvtzs x9, h1
911 ; CHECK-NEXT: fcvtzs x10, h2
912 ; CHECK-NEXT: fcvtzs x11, h0
913 ; CHECK-NEXT: stp x8, x9, [sp, #-32]!
914 ; CHECK-NEXT: .cfi_def_cfa_offset 32
915 ; CHECK-NEXT: stp x11, x10, [sp, #16]
916 ; CHECK-NEXT: ldp q1, q0, [sp]
917 ; CHECK-NEXT: stp q1, q0, [x1]
918 ; CHECK-NEXT: add sp, sp, #32
920 %op1 = load <4 x half>, ptr %a
921 %res = fptosi <4 x half> %op1 to <4 x i64>
922 store <4 x i64> %res, ptr %b
926 define void @fcvtzs_v8f16_v8i64(ptr %a, ptr %b) {
927 ; CHECK-LABEL: fcvtzs_v8f16_v8i64:
929 ; CHECK-NEXT: sub sp, sp, #64
930 ; CHECK-NEXT: .cfi_def_cfa_offset 64
931 ; CHECK-NEXT: ldr q0, [x0]
932 ; CHECK-NEXT: mov z1.h, z0.h[1]
933 ; CHECK-NEXT: mov z2.h, z0.h[3]
934 ; CHECK-NEXT: mov z3.h, z0.h[2]
935 ; CHECK-NEXT: fcvtzs x8, h0
936 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
937 ; CHECK-NEXT: fcvtzs x9, h1
938 ; CHECK-NEXT: fcvtzs x10, h2
939 ; CHECK-NEXT: fcvtzs x11, h3
940 ; CHECK-NEXT: mov z1.h, z0.h[1]
941 ; CHECK-NEXT: mov z2.h, z0.h[3]
942 ; CHECK-NEXT: fcvtzs x12, h0
943 ; CHECK-NEXT: mov z0.h, z0.h[2]
944 ; CHECK-NEXT: stp x8, x9, [sp, #32]
945 ; CHECK-NEXT: fcvtzs x8, h1
946 ; CHECK-NEXT: fcvtzs x9, h2
947 ; CHECK-NEXT: stp x11, x10, [sp, #48]
948 ; CHECK-NEXT: fcvtzs x10, h0
949 ; CHECK-NEXT: ldp q2, q3, [sp, #32]
950 ; CHECK-NEXT: stp x12, x8, [sp]
951 ; CHECK-NEXT: stp x10, x9, [sp, #16]
952 ; CHECK-NEXT: ldp q1, q0, [sp]
953 ; CHECK-NEXT: stp q2, q3, [x1]
954 ; CHECK-NEXT: stp q1, q0, [x1, #32]
955 ; CHECK-NEXT: add sp, sp, #64
957 %op1 = load <8 x half>, ptr %a
958 %res = fptosi <8 x half> %op1 to <8 x i64>
959 store <8 x i64> %res, ptr %b
963 define void @fcvtzs_v16f16_v16i64(ptr %a, ptr %b) {
964 ; CHECK-LABEL: fcvtzs_v16f16_v16i64:
966 ; CHECK-NEXT: sub sp, sp, #128
967 ; CHECK-NEXT: .cfi_def_cfa_offset 128
968 ; CHECK-NEXT: ldp q1, q0, [x0]
969 ; CHECK-NEXT: mov z2.h, z1.h[1]
970 ; CHECK-NEXT: mov z3.h, z1.h[3]
971 ; CHECK-NEXT: mov z4.h, z1.h[2]
972 ; CHECK-NEXT: fcvtzs x8, h1
973 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
974 ; CHECK-NEXT: mov z5.h, z0.h[3]
975 ; CHECK-NEXT: fcvtzs x10, h0
976 ; CHECK-NEXT: fcvtzs x9, h2
977 ; CHECK-NEXT: fcvtzs x11, h3
978 ; CHECK-NEXT: fcvtzs x12, h4
979 ; CHECK-NEXT: mov z2.h, z1.h[1]
980 ; CHECK-NEXT: mov z4.h, z1.h[3]
981 ; CHECK-NEXT: fcvtzs x13, h1
982 ; CHECK-NEXT: mov z1.h, z1.h[2]
983 ; CHECK-NEXT: mov z3.h, z0.h[1]
984 ; CHECK-NEXT: stp x8, x9, [sp, #32]
985 ; CHECK-NEXT: fcvtzs x8, h2
986 ; CHECK-NEXT: fcvtzs x9, h4
987 ; CHECK-NEXT: stp x12, x11, [sp, #48]
988 ; CHECK-NEXT: fcvtzs x11, h1
989 ; CHECK-NEXT: mov z2.h, z0.h[2]
990 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
991 ; CHECK-NEXT: fcvtzs x12, h3
992 ; CHECK-NEXT: stp x13, x8, [sp]
993 ; CHECK-NEXT: fcvtzs x8, h5
994 ; CHECK-NEXT: stp x11, x9, [sp, #16]
995 ; CHECK-NEXT: fcvtzs x9, h2
996 ; CHECK-NEXT: mov z1.h, z0.h[1]
997 ; CHECK-NEXT: mov z2.h, z0.h[3]
998 ; CHECK-NEXT: fcvtzs x11, h0
999 ; CHECK-NEXT: mov z0.h, z0.h[2]
1000 ; CHECK-NEXT: stp x10, x12, [sp, #96]
1001 ; CHECK-NEXT: ldp q3, q4, [sp]
1002 ; CHECK-NEXT: fcvtzs x10, h1
1003 ; CHECK-NEXT: fcvtzs x12, h2
1004 ; CHECK-NEXT: stp x9, x8, [sp, #112]
1005 ; CHECK-NEXT: fcvtzs x8, h0
1006 ; CHECK-NEXT: ldp q0, q1, [sp, #32]
1007 ; CHECK-NEXT: ldp q6, q7, [sp, #96]
1008 ; CHECK-NEXT: stp x11, x10, [sp, #64]
1009 ; CHECK-NEXT: stp x8, x12, [sp, #80]
1010 ; CHECK-NEXT: ldp q5, q2, [sp, #64]
1011 ; CHECK-NEXT: stp q0, q1, [x1]
1012 ; CHECK-NEXT: stp q3, q4, [x1, #32]
1013 ; CHECK-NEXT: stp q6, q7, [x1, #64]
1014 ; CHECK-NEXT: stp q5, q2, [x1, #96]
1015 ; CHECK-NEXT: add sp, sp, #128
1017 %op1 = load <16 x half>, ptr %a
1018 %res = fptosi <16 x half> %op1 to <16 x i64>
1019 store <16 x i64> %res, ptr %b
1027 define <2 x i16> @fcvtzs_v2f32_v2i16(<2 x float> %op1) {
1028 ; CHECK-LABEL: fcvtzs_v2f32_v2i16:
1030 ; CHECK-NEXT: ptrue p0.s, vl2
1031 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1032 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1033 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1035 %res = fptosi <2 x float> %op1 to <2 x i16>
1039 define <4 x i16> @fcvtzs_v4f32_v4i16(<4 x float> %op1) {
1040 ; CHECK-LABEL: fcvtzs_v4f32_v4i16:
1042 ; CHECK-NEXT: ptrue p0.s, vl4
1043 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1044 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1045 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1046 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1048 %res = fptosi <4 x float> %op1 to <4 x i16>
1052 define <8 x i16> @fcvtzs_v8f32_v8i16(ptr %a) {
1053 ; CHECK-LABEL: fcvtzs_v8f32_v8i16:
1055 ; CHECK-NEXT: ptrue p0.s, vl4
1056 ; CHECK-NEXT: ldp q0, q1, [x0]
1057 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1058 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1059 ; CHECK-NEXT: ptrue p0.h, vl4
1060 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1061 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1062 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1063 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1065 %op1 = load <8 x float>, ptr %a
1066 %res = fptosi <8 x float> %op1 to <8 x i16>
1070 define void @fcvtzs_v16f32_v16i16(ptr %a, ptr %b) {
1071 ; CHECK-LABEL: fcvtzs_v16f32_v16i16:
1073 ; CHECK-NEXT: ptrue p0.s, vl4
1074 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1075 ; CHECK-NEXT: ldp q2, q3, [x0]
1076 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1077 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1078 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.s
1079 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.s
1080 ; CHECK-NEXT: ptrue p0.h, vl4
1081 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1082 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1083 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
1084 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
1085 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1086 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
1087 ; CHECK-NEXT: stp q2, q0, [x1]
1089 %op1 = load <16 x float>, ptr %a
1090 %res = fptosi <16 x float> %op1 to <16 x i16>
1091 store <16 x i16> %res, ptr %b
1099 define <2 x i32> @fcvtzs_v2f32_v2i32(<2 x float> %op1) {
1100 ; CHECK-LABEL: fcvtzs_v2f32_v2i32:
1102 ; CHECK-NEXT: ptrue p0.s, vl2
1103 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1104 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1105 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1107 %res = fptosi <2 x float> %op1 to <2 x i32>
1111 define <4 x i32> @fcvtzs_v4f32_v4i32(<4 x float> %op1) {
1112 ; CHECK-LABEL: fcvtzs_v4f32_v4i32:
1114 ; CHECK-NEXT: ptrue p0.s, vl4
1115 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1116 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1117 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1119 %res = fptosi <4 x float> %op1 to <4 x i32>
1123 define void @fcvtzs_v8f32_v8i32(ptr %a, ptr %b) {
1124 ; CHECK-LABEL: fcvtzs_v8f32_v8i32:
1126 ; CHECK-NEXT: ptrue p0.s, vl4
1127 ; CHECK-NEXT: ldp q0, q1, [x0]
1128 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1129 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1130 ; CHECK-NEXT: stp q0, q1, [x1]
1132 %op1 = load <8 x float>, ptr %a
1133 %res = fptosi <8 x float> %op1 to <8 x i32>
1134 store <8 x i32> %res, ptr %b
1142 define <1 x i64> @fcvtzs_v1f32_v1i64(<1 x float> %op1) {
1143 ; CHECK-LABEL: fcvtzs_v1f32_v1i64:
1145 ; CHECK-NEXT: ptrue p0.d, vl2
1146 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1147 ; CHECK-NEXT: uunpklo z0.d, z0.s
1148 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1149 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1151 %res = fptosi <1 x float> %op1 to <1 x i64>
1155 define <2 x i64> @fcvtzs_v2f32_v2i64(<2 x float> %op1) {
1156 ; CHECK-LABEL: fcvtzs_v2f32_v2i64:
1158 ; CHECK-NEXT: ptrue p0.d, vl2
1159 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1160 ; CHECK-NEXT: uunpklo z0.d, z0.s
1161 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1162 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1164 %res = fptosi <2 x float> %op1 to <2 x i64>
1168 define void @fcvtzs_v4f32_v4i64(ptr %a, ptr %b) {
1169 ; CHECK-LABEL: fcvtzs_v4f32_v4i64:
1171 ; CHECK-NEXT: ldr q0, [x0]
1172 ; CHECK-NEXT: ptrue p0.d, vl2
1173 ; CHECK-NEXT: uunpklo z1.d, z0.s
1174 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1175 ; CHECK-NEXT: uunpklo z0.d, z0.s
1176 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
1177 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1178 ; CHECK-NEXT: stp q1, q0, [x1]
1180 %op1 = load <4 x float>, ptr %a
1181 %res = fptosi <4 x float> %op1 to <4 x i64>
1182 store <4 x i64> %res, ptr %b
1186 define void @fcvtzs_v8f32_v8i64(ptr %a, ptr %b) {
1187 ; CHECK-LABEL: fcvtzs_v8f32_v8i64:
1189 ; CHECK-NEXT: ldp q1, q0, [x0]
1190 ; CHECK-NEXT: ptrue p0.d, vl2
1191 ; CHECK-NEXT: uunpklo z2.d, z0.s
1192 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1193 ; CHECK-NEXT: uunpklo z3.d, z1.s
1194 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1195 ; CHECK-NEXT: uunpklo z0.d, z0.s
1196 ; CHECK-NEXT: uunpklo z1.d, z1.s
1197 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.s
1198 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.s
1199 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1200 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
1201 ; CHECK-NEXT: stp q2, q0, [x1, #32]
1202 ; CHECK-NEXT: stp q3, q1, [x1]
1204 %op1 = load <8 x float>, ptr %a
1205 %res = fptosi <8 x float> %op1 to <8 x i64>
1206 store <8 x i64> %res, ptr %b
1215 ; v1f64 is perfered to be widened to v4f64, so use SVE
1216 define <1 x i16> @fcvtzs_v1f64_v1i16(<1 x double> %op1) {
1217 ; CHECK-LABEL: fcvtzs_v1f64_v1i16:
1219 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1220 ; CHECK-NEXT: fcvtzs w8, d0
1221 ; CHECK-NEXT: mov z0.h, w8
1222 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1224 %res = fptosi <1 x double> %op1 to <1 x i16>
1228 define <2 x i16> @fcvtzs_v2f64_v2i16(<2 x double> %op1) {
1229 ; CHECK-LABEL: fcvtzs_v2f64_v2i16:
1231 ; CHECK-NEXT: ptrue p0.d, vl2
1232 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1233 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1234 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1235 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1237 %res = fptosi <2 x double> %op1 to <2 x i16>
1241 define <4 x i16> @fcvtzs_v4f64_v4i16(ptr %a) {
1242 ; CHECK-LABEL: fcvtzs_v4f64_v4i16:
1244 ; CHECK-NEXT: sub sp, sp, #16
1245 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1246 ; CHECK-NEXT: ptrue p0.d, vl2
1247 ; CHECK-NEXT: ldp q1, q0, [x0]
1248 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1249 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1250 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1251 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1252 ; CHECK-NEXT: mov z2.s, z0.s[1]
1253 ; CHECK-NEXT: fmov w8, s0
1254 ; CHECK-NEXT: mov z0.s, z1.s[1]
1255 ; CHECK-NEXT: fmov w9, s1
1256 ; CHECK-NEXT: strh w8, [sp, #12]
1257 ; CHECK-NEXT: fmov w8, s2
1258 ; CHECK-NEXT: strh w9, [sp, #8]
1259 ; CHECK-NEXT: strh w8, [sp, #14]
1260 ; CHECK-NEXT: fmov w8, s0
1261 ; CHECK-NEXT: strh w8, [sp, #10]
1262 ; CHECK-NEXT: ldr d0, [sp, #8]
1263 ; CHECK-NEXT: add sp, sp, #16
1265 %op1 = load <4 x double>, ptr %a
1266 %res = fptosi <4 x double> %op1 to <4 x i16>
1270 define <8 x i16> @fcvtzs_v8f64_v8i16(ptr %a) {
1271 ; CHECK-LABEL: fcvtzs_v8f64_v8i16:
1273 ; CHECK-NEXT: sub sp, sp, #16
1274 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1275 ; CHECK-NEXT: ptrue p0.d, vl2
1276 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
1277 ; CHECK-NEXT: ldp q3, q2, [x0]
1278 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1279 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1280 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1281 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1282 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1283 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1284 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1285 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1286 ; CHECK-NEXT: fmov w8, s0
1287 ; CHECK-NEXT: mov z0.s, z0.s[1]
1288 ; CHECK-NEXT: strh w8, [sp, #12]
1289 ; CHECK-NEXT: fmov w8, s1
1290 ; CHECK-NEXT: mov z1.s, z1.s[1]
1291 ; CHECK-NEXT: strh w8, [sp, #8]
1292 ; CHECK-NEXT: fmov w8, s2
1293 ; CHECK-NEXT: mov z2.s, z2.s[1]
1294 ; CHECK-NEXT: strh w8, [sp, #4]
1295 ; CHECK-NEXT: fmov w8, s3
1296 ; CHECK-NEXT: mov z3.s, z3.s[1]
1297 ; CHECK-NEXT: strh w8, [sp]
1298 ; CHECK-NEXT: fmov w8, s0
1299 ; CHECK-NEXT: strh w8, [sp, #14]
1300 ; CHECK-NEXT: fmov w8, s1
1301 ; CHECK-NEXT: strh w8, [sp, #10]
1302 ; CHECK-NEXT: fmov w8, s2
1303 ; CHECK-NEXT: strh w8, [sp, #6]
1304 ; CHECK-NEXT: fmov w8, s3
1305 ; CHECK-NEXT: strh w8, [sp, #2]
1306 ; CHECK-NEXT: ldr q0, [sp], #16
1308 %op1 = load <8 x double>, ptr %a
1309 %res = fptosi <8 x double> %op1 to <8 x i16>
1313 define void @fcvtzs_v16f64_v16i16(ptr %a, ptr %b) {
1314 ; CHECK-LABEL: fcvtzs_v16f64_v16i16:
1316 ; CHECK-NEXT: sub sp, sp, #32
1317 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1318 ; CHECK-NEXT: ptrue p0.d, vl2
1319 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1320 ; CHECK-NEXT: ldp q3, q2, [x0]
1321 ; CHECK-NEXT: ldr q6, [x0, #112]
1322 ; CHECK-NEXT: ldp q4, q5, [x0, #80]
1323 ; CHECK-NEXT: ldr q7, [x0, #64]
1324 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1325 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1326 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1327 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1328 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
1329 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
1330 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
1331 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1332 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1333 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1334 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1335 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
1336 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
1337 ; CHECK-NEXT: fmov w8, s1
1338 ; CHECK-NEXT: mov z16.s, z1.s[1]
1339 ; CHECK-NEXT: mov z1.s, z0.s[1]
1340 ; CHECK-NEXT: fmov w9, s0
1341 ; CHECK-NEXT: mov z0.s, z2.s[1]
1342 ; CHECK-NEXT: strh w8, [sp, #12]
1343 ; CHECK-NEXT: fmov w8, s2
1344 ; CHECK-NEXT: mov z2.s, z3.s[1]
1345 ; CHECK-NEXT: strh w9, [sp, #8]
1346 ; CHECK-NEXT: fmov w9, s3
1347 ; CHECK-NEXT: movprfx z3, z7
1348 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z7.d
1349 ; CHECK-NEXT: strh w8, [sp, #4]
1350 ; CHECK-NEXT: fmov w8, s16
1351 ; CHECK-NEXT: strh w9, [sp]
1352 ; CHECK-NEXT: strh w8, [sp, #14]
1353 ; CHECK-NEXT: fmov w8, s1
1354 ; CHECK-NEXT: uzp1 z1.s, z4.s, z4.s
1355 ; CHECK-NEXT: strh w8, [sp, #10]
1356 ; CHECK-NEXT: fmov w8, s0
1357 ; CHECK-NEXT: uzp1 z0.s, z3.s, z3.s
1358 ; CHECK-NEXT: mov z3.s, z5.s[1]
1359 ; CHECK-NEXT: strh w8, [sp, #6]
1360 ; CHECK-NEXT: fmov w8, s2
1361 ; CHECK-NEXT: mov z2.s, z6.s[1]
1362 ; CHECK-NEXT: strh w8, [sp, #2]
1363 ; CHECK-NEXT: fmov w8, s6
1364 ; CHECK-NEXT: strh w8, [sp, #28]
1365 ; CHECK-NEXT: fmov w8, s5
1366 ; CHECK-NEXT: strh w8, [sp, #24]
1367 ; CHECK-NEXT: fmov w8, s1
1368 ; CHECK-NEXT: mov z1.s, z1.s[1]
1369 ; CHECK-NEXT: strh w8, [sp, #20]
1370 ; CHECK-NEXT: fmov w8, s0
1371 ; CHECK-NEXT: mov z0.s, z0.s[1]
1372 ; CHECK-NEXT: strh w8, [sp, #16]
1373 ; CHECK-NEXT: fmov w8, s2
1374 ; CHECK-NEXT: strh w8, [sp, #30]
1375 ; CHECK-NEXT: fmov w8, s3
1376 ; CHECK-NEXT: strh w8, [sp, #26]
1377 ; CHECK-NEXT: fmov w8, s1
1378 ; CHECK-NEXT: strh w8, [sp, #22]
1379 ; CHECK-NEXT: fmov w8, s0
1380 ; CHECK-NEXT: strh w8, [sp, #18]
1381 ; CHECK-NEXT: ldp q1, q0, [sp]
1382 ; CHECK-NEXT: stp q1, q0, [x1]
1383 ; CHECK-NEXT: add sp, sp, #32
1385 %op1 = load <16 x double>, ptr %a
1386 %res = fptosi <16 x double> %op1 to <16 x i16>
1387 store <16 x i16> %res, ptr %b
1395 define <1 x i32> @fcvtzs_v1f64_v1i32(<1 x double> %op1) {
1396 ; CHECK-LABEL: fcvtzs_v1f64_v1i32:
1398 ; CHECK-NEXT: ptrue p0.d, vl2
1399 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1400 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1401 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1402 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1404 %res = fptosi <1 x double> %op1 to <1 x i32>
1408 define <2 x i32> @fcvtzs_v2f64_v2i32(<2 x double> %op1) {
1409 ; CHECK-LABEL: fcvtzs_v2f64_v2i32:
1411 ; CHECK-NEXT: ptrue p0.d, vl2
1412 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1413 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1414 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1415 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1417 %res = fptosi <2 x double> %op1 to <2 x i32>
1421 define <4 x i32> @fcvtzs_v4f64_v4i32(ptr %a) {
1422 ; CHECK-LABEL: fcvtzs_v4f64_v4i32:
1424 ; CHECK-NEXT: ptrue p0.d, vl2
1425 ; CHECK-NEXT: ldp q0, q1, [x0]
1426 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1427 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1428 ; CHECK-NEXT: ptrue p0.s, vl2
1429 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1430 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1431 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1432 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1434 %op1 = load <4 x double>, ptr %a
1435 %res = fptosi <4 x double> %op1 to <4 x i32>
1439 define void @fcvtzs_v8f64_v8i32(ptr %a, ptr %b) {
1440 ; CHECK-LABEL: fcvtzs_v8f64_v8i32:
1442 ; CHECK-NEXT: ptrue p0.d, vl2
1443 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1444 ; CHECK-NEXT: ldp q2, q3, [x0]
1445 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1446 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1447 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1448 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1449 ; CHECK-NEXT: ptrue p0.s, vl2
1450 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1451 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1452 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1453 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1454 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1455 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
1456 ; CHECK-NEXT: stp q2, q0, [x1]
1458 %op1 = load <8 x double>, ptr %a
1459 %res = fptosi <8 x double> %op1 to <8 x i32>
1460 store <8 x i32> %res, ptr %b
1468 define <1 x i64> @fcvtzs_v1f64_v1i64(<1 x double> %op1) {
1469 ; CHECK-LABEL: fcvtzs_v1f64_v1i64:
1471 ; CHECK-NEXT: ptrue p0.d, vl1
1472 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1473 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1474 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1476 %res = fptosi <1 x double> %op1 to <1 x i64>
1480 define <2 x i64> @fcvtzs_v2f64_v2i64(<2 x double> %op1) {
1481 ; CHECK-LABEL: fcvtzs_v2f64_v2i64:
1483 ; CHECK-NEXT: ptrue p0.d, vl2
1484 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1485 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1486 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1488 %res = fptosi <2 x double> %op1 to <2 x i64>
1492 define void @fcvtzs_v4f64_v4i64(ptr %a, ptr %b) {
1493 ; CHECK-LABEL: fcvtzs_v4f64_v4i64:
1495 ; CHECK-NEXT: ptrue p0.d, vl2
1496 ; CHECK-NEXT: ldp q0, q1, [x0]
1497 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1498 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1499 ; CHECK-NEXT: stp q0, q1, [x1]
1501 %op1 = load <4 x double>, ptr %a
1502 %res = fptosi <4 x double> %op1 to <4 x i64>
1503 store <4 x i64> %res, ptr %b