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: ldr q0, [x0]
219 ; CHECK-NEXT: mov z1.h, z0.h[1]
220 ; CHECK-NEXT: mov z2.h, z0.h[3]
221 ; CHECK-NEXT: fcvtzu x8, h0
222 ; CHECK-NEXT: mov z3.h, z0.h[2]
223 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
224 ; CHECK-NEXT: fcvtzu x9, h1
225 ; CHECK-NEXT: fcvtzu x10, h2
226 ; CHECK-NEXT: ldr q1, [x0, #16]
227 ; CHECK-NEXT: fcvtzu x11, h3
228 ; CHECK-NEXT: mov z2.h, z0.h[1]
229 ; CHECK-NEXT: mov z3.h, z0.h[3]
230 ; CHECK-NEXT: fcvtzu x12, h1
231 ; CHECK-NEXT: stp x8, x9, [sp, #32]
232 ; CHECK-NEXT: fcvtzu x8, h0
233 ; CHECK-NEXT: mov z0.h, z0.h[2]
234 ; CHECK-NEXT: fcvtzu x9, h2
235 ; CHECK-NEXT: stp x11, x10, [sp, #48]
236 ; CHECK-NEXT: fcvtzu x10, h3
237 ; CHECK-NEXT: mov z2.h, z1.h[1]
238 ; CHECK-NEXT: mov z3.h, z1.h[3]
239 ; CHECK-NEXT: fcvtzu x11, h0
240 ; CHECK-NEXT: mov z0.h, z1.h[2]
241 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
242 ; CHECK-NEXT: stp x8, x9, [sp]
243 ; CHECK-NEXT: fcvtzu x8, h2
244 ; CHECK-NEXT: fcvtzu x9, h3
245 ; CHECK-NEXT: mov z2.h, z1.h[1]
246 ; CHECK-NEXT: stp x11, x10, [sp, #16]
247 ; CHECK-NEXT: fcvtzu x10, h0
248 ; CHECK-NEXT: mov z0.h, z1.h[3]
249 ; CHECK-NEXT: fcvtzu x11, h1
250 ; CHECK-NEXT: mov z1.h, z1.h[2]
251 ; CHECK-NEXT: stp x12, x8, [sp, #96]
252 ; CHECK-NEXT: fcvtzu x12, h2
253 ; CHECK-NEXT: fcvtzu x8, h0
254 ; CHECK-NEXT: ldp q3, q4, [sp]
255 ; CHECK-NEXT: stp x10, x9, [sp, #112]
256 ; CHECK-NEXT: fcvtzu x9, h1
257 ; CHECK-NEXT: ldp q0, q1, [sp, #32]
258 ; CHECK-NEXT: stp x11, x12, [sp, #64]
259 ; CHECK-NEXT: ldp q6, q7, [sp, #96]
260 ; CHECK-NEXT: stp x9, x8, [sp, #80]
261 ; CHECK-NEXT: ldp q5, q2, [sp, #64]
262 ; CHECK-NEXT: stp q0, q1, [x1]
263 ; CHECK-NEXT: stp q3, q4, [x1, #32]
264 ; CHECK-NEXT: stp q6, q7, [x1, #64]
265 ; CHECK-NEXT: stp q5, q2, [x1, #96]
266 ; CHECK-NEXT: add sp, sp, #128
268 %op1 = load <16 x half>, ptr %a
269 %res = fptoui <16 x half> %op1 to <16 x i64>
270 store <16 x i64> %res, ptr %b
278 define <2 x i16> @fcvtzu_v2f32_v2i16(<2 x float> %op1) {
279 ; CHECK-LABEL: fcvtzu_v2f32_v2i16:
281 ; CHECK-NEXT: ptrue p0.s, vl2
282 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
283 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
284 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
286 %res = fptoui <2 x float> %op1 to <2 x i16>
290 define <4 x i16> @fcvtzu_v4f32_v4i16(<4 x float> %op1) {
291 ; CHECK-LABEL: fcvtzu_v4f32_v4i16:
293 ; CHECK-NEXT: ptrue p0.s, vl4
294 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
295 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
296 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
297 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
299 %res = fptoui <4 x float> %op1 to <4 x i16>
303 define <8 x i16> @fcvtzu_v8f32_v8i16(ptr %a) {
304 ; CHECK-LABEL: fcvtzu_v8f32_v8i16:
306 ; CHECK-NEXT: ptrue p0.s, vl4
307 ; CHECK-NEXT: ldp q0, q1, [x0]
308 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
309 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
310 ; CHECK-NEXT: ptrue p0.h, vl4
311 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
312 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
313 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
314 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
316 %op1 = load <8 x float>, ptr %a
317 %res = fptoui <8 x float> %op1 to <8 x i16>
321 define void @fcvtzu_v16f32_v16i16(ptr %a, ptr %b) {
322 ; CHECK-LABEL: fcvtzu_v16f32_v16i16:
324 ; CHECK-NEXT: ptrue p0.s, vl4
325 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
326 ; CHECK-NEXT: ldp q2, q3, [x0]
327 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
328 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
329 ; CHECK-NEXT: fcvtzu z3.s, p0/m, z3.s
330 ; CHECK-NEXT: fcvtzu z2.s, p0/m, z2.s
331 ; CHECK-NEXT: ptrue p0.h, vl4
332 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
333 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
334 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
335 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
336 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
337 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
338 ; CHECK-NEXT: stp q2, q0, [x1]
340 %op1 = load <16 x float>, ptr %a
341 %res = fptoui <16 x float> %op1 to <16 x i16>
342 store <16 x i16> %res, ptr %b
350 define <2 x i32> @fcvtzu_v2f32_v2i32(<2 x float> %op1) {
351 ; CHECK-LABEL: fcvtzu_v2f32_v2i32:
353 ; CHECK-NEXT: ptrue p0.s, vl2
354 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
355 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
356 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
358 %res = fptoui <2 x float> %op1 to <2 x i32>
362 define <4 x i32> @fcvtzu_v4f32_v4i32(<4 x float> %op1) {
363 ; CHECK-LABEL: fcvtzu_v4f32_v4i32:
365 ; CHECK-NEXT: ptrue p0.s, vl4
366 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
367 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
368 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
370 %res = fptoui <4 x float> %op1 to <4 x i32>
374 define void @fcvtzu_v8f32_v8i32(ptr %a, ptr %b) {
375 ; CHECK-LABEL: fcvtzu_v8f32_v8i32:
377 ; CHECK-NEXT: ptrue p0.s, vl4
378 ; CHECK-NEXT: ldp q0, q1, [x0]
379 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
380 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
381 ; CHECK-NEXT: stp q0, q1, [x1]
383 %op1 = load <8 x float>, ptr %a
384 %res = fptoui <8 x float> %op1 to <8 x i32>
385 store <8 x i32> %res, ptr %b
393 define <1 x i64> @fcvtzu_v1f32_v1i64(<1 x float> %op1) {
394 ; CHECK-LABEL: fcvtzu_v1f32_v1i64:
396 ; CHECK-NEXT: ptrue p0.d, vl2
397 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
398 ; CHECK-NEXT: uunpklo z0.d, z0.s
399 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
400 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
402 %res = fptoui <1 x float> %op1 to <1 x i64>
406 define <2 x i64> @fcvtzu_v2f32_v2i64(<2 x float> %op1) {
407 ; CHECK-LABEL: fcvtzu_v2f32_v2i64:
409 ; CHECK-NEXT: ptrue p0.d, vl2
410 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
411 ; CHECK-NEXT: uunpklo z0.d, z0.s
412 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
413 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
415 %res = fptoui <2 x float> %op1 to <2 x i64>
419 define void @fcvtzu_v4f32_v4i64(ptr %a, ptr %b) {
420 ; CHECK-LABEL: fcvtzu_v4f32_v4i64:
422 ; CHECK-NEXT: ldr q0, [x0]
423 ; CHECK-NEXT: ptrue p0.d, vl2
424 ; CHECK-NEXT: uunpklo z1.d, z0.s
425 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
426 ; CHECK-NEXT: uunpklo z0.d, z0.s
427 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
428 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
429 ; CHECK-NEXT: stp q1, q0, [x1]
431 %op1 = load <4 x float>, ptr %a
432 %res = fptoui <4 x float> %op1 to <4 x i64>
433 store <4 x i64> %res, ptr %b
437 define void @fcvtzu_v8f32_v8i64(ptr %a, ptr %b) {
438 ; CHECK-LABEL: fcvtzu_v8f32_v8i64:
440 ; CHECK-NEXT: ldp q1, q0, [x0]
441 ; CHECK-NEXT: ptrue p0.d, vl2
442 ; CHECK-NEXT: uunpklo z2.d, z0.s
443 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
444 ; CHECK-NEXT: uunpklo z3.d, z1.s
445 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
446 ; CHECK-NEXT: uunpklo z0.d, z0.s
447 ; CHECK-NEXT: uunpklo z1.d, z1.s
448 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.s
449 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.s
450 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
451 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
452 ; CHECK-NEXT: stp q2, q0, [x1, #32]
453 ; CHECK-NEXT: stp q3, q1, [x1]
455 %op1 = load <8 x float>, ptr %a
456 %res = fptoui <8 x float> %op1 to <8 x i64>
457 store <8 x i64> %res, ptr %b
465 define <1 x i16> @fcvtzu_v1f64_v1i16(<1 x double> %op1) {
466 ; CHECK-LABEL: fcvtzu_v1f64_v1i16:
468 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
469 ; CHECK-NEXT: fcvtzs w8, d0
470 ; CHECK-NEXT: mov z0.h, w8
471 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
473 %res = fptoui <1 x double> %op1 to <1 x i16>
477 define <2 x i16> @fcvtzu_v2f64_v2i16(<2 x double> %op1) {
478 ; CHECK-LABEL: fcvtzu_v2f64_v2i16:
480 ; CHECK-NEXT: ptrue p0.d, vl2
481 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
482 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
483 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
484 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
486 %res = fptoui <2 x double> %op1 to <2 x i16>
490 define <4 x i16> @fcvtzu_v4f64_v4i16(ptr %a) {
491 ; CHECK-LABEL: fcvtzu_v4f64_v4i16:
493 ; CHECK-NEXT: sub sp, sp, #16
494 ; CHECK-NEXT: .cfi_def_cfa_offset 16
495 ; CHECK-NEXT: ptrue p0.d, vl2
496 ; CHECK-NEXT: ldp q1, q0, [x0]
497 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
498 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
499 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
500 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
501 ; CHECK-NEXT: fmov w8, s0
502 ; CHECK-NEXT: mov z2.s, z0.s[1]
503 ; CHECK-NEXT: mov z0.s, z1.s[1]
504 ; CHECK-NEXT: strh w8, [sp, #12]
505 ; CHECK-NEXT: fmov w8, s1
506 ; CHECK-NEXT: strh w8, [sp, #8]
507 ; CHECK-NEXT: fmov w8, s2
508 ; CHECK-NEXT: strh w8, [sp, #14]
509 ; CHECK-NEXT: fmov w8, s0
510 ; CHECK-NEXT: strh w8, [sp, #10]
511 ; CHECK-NEXT: ldr d0, [sp, #8]
512 ; CHECK-NEXT: add sp, sp, #16
514 %op1 = load <4 x double>, ptr %a
515 %res = fptoui <4 x double> %op1 to <4 x i16>
519 define <8 x i16> @fcvtzu_v8f64_v8i16(ptr %a) {
520 ; CHECK-LABEL: fcvtzu_v8f64_v8i16:
522 ; CHECK-NEXT: sub sp, sp, #16
523 ; CHECK-NEXT: .cfi_def_cfa_offset 16
524 ; CHECK-NEXT: ptrue p0.d, vl2
525 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
526 ; CHECK-NEXT: ldp q3, q2, [x0]
527 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
528 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
529 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
530 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
531 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
532 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
533 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
534 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
535 ; CHECK-NEXT: fmov w8, s0
536 ; CHECK-NEXT: mov z0.s, z0.s[1]
537 ; CHECK-NEXT: strh w8, [sp, #12]
538 ; CHECK-NEXT: fmov w8, s1
539 ; CHECK-NEXT: mov z1.s, z1.s[1]
540 ; CHECK-NEXT: strh w8, [sp, #8]
541 ; CHECK-NEXT: fmov w8, s2
542 ; CHECK-NEXT: mov z2.s, z2.s[1]
543 ; CHECK-NEXT: strh w8, [sp, #4]
544 ; CHECK-NEXT: fmov w8, s3
545 ; CHECK-NEXT: mov z3.s, z3.s[1]
546 ; CHECK-NEXT: strh w8, [sp]
547 ; CHECK-NEXT: fmov w8, s0
548 ; CHECK-NEXT: strh w8, [sp, #14]
549 ; CHECK-NEXT: fmov w8, s1
550 ; CHECK-NEXT: strh w8, [sp, #10]
551 ; CHECK-NEXT: fmov w8, s2
552 ; CHECK-NEXT: strh w8, [sp, #6]
553 ; CHECK-NEXT: fmov w8, s3
554 ; CHECK-NEXT: strh w8, [sp, #2]
555 ; CHECK-NEXT: ldr q0, [sp], #16
557 %op1 = load <8 x double>, ptr %a
558 %res = fptoui <8 x double> %op1 to <8 x i16>
562 define void @fcvtzu_v16f64_v16i16(ptr %a, ptr %b) {
563 ; CHECK-LABEL: fcvtzu_v16f64_v16i16:
565 ; CHECK-NEXT: sub sp, sp, #32
566 ; CHECK-NEXT: .cfi_def_cfa_offset 32
567 ; CHECK-NEXT: ptrue p0.d, vl2
568 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
569 ; CHECK-NEXT: ldp q3, q2, [x0]
570 ; CHECK-NEXT: ldr q6, [x0, #112]
571 ; CHECK-NEXT: ldp q4, q5, [x0, #80]
572 ; CHECK-NEXT: ldr q7, [x0, #64]
573 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
574 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
575 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
576 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
577 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
578 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
579 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
580 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
581 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
582 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
583 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
584 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
585 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
586 ; CHECK-NEXT: fmov w8, s1
587 ; CHECK-NEXT: mov z16.s, z1.s[1]
588 ; CHECK-NEXT: mov z1.s, z0.s[1]
589 ; CHECK-NEXT: strh w8, [sp, #12]
590 ; CHECK-NEXT: fmov w8, s0
591 ; CHECK-NEXT: mov z0.s, z2.s[1]
592 ; CHECK-NEXT: strh w8, [sp, #8]
593 ; CHECK-NEXT: fmov w8, s2
594 ; CHECK-NEXT: mov z2.s, z3.s[1]
595 ; CHECK-NEXT: strh w8, [sp, #4]
596 ; CHECK-NEXT: fmov w8, s3
597 ; CHECK-NEXT: movprfx z3, z7
598 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z7.d
599 ; CHECK-NEXT: strh w8, [sp]
600 ; CHECK-NEXT: fmov w8, s16
601 ; CHECK-NEXT: strh w8, [sp, #14]
602 ; CHECK-NEXT: fmov w8, s1
603 ; CHECK-NEXT: uzp1 z1.s, z4.s, z4.s
604 ; CHECK-NEXT: strh w8, [sp, #10]
605 ; CHECK-NEXT: fmov w8, s0
606 ; CHECK-NEXT: uzp1 z0.s, z3.s, z3.s
607 ; CHECK-NEXT: mov z3.s, z5.s[1]
608 ; CHECK-NEXT: strh w8, [sp, #6]
609 ; CHECK-NEXT: fmov w8, s2
610 ; CHECK-NEXT: mov z2.s, z6.s[1]
611 ; CHECK-NEXT: strh w8, [sp, #2]
612 ; CHECK-NEXT: fmov w8, s6
613 ; CHECK-NEXT: strh w8, [sp, #28]
614 ; CHECK-NEXT: fmov w8, s5
615 ; CHECK-NEXT: strh w8, [sp, #24]
616 ; CHECK-NEXT: fmov w8, s1
617 ; CHECK-NEXT: mov z1.s, z1.s[1]
618 ; CHECK-NEXT: strh w8, [sp, #20]
619 ; CHECK-NEXT: fmov w8, s0
620 ; CHECK-NEXT: mov z0.s, z0.s[1]
621 ; CHECK-NEXT: strh w8, [sp, #16]
622 ; CHECK-NEXT: fmov w8, s2
623 ; CHECK-NEXT: strh w8, [sp, #30]
624 ; CHECK-NEXT: fmov w8, s3
625 ; CHECK-NEXT: strh w8, [sp, #26]
626 ; CHECK-NEXT: fmov w8, s1
627 ; CHECK-NEXT: strh w8, [sp, #22]
628 ; CHECK-NEXT: fmov w8, s0
629 ; CHECK-NEXT: strh w8, [sp, #18]
630 ; CHECK-NEXT: ldp q1, q0, [sp]
631 ; CHECK-NEXT: stp q1, q0, [x1]
632 ; CHECK-NEXT: add sp, sp, #32
634 %op1 = load <16 x double>, ptr %a
635 %res = fptoui <16 x double> %op1 to <16 x i16>
636 store <16 x i16> %res, ptr %b
644 define <1 x i32> @fcvtzu_v1f64_v1i32(<1 x double> %op1) {
645 ; CHECK-LABEL: fcvtzu_v1f64_v1i32:
647 ; CHECK-NEXT: ptrue p0.d, vl2
648 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
649 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
650 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
651 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
653 %res = fptoui <1 x double> %op1 to <1 x i32>
657 define <2 x i32> @fcvtzu_v2f64_v2i32(<2 x double> %op1) {
658 ; CHECK-LABEL: fcvtzu_v2f64_v2i32:
660 ; CHECK-NEXT: ptrue p0.d, vl2
661 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
662 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
663 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
664 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
666 %res = fptoui <2 x double> %op1 to <2 x i32>
670 define <4 x i32> @fcvtzu_v4f64_v4i32(ptr %a) {
671 ; CHECK-LABEL: fcvtzu_v4f64_v4i32:
673 ; CHECK-NEXT: ptrue p0.d, vl2
674 ; CHECK-NEXT: ldp q0, q1, [x0]
675 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
676 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
677 ; CHECK-NEXT: ptrue p0.s, vl2
678 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
679 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
680 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
681 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
683 %op1 = load <4 x double>, ptr %a
684 %res = fptoui <4 x double> %op1 to <4 x i32>
688 define void @fcvtzu_v8f64_v8i32(ptr %a, ptr %b) {
689 ; CHECK-LABEL: fcvtzu_v8f64_v8i32:
691 ; CHECK-NEXT: ptrue p0.d, vl2
692 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
693 ; CHECK-NEXT: ldp q2, q3, [x0]
694 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
695 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
696 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.d
697 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.d
698 ; CHECK-NEXT: ptrue p0.s, vl2
699 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
700 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
701 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
702 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
703 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
704 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
705 ; CHECK-NEXT: stp q2, q0, [x1]
707 %op1 = load <8 x double>, ptr %a
708 %res = fptoui <8 x double> %op1 to <8 x i32>
709 store <8 x i32> %res, ptr %b
717 define <1 x i64> @fcvtzu_v1f64_v1i64(<1 x double> %op1) {
718 ; CHECK-LABEL: fcvtzu_v1f64_v1i64:
720 ; CHECK-NEXT: ptrue p0.d, vl1
721 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
722 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
723 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
725 %res = fptoui <1 x double> %op1 to <1 x i64>
729 define <2 x i64> @fcvtzu_v2f64_v2i64(<2 x double> %op1) {
730 ; CHECK-LABEL: fcvtzu_v2f64_v2i64:
732 ; CHECK-NEXT: ptrue p0.d, vl2
733 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
734 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
735 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
737 %res = fptoui <2 x double> %op1 to <2 x i64>
741 define void @fcvtzu_v4f64_v4i64(ptr %a, ptr %b) {
742 ; CHECK-LABEL: fcvtzu_v4f64_v4i64:
744 ; CHECK-NEXT: ptrue p0.d, vl2
745 ; CHECK-NEXT: ldp q0, q1, [x0]
746 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
747 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
748 ; CHECK-NEXT: stp q0, q1, [x1]
750 %op1 = load <4 x double>, ptr %a
751 %res = fptoui <4 x double> %op1 to <4 x i64>
752 store <4 x i64> %res, ptr %b
760 define <4 x i16> @fcvtzs_v4f16_v4i16(<4 x half> %op1) {
761 ; CHECK-LABEL: fcvtzs_v4f16_v4i16:
763 ; CHECK-NEXT: ptrue p0.h, vl4
764 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
765 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
766 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
768 %res = fptosi <4 x half> %op1 to <4 x i16>
772 define void @fcvtzs_v8f16_v8i16(ptr %a, ptr %b) {
773 ; CHECK-LABEL: fcvtzs_v8f16_v8i16:
775 ; CHECK-NEXT: ptrue p0.h, vl8
776 ; CHECK-NEXT: ldr q0, [x0]
777 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
778 ; CHECK-NEXT: str q0, [x1]
780 %op1 = load <8 x half>, ptr %a
781 %res = fptosi <8 x half> %op1 to <8 x i16>
782 store <8 x i16> %res, ptr %b
786 define void @fcvtzs_v16f16_v16i16(ptr %a, ptr %b) {
787 ; CHECK-LABEL: fcvtzs_v16f16_v16i16:
789 ; CHECK-NEXT: ptrue p0.h, vl8
790 ; CHECK-NEXT: ldp q0, q1, [x0]
791 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
792 ; CHECK-NEXT: fcvtzs z1.h, p0/m, z1.h
793 ; CHECK-NEXT: stp q0, q1, [x1]
795 %op1 = load <16 x half>, ptr %a
796 %res = fptosi <16 x half> %op1 to <16 x i16>
797 store <16 x i16> %res, ptr %b
805 define <2 x i32> @fcvtzs_v2f16_v2i32(<2 x half> %op1) {
806 ; CHECK-LABEL: fcvtzs_v2f16_v2i32:
808 ; CHECK-NEXT: ptrue p0.s, vl4
809 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
810 ; CHECK-NEXT: uunpklo z0.s, z0.h
811 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
812 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
814 %res = fptosi <2 x half> %op1 to <2 x i32>
818 define <4 x i32> @fcvtzs_v4f16_v4i32(<4 x half> %op1) {
819 ; CHECK-LABEL: fcvtzs_v4f16_v4i32:
821 ; CHECK-NEXT: ptrue p0.s, vl4
822 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
823 ; CHECK-NEXT: uunpklo z0.s, z0.h
824 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
825 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
827 %res = fptosi <4 x half> %op1 to <4 x i32>
831 define void @fcvtzs_v8f16_v8i32(ptr %a, ptr %b) {
832 ; CHECK-LABEL: fcvtzs_v8f16_v8i32:
834 ; CHECK-NEXT: ldr q0, [x0]
835 ; CHECK-NEXT: ptrue p0.s, vl4
836 ; CHECK-NEXT: uunpklo z1.s, z0.h
837 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
838 ; CHECK-NEXT: uunpklo z0.s, z0.h
839 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
840 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
841 ; CHECK-NEXT: stp q1, q0, [x1]
843 %op1 = load <8 x half>, ptr %a
844 %res = fptosi <8 x half> %op1 to <8 x i32>
845 store <8 x i32> %res, ptr %b
849 define void @fcvtzs_v16f16_v16i32(ptr %a, ptr %b) {
850 ; CHECK-LABEL: fcvtzs_v16f16_v16i32:
852 ; CHECK-NEXT: ldp q1, q0, [x0]
853 ; CHECK-NEXT: ptrue p0.s, vl4
854 ; CHECK-NEXT: uunpklo z2.s, z0.h
855 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
856 ; CHECK-NEXT: uunpklo z3.s, z1.h
857 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
858 ; CHECK-NEXT: uunpklo z0.s, z0.h
859 ; CHECK-NEXT: uunpklo z1.s, z1.h
860 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.h
861 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.h
862 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
863 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
864 ; CHECK-NEXT: stp q2, q0, [x1, #32]
865 ; CHECK-NEXT: stp q3, q1, [x1]
867 %op1 = load <16 x half>, ptr %a
868 %res = fptosi <16 x half> %op1 to <16 x i32>
869 store <16 x i32> %res, ptr %b
877 define <1 x i64> @fcvtzs_v1f16_v1i64(<1 x half> %op1) {
878 ; CHECK-LABEL: fcvtzs_v1f16_v1i64:
880 ; CHECK-NEXT: fcvtzs x8, h0
881 ; CHECK-NEXT: fmov d0, x8
883 %res = fptosi <1 x half> %op1 to <1 x i64>
887 ; v2f16 is not legal for NEON, so use SVE
888 define <2 x i64> @fcvtzs_v2f16_v2i64(<2 x half> %op1) {
889 ; CHECK-LABEL: fcvtzs_v2f16_v2i64:
891 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
892 ; CHECK-NEXT: mov z1.h, z0.h[1]
893 ; CHECK-NEXT: fcvtzs x8, h0
894 ; CHECK-NEXT: fcvtzs x9, h1
895 ; CHECK-NEXT: stp x8, x9, [sp, #-16]!
896 ; CHECK-NEXT: .cfi_def_cfa_offset 16
897 ; CHECK-NEXT: ldr q0, [sp], #16
899 %res = fptosi <2 x half> %op1 to <2 x i64>
903 define void @fcvtzs_v4f16_v4i64(ptr %a, ptr %b) {
904 ; CHECK-LABEL: fcvtzs_v4f16_v4i64:
906 ; CHECK-NEXT: ldr d0, [x0]
907 ; CHECK-NEXT: mov z1.h, z0.h[1]
908 ; CHECK-NEXT: fcvtzs x8, h0
909 ; CHECK-NEXT: mov z2.h, z0.h[3]
910 ; CHECK-NEXT: mov z0.h, z0.h[2]
911 ; CHECK-NEXT: fcvtzs x9, h1
912 ; CHECK-NEXT: fcvtzs x10, h2
913 ; CHECK-NEXT: fcvtzs x11, h0
914 ; CHECK-NEXT: stp x8, x9, [sp, #-32]!
915 ; CHECK-NEXT: .cfi_def_cfa_offset 32
916 ; CHECK-NEXT: stp x11, x10, [sp, #16]
917 ; CHECK-NEXT: ldp q1, q0, [sp]
918 ; CHECK-NEXT: stp q1, q0, [x1]
919 ; CHECK-NEXT: add sp, sp, #32
921 %op1 = load <4 x half>, ptr %a
922 %res = fptosi <4 x half> %op1 to <4 x i64>
923 store <4 x i64> %res, ptr %b
927 define void @fcvtzs_v8f16_v8i64(ptr %a, ptr %b) {
928 ; CHECK-LABEL: fcvtzs_v8f16_v8i64:
930 ; CHECK-NEXT: sub sp, sp, #64
931 ; CHECK-NEXT: .cfi_def_cfa_offset 64
932 ; CHECK-NEXT: ldr q0, [x0]
933 ; CHECK-NEXT: mov z1.h, z0.h[1]
934 ; CHECK-NEXT: mov z2.h, z0.h[3]
935 ; CHECK-NEXT: mov z3.h, z0.h[2]
936 ; CHECK-NEXT: fcvtzs x8, h0
937 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
938 ; CHECK-NEXT: fcvtzs x9, h1
939 ; CHECK-NEXT: fcvtzs x10, h2
940 ; CHECK-NEXT: fcvtzs x11, h3
941 ; CHECK-NEXT: mov z1.h, z0.h[1]
942 ; CHECK-NEXT: mov z2.h, z0.h[3]
943 ; CHECK-NEXT: fcvtzs x12, h0
944 ; CHECK-NEXT: mov z0.h, z0.h[2]
945 ; CHECK-NEXT: stp x8, x9, [sp, #32]
946 ; CHECK-NEXT: fcvtzs x8, h1
947 ; CHECK-NEXT: fcvtzs x9, h2
948 ; CHECK-NEXT: stp x11, x10, [sp, #48]
949 ; CHECK-NEXT: fcvtzs x10, h0
950 ; CHECK-NEXT: ldp q2, q3, [sp, #32]
951 ; CHECK-NEXT: stp x12, x8, [sp]
952 ; CHECK-NEXT: stp x10, x9, [sp, #16]
953 ; CHECK-NEXT: ldp q1, q0, [sp]
954 ; CHECK-NEXT: stp q2, q3, [x1]
955 ; CHECK-NEXT: stp q1, q0, [x1, #32]
956 ; CHECK-NEXT: add sp, sp, #64
958 %op1 = load <8 x half>, ptr %a
959 %res = fptosi <8 x half> %op1 to <8 x i64>
960 store <8 x i64> %res, ptr %b
964 define void @fcvtzs_v16f16_v16i64(ptr %a, ptr %b) {
965 ; CHECK-LABEL: fcvtzs_v16f16_v16i64:
967 ; CHECK-NEXT: sub sp, sp, #128
968 ; CHECK-NEXT: .cfi_def_cfa_offset 128
969 ; CHECK-NEXT: ldr q0, [x0]
970 ; CHECK-NEXT: mov z1.h, z0.h[1]
971 ; CHECK-NEXT: mov z2.h, z0.h[3]
972 ; CHECK-NEXT: fcvtzs x8, h0
973 ; CHECK-NEXT: mov z3.h, z0.h[2]
974 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
975 ; CHECK-NEXT: fcvtzs x9, h1
976 ; CHECK-NEXT: fcvtzs x10, h2
977 ; CHECK-NEXT: ldr q1, [x0, #16]
978 ; CHECK-NEXT: fcvtzs x11, h3
979 ; CHECK-NEXT: mov z2.h, z0.h[1]
980 ; CHECK-NEXT: mov z3.h, z0.h[3]
981 ; CHECK-NEXT: fcvtzs x12, h1
982 ; CHECK-NEXT: stp x8, x9, [sp, #32]
983 ; CHECK-NEXT: fcvtzs x8, h0
984 ; CHECK-NEXT: mov z0.h, z0.h[2]
985 ; CHECK-NEXT: fcvtzs x9, h2
986 ; CHECK-NEXT: stp x11, x10, [sp, #48]
987 ; CHECK-NEXT: fcvtzs x10, h3
988 ; CHECK-NEXT: mov z2.h, z1.h[1]
989 ; CHECK-NEXT: mov z3.h, z1.h[3]
990 ; CHECK-NEXT: fcvtzs x11, h0
991 ; CHECK-NEXT: mov z0.h, z1.h[2]
992 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
993 ; CHECK-NEXT: stp x8, x9, [sp]
994 ; CHECK-NEXT: fcvtzs x8, h2
995 ; CHECK-NEXT: fcvtzs x9, h3
996 ; CHECK-NEXT: mov z2.h, z1.h[1]
997 ; CHECK-NEXT: stp x11, x10, [sp, #16]
998 ; CHECK-NEXT: fcvtzs x10, h0
999 ; CHECK-NEXT: mov z0.h, z1.h[3]
1000 ; CHECK-NEXT: fcvtzs x11, h1
1001 ; CHECK-NEXT: mov z1.h, z1.h[2]
1002 ; CHECK-NEXT: stp x12, x8, [sp, #96]
1003 ; CHECK-NEXT: fcvtzs x12, h2
1004 ; CHECK-NEXT: fcvtzs x8, h0
1005 ; CHECK-NEXT: ldp q3, q4, [sp]
1006 ; CHECK-NEXT: stp x10, x9, [sp, #112]
1007 ; CHECK-NEXT: fcvtzs x9, h1
1008 ; CHECK-NEXT: ldp q0, q1, [sp, #32]
1009 ; CHECK-NEXT: stp x11, x12, [sp, #64]
1010 ; CHECK-NEXT: ldp q6, q7, [sp, #96]
1011 ; CHECK-NEXT: stp x9, x8, [sp, #80]
1012 ; CHECK-NEXT: ldp q5, q2, [sp, #64]
1013 ; CHECK-NEXT: stp q0, q1, [x1]
1014 ; CHECK-NEXT: stp q3, q4, [x1, #32]
1015 ; CHECK-NEXT: stp q6, q7, [x1, #64]
1016 ; CHECK-NEXT: stp q5, q2, [x1, #96]
1017 ; CHECK-NEXT: add sp, sp, #128
1019 %op1 = load <16 x half>, ptr %a
1020 %res = fptosi <16 x half> %op1 to <16 x i64>
1021 store <16 x i64> %res, ptr %b
1029 define <2 x i16> @fcvtzs_v2f32_v2i16(<2 x float> %op1) {
1030 ; CHECK-LABEL: fcvtzs_v2f32_v2i16:
1032 ; CHECK-NEXT: ptrue p0.s, vl2
1033 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1034 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1035 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1037 %res = fptosi <2 x float> %op1 to <2 x i16>
1041 define <4 x i16> @fcvtzs_v4f32_v4i16(<4 x float> %op1) {
1042 ; CHECK-LABEL: fcvtzs_v4f32_v4i16:
1044 ; CHECK-NEXT: ptrue p0.s, vl4
1045 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1046 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1047 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1048 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1050 %res = fptosi <4 x float> %op1 to <4 x i16>
1054 define <8 x i16> @fcvtzs_v8f32_v8i16(ptr %a) {
1055 ; CHECK-LABEL: fcvtzs_v8f32_v8i16:
1057 ; CHECK-NEXT: ptrue p0.s, vl4
1058 ; CHECK-NEXT: ldp q0, q1, [x0]
1059 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1060 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1061 ; CHECK-NEXT: ptrue p0.h, vl4
1062 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1063 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1064 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1065 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1067 %op1 = load <8 x float>, ptr %a
1068 %res = fptosi <8 x float> %op1 to <8 x i16>
1072 define void @fcvtzs_v16f32_v16i16(ptr %a, ptr %b) {
1073 ; CHECK-LABEL: fcvtzs_v16f32_v16i16:
1075 ; CHECK-NEXT: ptrue p0.s, vl4
1076 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1077 ; CHECK-NEXT: ldp q2, q3, [x0]
1078 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1079 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1080 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.s
1081 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.s
1082 ; CHECK-NEXT: ptrue p0.h, vl4
1083 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
1084 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1085 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
1086 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
1087 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
1088 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
1089 ; CHECK-NEXT: stp q2, q0, [x1]
1091 %op1 = load <16 x float>, ptr %a
1092 %res = fptosi <16 x float> %op1 to <16 x i16>
1093 store <16 x i16> %res, ptr %b
1101 define <2 x i32> @fcvtzs_v2f32_v2i32(<2 x float> %op1) {
1102 ; CHECK-LABEL: fcvtzs_v2f32_v2i32:
1104 ; CHECK-NEXT: ptrue p0.s, vl2
1105 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1106 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1107 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1109 %res = fptosi <2 x float> %op1 to <2 x i32>
1113 define <4 x i32> @fcvtzs_v4f32_v4i32(<4 x float> %op1) {
1114 ; CHECK-LABEL: fcvtzs_v4f32_v4i32:
1116 ; CHECK-NEXT: ptrue p0.s, vl4
1117 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1118 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1119 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1121 %res = fptosi <4 x float> %op1 to <4 x i32>
1125 define void @fcvtzs_v8f32_v8i32(ptr %a, ptr %b) {
1126 ; CHECK-LABEL: fcvtzs_v8f32_v8i32:
1128 ; CHECK-NEXT: ptrue p0.s, vl4
1129 ; CHECK-NEXT: ldp q0, q1, [x0]
1130 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
1131 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
1132 ; CHECK-NEXT: stp q0, q1, [x1]
1134 %op1 = load <8 x float>, ptr %a
1135 %res = fptosi <8 x float> %op1 to <8 x i32>
1136 store <8 x i32> %res, ptr %b
1144 define <1 x i64> @fcvtzs_v1f32_v1i64(<1 x float> %op1) {
1145 ; CHECK-LABEL: fcvtzs_v1f32_v1i64:
1147 ; CHECK-NEXT: ptrue p0.d, vl2
1148 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1149 ; CHECK-NEXT: uunpklo z0.d, z0.s
1150 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1151 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1153 %res = fptosi <1 x float> %op1 to <1 x i64>
1157 define <2 x i64> @fcvtzs_v2f32_v2i64(<2 x float> %op1) {
1158 ; CHECK-LABEL: fcvtzs_v2f32_v2i64:
1160 ; CHECK-NEXT: ptrue p0.d, vl2
1161 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1162 ; CHECK-NEXT: uunpklo z0.d, z0.s
1163 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1164 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1166 %res = fptosi <2 x float> %op1 to <2 x i64>
1170 define void @fcvtzs_v4f32_v4i64(ptr %a, ptr %b) {
1171 ; CHECK-LABEL: fcvtzs_v4f32_v4i64:
1173 ; CHECK-NEXT: ldr q0, [x0]
1174 ; CHECK-NEXT: ptrue p0.d, vl2
1175 ; CHECK-NEXT: uunpklo z1.d, z0.s
1176 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1177 ; CHECK-NEXT: uunpklo z0.d, z0.s
1178 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
1179 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1180 ; CHECK-NEXT: stp q1, q0, [x1]
1182 %op1 = load <4 x float>, ptr %a
1183 %res = fptosi <4 x float> %op1 to <4 x i64>
1184 store <4 x i64> %res, ptr %b
1188 define void @fcvtzs_v8f32_v8i64(ptr %a, ptr %b) {
1189 ; CHECK-LABEL: fcvtzs_v8f32_v8i64:
1191 ; CHECK-NEXT: ldp q1, q0, [x0]
1192 ; CHECK-NEXT: ptrue p0.d, vl2
1193 ; CHECK-NEXT: uunpklo z2.d, z0.s
1194 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1195 ; CHECK-NEXT: uunpklo z3.d, z1.s
1196 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1197 ; CHECK-NEXT: uunpklo z0.d, z0.s
1198 ; CHECK-NEXT: uunpklo z1.d, z1.s
1199 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.s
1200 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.s
1201 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
1202 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
1203 ; CHECK-NEXT: stp q2, q0, [x1, #32]
1204 ; CHECK-NEXT: stp q3, q1, [x1]
1206 %op1 = load <8 x float>, ptr %a
1207 %res = fptosi <8 x float> %op1 to <8 x i64>
1208 store <8 x i64> %res, ptr %b
1217 ; v1f64 is perfered to be widened to v4f64, so use SVE
1218 define <1 x i16> @fcvtzs_v1f64_v1i16(<1 x double> %op1) {
1219 ; CHECK-LABEL: fcvtzs_v1f64_v1i16:
1221 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1222 ; CHECK-NEXT: fcvtzs w8, d0
1223 ; CHECK-NEXT: mov z0.h, w8
1224 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1226 %res = fptosi <1 x double> %op1 to <1 x i16>
1230 define <2 x i16> @fcvtzs_v2f64_v2i16(<2 x double> %op1) {
1231 ; CHECK-LABEL: fcvtzs_v2f64_v2i16:
1233 ; CHECK-NEXT: ptrue p0.d, vl2
1234 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1235 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1236 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1237 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1239 %res = fptosi <2 x double> %op1 to <2 x i16>
1243 define <4 x i16> @fcvtzs_v4f64_v4i16(ptr %a) {
1244 ; CHECK-LABEL: fcvtzs_v4f64_v4i16:
1246 ; CHECK-NEXT: sub sp, sp, #16
1247 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1248 ; CHECK-NEXT: ptrue p0.d, vl2
1249 ; CHECK-NEXT: ldp q1, q0, [x0]
1250 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1251 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1252 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1253 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1254 ; CHECK-NEXT: fmov w8, s0
1255 ; CHECK-NEXT: mov z2.s, z0.s[1]
1256 ; CHECK-NEXT: mov z0.s, z1.s[1]
1257 ; CHECK-NEXT: strh w8, [sp, #12]
1258 ; CHECK-NEXT: fmov w8, s1
1259 ; CHECK-NEXT: strh w8, [sp, #8]
1260 ; CHECK-NEXT: fmov w8, s2
1261 ; CHECK-NEXT: strh w8, [sp, #14]
1262 ; CHECK-NEXT: fmov w8, s0
1263 ; CHECK-NEXT: strh w8, [sp, #10]
1264 ; CHECK-NEXT: ldr d0, [sp, #8]
1265 ; CHECK-NEXT: add sp, sp, #16
1267 %op1 = load <4 x double>, ptr %a
1268 %res = fptosi <4 x double> %op1 to <4 x i16>
1272 define <8 x i16> @fcvtzs_v8f64_v8i16(ptr %a) {
1273 ; CHECK-LABEL: fcvtzs_v8f64_v8i16:
1275 ; CHECK-NEXT: sub sp, sp, #16
1276 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1277 ; CHECK-NEXT: ptrue p0.d, vl2
1278 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
1279 ; CHECK-NEXT: ldp q3, q2, [x0]
1280 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1281 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1282 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1283 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1284 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1285 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1286 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1287 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1288 ; CHECK-NEXT: fmov w8, s0
1289 ; CHECK-NEXT: mov z0.s, z0.s[1]
1290 ; CHECK-NEXT: strh w8, [sp, #12]
1291 ; CHECK-NEXT: fmov w8, s1
1292 ; CHECK-NEXT: mov z1.s, z1.s[1]
1293 ; CHECK-NEXT: strh w8, [sp, #8]
1294 ; CHECK-NEXT: fmov w8, s2
1295 ; CHECK-NEXT: mov z2.s, z2.s[1]
1296 ; CHECK-NEXT: strh w8, [sp, #4]
1297 ; CHECK-NEXT: fmov w8, s3
1298 ; CHECK-NEXT: mov z3.s, z3.s[1]
1299 ; CHECK-NEXT: strh w8, [sp]
1300 ; CHECK-NEXT: fmov w8, s0
1301 ; CHECK-NEXT: strh w8, [sp, #14]
1302 ; CHECK-NEXT: fmov w8, s1
1303 ; CHECK-NEXT: strh w8, [sp, #10]
1304 ; CHECK-NEXT: fmov w8, s2
1305 ; CHECK-NEXT: strh w8, [sp, #6]
1306 ; CHECK-NEXT: fmov w8, s3
1307 ; CHECK-NEXT: strh w8, [sp, #2]
1308 ; CHECK-NEXT: ldr q0, [sp], #16
1310 %op1 = load <8 x double>, ptr %a
1311 %res = fptosi <8 x double> %op1 to <8 x i16>
1315 define void @fcvtzs_v16f64_v16i16(ptr %a, ptr %b) {
1316 ; CHECK-LABEL: fcvtzs_v16f64_v16i16:
1318 ; CHECK-NEXT: sub sp, sp, #32
1319 ; CHECK-NEXT: .cfi_def_cfa_offset 32
1320 ; CHECK-NEXT: ptrue p0.d, vl2
1321 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1322 ; CHECK-NEXT: ldp q3, q2, [x0]
1323 ; CHECK-NEXT: ldr q6, [x0, #112]
1324 ; CHECK-NEXT: ldp q4, q5, [x0, #80]
1325 ; CHECK-NEXT: ldr q7, [x0, #64]
1326 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1327 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1328 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1329 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1330 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
1331 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
1332 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
1333 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1334 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1335 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1336 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1337 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
1338 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
1339 ; CHECK-NEXT: fmov w8, s1
1340 ; CHECK-NEXT: mov z16.s, z1.s[1]
1341 ; CHECK-NEXT: mov z1.s, z0.s[1]
1342 ; CHECK-NEXT: strh w8, [sp, #12]
1343 ; CHECK-NEXT: fmov w8, s0
1344 ; CHECK-NEXT: mov z0.s, z2.s[1]
1345 ; CHECK-NEXT: strh w8, [sp, #8]
1346 ; CHECK-NEXT: fmov w8, s2
1347 ; CHECK-NEXT: mov z2.s, z3.s[1]
1348 ; CHECK-NEXT: strh w8, [sp, #4]
1349 ; CHECK-NEXT: fmov w8, s3
1350 ; CHECK-NEXT: movprfx z3, z7
1351 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z7.d
1352 ; CHECK-NEXT: strh w8, [sp]
1353 ; CHECK-NEXT: fmov w8, s16
1354 ; CHECK-NEXT: strh w8, [sp, #14]
1355 ; CHECK-NEXT: fmov w8, s1
1356 ; CHECK-NEXT: uzp1 z1.s, z4.s, z4.s
1357 ; CHECK-NEXT: strh w8, [sp, #10]
1358 ; CHECK-NEXT: fmov w8, s0
1359 ; CHECK-NEXT: uzp1 z0.s, z3.s, z3.s
1360 ; CHECK-NEXT: mov z3.s, z5.s[1]
1361 ; CHECK-NEXT: strh w8, [sp, #6]
1362 ; CHECK-NEXT: fmov w8, s2
1363 ; CHECK-NEXT: mov z2.s, z6.s[1]
1364 ; CHECK-NEXT: strh w8, [sp, #2]
1365 ; CHECK-NEXT: fmov w8, s6
1366 ; CHECK-NEXT: strh w8, [sp, #28]
1367 ; CHECK-NEXT: fmov w8, s5
1368 ; CHECK-NEXT: strh w8, [sp, #24]
1369 ; CHECK-NEXT: fmov w8, s1
1370 ; CHECK-NEXT: mov z1.s, z1.s[1]
1371 ; CHECK-NEXT: strh w8, [sp, #20]
1372 ; CHECK-NEXT: fmov w8, s0
1373 ; CHECK-NEXT: mov z0.s, z0.s[1]
1374 ; CHECK-NEXT: strh w8, [sp, #16]
1375 ; CHECK-NEXT: fmov w8, s2
1376 ; CHECK-NEXT: strh w8, [sp, #30]
1377 ; CHECK-NEXT: fmov w8, s3
1378 ; CHECK-NEXT: strh w8, [sp, #26]
1379 ; CHECK-NEXT: fmov w8, s1
1380 ; CHECK-NEXT: strh w8, [sp, #22]
1381 ; CHECK-NEXT: fmov w8, s0
1382 ; CHECK-NEXT: strh w8, [sp, #18]
1383 ; CHECK-NEXT: ldp q1, q0, [sp]
1384 ; CHECK-NEXT: stp q1, q0, [x1]
1385 ; CHECK-NEXT: add sp, sp, #32
1387 %op1 = load <16 x double>, ptr %a
1388 %res = fptosi <16 x double> %op1 to <16 x i16>
1389 store <16 x i16> %res, ptr %b
1397 define <1 x i32> @fcvtzs_v1f64_v1i32(<1 x double> %op1) {
1398 ; CHECK-LABEL: fcvtzs_v1f64_v1i32:
1400 ; CHECK-NEXT: ptrue p0.d, vl2
1401 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1402 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1403 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1404 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1406 %res = fptosi <1 x double> %op1 to <1 x i32>
1410 define <2 x i32> @fcvtzs_v2f64_v2i32(<2 x double> %op1) {
1411 ; CHECK-LABEL: fcvtzs_v2f64_v2i32:
1413 ; CHECK-NEXT: ptrue p0.d, vl2
1414 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1415 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1416 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1417 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1419 %res = fptosi <2 x double> %op1 to <2 x i32>
1423 define <4 x i32> @fcvtzs_v4f64_v4i32(ptr %a) {
1424 ; CHECK-LABEL: fcvtzs_v4f64_v4i32:
1426 ; CHECK-NEXT: ptrue p0.d, vl2
1427 ; CHECK-NEXT: ldp q0, q1, [x0]
1428 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1429 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1430 ; CHECK-NEXT: ptrue p0.s, vl2
1431 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1432 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1433 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1434 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1436 %op1 = load <4 x double>, ptr %a
1437 %res = fptosi <4 x double> %op1 to <4 x i32>
1441 define void @fcvtzs_v8f64_v8i32(ptr %a, ptr %b) {
1442 ; CHECK-LABEL: fcvtzs_v8f64_v8i32:
1444 ; CHECK-NEXT: ptrue p0.d, vl2
1445 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1446 ; CHECK-NEXT: ldp q2, q3, [x0]
1447 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1448 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1449 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1450 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1451 ; CHECK-NEXT: ptrue p0.s, vl2
1452 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1453 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1454 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1455 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1456 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1457 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
1458 ; CHECK-NEXT: stp q2, q0, [x1]
1460 %op1 = load <8 x double>, ptr %a
1461 %res = fptosi <8 x double> %op1 to <8 x i32>
1462 store <8 x i32> %res, ptr %b
1470 define <1 x i64> @fcvtzs_v1f64_v1i64(<1 x double> %op1) {
1471 ; CHECK-LABEL: fcvtzs_v1f64_v1i64:
1473 ; CHECK-NEXT: ptrue p0.d, vl1
1474 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1475 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1476 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1478 %res = fptosi <1 x double> %op1 to <1 x i64>
1482 define <2 x i64> @fcvtzs_v2f64_v2i64(<2 x double> %op1) {
1483 ; CHECK-LABEL: fcvtzs_v2f64_v2i64:
1485 ; CHECK-NEXT: ptrue p0.d, vl2
1486 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1487 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1488 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1490 %res = fptosi <2 x double> %op1 to <2 x i64>
1494 define void @fcvtzs_v4f64_v4i64(ptr %a, ptr %b) {
1495 ; CHECK-LABEL: fcvtzs_v4f64_v4i64:
1497 ; CHECK-NEXT: ptrue p0.d, vl2
1498 ; CHECK-NEXT: ldp q0, q1, [x0]
1499 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1500 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1501 ; CHECK-NEXT: stp q0, q1, [x1]
1503 %op1 = load <4 x double>, ptr %a
1504 %res = fptosi <4 x double> %op1 to <4 x i64>
1505 store <4 x i64> %res, ptr %b