1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s
3 ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
5 target triple = "aarch64-unknown-linux-gnu"
11 define <4 x i16> @fcvtzu_v4f16_v4i16(<4 x half> %op1) {
12 ; CHECK-LABEL: fcvtzu_v4f16_v4i16:
14 ; CHECK-NEXT: ptrue p0.h, vl4
15 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
16 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
17 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
20 ; NONEON-NOSVE-LABEL: fcvtzu_v4f16_v4i16:
21 ; NONEON-NOSVE: // %bb.0:
22 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
23 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
24 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
25 ; NONEON-NOSVE-NEXT: fcvt s0, h0
26 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
27 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
28 ; NONEON-NOSVE-NEXT: fcvt s0, h0
29 ; NONEON-NOSVE-NEXT: strh w8, [sp, #14]
30 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
31 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
32 ; NONEON-NOSVE-NEXT: fcvt s0, h0
33 ; NONEON-NOSVE-NEXT: strh w8, [sp, #12]
34 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
35 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
36 ; NONEON-NOSVE-NEXT: fcvt s0, h0
37 ; NONEON-NOSVE-NEXT: strh w8, [sp, #10]
38 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
39 ; NONEON-NOSVE-NEXT: strh w8, [sp, #8]
40 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
41 ; NONEON-NOSVE-NEXT: add sp, sp, #16
42 ; NONEON-NOSVE-NEXT: ret
43 %res = fptoui <4 x half> %op1 to <4 x i16>
47 define void @fcvtzu_v8f16_v8i16(ptr %a, ptr %b) {
48 ; CHECK-LABEL: fcvtzu_v8f16_v8i16:
50 ; CHECK-NEXT: ptrue p0.h, vl8
51 ; CHECK-NEXT: ldr q0, [x0]
52 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
53 ; CHECK-NEXT: str q0, [x1]
56 ; NONEON-NOSVE-LABEL: fcvtzu_v8f16_v8i16:
57 ; NONEON-NOSVE: // %bb.0:
58 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
59 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
60 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
61 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
62 ; NONEON-NOSVE-NEXT: fcvt s0, h0
63 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
64 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
65 ; NONEON-NOSVE-NEXT: fcvt s0, h0
66 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
67 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
68 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
69 ; NONEON-NOSVE-NEXT: fcvt s0, h0
70 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
71 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
72 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
73 ; NONEON-NOSVE-NEXT: fcvt s0, h0
74 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
75 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
76 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
77 ; NONEON-NOSVE-NEXT: fcvt s0, h0
78 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
79 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
80 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
81 ; NONEON-NOSVE-NEXT: fcvt s0, h0
82 ; NONEON-NOSVE-NEXT: strh w8, [sp, #22]
83 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
84 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
85 ; NONEON-NOSVE-NEXT: fcvt s0, h0
86 ; NONEON-NOSVE-NEXT: strh w8, [sp, #20]
87 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
88 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
89 ; NONEON-NOSVE-NEXT: fcvt s0, h0
90 ; NONEON-NOSVE-NEXT: strh w8, [sp, #18]
91 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
92 ; NONEON-NOSVE-NEXT: strh w8, [sp, #16]
93 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
94 ; NONEON-NOSVE-NEXT: str q0, [x1]
95 ; NONEON-NOSVE-NEXT: add sp, sp, #32
96 ; NONEON-NOSVE-NEXT: ret
97 %op1 = load <8 x half>, ptr %a
98 %res = fptoui <8 x half> %op1 to <8 x i16>
99 store <8 x i16> %res, ptr %b
103 define void @fcvtzu_v16f16_v16i16(ptr %a, ptr %b) {
104 ; CHECK-LABEL: fcvtzu_v16f16_v16i16:
106 ; CHECK-NEXT: ldp q0, q1, [x0]
107 ; CHECK-NEXT: ptrue p0.h, vl8
108 ; CHECK-NEXT: fcvtzu z0.h, p0/m, z0.h
109 ; CHECK-NEXT: fcvtzu z1.h, p0/m, z1.h
110 ; CHECK-NEXT: stp q0, q1, [x1]
113 ; NONEON-NOSVE-LABEL: fcvtzu_v16f16_v16i16:
114 ; NONEON-NOSVE: // %bb.0:
115 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
116 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
117 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
118 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
119 ; NONEON-NOSVE-NEXT: fcvt s0, h0
120 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
121 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
122 ; NONEON-NOSVE-NEXT: fcvt s0, h0
123 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
124 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
125 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
126 ; NONEON-NOSVE-NEXT: fcvt s0, h0
127 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
128 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
129 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
130 ; NONEON-NOSVE-NEXT: fcvt s0, h0
131 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
132 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
133 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
134 ; NONEON-NOSVE-NEXT: fcvt s0, h0
135 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
136 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
137 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
138 ; NONEON-NOSVE-NEXT: fcvt s0, h0
139 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
140 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
141 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
142 ; NONEON-NOSVE-NEXT: fcvt s0, h0
143 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
144 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
145 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
146 ; NONEON-NOSVE-NEXT: fcvt s0, h0
147 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
148 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
149 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
150 ; NONEON-NOSVE-NEXT: fcvt s0, h0
151 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
152 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
153 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
154 ; NONEON-NOSVE-NEXT: fcvt s0, h0
155 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
156 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
157 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
158 ; NONEON-NOSVE-NEXT: fcvt s0, h0
159 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
160 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
161 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
162 ; NONEON-NOSVE-NEXT: fcvt s0, h0
163 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
164 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
165 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
166 ; NONEON-NOSVE-NEXT: fcvt s0, h0
167 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
168 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
169 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
170 ; NONEON-NOSVE-NEXT: fcvt s0, h0
171 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
172 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
173 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
174 ; NONEON-NOSVE-NEXT: fcvt s0, h0
175 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
176 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
177 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
178 ; NONEON-NOSVE-NEXT: fcvt s0, h0
179 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
180 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
181 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
182 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
183 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
184 ; NONEON-NOSVE-NEXT: add sp, sp, #64
185 ; NONEON-NOSVE-NEXT: ret
186 %op1 = load <16 x half>, ptr %a
187 %res = fptoui <16 x half> %op1 to <16 x i16>
188 store <16 x i16> %res, ptr %b
196 define <2 x i32> @fcvtzu_v2f16_v2i32(<2 x half> %op1) {
197 ; CHECK-LABEL: fcvtzu_v2f16_v2i32:
199 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
200 ; CHECK-NEXT: ptrue p0.s, vl4
201 ; CHECK-NEXT: uunpklo z0.s, z0.h
202 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
203 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
206 ; NONEON-NOSVE-LABEL: fcvtzu_v2f16_v2i32:
207 ; NONEON-NOSVE: // %bb.0:
208 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
209 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
210 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
211 ; NONEON-NOSVE-NEXT: fcvt s0, h0
212 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
213 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
214 ; NONEON-NOSVE-NEXT: fcvt s0, h0
215 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
216 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
217 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
218 ; NONEON-NOSVE-NEXT: add sp, sp, #16
219 ; NONEON-NOSVE-NEXT: ret
220 %res = fptoui <2 x half> %op1 to <2 x i32>
224 define <4 x i32> @fcvtzu_v4f16_v4i32(<4 x half> %op1) {
225 ; CHECK-LABEL: fcvtzu_v4f16_v4i32:
227 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
228 ; CHECK-NEXT: ptrue p0.s, vl4
229 ; CHECK-NEXT: uunpklo z0.s, z0.h
230 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
231 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
234 ; NONEON-NOSVE-LABEL: fcvtzu_v4f16_v4i32:
235 ; NONEON-NOSVE: // %bb.0:
236 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
237 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
238 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
239 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
240 ; NONEON-NOSVE-NEXT: fcvt s0, h0
241 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
242 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
243 ; NONEON-NOSVE-NEXT: fcvt s0, h0
244 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
245 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
246 ; NONEON-NOSVE-NEXT: fcvt s0, h0
247 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
248 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
249 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
250 ; NONEON-NOSVE-NEXT: fcvt s0, h0
251 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
252 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #16]
253 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
254 ; NONEON-NOSVE-NEXT: add sp, sp, #32
255 ; NONEON-NOSVE-NEXT: ret
256 %res = fptoui <4 x half> %op1 to <4 x i32>
260 define void @fcvtzu_v8f16_v8i32(ptr %a, ptr %b) {
261 ; CHECK-LABEL: fcvtzu_v8f16_v8i32:
263 ; CHECK-NEXT: ldr q0, [x0]
264 ; CHECK-NEXT: ptrue p0.s, vl4
265 ; CHECK-NEXT: uunpklo z1.s, z0.h
266 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
267 ; CHECK-NEXT: uunpklo z0.s, z0.h
268 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.h
269 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
270 ; CHECK-NEXT: stp q1, q0, [x1]
273 ; NONEON-NOSVE-LABEL: fcvtzu_v8f16_v8i32:
274 ; NONEON-NOSVE: // %bb.0:
275 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
276 ; NONEON-NOSVE-NEXT: str q0, [sp, #-64]!
277 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
278 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
279 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
280 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
281 ; NONEON-NOSVE-NEXT: fcvt s0, h0
282 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
283 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
284 ; NONEON-NOSVE-NEXT: fcvt s0, h0
285 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
286 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
287 ; NONEON-NOSVE-NEXT: fcvt s0, h0
288 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
289 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
290 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
291 ; NONEON-NOSVE-NEXT: fcvt s0, h0
292 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
293 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
294 ; NONEON-NOSVE-NEXT: fcvt s0, h0
295 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
296 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
297 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
298 ; NONEON-NOSVE-NEXT: fcvt s0, h0
299 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
300 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
301 ; NONEON-NOSVE-NEXT: fcvt s0, h0
302 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
303 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
304 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
305 ; NONEON-NOSVE-NEXT: fcvt s0, h0
306 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
307 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
308 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
309 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
310 ; NONEON-NOSVE-NEXT: add sp, sp, #64
311 ; NONEON-NOSVE-NEXT: ret
312 %op1 = load <8 x half>, ptr %a
313 %res = fptoui <8 x half> %op1 to <8 x i32>
314 store <8 x i32> %res, ptr %b
318 define void @fcvtzu_v16f16_v16i32(ptr %a, ptr %b) {
319 ; CHECK-LABEL: fcvtzu_v16f16_v16i32:
321 ; CHECK-NEXT: ldp q1, q0, [x0]
322 ; CHECK-NEXT: ptrue p0.s, vl4
323 ; CHECK-NEXT: uunpklo z2.s, z0.h
324 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
325 ; CHECK-NEXT: uunpklo z3.s, z1.h
326 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
327 ; CHECK-NEXT: uunpklo z0.s, z0.h
328 ; CHECK-NEXT: uunpklo z1.s, z1.h
329 ; CHECK-NEXT: fcvtzu z2.s, p0/m, z2.h
330 ; CHECK-NEXT: fcvtzu z3.s, p0/m, z3.h
331 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.h
332 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.h
333 ; CHECK-NEXT: stp q2, q0, [x1, #32]
334 ; CHECK-NEXT: stp q3, q1, [x1]
337 ; NONEON-NOSVE-LABEL: fcvtzu_v16f16_v16i32:
338 ; NONEON-NOSVE: // %bb.0:
339 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
340 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-128]!
341 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 128
342 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
343 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
344 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
345 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
346 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #46]
347 ; NONEON-NOSVE-NEXT: fcvt s0, h0
348 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
349 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #44]
350 ; NONEON-NOSVE-NEXT: fcvt s0, h0
351 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
352 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #42]
353 ; NONEON-NOSVE-NEXT: fcvt s0, h0
354 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
355 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
356 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #40]
357 ; NONEON-NOSVE-NEXT: fcvt s0, h0
358 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
359 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #38]
360 ; NONEON-NOSVE-NEXT: fcvt s0, h0
361 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
362 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
363 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #36]
364 ; NONEON-NOSVE-NEXT: fcvt s0, h0
365 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
366 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #34]
367 ; NONEON-NOSVE-NEXT: fcvt s0, h0
368 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
369 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
370 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #32]
371 ; NONEON-NOSVE-NEXT: fcvt s0, h0
372 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
373 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #62]
374 ; NONEON-NOSVE-NEXT: fcvt s0, h0
375 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
376 ; NONEON-NOSVE-NEXT: ldp q3, q2, [sp, #64]
377 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
378 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #60]
379 ; NONEON-NOSVE-NEXT: fcvt s0, h0
380 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
381 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #58]
382 ; NONEON-NOSVE-NEXT: fcvt s0, h0
383 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #120]
384 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
385 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #56]
386 ; NONEON-NOSVE-NEXT: fcvt s0, h0
387 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
388 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #54]
389 ; NONEON-NOSVE-NEXT: fcvt s0, h0
390 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #112]
391 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
392 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #52]
393 ; NONEON-NOSVE-NEXT: fcvt s0, h0
394 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
395 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #50]
396 ; NONEON-NOSVE-NEXT: fcvt s0, h0
397 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #104]
398 ; NONEON-NOSVE-NEXT: fcvtzu w9, s0
399 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #48]
400 ; NONEON-NOSVE-NEXT: fcvt s0, h0
401 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
402 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #96]
403 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
404 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
405 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
406 ; NONEON-NOSVE-NEXT: add sp, sp, #128
407 ; NONEON-NOSVE-NEXT: ret
408 %op1 = load <16 x half>, ptr %a
409 %res = fptoui <16 x half> %op1 to <16 x i32>
410 store <16 x i32> %res, ptr %b
418 define <1 x i64> @fcvtzu_v1f16_v1i64(<1 x half> %op1) {
419 ; CHECK-LABEL: fcvtzu_v1f16_v1i64:
421 ; CHECK-NEXT: fcvtzu x8, h0
422 ; CHECK-NEXT: fmov d0, x8
425 ; NONEON-NOSVE-LABEL: fcvtzu_v1f16_v1i64:
426 ; NONEON-NOSVE: // %bb.0:
427 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
428 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
429 ; NONEON-NOSVE-NEXT: fcvt s0, h0
430 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
431 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
432 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
433 ; NONEON-NOSVE-NEXT: add sp, sp, #16
434 ; NONEON-NOSVE-NEXT: ret
435 %res = fptoui <1 x half> %op1 to <1 x i64>
439 define <2 x i64> @fcvtzu_v2f16_v2i64(<2 x half> %op1) {
440 ; CHECK-LABEL: fcvtzu_v2f16_v2i64:
442 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
443 ; CHECK-NEXT: mov z1.h, z0.h[1]
444 ; CHECK-NEXT: fcvtzu x8, h0
445 ; CHECK-NEXT: fcvtzu x9, h1
446 ; CHECK-NEXT: fmov d0, x8
447 ; CHECK-NEXT: fmov d1, x9
448 ; CHECK-NEXT: zip1 z0.d, z0.d, z1.d
449 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
452 ; NONEON-NOSVE-LABEL: fcvtzu_v2f16_v2i64:
453 ; NONEON-NOSVE: // %bb.0:
454 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
455 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
456 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
457 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
458 ; NONEON-NOSVE-NEXT: fcvt s0, h0
459 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
460 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
461 ; NONEON-NOSVE-NEXT: fcvt s0, h0
462 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
463 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
464 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
465 ; NONEON-NOSVE-NEXT: add sp, sp, #32
466 ; NONEON-NOSVE-NEXT: ret
467 %res = fptoui <2 x half> %op1 to <2 x i64>
471 define void @fcvtzu_v4f16_v4i64(ptr %a, ptr %b) {
472 ; CHECK-LABEL: fcvtzu_v4f16_v4i64:
474 ; CHECK-NEXT: ldr d0, [x0]
475 ; CHECK-NEXT: mov z1.h, z0.h[3]
476 ; CHECK-NEXT: mov z2.h, z0.h[2]
477 ; CHECK-NEXT: mov z3.h, z0.h[1]
478 ; CHECK-NEXT: fcvtzu x10, h0
479 ; CHECK-NEXT: fcvtzu x8, h1
480 ; CHECK-NEXT: fcvtzu x9, h2
481 ; CHECK-NEXT: fcvtzu x11, h3
482 ; CHECK-NEXT: fmov d2, x10
483 ; CHECK-NEXT: fmov d0, x8
484 ; CHECK-NEXT: fmov d1, x9
485 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
486 ; CHECK-NEXT: fmov d1, x11
487 ; CHECK-NEXT: zip1 z1.d, z2.d, z1.d
488 ; CHECK-NEXT: stp q1, q0, [x1]
491 ; NONEON-NOSVE-LABEL: fcvtzu_v4f16_v4i64:
492 ; NONEON-NOSVE: // %bb.0:
493 ; NONEON-NOSVE-NEXT: sub sp, sp, #48
494 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
495 ; NONEON-NOSVE-NEXT: ldr d0, [x0]
496 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
497 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
498 ; NONEON-NOSVE-NEXT: fcvt s0, h0
499 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
500 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
501 ; NONEON-NOSVE-NEXT: fcvt s0, h0
502 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
503 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
504 ; NONEON-NOSVE-NEXT: fcvt s0, h0
505 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
506 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
507 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
508 ; NONEON-NOSVE-NEXT: fcvt s0, h0
509 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
510 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
511 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #16]
512 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
513 ; NONEON-NOSVE-NEXT: add sp, sp, #48
514 ; NONEON-NOSVE-NEXT: ret
515 %op1 = load <4 x half>, ptr %a
516 %res = fptoui <4 x half> %op1 to <4 x i64>
517 store <4 x i64> %res, ptr %b
521 define void @fcvtzu_v8f16_v8i64(ptr %a, ptr %b) {
522 ; CHECK-LABEL: fcvtzu_v8f16_v8i64:
524 ; CHECK-NEXT: ldr q0, [x0]
525 ; CHECK-NEXT: mov z1.d, z0.d
526 ; CHECK-NEXT: mov z2.h, z0.h[3]
527 ; CHECK-NEXT: mov z3.h, z0.h[2]
528 ; CHECK-NEXT: mov z4.h, z0.h[1]
529 ; CHECK-NEXT: fcvtzu x10, h0
530 ; CHECK-NEXT: ext z1.b, z1.b, z0.b, #8
531 ; CHECK-NEXT: fcvtzu x8, h2
532 ; CHECK-NEXT: fcvtzu x9, h3
533 ; CHECK-NEXT: fcvtzu x11, h4
534 ; CHECK-NEXT: mov z5.h, z1.h[3]
535 ; CHECK-NEXT: mov z6.h, z1.h[2]
536 ; CHECK-NEXT: mov z2.h, z1.h[1]
537 ; CHECK-NEXT: fcvtzu x14, h1
538 ; CHECK-NEXT: fmov d0, x8
539 ; CHECK-NEXT: fmov d1, x9
540 ; CHECK-NEXT: fmov d3, x11
541 ; CHECK-NEXT: fcvtzu x12, h5
542 ; CHECK-NEXT: fcvtzu x13, h6
543 ; CHECK-NEXT: fcvtzu x15, h2
544 ; CHECK-NEXT: fmov d2, x10
545 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
546 ; CHECK-NEXT: fmov d1, x12
547 ; CHECK-NEXT: fmov d4, x13
548 ; CHECK-NEXT: zip1 z2.d, z2.d, z3.d
549 ; CHECK-NEXT: fmov d3, x14
550 ; CHECK-NEXT: zip1 z1.d, z4.d, z1.d
551 ; CHECK-NEXT: fmov d4, x15
552 ; CHECK-NEXT: stp q2, q0, [x1]
553 ; CHECK-NEXT: zip1 z3.d, z3.d, z4.d
554 ; CHECK-NEXT: stp q3, q1, [x1, #32]
557 ; NONEON-NOSVE-LABEL: fcvtzu_v8f16_v8i64:
558 ; NONEON-NOSVE: // %bb.0:
559 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
560 ; NONEON-NOSVE-NEXT: str q0, [sp, #-96]!
561 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
562 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
563 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
564 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
565 ; NONEON-NOSVE-NEXT: fcvt s0, h0
566 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
567 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
568 ; NONEON-NOSVE-NEXT: fcvt s0, h0
569 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
570 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
571 ; NONEON-NOSVE-NEXT: fcvt s0, h0
572 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
573 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
574 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
575 ; NONEON-NOSVE-NEXT: fcvt s0, h0
576 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
577 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
578 ; NONEON-NOSVE-NEXT: fcvt s0, h0
579 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
580 ; NONEON-NOSVE-NEXT: ldp q2, q3, [sp, #64]
581 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
582 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
583 ; NONEON-NOSVE-NEXT: fcvt s0, h0
584 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
585 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
586 ; NONEON-NOSVE-NEXT: fcvt s0, h0
587 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
588 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
589 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
590 ; NONEON-NOSVE-NEXT: fcvt s0, h0
591 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
592 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
593 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #32]
594 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
595 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
596 ; NONEON-NOSVE-NEXT: add sp, sp, #96
597 ; NONEON-NOSVE-NEXT: ret
598 %op1 = load <8 x half>, ptr %a
599 %res = fptoui <8 x half> %op1 to <8 x i64>
600 store <8 x i64> %res, ptr %b
604 define void @fcvtzu_v16f16_v16i64(ptr %a, ptr %b) {
605 ; CHECK-LABEL: fcvtzu_v16f16_v16i64:
607 ; CHECK-NEXT: ldp q0, q1, [x0]
608 ; CHECK-NEXT: mov z3.d, z0.d
609 ; CHECK-NEXT: mov z5.d, z1.d
610 ; CHECK-NEXT: mov z2.h, z0.h[3]
611 ; CHECK-NEXT: mov z4.h, z1.h[1]
612 ; CHECK-NEXT: mov z6.h, z1.h[3]
613 ; CHECK-NEXT: fcvtzu x9, h1
614 ; CHECK-NEXT: fcvtzu x8, h0
615 ; CHECK-NEXT: mov z7.h, z0.h[1]
616 ; CHECK-NEXT: ext z3.b, z3.b, z0.b, #8
617 ; CHECK-NEXT: ext z5.b, z5.b, z1.b, #8
618 ; CHECK-NEXT: fcvtzu x10, h2
619 ; CHECK-NEXT: fcvtzu x11, h4
620 ; CHECK-NEXT: fcvtzu x12, h6
621 ; CHECK-NEXT: mov z1.h, z1.h[2]
622 ; CHECK-NEXT: mov z0.h, z0.h[2]
623 ; CHECK-NEXT: fmov d16, x9
624 ; CHECK-NEXT: mov z2.h, z3.h[3]
625 ; CHECK-NEXT: mov z4.h, z5.h[3]
626 ; CHECK-NEXT: fcvtzu x14, h3
627 ; CHECK-NEXT: fcvtzu x13, h1
628 ; CHECK-NEXT: fcvtzu x15, h5
629 ; CHECK-NEXT: mov z1.h, z3.h[1]
630 ; CHECK-NEXT: mov z6.h, z5.h[1]
631 ; CHECK-NEXT: mov z5.h, z5.h[2]
632 ; CHECK-NEXT: mov z3.h, z3.h[2]
633 ; CHECK-NEXT: fcvtzu x9, h2
634 ; CHECK-NEXT: fmov d2, x10
635 ; CHECK-NEXT: fcvtzu x10, h4
636 ; CHECK-NEXT: fmov d4, x11
637 ; CHECK-NEXT: fcvtzu x11, h7
638 ; CHECK-NEXT: fmov d7, x12
639 ; CHECK-NEXT: fcvtzu x12, h0
640 ; CHECK-NEXT: fmov d0, x13
641 ; CHECK-NEXT: fcvtzu x13, h1
642 ; CHECK-NEXT: fmov d1, x14
643 ; CHECK-NEXT: fcvtzu x14, h6
644 ; CHECK-NEXT: fmov d6, x15
645 ; CHECK-NEXT: fcvtzu x15, h5
646 ; CHECK-NEXT: fmov d5, x9
647 ; CHECK-NEXT: fcvtzu x9, h3
648 ; CHECK-NEXT: zip1 z4.d, z16.d, z4.d
649 ; CHECK-NEXT: fmov d16, x8
650 ; CHECK-NEXT: zip1 z0.d, z0.d, z7.d
651 ; CHECK-NEXT: fmov d3, x12
652 ; CHECK-NEXT: fmov d7, x10
653 ; CHECK-NEXT: stp q4, q0, [x1, #64]
654 ; CHECK-NEXT: fmov d0, x14
655 ; CHECK-NEXT: fmov d4, x9
656 ; CHECK-NEXT: zip1 z2.d, z3.d, z2.d
657 ; CHECK-NEXT: fmov d3, x11
658 ; CHECK-NEXT: zip1 z0.d, z6.d, z0.d
659 ; CHECK-NEXT: zip1 z4.d, z4.d, z5.d
660 ; CHECK-NEXT: zip1 z3.d, z16.d, z3.d
661 ; CHECK-NEXT: fmov d16, x15
662 ; CHECK-NEXT: stp q3, q2, [x1]
663 ; CHECK-NEXT: fmov d2, x13
664 ; CHECK-NEXT: zip1 z7.d, z16.d, z7.d
665 ; CHECK-NEXT: zip1 z1.d, z1.d, z2.d
666 ; CHECK-NEXT: stp q0, q7, [x1, #96]
667 ; CHECK-NEXT: stp q1, q4, [x1, #32]
670 ; NONEON-NOSVE-LABEL: fcvtzu_v16f16_v16i64:
671 ; NONEON-NOSVE: // %bb.0:
672 ; NONEON-NOSVE-NEXT: sub sp, sp, #192
673 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 192
674 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
675 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp]
676 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
677 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
678 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
679 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
680 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #42]
681 ; NONEON-NOSVE-NEXT: fcvt s0, h0
682 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
683 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #40]
684 ; NONEON-NOSVE-NEXT: fcvt s0, h0
685 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
686 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #46]
687 ; NONEON-NOSVE-NEXT: fcvt s0, h0
688 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #96]
689 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
690 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #44]
691 ; NONEON-NOSVE-NEXT: fcvt s0, h0
692 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
693 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #34]
694 ; NONEON-NOSVE-NEXT: fcvt s0, h0
695 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #112]
696 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
697 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #32]
698 ; NONEON-NOSVE-NEXT: fcvt s0, h0
699 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
700 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #38]
701 ; NONEON-NOSVE-NEXT: fcvt s0, h0
702 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
703 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
704 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #36]
705 ; NONEON-NOSVE-NEXT: fcvt s0, h0
706 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
707 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #58]
708 ; NONEON-NOSVE-NEXT: fcvt s0, h0
709 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
710 ; NONEON-NOSVE-NEXT: ldp q3, q4, [sp, #64]
711 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
712 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #56]
713 ; NONEON-NOSVE-NEXT: fcvt s0, h0
714 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
715 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #62]
716 ; NONEON-NOSVE-NEXT: fcvt s0, h0
717 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #160]
718 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
719 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #60]
720 ; NONEON-NOSVE-NEXT: fcvt s0, h0
721 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
722 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #50]
723 ; NONEON-NOSVE-NEXT: fcvt s0, h0
724 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #176]
725 ; NONEON-NOSVE-NEXT: ldp q6, q7, [sp, #160]
726 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
727 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #48]
728 ; NONEON-NOSVE-NEXT: fcvt s0, h0
729 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
730 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #54]
731 ; NONEON-NOSVE-NEXT: fcvt s0, h0
732 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #128]
733 ; NONEON-NOSVE-NEXT: fcvtzu x9, s0
734 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #52]
735 ; NONEON-NOSVE-NEXT: fcvt s0, h0
736 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
737 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
738 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #144]
739 ; NONEON-NOSVE-NEXT: ldp q5, q2, [sp, #128]
740 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
741 ; NONEON-NOSVE-NEXT: stp q3, q4, [x1, #32]
742 ; NONEON-NOSVE-NEXT: stp q6, q7, [x1, #64]
743 ; NONEON-NOSVE-NEXT: stp q5, q2, [x1, #96]
744 ; NONEON-NOSVE-NEXT: add sp, sp, #192
745 ; NONEON-NOSVE-NEXT: ret
746 %op1 = load <16 x half>, ptr %a
747 %res = fptoui <16 x half> %op1 to <16 x i64>
748 store <16 x i64> %res, ptr %b
756 define <2 x i16> @fcvtzu_v2f32_v2i16(<2 x float> %op1) {
757 ; CHECK-LABEL: fcvtzu_v2f32_v2i16:
759 ; CHECK-NEXT: ptrue p0.s, vl2
760 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
761 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
762 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
765 ; NONEON-NOSVE-LABEL: fcvtzu_v2f32_v2i16:
766 ; NONEON-NOSVE: // %bb.0:
767 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
768 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
769 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
770 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
771 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
772 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
773 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
774 ; NONEON-NOSVE-NEXT: add sp, sp, #16
775 ; NONEON-NOSVE-NEXT: ret
776 %res = fptoui <2 x float> %op1 to <2 x i16>
780 define <4 x i16> @fcvtzu_v4f32_v4i16(<4 x float> %op1) {
781 ; CHECK-LABEL: fcvtzu_v4f32_v4i16:
783 ; CHECK-NEXT: ptrue p0.s, vl4
784 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
785 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
786 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
787 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
790 ; NONEON-NOSVE-LABEL: fcvtzu_v4f32_v4i16:
791 ; NONEON-NOSVE: // %bb.0:
792 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
793 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
794 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
795 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
796 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
797 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
798 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
799 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
800 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
801 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
802 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
803 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
804 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
805 ; NONEON-NOSVE-NEXT: add sp, sp, #32
806 ; NONEON-NOSVE-NEXT: ret
807 %res = fptoui <4 x float> %op1 to <4 x i16>
811 define <8 x i16> @fcvtzu_v8f32_v8i16(ptr %a) {
812 ; CHECK-LABEL: fcvtzu_v8f32_v8i16:
814 ; CHECK-NEXT: ldp q0, q1, [x0]
815 ; CHECK-NEXT: ptrue p0.s, vl4
816 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
817 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
818 ; CHECK-NEXT: ptrue p0.h, vl4
819 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
820 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
821 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
822 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
825 ; NONEON-NOSVE-LABEL: fcvtzu_v8f32_v8i16:
826 ; NONEON-NOSVE: // %bb.0:
827 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
828 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
829 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
830 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
831 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
832 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
833 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
834 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
835 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
836 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
837 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
838 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
839 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
840 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
841 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
842 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
843 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
844 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
845 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
846 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
847 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
848 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
849 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
850 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
851 ; NONEON-NOSVE-NEXT: add sp, sp, #48
852 ; NONEON-NOSVE-NEXT: ret
853 %op1 = load <8 x float>, ptr %a
854 %res = fptoui <8 x float> %op1 to <8 x i16>
858 define void @fcvtzu_v16f32_v16i16(ptr %a, ptr %b) {
859 ; CHECK-LABEL: fcvtzu_v16f32_v16i16:
861 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
862 ; CHECK-NEXT: ptrue p0.s, vl4
863 ; CHECK-NEXT: ldp q2, q3, [x0]
864 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
865 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
866 ; CHECK-NEXT: fcvtzu z3.s, p0/m, z3.s
867 ; CHECK-NEXT: fcvtzu z2.s, p0/m, z2.s
868 ; CHECK-NEXT: ptrue p0.h, vl4
869 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
870 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
871 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
872 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
873 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
874 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
875 ; CHECK-NEXT: stp q2, q0, [x1]
878 ; NONEON-NOSVE-LABEL: fcvtzu_v16f32_v16i16:
879 ; NONEON-NOSVE: // %bb.0:
880 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
881 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
882 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
883 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #32]
884 ; NONEON-NOSVE-NEXT: str q1, [sp]
885 ; NONEON-NOSVE-NEXT: stp q3, q0, [sp, #16]
886 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #40]
887 ; NONEON-NOSVE-NEXT: str q2, [sp, #48]
888 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
889 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
890 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
891 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #32]
892 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
893 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
894 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
895 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
896 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
897 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
898 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
899 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
900 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
901 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
902 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
903 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
904 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
905 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
906 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
907 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
908 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
909 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
910 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
911 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
912 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
913 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
914 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
915 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
916 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #56]
917 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
918 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
919 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
920 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
921 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #48]
922 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
923 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
924 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
925 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
926 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
927 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #64]
928 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
929 ; NONEON-NOSVE-NEXT: add sp, sp, #96
930 ; NONEON-NOSVE-NEXT: ret
931 %op1 = load <16 x float>, ptr %a
932 %res = fptoui <16 x float> %op1 to <16 x i16>
933 store <16 x i16> %res, ptr %b
941 define <2 x i32> @fcvtzu_v2f32_v2i32(<2 x float> %op1) {
942 ; CHECK-LABEL: fcvtzu_v2f32_v2i32:
944 ; CHECK-NEXT: ptrue p0.s, vl2
945 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
946 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
947 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
950 ; NONEON-NOSVE-LABEL: fcvtzu_v2f32_v2i32:
951 ; NONEON-NOSVE: // %bb.0:
952 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
953 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
954 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
955 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
956 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
957 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
958 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
959 ; NONEON-NOSVE-NEXT: add sp, sp, #16
960 ; NONEON-NOSVE-NEXT: ret
961 %res = fptoui <2 x float> %op1 to <2 x i32>
965 define <4 x i32> @fcvtzu_v4f32_v4i32(<4 x float> %op1) {
966 ; CHECK-LABEL: fcvtzu_v4f32_v4i32:
968 ; CHECK-NEXT: ptrue p0.s, vl4
969 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
970 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
971 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
974 ; NONEON-NOSVE-LABEL: fcvtzu_v4f32_v4i32:
975 ; NONEON-NOSVE: // %bb.0:
976 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
977 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
978 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
979 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
980 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
981 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
982 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
983 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
984 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
985 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #16]
986 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
987 ; NONEON-NOSVE-NEXT: add sp, sp, #32
988 ; NONEON-NOSVE-NEXT: ret
989 %res = fptoui <4 x float> %op1 to <4 x i32>
993 define void @fcvtzu_v8f32_v8i32(ptr %a, ptr %b) {
994 ; CHECK-LABEL: fcvtzu_v8f32_v8i32:
996 ; CHECK-NEXT: ldp q0, q1, [x0]
997 ; CHECK-NEXT: ptrue p0.s, vl4
998 ; CHECK-NEXT: fcvtzu z0.s, p0/m, z0.s
999 ; CHECK-NEXT: fcvtzu z1.s, p0/m, z1.s
1000 ; CHECK-NEXT: stp q0, q1, [x1]
1003 ; NONEON-NOSVE-LABEL: fcvtzu_v8f32_v8i32:
1004 ; NONEON-NOSVE: // %bb.0:
1005 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1006 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1007 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1008 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
1009 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
1010 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
1011 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
1012 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
1013 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
1014 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
1015 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
1016 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
1017 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
1018 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
1019 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
1020 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
1021 ; NONEON-NOSVE-NEXT: fcvtzu w9, s1
1022 ; NONEON-NOSVE-NEXT: fcvtzu w8, s0
1023 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
1024 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1025 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
1026 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1027 ; NONEON-NOSVE-NEXT: ret
1028 %op1 = load <8 x float>, ptr %a
1029 %res = fptoui <8 x float> %op1 to <8 x i32>
1030 store <8 x i32> %res, ptr %b
1038 define <1 x i64> @fcvtzu_v1f32_v1i64(<1 x float> %op1) {
1039 ; CHECK-LABEL: fcvtzu_v1f32_v1i64:
1041 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1042 ; CHECK-NEXT: ptrue p0.d, vl2
1043 ; CHECK-NEXT: uunpklo z0.d, z0.s
1044 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
1045 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1048 ; NONEON-NOSVE-LABEL: fcvtzu_v1f32_v1i64:
1049 ; NONEON-NOSVE: // %bb.0:
1050 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
1051 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1052 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
1053 ; NONEON-NOSVE-NEXT: ldr s0, [sp, #8]
1054 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1055 ; NONEON-NOSVE-NEXT: fmov d0, x8
1056 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1057 ; NONEON-NOSVE-NEXT: ret
1058 %res = fptoui <1 x float> %op1 to <1 x i64>
1062 define <2 x i64> @fcvtzu_v2f32_v2i64(<2 x float> %op1) {
1063 ; CHECK-LABEL: fcvtzu_v2f32_v2i64:
1065 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1066 ; CHECK-NEXT: ptrue p0.d, vl2
1067 ; CHECK-NEXT: uunpklo z0.d, z0.s
1068 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
1069 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1072 ; NONEON-NOSVE-LABEL: fcvtzu_v2f32_v2i64:
1073 ; NONEON-NOSVE: // %bb.0:
1074 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1075 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1076 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
1077 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
1078 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1079 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1080 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
1081 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
1082 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1083 ; NONEON-NOSVE-NEXT: ret
1084 %res = fptoui <2 x float> %op1 to <2 x i64>
1088 define void @fcvtzu_v4f32_v4i64(ptr %a, ptr %b) {
1089 ; CHECK-LABEL: fcvtzu_v4f32_v4i64:
1091 ; CHECK-NEXT: ldr q0, [x0]
1092 ; CHECK-NEXT: ptrue p0.d, vl2
1093 ; CHECK-NEXT: uunpklo z1.d, z0.s
1094 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1095 ; CHECK-NEXT: uunpklo z0.d, z0.s
1096 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
1097 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
1098 ; CHECK-NEXT: stp q1, q0, [x1]
1101 ; NONEON-NOSVE-LABEL: fcvtzu_v4f32_v4i64:
1102 ; NONEON-NOSVE: // %bb.0:
1103 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
1104 ; NONEON-NOSVE-NEXT: str q0, [sp, #-64]!
1105 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1106 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
1107 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
1108 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
1109 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1110 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1111 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
1112 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
1113 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1114 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1115 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
1116 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1117 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
1118 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1119 ; NONEON-NOSVE-NEXT: ret
1120 %op1 = load <4 x float>, ptr %a
1121 %res = fptoui <4 x float> %op1 to <4 x i64>
1122 store <4 x i64> %res, ptr %b
1126 define void @fcvtzu_v8f32_v8i64(ptr %a, ptr %b) {
1127 ; CHECK-LABEL: fcvtzu_v8f32_v8i64:
1129 ; CHECK-NEXT: ldp q1, q0, [x0]
1130 ; CHECK-NEXT: ptrue p0.d, vl2
1131 ; CHECK-NEXT: uunpklo z2.d, z0.s
1132 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1133 ; CHECK-NEXT: uunpklo z3.d, z1.s
1134 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
1135 ; CHECK-NEXT: uunpklo z0.d, z0.s
1136 ; CHECK-NEXT: uunpklo z1.d, z1.s
1137 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.s
1138 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.s
1139 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.s
1140 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.s
1141 ; CHECK-NEXT: stp q2, q0, [x1, #32]
1142 ; CHECK-NEXT: stp q3, q1, [x1]
1145 ; NONEON-NOSVE-LABEL: fcvtzu_v8f32_v8i64:
1146 ; NONEON-NOSVE: // %bb.0:
1147 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
1148 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-128]!
1149 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 128
1150 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
1151 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
1152 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
1153 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
1154 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #40]
1155 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1156 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1157 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #32]
1158 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
1159 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1160 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1161 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #56]
1162 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
1163 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1164 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1165 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #48]
1166 ; NONEON-NOSVE-NEXT: ldp q3, q2, [sp, #64]
1167 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #112]
1168 ; NONEON-NOSVE-NEXT: fcvtzu x9, s1
1169 ; NONEON-NOSVE-NEXT: fcvtzu x8, s0
1170 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #96]
1171 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
1172 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
1173 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
1174 ; NONEON-NOSVE-NEXT: add sp, sp, #128
1175 ; NONEON-NOSVE-NEXT: ret
1176 %op1 = load <8 x float>, ptr %a
1177 %res = fptoui <8 x float> %op1 to <8 x i64>
1178 store <8 x i64> %res, ptr %b
1186 define <1 x i16> @fcvtzu_v1f64_v1i16(<1 x double> %op1) {
1187 ; CHECK-LABEL: fcvtzu_v1f64_v1i16:
1189 ; CHECK-NEXT: fcvtzs w8, d0
1190 ; CHECK-NEXT: mov z0.h, w8
1191 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1194 ; NONEON-NOSVE-LABEL: fcvtzu_v1f64_v1i16:
1195 ; NONEON-NOSVE: // %bb.0:
1196 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
1197 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1198 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
1199 ; NONEON-NOSVE-NEXT: strh w8, [sp, #8]
1200 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1201 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1202 ; NONEON-NOSVE-NEXT: ret
1203 %res = fptoui <1 x double> %op1 to <1 x i16>
1207 define <2 x i16> @fcvtzu_v2f64_v2i16(<2 x double> %op1) {
1208 ; CHECK-LABEL: fcvtzu_v2f64_v2i16:
1210 ; CHECK-NEXT: ptrue p0.d, vl2
1211 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1212 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1213 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1214 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1217 ; NONEON-NOSVE-LABEL: fcvtzu_v2f64_v2i16:
1218 ; NONEON-NOSVE: // %bb.0:
1219 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
1220 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1221 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1222 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1223 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1224 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
1225 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1226 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1227 ; NONEON-NOSVE-NEXT: ret
1228 %res = fptoui <2 x double> %op1 to <2 x i16>
1232 define <4 x i16> @fcvtzu_v4f64_v4i16(ptr %a) {
1233 ; CHECK-LABEL: fcvtzu_v4f64_v4i16:
1235 ; CHECK-NEXT: ldp q0, q1, [x0]
1236 ; CHECK-NEXT: ptrue p0.d, vl2
1237 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1238 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1239 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1240 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1241 ; CHECK-NEXT: mov z2.s, z1.s[1]
1242 ; CHECK-NEXT: mov z3.s, z0.s[1]
1243 ; CHECK-NEXT: zip1 z1.h, z1.h, z2.h
1244 ; CHECK-NEXT: zip1 z0.h, z0.h, z3.h
1245 ; CHECK-NEXT: zip1 z0.s, z0.s, z1.s
1246 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1249 ; NONEON-NOSVE-LABEL: fcvtzu_v4f64_v4i16:
1250 ; NONEON-NOSVE: // %bb.0:
1251 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1252 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-80]!
1253 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 80
1254 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1255 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1256 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1257 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1258 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
1259 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1260 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1261 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
1262 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #40]
1263 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #56]
1264 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #64]
1265 ; NONEON-NOSVE-NEXT: strh w9, [sp, #78]
1266 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
1267 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #56]
1268 ; NONEON-NOSVE-NEXT: strh w9, [sp, #74]
1269 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
1270 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #72]
1271 ; NONEON-NOSVE-NEXT: add sp, sp, #80
1272 ; NONEON-NOSVE-NEXT: ret
1273 %op1 = load <4 x double>, ptr %a
1274 %res = fptoui <4 x double> %op1 to <4 x i16>
1278 define <8 x i16> @fcvtzu_v8f64_v8i16(ptr %a) {
1279 ; CHECK-LABEL: fcvtzu_v8f64_v8i16:
1281 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
1282 ; CHECK-NEXT: ptrue p0.d, vl2
1283 ; CHECK-NEXT: ldp q2, q3, [x0]
1284 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1285 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1286 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1287 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1288 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1289 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1290 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1291 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1292 ; CHECK-NEXT: mov z4.s, z0.s[1]
1293 ; CHECK-NEXT: mov z5.s, z1.s[1]
1294 ; CHECK-NEXT: mov z6.s, z3.s[1]
1295 ; CHECK-NEXT: mov z7.s, z2.s[1]
1296 ; CHECK-NEXT: zip1 z0.h, z0.h, z4.h
1297 ; CHECK-NEXT: zip1 z1.h, z1.h, z5.h
1298 ; CHECK-NEXT: zip1 z3.h, z3.h, z6.h
1299 ; CHECK-NEXT: zip1 z2.h, z2.h, z7.h
1300 ; CHECK-NEXT: zip1 z0.s, z1.s, z0.s
1301 ; CHECK-NEXT: zip1 z1.s, z2.s, z3.s
1302 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
1303 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1306 ; NONEON-NOSVE-LABEL: fcvtzu_v8f64_v8i16:
1307 ; NONEON-NOSVE: // %bb.0:
1308 ; NONEON-NOSVE-NEXT: sub sp, sp, #144
1309 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 144
1310 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0, #32]
1311 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0]
1312 ; NONEON-NOSVE-NEXT: str q1, [sp, #48]
1313 ; NONEON-NOSVE-NEXT: stp q0, q3, [sp, #16]
1314 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1315 ; NONEON-NOSVE-NEXT: str q2, [sp]
1316 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1317 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1318 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
1319 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
1320 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1321 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1322 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
1323 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
1324 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1325 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1326 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1327 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
1328 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1329 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1330 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #80]
1331 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #72]
1332 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #104]
1333 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
1334 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #104]
1335 ; NONEON-NOSVE-NEXT: str d2, [sp, #120]
1336 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #64]
1337 ; NONEON-NOSVE-NEXT: strh w9, [sp, #142]
1338 ; NONEON-NOSVE-NEXT: strh w8, [sp, #140]
1339 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #120]
1340 ; NONEON-NOSVE-NEXT: str d0, [sp, #96]
1341 ; NONEON-NOSVE-NEXT: strh w9, [sp, #138]
1342 ; NONEON-NOSVE-NEXT: strh w8, [sp, #136]
1343 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #112]
1344 ; NONEON-NOSVE-NEXT: strh w9, [sp, #134]
1345 ; NONEON-NOSVE-NEXT: strh w8, [sp, #132]
1346 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #96]
1347 ; NONEON-NOSVE-NEXT: strh w9, [sp, #130]
1348 ; NONEON-NOSVE-NEXT: strh w8, [sp, #128]
1349 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #128]
1350 ; NONEON-NOSVE-NEXT: add sp, sp, #144
1351 ; NONEON-NOSVE-NEXT: ret
1352 %op1 = load <8 x double>, ptr %a
1353 %res = fptoui <8 x double> %op1 to <8 x i16>
1357 define void @fcvtzu_v16f64_v16i16(ptr %a, ptr %b) {
1358 ; CHECK-LABEL: fcvtzu_v16f64_v16i16:
1360 ; CHECK-NEXT: ldp q5, q6, [x0, #96]
1361 ; CHECK-NEXT: ptrue p0.d, vl2
1362 ; CHECK-NEXT: ldp q0, q4, [x0, #32]
1363 ; CHECK-NEXT: ldp q2, q7, [x0, #64]
1364 ; CHECK-NEXT: ldp q1, q3, [x0]
1365 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
1366 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
1367 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
1368 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
1369 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z7.d
1370 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
1371 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
1372 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
1373 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
1374 ; CHECK-NEXT: uzp1 z4.s, z4.s, z4.s
1375 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
1376 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1377 ; CHECK-NEXT: uzp1 z7.s, z7.s, z7.s
1378 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1379 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1380 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1381 ; CHECK-NEXT: mov z17.s, z6.s[1]
1382 ; CHECK-NEXT: mov z16.s, z4.s[1]
1383 ; CHECK-NEXT: mov z18.s, z5.s[1]
1384 ; CHECK-NEXT: mov z21.s, z0.s[1]
1385 ; CHECK-NEXT: mov z19.s, z7.s[1]
1386 ; CHECK-NEXT: mov z20.s, z2.s[1]
1387 ; CHECK-NEXT: mov z22.s, z3.s[1]
1388 ; CHECK-NEXT: mov z23.s, z1.s[1]
1389 ; CHECK-NEXT: zip1 z6.h, z6.h, z17.h
1390 ; CHECK-NEXT: zip1 z4.h, z4.h, z16.h
1391 ; CHECK-NEXT: zip1 z5.h, z5.h, z18.h
1392 ; CHECK-NEXT: zip1 z0.h, z0.h, z21.h
1393 ; CHECK-NEXT: zip1 z7.h, z7.h, z19.h
1394 ; CHECK-NEXT: zip1 z2.h, z2.h, z20.h
1395 ; CHECK-NEXT: zip1 z3.h, z3.h, z22.h
1396 ; CHECK-NEXT: zip1 z1.h, z1.h, z23.h
1397 ; CHECK-NEXT: zip1 z5.s, z5.s, z6.s
1398 ; CHECK-NEXT: zip1 z0.s, z0.s, z4.s
1399 ; CHECK-NEXT: zip1 z2.s, z2.s, z7.s
1400 ; CHECK-NEXT: zip1 z1.s, z1.s, z3.s
1401 ; CHECK-NEXT: zip1 z2.d, z2.d, z5.d
1402 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
1403 ; CHECK-NEXT: stp q0, q2, [x1]
1406 ; NONEON-NOSVE-LABEL: fcvtzu_v16f64_v16i16:
1407 ; NONEON-NOSVE: // %bb.0:
1408 ; NONEON-NOSVE-NEXT: sub sp, sp, #304
1409 ; NONEON-NOSVE-NEXT: str x29, [sp, #288] // 8-byte Folded Spill
1410 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 304
1411 ; NONEON-NOSVE-NEXT: .cfi_offset w29, -16
1412 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0, #32]
1413 ; NONEON-NOSVE-NEXT: ldr x29, [sp, #288] // 8-byte Folded Reload
1414 ; NONEON-NOSVE-NEXT: ldp q6, q7, [x0]
1415 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #64]
1416 ; NONEON-NOSVE-NEXT: ldp q4, q5, [x0, #96]
1417 ; NONEON-NOSVE-NEXT: stp q1, q7, [sp, #64]
1418 ; NONEON-NOSVE-NEXT: stp q0, q2, [sp, #96]
1419 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #64]
1420 ; NONEON-NOSVE-NEXT: stp q6, q4, [sp]
1421 ; NONEON-NOSVE-NEXT: stp q5, q3, [sp, #32]
1422 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1423 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1424 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #96]
1425 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #168]
1426 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1427 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1428 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #80]
1429 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #184]
1430 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1431 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1432 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1433 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #176]
1434 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1435 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1436 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
1437 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #136]
1438 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1439 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1440 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1441 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #152]
1442 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1443 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1444 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
1445 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #144]
1446 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1447 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1448 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #112]
1449 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #160]
1450 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1451 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1452 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #176]
1453 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #168]
1454 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #232]
1455 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #136]
1456 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #192]
1457 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #232]
1458 ; NONEON-NOSVE-NEXT: str d2, [sp, #248]
1459 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #144]
1460 ; NONEON-NOSVE-NEXT: strh w9, [sp, #270]
1461 ; NONEON-NOSVE-NEXT: strh w8, [sp, #268]
1462 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #248]
1463 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #200]
1464 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #160]
1465 ; NONEON-NOSVE-NEXT: strh w9, [sp, #266]
1466 ; NONEON-NOSVE-NEXT: strh w8, [sp, #264]
1467 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #240]
1468 ; NONEON-NOSVE-NEXT: stp d2, d0, [sp, #216]
1469 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #192]
1470 ; NONEON-NOSVE-NEXT: strh w9, [sp, #262]
1471 ; NONEON-NOSVE-NEXT: strh w8, [sp, #260]
1472 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #200]
1473 ; NONEON-NOSVE-NEXT: str d0, [sp, #296]
1474 ; NONEON-NOSVE-NEXT: strh w9, [sp, #258]
1475 ; NONEON-NOSVE-NEXT: strh w8, [sp, #256]
1476 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #216]
1477 ; NONEON-NOSVE-NEXT: strh w9, [sp, #286]
1478 ; NONEON-NOSVE-NEXT: strh w8, [sp, #284]
1479 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #208]
1480 ; NONEON-NOSVE-NEXT: strh w9, [sp, #282]
1481 ; NONEON-NOSVE-NEXT: strh w8, [sp, #280]
1482 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #224]
1483 ; NONEON-NOSVE-NEXT: strh w8, [sp, #276]
1484 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #300]
1485 ; NONEON-NOSVE-NEXT: strh w9, [sp, #278]
1486 ; NONEON-NOSVE-NEXT: strh w8, [sp, #274]
1487 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #296]
1488 ; NONEON-NOSVE-NEXT: strh w8, [sp, #272]
1489 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #256]
1490 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
1491 ; NONEON-NOSVE-NEXT: add sp, sp, #304
1492 ; NONEON-NOSVE-NEXT: ret
1493 %op1 = load <16 x double>, ptr %a
1494 %res = fptoui <16 x double> %op1 to <16 x i16>
1495 store <16 x i16> %res, ptr %b
1503 define <1 x i32> @fcvtzu_v1f64_v1i32(<1 x double> %op1) {
1504 ; CHECK-LABEL: fcvtzu_v1f64_v1i32:
1506 ; CHECK-NEXT: ptrue p0.d, vl2
1507 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1508 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1509 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1510 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1513 ; NONEON-NOSVE-LABEL: fcvtzu_v1f64_v1i32:
1514 ; NONEON-NOSVE: // %bb.0:
1515 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
1516 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1517 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1518 ; NONEON-NOSVE-NEXT: str w8, [sp, #8]
1519 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1520 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1521 ; NONEON-NOSVE-NEXT: ret
1522 %res = fptoui <1 x double> %op1 to <1 x i32>
1526 define <2 x i32> @fcvtzu_v2f64_v2i32(<2 x double> %op1) {
1527 ; CHECK-LABEL: fcvtzu_v2f64_v2i32:
1529 ; CHECK-NEXT: ptrue p0.d, vl2
1530 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1531 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1532 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1533 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1536 ; NONEON-NOSVE-LABEL: fcvtzu_v2f64_v2i32:
1537 ; NONEON-NOSVE: // %bb.0:
1538 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
1539 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1540 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1541 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1542 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1543 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
1544 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
1545 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1546 ; NONEON-NOSVE-NEXT: ret
1547 %res = fptoui <2 x double> %op1 to <2 x i32>
1551 define <4 x i32> @fcvtzu_v4f64_v4i32(ptr %a) {
1552 ; CHECK-LABEL: fcvtzu_v4f64_v4i32:
1554 ; CHECK-NEXT: ldp q0, q1, [x0]
1555 ; CHECK-NEXT: ptrue p0.d, vl2
1556 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
1557 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1558 ; CHECK-NEXT: ptrue p0.s, vl2
1559 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1560 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1561 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1562 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1565 ; NONEON-NOSVE-LABEL: fcvtzu_v4f64_v4i32:
1566 ; NONEON-NOSVE: // %bb.0:
1567 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1568 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1569 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1570 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1571 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1572 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1573 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1574 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
1575 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1576 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1577 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
1578 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1579 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1580 ; NONEON-NOSVE-NEXT: ret
1581 %op1 = load <4 x double>, ptr %a
1582 %res = fptoui <4 x double> %op1 to <4 x i32>
1586 define void @fcvtzu_v8f64_v8i32(ptr %a, ptr %b) {
1587 ; CHECK-LABEL: fcvtzu_v8f64_v8i32:
1589 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
1590 ; CHECK-NEXT: ptrue p0.d, vl2
1591 ; CHECK-NEXT: ldp q2, q3, [x0]
1592 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
1593 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1594 ; CHECK-NEXT: fcvtzu z3.d, p0/m, z3.d
1595 ; CHECK-NEXT: fcvtzu z2.d, p0/m, z2.d
1596 ; CHECK-NEXT: ptrue p0.s, vl2
1597 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1598 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1599 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
1600 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
1601 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1602 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
1603 ; CHECK-NEXT: stp q2, q0, [x1]
1606 ; NONEON-NOSVE-LABEL: fcvtzu_v8f64_v8i32:
1607 ; NONEON-NOSVE: // %bb.0:
1608 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1609 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1610 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1611 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #32]
1612 ; NONEON-NOSVE-NEXT: str q1, [sp]
1613 ; NONEON-NOSVE-NEXT: stp q3, q0, [sp, #16]
1614 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
1615 ; NONEON-NOSVE-NEXT: str q2, [sp, #48]
1616 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1617 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1618 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1619 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
1620 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1621 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1622 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1623 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
1624 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1625 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1626 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
1627 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
1628 ; NONEON-NOSVE-NEXT: fcvtzu w9, d1
1629 ; NONEON-NOSVE-NEXT: fcvtzu w8, d0
1630 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
1631 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #64]
1632 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
1633 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1634 ; NONEON-NOSVE-NEXT: ret
1635 %op1 = load <8 x double>, ptr %a
1636 %res = fptoui <8 x double> %op1 to <8 x i32>
1637 store <8 x i32> %res, ptr %b
1645 define <1 x i64> @fcvtzu_v1f64_v1i64(<1 x double> %op1) {
1646 ; CHECK-LABEL: fcvtzu_v1f64_v1i64:
1648 ; CHECK-NEXT: ptrue p0.d, vl1
1649 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1650 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1651 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1654 ; NONEON-NOSVE-LABEL: fcvtzu_v1f64_v1i64:
1655 ; NONEON-NOSVE: // %bb.0:
1656 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
1657 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1658 ; NONEON-NOSVE-NEXT: fcvtzu x8, d0
1659 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
1660 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1661 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1662 ; NONEON-NOSVE-NEXT: ret
1663 %res = fptoui <1 x double> %op1 to <1 x i64>
1667 define <2 x i64> @fcvtzu_v2f64_v2i64(<2 x double> %op1) {
1668 ; CHECK-LABEL: fcvtzu_v2f64_v2i64:
1670 ; CHECK-NEXT: ptrue p0.d, vl2
1671 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1672 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1673 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1676 ; NONEON-NOSVE-LABEL: fcvtzu_v2f64_v2i64:
1677 ; NONEON-NOSVE: // %bb.0:
1678 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
1679 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1680 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1681 ; NONEON-NOSVE-NEXT: fcvtzu x9, d1
1682 ; NONEON-NOSVE-NEXT: fcvtzu x8, d0
1683 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
1684 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
1685 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1686 ; NONEON-NOSVE-NEXT: ret
1687 %res = fptoui <2 x double> %op1 to <2 x i64>
1691 define void @fcvtzu_v4f64_v4i64(ptr %a, ptr %b) {
1692 ; CHECK-LABEL: fcvtzu_v4f64_v4i64:
1694 ; CHECK-NEXT: ldp q0, q1, [x0]
1695 ; CHECK-NEXT: ptrue p0.d, vl2
1696 ; CHECK-NEXT: fcvtzu z0.d, p0/m, z0.d
1697 ; CHECK-NEXT: fcvtzu z1.d, p0/m, z1.d
1698 ; CHECK-NEXT: stp q0, q1, [x1]
1701 ; NONEON-NOSVE-LABEL: fcvtzu_v4f64_v4i64:
1702 ; NONEON-NOSVE: // %bb.0:
1703 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1704 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1705 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1706 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
1707 ; NONEON-NOSVE-NEXT: fcvtzu x9, d1
1708 ; NONEON-NOSVE-NEXT: fcvtzu x8, d0
1709 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
1710 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
1711 ; NONEON-NOSVE-NEXT: fcvtzu x9, d1
1712 ; NONEON-NOSVE-NEXT: fcvtzu x8, d0
1713 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
1714 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1715 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
1716 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1717 ; NONEON-NOSVE-NEXT: ret
1718 %op1 = load <4 x double>, ptr %a
1719 %res = fptoui <4 x double> %op1 to <4 x i64>
1720 store <4 x i64> %res, ptr %b
1728 define <4 x i16> @fcvtzs_v4f16_v4i16(<4 x half> %op1) {
1729 ; CHECK-LABEL: fcvtzs_v4f16_v4i16:
1731 ; CHECK-NEXT: ptrue p0.h, vl4
1732 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1733 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
1734 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1737 ; NONEON-NOSVE-LABEL: fcvtzs_v4f16_v4i16:
1738 ; NONEON-NOSVE: // %bb.0:
1739 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
1740 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1741 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
1742 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1743 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1744 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
1745 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1746 ; NONEON-NOSVE-NEXT: strh w8, [sp, #14]
1747 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1748 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
1749 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1750 ; NONEON-NOSVE-NEXT: strh w8, [sp, #12]
1751 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1752 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
1753 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1754 ; NONEON-NOSVE-NEXT: strh w8, [sp, #10]
1755 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1756 ; NONEON-NOSVE-NEXT: strh w8, [sp, #8]
1757 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1758 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1759 ; NONEON-NOSVE-NEXT: ret
1760 %res = fptosi <4 x half> %op1 to <4 x i16>
1764 define void @fcvtzs_v8f16_v8i16(ptr %a, ptr %b) {
1765 ; CHECK-LABEL: fcvtzs_v8f16_v8i16:
1767 ; CHECK-NEXT: ptrue p0.h, vl8
1768 ; CHECK-NEXT: ldr q0, [x0]
1769 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
1770 ; CHECK-NEXT: str q0, [x1]
1773 ; NONEON-NOSVE-LABEL: fcvtzs_v8f16_v8i16:
1774 ; NONEON-NOSVE: // %bb.0:
1775 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
1776 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
1777 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1778 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
1779 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1780 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1781 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
1782 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1783 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
1784 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1785 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
1786 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1787 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
1788 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1789 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
1790 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1791 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
1792 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1793 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
1794 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1795 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
1796 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1797 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
1798 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1799 ; NONEON-NOSVE-NEXT: strh w8, [sp, #22]
1800 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1801 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
1802 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1803 ; NONEON-NOSVE-NEXT: strh w8, [sp, #20]
1804 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1805 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
1806 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1807 ; NONEON-NOSVE-NEXT: strh w8, [sp, #18]
1808 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1809 ; NONEON-NOSVE-NEXT: strh w8, [sp, #16]
1810 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
1811 ; NONEON-NOSVE-NEXT: str q0, [x1]
1812 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1813 ; NONEON-NOSVE-NEXT: ret
1814 %op1 = load <8 x half>, ptr %a
1815 %res = fptosi <8 x half> %op1 to <8 x i16>
1816 store <8 x i16> %res, ptr %b
1820 define void @fcvtzs_v16f16_v16i16(ptr %a, ptr %b) {
1821 ; CHECK-LABEL: fcvtzs_v16f16_v16i16:
1823 ; CHECK-NEXT: ldp q0, q1, [x0]
1824 ; CHECK-NEXT: ptrue p0.h, vl8
1825 ; CHECK-NEXT: fcvtzs z0.h, p0/m, z0.h
1826 ; CHECK-NEXT: fcvtzs z1.h, p0/m, z1.h
1827 ; CHECK-NEXT: stp q0, q1, [x1]
1830 ; NONEON-NOSVE-LABEL: fcvtzs_v16f16_v16i16:
1831 ; NONEON-NOSVE: // %bb.0:
1832 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
1833 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
1834 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1835 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
1836 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1837 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1838 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
1839 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1840 ; NONEON-NOSVE-NEXT: strh w8, [sp, #62]
1841 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1842 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
1843 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1844 ; NONEON-NOSVE-NEXT: strh w8, [sp, #60]
1845 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1846 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
1847 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1848 ; NONEON-NOSVE-NEXT: strh w8, [sp, #58]
1849 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1850 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
1851 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1852 ; NONEON-NOSVE-NEXT: strh w8, [sp, #56]
1853 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1854 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
1855 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1856 ; NONEON-NOSVE-NEXT: strh w8, [sp, #54]
1857 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1858 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
1859 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1860 ; NONEON-NOSVE-NEXT: strh w8, [sp, #52]
1861 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1862 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
1863 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1864 ; NONEON-NOSVE-NEXT: strh w8, [sp, #50]
1865 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1866 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
1867 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1868 ; NONEON-NOSVE-NEXT: strh w8, [sp, #48]
1869 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1870 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
1871 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1872 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1873 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1874 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
1875 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1876 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1877 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1878 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
1879 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1880 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1881 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1882 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #6]
1883 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1884 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1885 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1886 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #4]
1887 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1888 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1889 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1890 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
1891 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1892 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1893 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1894 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
1895 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1896 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1897 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1898 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1899 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
1900 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
1901 ; NONEON-NOSVE-NEXT: add sp, sp, #64
1902 ; NONEON-NOSVE-NEXT: ret
1903 %op1 = load <16 x half>, ptr %a
1904 %res = fptosi <16 x half> %op1 to <16 x i16>
1905 store <16 x i16> %res, ptr %b
1913 define <2 x i32> @fcvtzs_v2f16_v2i32(<2 x half> %op1) {
1914 ; CHECK-LABEL: fcvtzs_v2f16_v2i32:
1916 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1917 ; CHECK-NEXT: ptrue p0.s, vl4
1918 ; CHECK-NEXT: uunpklo z0.s, z0.h
1919 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
1920 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1923 ; NONEON-NOSVE-LABEL: fcvtzs_v2f16_v2i32:
1924 ; NONEON-NOSVE: // %bb.0:
1925 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
1926 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
1927 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #2]
1928 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1929 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
1930 ; NONEON-NOSVE-NEXT: ldr h0, [sp]
1931 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1932 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1933 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
1934 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
1935 ; NONEON-NOSVE-NEXT: add sp, sp, #16
1936 ; NONEON-NOSVE-NEXT: ret
1937 %res = fptosi <2 x half> %op1 to <2 x i32>
1941 define <4 x i32> @fcvtzs_v4f16_v4i32(<4 x half> %op1) {
1942 ; CHECK-LABEL: fcvtzs_v4f16_v4i32:
1944 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
1945 ; CHECK-NEXT: ptrue p0.s, vl4
1946 ; CHECK-NEXT: uunpklo z0.s, z0.h
1947 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
1948 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1951 ; NONEON-NOSVE-LABEL: fcvtzs_v4f16_v4i32:
1952 ; NONEON-NOSVE: // %bb.0:
1953 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
1954 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
1955 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
1956 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
1957 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1958 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
1959 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
1960 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1961 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1962 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
1963 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1964 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
1965 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
1966 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
1967 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1968 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
1969 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #16]
1970 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
1971 ; NONEON-NOSVE-NEXT: add sp, sp, #32
1972 ; NONEON-NOSVE-NEXT: ret
1973 %res = fptosi <4 x half> %op1 to <4 x i32>
1977 define void @fcvtzs_v8f16_v8i32(ptr %a, ptr %b) {
1978 ; CHECK-LABEL: fcvtzs_v8f16_v8i32:
1980 ; CHECK-NEXT: ldr q0, [x0]
1981 ; CHECK-NEXT: ptrue p0.s, vl4
1982 ; CHECK-NEXT: uunpklo z1.s, z0.h
1983 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
1984 ; CHECK-NEXT: uunpklo z0.s, z0.h
1985 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
1986 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
1987 ; CHECK-NEXT: stp q1, q0, [x1]
1990 ; NONEON-NOSVE-LABEL: fcvtzs_v8f16_v8i32:
1991 ; NONEON-NOSVE: // %bb.0:
1992 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
1993 ; NONEON-NOSVE-NEXT: str q0, [sp, #-64]!
1994 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
1995 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
1996 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
1997 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
1998 ; NONEON-NOSVE-NEXT: fcvt s0, h0
1999 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2000 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
2001 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2002 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2003 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
2004 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2005 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
2006 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2007 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
2008 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2009 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2010 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
2011 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2012 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
2013 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2014 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
2015 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2016 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2017 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
2018 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2019 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
2020 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2021 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
2022 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2023 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2024 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
2025 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2026 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
2027 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2028 ; NONEON-NOSVE-NEXT: ret
2029 %op1 = load <8 x half>, ptr %a
2030 %res = fptosi <8 x half> %op1 to <8 x i32>
2031 store <8 x i32> %res, ptr %b
2035 define void @fcvtzs_v16f16_v16i32(ptr %a, ptr %b) {
2036 ; CHECK-LABEL: fcvtzs_v16f16_v16i32:
2038 ; CHECK-NEXT: ldp q1, q0, [x0]
2039 ; CHECK-NEXT: ptrue p0.s, vl4
2040 ; CHECK-NEXT: uunpklo z2.s, z0.h
2041 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
2042 ; CHECK-NEXT: uunpklo z3.s, z1.h
2043 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
2044 ; CHECK-NEXT: uunpklo z0.s, z0.h
2045 ; CHECK-NEXT: uunpklo z1.s, z1.h
2046 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.h
2047 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.h
2048 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.h
2049 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.h
2050 ; CHECK-NEXT: stp q2, q0, [x1, #32]
2051 ; CHECK-NEXT: stp q3, q1, [x1]
2054 ; NONEON-NOSVE-LABEL: fcvtzs_v16f16_v16i32:
2055 ; NONEON-NOSVE: // %bb.0:
2056 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
2057 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-128]!
2058 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 128
2059 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
2060 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
2061 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
2062 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
2063 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #46]
2064 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2065 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2066 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #44]
2067 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2068 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2069 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #42]
2070 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2071 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
2072 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2073 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #40]
2074 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2075 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2076 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #38]
2077 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2078 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
2079 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2080 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #36]
2081 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2082 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2083 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #34]
2084 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2085 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
2086 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2087 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #32]
2088 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2089 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2090 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #62]
2091 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2092 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
2093 ; NONEON-NOSVE-NEXT: ldp q3, q2, [sp, #64]
2094 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2095 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #60]
2096 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2097 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2098 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #58]
2099 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2100 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #120]
2101 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2102 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #56]
2103 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2104 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2105 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #54]
2106 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2107 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #112]
2108 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2109 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #52]
2110 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2111 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2112 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #50]
2113 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2114 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #104]
2115 ; NONEON-NOSVE-NEXT: fcvtzs w9, s0
2116 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #48]
2117 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2118 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2119 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #96]
2120 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
2121 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
2122 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
2123 ; NONEON-NOSVE-NEXT: add sp, sp, #128
2124 ; NONEON-NOSVE-NEXT: ret
2125 %op1 = load <16 x half>, ptr %a
2126 %res = fptosi <16 x half> %op1 to <16 x i32>
2127 store <16 x i32> %res, ptr %b
2135 define <1 x i64> @fcvtzs_v1f16_v1i64(<1 x half> %op1) {
2136 ; CHECK-LABEL: fcvtzs_v1f16_v1i64:
2138 ; CHECK-NEXT: fcvtzs x8, h0
2139 ; CHECK-NEXT: fmov d0, x8
2142 ; NONEON-NOSVE-LABEL: fcvtzs_v1f16_v1i64:
2143 ; NONEON-NOSVE: // %bb.0:
2144 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
2145 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2146 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2147 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2148 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
2149 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
2150 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2151 ; NONEON-NOSVE-NEXT: ret
2152 %res = fptosi <1 x half> %op1 to <1 x i64>
2156 ; v2f16 is not legal for NEON, so use SVE
2157 define <2 x i64> @fcvtzs_v2f16_v2i64(<2 x half> %op1) {
2158 ; CHECK-LABEL: fcvtzs_v2f16_v2i64:
2160 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2161 ; CHECK-NEXT: mov z1.h, z0.h[1]
2162 ; CHECK-NEXT: fcvtzs x8, h0
2163 ; CHECK-NEXT: fcvtzs x9, h1
2164 ; CHECK-NEXT: fmov d0, x8
2165 ; CHECK-NEXT: fmov d1, x9
2166 ; CHECK-NEXT: zip1 z0.d, z0.d, z1.d
2167 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2170 ; NONEON-NOSVE-LABEL: fcvtzs_v2f16_v2i64:
2171 ; NONEON-NOSVE: // %bb.0:
2172 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
2173 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2174 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
2175 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
2176 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2177 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2178 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
2179 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2180 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2181 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
2182 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
2183 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2184 ; NONEON-NOSVE-NEXT: ret
2185 %res = fptosi <2 x half> %op1 to <2 x i64>
2189 define void @fcvtzs_v4f16_v4i64(ptr %a, ptr %b) {
2190 ; CHECK-LABEL: fcvtzs_v4f16_v4i64:
2192 ; CHECK-NEXT: ldr d0, [x0]
2193 ; CHECK-NEXT: mov z1.h, z0.h[3]
2194 ; CHECK-NEXT: mov z2.h, z0.h[2]
2195 ; CHECK-NEXT: mov z3.h, z0.h[1]
2196 ; CHECK-NEXT: fcvtzs x10, h0
2197 ; CHECK-NEXT: fcvtzs x8, h1
2198 ; CHECK-NEXT: fcvtzs x9, h2
2199 ; CHECK-NEXT: fcvtzs x11, h3
2200 ; CHECK-NEXT: fmov d2, x10
2201 ; CHECK-NEXT: fmov d0, x8
2202 ; CHECK-NEXT: fmov d1, x9
2203 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
2204 ; CHECK-NEXT: fmov d1, x11
2205 ; CHECK-NEXT: zip1 z1.d, z2.d, z1.d
2206 ; CHECK-NEXT: stp q1, q0, [x1]
2209 ; NONEON-NOSVE-LABEL: fcvtzs_v4f16_v4i64:
2210 ; NONEON-NOSVE: // %bb.0:
2211 ; NONEON-NOSVE-NEXT: sub sp, sp, #48
2212 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
2213 ; NONEON-NOSVE-NEXT: ldr d0, [x0]
2214 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
2215 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #10]
2216 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2217 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2218 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #8]
2219 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2220 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2221 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #14]
2222 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2223 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
2224 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2225 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #12]
2226 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2227 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2228 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
2229 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #16]
2230 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
2231 ; NONEON-NOSVE-NEXT: add sp, sp, #48
2232 ; NONEON-NOSVE-NEXT: ret
2233 %op1 = load <4 x half>, ptr %a
2234 %res = fptosi <4 x half> %op1 to <4 x i64>
2235 store <4 x i64> %res, ptr %b
2239 define void @fcvtzs_v8f16_v8i64(ptr %a, ptr %b) {
2240 ; CHECK-LABEL: fcvtzs_v8f16_v8i64:
2242 ; CHECK-NEXT: ldr q0, [x0]
2243 ; CHECK-NEXT: mov z1.d, z0.d
2244 ; CHECK-NEXT: mov z2.h, z0.h[3]
2245 ; CHECK-NEXT: mov z3.h, z0.h[2]
2246 ; CHECK-NEXT: mov z4.h, z0.h[1]
2247 ; CHECK-NEXT: fcvtzs x10, h0
2248 ; CHECK-NEXT: ext z1.b, z1.b, z0.b, #8
2249 ; CHECK-NEXT: fcvtzs x8, h2
2250 ; CHECK-NEXT: fcvtzs x9, h3
2251 ; CHECK-NEXT: fcvtzs x11, h4
2252 ; CHECK-NEXT: mov z5.h, z1.h[3]
2253 ; CHECK-NEXT: mov z6.h, z1.h[2]
2254 ; CHECK-NEXT: mov z2.h, z1.h[1]
2255 ; CHECK-NEXT: fcvtzs x14, h1
2256 ; CHECK-NEXT: fmov d0, x8
2257 ; CHECK-NEXT: fmov d1, x9
2258 ; CHECK-NEXT: fmov d3, x11
2259 ; CHECK-NEXT: fcvtzs x12, h5
2260 ; CHECK-NEXT: fcvtzs x13, h6
2261 ; CHECK-NEXT: fcvtzs x15, h2
2262 ; CHECK-NEXT: fmov d2, x10
2263 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
2264 ; CHECK-NEXT: fmov d1, x12
2265 ; CHECK-NEXT: fmov d4, x13
2266 ; CHECK-NEXT: zip1 z2.d, z2.d, z3.d
2267 ; CHECK-NEXT: fmov d3, x14
2268 ; CHECK-NEXT: zip1 z1.d, z4.d, z1.d
2269 ; CHECK-NEXT: fmov d4, x15
2270 ; CHECK-NEXT: stp q2, q0, [x1]
2271 ; CHECK-NEXT: zip1 z3.d, z3.d, z4.d
2272 ; CHECK-NEXT: stp q3, q1, [x1, #32]
2275 ; NONEON-NOSVE-LABEL: fcvtzs_v8f16_v8i64:
2276 ; NONEON-NOSVE: // %bb.0:
2277 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
2278 ; NONEON-NOSVE-NEXT: str q0, [sp, #-96]!
2279 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
2280 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
2281 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
2282 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #26]
2283 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2284 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2285 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #24]
2286 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2287 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2288 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #30]
2289 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2290 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
2291 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2292 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #28]
2293 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2294 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2295 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #18]
2296 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2297 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
2298 ; NONEON-NOSVE-NEXT: ldp q2, q3, [sp, #64]
2299 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2300 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #16]
2301 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2302 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2303 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #22]
2304 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2305 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
2306 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2307 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #20]
2308 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2309 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2310 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
2311 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #32]
2312 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
2313 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
2314 ; NONEON-NOSVE-NEXT: add sp, sp, #96
2315 ; NONEON-NOSVE-NEXT: ret
2316 %op1 = load <8 x half>, ptr %a
2317 %res = fptosi <8 x half> %op1 to <8 x i64>
2318 store <8 x i64> %res, ptr %b
2322 define void @fcvtzs_v16f16_v16i64(ptr %a, ptr %b) {
2323 ; CHECK-LABEL: fcvtzs_v16f16_v16i64:
2325 ; CHECK-NEXT: ldp q0, q1, [x0]
2326 ; CHECK-NEXT: mov z3.d, z0.d
2327 ; CHECK-NEXT: mov z5.d, z1.d
2328 ; CHECK-NEXT: mov z2.h, z0.h[3]
2329 ; CHECK-NEXT: mov z4.h, z1.h[1]
2330 ; CHECK-NEXT: mov z6.h, z1.h[3]
2331 ; CHECK-NEXT: fcvtzs x9, h1
2332 ; CHECK-NEXT: fcvtzs x8, h0
2333 ; CHECK-NEXT: mov z7.h, z0.h[1]
2334 ; CHECK-NEXT: ext z3.b, z3.b, z0.b, #8
2335 ; CHECK-NEXT: ext z5.b, z5.b, z1.b, #8
2336 ; CHECK-NEXT: fcvtzs x10, h2
2337 ; CHECK-NEXT: fcvtzs x11, h4
2338 ; CHECK-NEXT: fcvtzs x12, h6
2339 ; CHECK-NEXT: mov z1.h, z1.h[2]
2340 ; CHECK-NEXT: mov z0.h, z0.h[2]
2341 ; CHECK-NEXT: fmov d16, x9
2342 ; CHECK-NEXT: mov z2.h, z3.h[3]
2343 ; CHECK-NEXT: mov z4.h, z5.h[3]
2344 ; CHECK-NEXT: fcvtzs x14, h3
2345 ; CHECK-NEXT: fcvtzs x13, h1
2346 ; CHECK-NEXT: fcvtzs x15, h5
2347 ; CHECK-NEXT: mov z1.h, z3.h[1]
2348 ; CHECK-NEXT: mov z6.h, z5.h[1]
2349 ; CHECK-NEXT: mov z5.h, z5.h[2]
2350 ; CHECK-NEXT: mov z3.h, z3.h[2]
2351 ; CHECK-NEXT: fcvtzs x9, h2
2352 ; CHECK-NEXT: fmov d2, x10
2353 ; CHECK-NEXT: fcvtzs x10, h4
2354 ; CHECK-NEXT: fmov d4, x11
2355 ; CHECK-NEXT: fcvtzs x11, h7
2356 ; CHECK-NEXT: fmov d7, x12
2357 ; CHECK-NEXT: fcvtzs x12, h0
2358 ; CHECK-NEXT: fmov d0, x13
2359 ; CHECK-NEXT: fcvtzs x13, h1
2360 ; CHECK-NEXT: fmov d1, x14
2361 ; CHECK-NEXT: fcvtzs x14, h6
2362 ; CHECK-NEXT: fmov d6, x15
2363 ; CHECK-NEXT: fcvtzs x15, h5
2364 ; CHECK-NEXT: fmov d5, x9
2365 ; CHECK-NEXT: fcvtzs x9, h3
2366 ; CHECK-NEXT: zip1 z4.d, z16.d, z4.d
2367 ; CHECK-NEXT: fmov d16, x8
2368 ; CHECK-NEXT: zip1 z0.d, z0.d, z7.d
2369 ; CHECK-NEXT: fmov d3, x12
2370 ; CHECK-NEXT: fmov d7, x10
2371 ; CHECK-NEXT: stp q4, q0, [x1, #64]
2372 ; CHECK-NEXT: fmov d0, x14
2373 ; CHECK-NEXT: fmov d4, x9
2374 ; CHECK-NEXT: zip1 z2.d, z3.d, z2.d
2375 ; CHECK-NEXT: fmov d3, x11
2376 ; CHECK-NEXT: zip1 z0.d, z6.d, z0.d
2377 ; CHECK-NEXT: zip1 z4.d, z4.d, z5.d
2378 ; CHECK-NEXT: zip1 z3.d, z16.d, z3.d
2379 ; CHECK-NEXT: fmov d16, x15
2380 ; CHECK-NEXT: stp q3, q2, [x1]
2381 ; CHECK-NEXT: fmov d2, x13
2382 ; CHECK-NEXT: zip1 z7.d, z16.d, z7.d
2383 ; CHECK-NEXT: zip1 z1.d, z1.d, z2.d
2384 ; CHECK-NEXT: stp q0, q7, [x1, #96]
2385 ; CHECK-NEXT: stp q1, q4, [x1, #32]
2388 ; NONEON-NOSVE-LABEL: fcvtzs_v16f16_v16i64:
2389 ; NONEON-NOSVE: // %bb.0:
2390 ; NONEON-NOSVE-NEXT: sub sp, sp, #192
2391 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 192
2392 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
2393 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp]
2394 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
2395 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
2396 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
2397 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
2398 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #42]
2399 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2400 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2401 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #40]
2402 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2403 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2404 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #46]
2405 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2406 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #96]
2407 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2408 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #44]
2409 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2410 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2411 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #34]
2412 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2413 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #112]
2414 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2415 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #32]
2416 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2417 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2418 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #38]
2419 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2420 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
2421 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2422 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #36]
2423 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2424 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2425 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #58]
2426 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2427 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
2428 ; NONEON-NOSVE-NEXT: ldp q3, q4, [sp, #64]
2429 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2430 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #56]
2431 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2432 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2433 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #62]
2434 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2435 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #160]
2436 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2437 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #60]
2438 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2439 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2440 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #50]
2441 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2442 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #176]
2443 ; NONEON-NOSVE-NEXT: ldp q6, q7, [sp, #160]
2444 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2445 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #48]
2446 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2447 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2448 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #54]
2449 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2450 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #128]
2451 ; NONEON-NOSVE-NEXT: fcvtzs x9, s0
2452 ; NONEON-NOSVE-NEXT: ldr h0, [sp, #52]
2453 ; NONEON-NOSVE-NEXT: fcvt s0, h0
2454 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2455 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
2456 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #144]
2457 ; NONEON-NOSVE-NEXT: ldp q5, q2, [sp, #128]
2458 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
2459 ; NONEON-NOSVE-NEXT: stp q3, q4, [x1, #32]
2460 ; NONEON-NOSVE-NEXT: stp q6, q7, [x1, #64]
2461 ; NONEON-NOSVE-NEXT: stp q5, q2, [x1, #96]
2462 ; NONEON-NOSVE-NEXT: add sp, sp, #192
2463 ; NONEON-NOSVE-NEXT: ret
2464 %op1 = load <16 x half>, ptr %a
2465 %res = fptosi <16 x half> %op1 to <16 x i64>
2466 store <16 x i64> %res, ptr %b
2474 define <2 x i16> @fcvtzs_v2f32_v2i16(<2 x float> %op1) {
2475 ; CHECK-LABEL: fcvtzs_v2f32_v2i16:
2477 ; CHECK-NEXT: ptrue p0.s, vl2
2478 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2479 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2480 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2483 ; NONEON-NOSVE-LABEL: fcvtzs_v2f32_v2i16:
2484 ; NONEON-NOSVE: // %bb.0:
2485 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
2486 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2487 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2488 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2489 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2490 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
2491 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
2492 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2493 ; NONEON-NOSVE-NEXT: ret
2494 %res = fptosi <2 x float> %op1 to <2 x i16>
2498 define <4 x i16> @fcvtzs_v4f32_v4i16(<4 x float> %op1) {
2499 ; CHECK-LABEL: fcvtzs_v4f32_v4i16:
2501 ; CHECK-NEXT: ptrue p0.s, vl4
2502 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
2503 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2504 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
2505 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2508 ; NONEON-NOSVE-LABEL: fcvtzs_v4f32_v4i16:
2509 ; NONEON-NOSVE: // %bb.0:
2510 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
2511 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2512 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2513 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2514 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
2515 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2516 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2517 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
2518 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2519 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
2520 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2521 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
2522 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
2523 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2524 ; NONEON-NOSVE-NEXT: ret
2525 %res = fptosi <4 x float> %op1 to <4 x i16>
2529 define <8 x i16> @fcvtzs_v8f32_v8i16(ptr %a) {
2530 ; CHECK-LABEL: fcvtzs_v8f32_v8i16:
2532 ; CHECK-NEXT: ldp q0, q1, [x0]
2533 ; CHECK-NEXT: ptrue p0.s, vl4
2534 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
2535 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2536 ; CHECK-NEXT: ptrue p0.h, vl4
2537 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
2538 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
2539 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
2540 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2543 ; NONEON-NOSVE-LABEL: fcvtzs_v8f32_v8i16:
2544 ; NONEON-NOSVE: // %bb.0:
2545 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2546 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
2547 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
2548 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
2549 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2550 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
2551 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2552 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
2553 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
2554 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2555 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
2556 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2557 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2558 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
2559 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2560 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
2561 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2562 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2563 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
2564 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2565 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
2566 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2567 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
2568 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
2569 ; NONEON-NOSVE-NEXT: add sp, sp, #48
2570 ; NONEON-NOSVE-NEXT: ret
2571 %op1 = load <8 x float>, ptr %a
2572 %res = fptosi <8 x float> %op1 to <8 x i16>
2576 define void @fcvtzs_v16f32_v16i16(ptr %a, ptr %b) {
2577 ; CHECK-LABEL: fcvtzs_v16f32_v16i16:
2579 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
2580 ; CHECK-NEXT: ptrue p0.s, vl4
2581 ; CHECK-NEXT: ldp q2, q3, [x0]
2582 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
2583 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2584 ; CHECK-NEXT: fcvtzs z3.s, p0/m, z3.s
2585 ; CHECK-NEXT: fcvtzs z2.s, p0/m, z2.s
2586 ; CHECK-NEXT: ptrue p0.h, vl4
2587 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
2588 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
2589 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
2590 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
2591 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
2592 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
2593 ; CHECK-NEXT: stp q2, q0, [x1]
2596 ; NONEON-NOSVE-LABEL: fcvtzs_v16f32_v16i16:
2597 ; NONEON-NOSVE: // %bb.0:
2598 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
2599 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
2600 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2601 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #32]
2602 ; NONEON-NOSVE-NEXT: str q1, [sp]
2603 ; NONEON-NOSVE-NEXT: stp q3, q0, [sp, #16]
2604 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #40]
2605 ; NONEON-NOSVE-NEXT: str q2, [sp, #48]
2606 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2607 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
2608 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2609 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #32]
2610 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
2611 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2612 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
2613 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2614 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2615 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
2616 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2617 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
2618 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2619 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2620 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
2621 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2622 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
2623 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2624 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
2625 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
2626 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2627 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
2628 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2629 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
2630 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
2631 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2632 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
2633 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2634 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #56]
2635 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
2636 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2637 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
2638 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2639 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #48]
2640 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
2641 ; NONEON-NOSVE-NEXT: fcvtzs w8, s1
2642 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
2643 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2644 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
2645 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #64]
2646 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
2647 ; NONEON-NOSVE-NEXT: add sp, sp, #96
2648 ; NONEON-NOSVE-NEXT: ret
2649 %op1 = load <16 x float>, ptr %a
2650 %res = fptosi <16 x float> %op1 to <16 x i16>
2651 store <16 x i16> %res, ptr %b
2659 define <2 x i32> @fcvtzs_v2f32_v2i32(<2 x float> %op1) {
2660 ; CHECK-LABEL: fcvtzs_v2f32_v2i32:
2662 ; CHECK-NEXT: ptrue p0.s, vl2
2663 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2664 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2665 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2668 ; NONEON-NOSVE-LABEL: fcvtzs_v2f32_v2i32:
2669 ; NONEON-NOSVE: // %bb.0:
2670 ; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!
2671 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2672 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2673 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2674 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2675 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]
2676 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
2677 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2678 ; NONEON-NOSVE-NEXT: ret
2679 %res = fptosi <2 x float> %op1 to <2 x i32>
2683 define <4 x i32> @fcvtzs_v4f32_v4i32(<4 x float> %op1) {
2684 ; CHECK-LABEL: fcvtzs_v4f32_v4i32:
2686 ; CHECK-NEXT: ptrue p0.s, vl4
2687 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
2688 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2689 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2692 ; NONEON-NOSVE-LABEL: fcvtzs_v4f32_v4i32:
2693 ; NONEON-NOSVE: // %bb.0:
2694 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
2695 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2696 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2697 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2698 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2699 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2700 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
2701 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2702 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2703 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #16]
2704 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
2705 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2706 ; NONEON-NOSVE-NEXT: ret
2707 %res = fptosi <4 x float> %op1 to <4 x i32>
2711 define void @fcvtzs_v8f32_v8i32(ptr %a, ptr %b) {
2712 ; CHECK-LABEL: fcvtzs_v8f32_v8i32:
2714 ; CHECK-NEXT: ldp q0, q1, [x0]
2715 ; CHECK-NEXT: ptrue p0.s, vl4
2716 ; CHECK-NEXT: fcvtzs z0.s, p0/m, z0.s
2717 ; CHECK-NEXT: fcvtzs z1.s, p0/m, z1.s
2718 ; CHECK-NEXT: stp q0, q1, [x1]
2721 ; NONEON-NOSVE-LABEL: fcvtzs_v8f32_v8i32:
2722 ; NONEON-NOSVE: // %bb.0:
2723 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2724 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
2725 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2726 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
2727 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2728 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2729 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
2730 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]
2731 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2732 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2733 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2734 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
2735 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2736 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2737 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp]
2738 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
2739 ; NONEON-NOSVE-NEXT: fcvtzs w9, s1
2740 ; NONEON-NOSVE-NEXT: fcvtzs w8, s0
2741 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
2742 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2743 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
2744 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2745 ; NONEON-NOSVE-NEXT: ret
2746 %op1 = load <8 x float>, ptr %a
2747 %res = fptosi <8 x float> %op1 to <8 x i32>
2748 store <8 x i32> %res, ptr %b
2756 define <1 x i64> @fcvtzs_v1f32_v1i64(<1 x float> %op1) {
2757 ; CHECK-LABEL: fcvtzs_v1f32_v1i64:
2759 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2760 ; CHECK-NEXT: ptrue p0.d, vl2
2761 ; CHECK-NEXT: uunpklo z0.d, z0.s
2762 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
2763 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2766 ; NONEON-NOSVE-LABEL: fcvtzs_v1f32_v1i64:
2767 ; NONEON-NOSVE: // %bb.0:
2768 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
2769 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2770 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
2771 ; NONEON-NOSVE-NEXT: ldr s0, [sp, #8]
2772 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2773 ; NONEON-NOSVE-NEXT: fmov d0, x8
2774 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2775 ; NONEON-NOSVE-NEXT: ret
2776 %res = fptosi <1 x float> %op1 to <1 x i64>
2780 define <2 x i64> @fcvtzs_v2f32_v2i64(<2 x float> %op1) {
2781 ; CHECK-LABEL: fcvtzs_v2f32_v2i64:
2783 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
2784 ; CHECK-NEXT: ptrue p0.d, vl2
2785 ; CHECK-NEXT: uunpklo z0.d, z0.s
2786 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
2787 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
2790 ; NONEON-NOSVE-LABEL: fcvtzs_v2f32_v2i64:
2791 ; NONEON-NOSVE: // %bb.0:
2792 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
2793 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2794 ; NONEON-NOSVE-NEXT: str d0, [sp, #8]
2795 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #8]
2796 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2797 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2798 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
2799 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
2800 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2801 ; NONEON-NOSVE-NEXT: ret
2802 %res = fptosi <2 x float> %op1 to <2 x i64>
2806 define void @fcvtzs_v4f32_v4i64(ptr %a, ptr %b) {
2807 ; CHECK-LABEL: fcvtzs_v4f32_v4i64:
2809 ; CHECK-NEXT: ldr q0, [x0]
2810 ; CHECK-NEXT: ptrue p0.d, vl2
2811 ; CHECK-NEXT: uunpklo z1.d, z0.s
2812 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
2813 ; CHECK-NEXT: uunpklo z0.d, z0.s
2814 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
2815 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
2816 ; CHECK-NEXT: stp q1, q0, [x1]
2819 ; NONEON-NOSVE-LABEL: fcvtzs_v4f32_v4i64:
2820 ; NONEON-NOSVE: // %bb.0:
2821 ; NONEON-NOSVE-NEXT: ldr q0, [x0]
2822 ; NONEON-NOSVE-NEXT: str q0, [sp, #-64]!
2823 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
2824 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
2825 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #16]
2826 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #24]
2827 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2828 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2829 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #16]
2830 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
2831 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2832 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2833 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
2834 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
2835 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
2836 ; NONEON-NOSVE-NEXT: add sp, sp, #64
2837 ; NONEON-NOSVE-NEXT: ret
2838 %op1 = load <4 x float>, ptr %a
2839 %res = fptosi <4 x float> %op1 to <4 x i64>
2840 store <4 x i64> %res, ptr %b
2844 define void @fcvtzs_v8f32_v8i64(ptr %a, ptr %b) {
2845 ; CHECK-LABEL: fcvtzs_v8f32_v8i64:
2847 ; CHECK-NEXT: ldp q1, q0, [x0]
2848 ; CHECK-NEXT: ptrue p0.d, vl2
2849 ; CHECK-NEXT: uunpklo z2.d, z0.s
2850 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
2851 ; CHECK-NEXT: uunpklo z3.d, z1.s
2852 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
2853 ; CHECK-NEXT: uunpklo z0.d, z0.s
2854 ; CHECK-NEXT: uunpklo z1.d, z1.s
2855 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.s
2856 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.s
2857 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.s
2858 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.s
2859 ; CHECK-NEXT: stp q2, q0, [x1, #32]
2860 ; CHECK-NEXT: stp q3, q1, [x1]
2863 ; NONEON-NOSVE-LABEL: fcvtzs_v8f32_v8i64:
2864 ; NONEON-NOSVE: // %bb.0:
2865 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0]
2866 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-128]!
2867 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 128
2868 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp]
2869 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #32]
2870 ; NONEON-NOSVE-NEXT: ldp d1, d0, [sp, #16]
2871 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #48]
2872 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #40]
2873 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2874 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2875 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #32]
2876 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #80]
2877 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2878 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2879 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #56]
2880 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #64]
2881 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2882 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2883 ; NONEON-NOSVE-NEXT: ldp s0, s1, [sp, #48]
2884 ; NONEON-NOSVE-NEXT: ldp q3, q2, [sp, #64]
2885 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #112]
2886 ; NONEON-NOSVE-NEXT: fcvtzs x9, s1
2887 ; NONEON-NOSVE-NEXT: fcvtzs x8, s0
2888 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #96]
2889 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #96]
2890 ; NONEON-NOSVE-NEXT: stp q2, q3, [x1]
2891 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1, #32]
2892 ; NONEON-NOSVE-NEXT: add sp, sp, #128
2893 ; NONEON-NOSVE-NEXT: ret
2894 %op1 = load <8 x float>, ptr %a
2895 %res = fptosi <8 x float> %op1 to <8 x i64>
2896 store <8 x i64> %res, ptr %b
2905 ; v1f64 is perfered to be widened to v4f64, so use SVE
2906 define <1 x i16> @fcvtzs_v1f64_v1i16(<1 x double> %op1) {
2907 ; CHECK-LABEL: fcvtzs_v1f64_v1i16:
2909 ; CHECK-NEXT: fcvtzs w8, d0
2910 ; CHECK-NEXT: mov z0.h, w8
2911 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2914 ; NONEON-NOSVE-LABEL: fcvtzs_v1f64_v1i16:
2915 ; NONEON-NOSVE: // %bb.0:
2916 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
2917 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
2918 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
2919 ; NONEON-NOSVE-NEXT: strh w8, [sp, #8]
2920 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
2921 ; NONEON-NOSVE-NEXT: add sp, sp, #16
2922 ; NONEON-NOSVE-NEXT: ret
2923 %res = fptosi <1 x double> %op1 to <1 x i16>
2927 define <2 x i16> @fcvtzs_v2f64_v2i16(<2 x double> %op1) {
2928 ; CHECK-LABEL: fcvtzs_v2f64_v2i16:
2930 ; CHECK-NEXT: ptrue p0.d, vl2
2931 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
2932 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
2933 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
2934 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2937 ; NONEON-NOSVE-LABEL: fcvtzs_v2f64_v2i16:
2938 ; NONEON-NOSVE: // %bb.0:
2939 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
2940 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
2941 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
2942 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
2943 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
2944 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
2945 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
2946 ; NONEON-NOSVE-NEXT: add sp, sp, #32
2947 ; NONEON-NOSVE-NEXT: ret
2948 %res = fptosi <2 x double> %op1 to <2 x i16>
2952 define <4 x i16> @fcvtzs_v4f64_v4i16(ptr %a) {
2953 ; CHECK-LABEL: fcvtzs_v4f64_v4i16:
2955 ; CHECK-NEXT: ldp q0, q1, [x0]
2956 ; CHECK-NEXT: ptrue p0.d, vl2
2957 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
2958 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
2959 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
2960 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
2961 ; CHECK-NEXT: mov z2.s, z1.s[1]
2962 ; CHECK-NEXT: mov z3.s, z0.s[1]
2963 ; CHECK-NEXT: zip1 z1.h, z1.h, z2.h
2964 ; CHECK-NEXT: zip1 z0.h, z0.h, z3.h
2965 ; CHECK-NEXT: zip1 z0.s, z0.s, z1.s
2966 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
2969 ; NONEON-NOSVE-LABEL: fcvtzs_v4f64_v4i16:
2970 ; NONEON-NOSVE: // %bb.0:
2971 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
2972 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-80]!
2973 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 80
2974 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
2975 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
2976 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
2977 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
2978 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]
2979 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
2980 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
2981 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
2982 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #40]
2983 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #56]
2984 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #64]
2985 ; NONEON-NOSVE-NEXT: strh w9, [sp, #78]
2986 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
2987 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #56]
2988 ; NONEON-NOSVE-NEXT: strh w9, [sp, #74]
2989 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
2990 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #72]
2991 ; NONEON-NOSVE-NEXT: add sp, sp, #80
2992 ; NONEON-NOSVE-NEXT: ret
2993 %op1 = load <4 x double>, ptr %a
2994 %res = fptosi <4 x double> %op1 to <4 x i16>
2998 define <8 x i16> @fcvtzs_v8f64_v8i16(ptr %a) {
2999 ; CHECK-LABEL: fcvtzs_v8f64_v8i16:
3001 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
3002 ; CHECK-NEXT: ptrue p0.d, vl2
3003 ; CHECK-NEXT: ldp q2, q3, [x0]
3004 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3005 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
3006 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
3007 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
3008 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3009 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
3010 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
3011 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
3012 ; CHECK-NEXT: mov z4.s, z0.s[1]
3013 ; CHECK-NEXT: mov z5.s, z1.s[1]
3014 ; CHECK-NEXT: mov z6.s, z3.s[1]
3015 ; CHECK-NEXT: mov z7.s, z2.s[1]
3016 ; CHECK-NEXT: zip1 z0.h, z0.h, z4.h
3017 ; CHECK-NEXT: zip1 z1.h, z1.h, z5.h
3018 ; CHECK-NEXT: zip1 z3.h, z3.h, z6.h
3019 ; CHECK-NEXT: zip1 z2.h, z2.h, z7.h
3020 ; CHECK-NEXT: zip1 z0.s, z1.s, z0.s
3021 ; CHECK-NEXT: zip1 z1.s, z2.s, z3.s
3022 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
3023 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
3026 ; NONEON-NOSVE-LABEL: fcvtzs_v8f64_v8i16:
3027 ; NONEON-NOSVE: // %bb.0:
3028 ; NONEON-NOSVE-NEXT: sub sp, sp, #144
3029 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 144
3030 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0, #32]
3031 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0]
3032 ; NONEON-NOSVE-NEXT: str q1, [sp, #48]
3033 ; NONEON-NOSVE-NEXT: stp q0, q3, [sp, #16]
3034 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
3035 ; NONEON-NOSVE-NEXT: str q2, [sp]
3036 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3037 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3038 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
3039 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
3040 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3041 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3042 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
3043 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
3044 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3045 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3046 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3047 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
3048 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3049 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3050 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #80]
3051 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #72]
3052 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #104]
3053 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
3054 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #104]
3055 ; NONEON-NOSVE-NEXT: str d2, [sp, #120]
3056 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #64]
3057 ; NONEON-NOSVE-NEXT: strh w9, [sp, #142]
3058 ; NONEON-NOSVE-NEXT: strh w8, [sp, #140]
3059 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #120]
3060 ; NONEON-NOSVE-NEXT: str d0, [sp, #96]
3061 ; NONEON-NOSVE-NEXT: strh w9, [sp, #138]
3062 ; NONEON-NOSVE-NEXT: strh w8, [sp, #136]
3063 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #112]
3064 ; NONEON-NOSVE-NEXT: strh w9, [sp, #134]
3065 ; NONEON-NOSVE-NEXT: strh w8, [sp, #132]
3066 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #96]
3067 ; NONEON-NOSVE-NEXT: strh w9, [sp, #130]
3068 ; NONEON-NOSVE-NEXT: strh w8, [sp, #128]
3069 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #128]
3070 ; NONEON-NOSVE-NEXT: add sp, sp, #144
3071 ; NONEON-NOSVE-NEXT: ret
3072 %op1 = load <8 x double>, ptr %a
3073 %res = fptosi <8 x double> %op1 to <8 x i16>
3077 define void @fcvtzs_v16f64_v16i16(ptr %a, ptr %b) {
3078 ; CHECK-LABEL: fcvtzs_v16f64_v16i16:
3080 ; CHECK-NEXT: ldp q5, q6, [x0, #96]
3081 ; CHECK-NEXT: ptrue p0.d, vl2
3082 ; CHECK-NEXT: ldp q0, q4, [x0, #32]
3083 ; CHECK-NEXT: ldp q2, q7, [x0, #64]
3084 ; CHECK-NEXT: ldp q1, q3, [x0]
3085 ; CHECK-NEXT: fcvtzs z6.d, p0/m, z6.d
3086 ; CHECK-NEXT: fcvtzs z4.d, p0/m, z4.d
3087 ; CHECK-NEXT: fcvtzs z5.d, p0/m, z5.d
3088 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3089 ; CHECK-NEXT: fcvtzs z7.d, p0/m, z7.d
3090 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
3091 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
3092 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
3093 ; CHECK-NEXT: uzp1 z6.s, z6.s, z6.s
3094 ; CHECK-NEXT: uzp1 z4.s, z4.s, z4.s
3095 ; CHECK-NEXT: uzp1 z5.s, z5.s, z5.s
3096 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3097 ; CHECK-NEXT: uzp1 z7.s, z7.s, z7.s
3098 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
3099 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
3100 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
3101 ; CHECK-NEXT: mov z17.s, z6.s[1]
3102 ; CHECK-NEXT: mov z16.s, z4.s[1]
3103 ; CHECK-NEXT: mov z18.s, z5.s[1]
3104 ; CHECK-NEXT: mov z21.s, z0.s[1]
3105 ; CHECK-NEXT: mov z19.s, z7.s[1]
3106 ; CHECK-NEXT: mov z20.s, z2.s[1]
3107 ; CHECK-NEXT: mov z22.s, z3.s[1]
3108 ; CHECK-NEXT: mov z23.s, z1.s[1]
3109 ; CHECK-NEXT: zip1 z6.h, z6.h, z17.h
3110 ; CHECK-NEXT: zip1 z4.h, z4.h, z16.h
3111 ; CHECK-NEXT: zip1 z5.h, z5.h, z18.h
3112 ; CHECK-NEXT: zip1 z0.h, z0.h, z21.h
3113 ; CHECK-NEXT: zip1 z7.h, z7.h, z19.h
3114 ; CHECK-NEXT: zip1 z2.h, z2.h, z20.h
3115 ; CHECK-NEXT: zip1 z3.h, z3.h, z22.h
3116 ; CHECK-NEXT: zip1 z1.h, z1.h, z23.h
3117 ; CHECK-NEXT: zip1 z5.s, z5.s, z6.s
3118 ; CHECK-NEXT: zip1 z0.s, z0.s, z4.s
3119 ; CHECK-NEXT: zip1 z2.s, z2.s, z7.s
3120 ; CHECK-NEXT: zip1 z1.s, z1.s, z3.s
3121 ; CHECK-NEXT: zip1 z2.d, z2.d, z5.d
3122 ; CHECK-NEXT: zip1 z0.d, z1.d, z0.d
3123 ; CHECK-NEXT: stp q0, q2, [x1]
3126 ; NONEON-NOSVE-LABEL: fcvtzs_v16f64_v16i16:
3127 ; NONEON-NOSVE: // %bb.0:
3128 ; NONEON-NOSVE-NEXT: sub sp, sp, #304
3129 ; NONEON-NOSVE-NEXT: str x29, [sp, #288] // 8-byte Folded Spill
3130 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 304
3131 ; NONEON-NOSVE-NEXT: .cfi_offset w29, -16
3132 ; NONEON-NOSVE-NEXT: ldp q0, q1, [x0, #32]
3133 ; NONEON-NOSVE-NEXT: ldr x29, [sp, #288] // 8-byte Folded Reload
3134 ; NONEON-NOSVE-NEXT: ldp q6, q7, [x0]
3135 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #64]
3136 ; NONEON-NOSVE-NEXT: ldp q4, q5, [x0, #96]
3137 ; NONEON-NOSVE-NEXT: stp q1, q7, [sp, #64]
3138 ; NONEON-NOSVE-NEXT: stp q0, q2, [sp, #96]
3139 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #64]
3140 ; NONEON-NOSVE-NEXT: stp q6, q4, [sp]
3141 ; NONEON-NOSVE-NEXT: stp q5, q3, [sp, #32]
3142 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3143 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3144 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #96]
3145 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #168]
3146 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3147 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3148 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #80]
3149 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #184]
3150 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3151 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3152 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3153 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #176]
3154 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3155 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3156 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
3157 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #136]
3158 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3159 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3160 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
3161 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #152]
3162 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3163 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3164 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
3165 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #144]
3166 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3167 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3168 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #112]
3169 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #160]
3170 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3171 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3172 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #176]
3173 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #168]
3174 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #232]
3175 ; NONEON-NOSVE-NEXT: ldr d1, [sp, #136]
3176 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #192]
3177 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #232]
3178 ; NONEON-NOSVE-NEXT: str d2, [sp, #248]
3179 ; NONEON-NOSVE-NEXT: ldp d0, d2, [sp, #144]
3180 ; NONEON-NOSVE-NEXT: strh w9, [sp, #270]
3181 ; NONEON-NOSVE-NEXT: strh w8, [sp, #268]
3182 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #248]
3183 ; NONEON-NOSVE-NEXT: stp d1, d0, [sp, #200]
3184 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #160]
3185 ; NONEON-NOSVE-NEXT: strh w9, [sp, #266]
3186 ; NONEON-NOSVE-NEXT: strh w8, [sp, #264]
3187 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #240]
3188 ; NONEON-NOSVE-NEXT: stp d2, d0, [sp, #216]
3189 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #192]
3190 ; NONEON-NOSVE-NEXT: strh w9, [sp, #262]
3191 ; NONEON-NOSVE-NEXT: strh w8, [sp, #260]
3192 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #200]
3193 ; NONEON-NOSVE-NEXT: str d0, [sp, #296]
3194 ; NONEON-NOSVE-NEXT: strh w9, [sp, #258]
3195 ; NONEON-NOSVE-NEXT: strh w8, [sp, #256]
3196 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #216]
3197 ; NONEON-NOSVE-NEXT: strh w9, [sp, #286]
3198 ; NONEON-NOSVE-NEXT: strh w8, [sp, #284]
3199 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #208]
3200 ; NONEON-NOSVE-NEXT: strh w9, [sp, #282]
3201 ; NONEON-NOSVE-NEXT: strh w8, [sp, #280]
3202 ; NONEON-NOSVE-NEXT: ldp w8, w9, [sp, #224]
3203 ; NONEON-NOSVE-NEXT: strh w8, [sp, #276]
3204 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #300]
3205 ; NONEON-NOSVE-NEXT: strh w9, [sp, #278]
3206 ; NONEON-NOSVE-NEXT: strh w8, [sp, #274]
3207 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #296]
3208 ; NONEON-NOSVE-NEXT: strh w8, [sp, #272]
3209 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #256]
3210 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
3211 ; NONEON-NOSVE-NEXT: add sp, sp, #304
3212 ; NONEON-NOSVE-NEXT: ret
3213 %op1 = load <16 x double>, ptr %a
3214 %res = fptosi <16 x double> %op1 to <16 x i16>
3215 store <16 x i16> %res, ptr %b
3223 define <1 x i32> @fcvtzs_v1f64_v1i32(<1 x double> %op1) {
3224 ; CHECK-LABEL: fcvtzs_v1f64_v1i32:
3226 ; CHECK-NEXT: ptrue p0.d, vl2
3227 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
3228 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3229 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3230 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
3233 ; NONEON-NOSVE-LABEL: fcvtzs_v1f64_v1i32:
3234 ; NONEON-NOSVE: // %bb.0:
3235 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
3236 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
3237 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3238 ; NONEON-NOSVE-NEXT: str w8, [sp, #8]
3239 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
3240 ; NONEON-NOSVE-NEXT: add sp, sp, #16
3241 ; NONEON-NOSVE-NEXT: ret
3242 %res = fptosi <1 x double> %op1 to <1 x i32>
3246 define <2 x i32> @fcvtzs_v2f64_v2i32(<2 x double> %op1) {
3247 ; CHECK-LABEL: fcvtzs_v2f64_v2i32:
3249 ; CHECK-NEXT: ptrue p0.d, vl2
3250 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
3251 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3252 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3253 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
3256 ; NONEON-NOSVE-LABEL: fcvtzs_v2f64_v2i32:
3257 ; NONEON-NOSVE: // %bb.0:
3258 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
3259 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
3260 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3261 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3262 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3263 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]
3264 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
3265 ; NONEON-NOSVE-NEXT: add sp, sp, #32
3266 ; NONEON-NOSVE-NEXT: ret
3267 %res = fptosi <2 x double> %op1 to <2 x i32>
3271 define <4 x i32> @fcvtzs_v4f64_v4i32(ptr %a) {
3272 ; CHECK-LABEL: fcvtzs_v4f64_v4i32:
3274 ; CHECK-NEXT: ldp q0, q1, [x0]
3275 ; CHECK-NEXT: ptrue p0.d, vl2
3276 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
3277 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3278 ; CHECK-NEXT: ptrue p0.s, vl2
3279 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
3280 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3281 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
3282 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
3285 ; NONEON-NOSVE-LABEL: fcvtzs_v4f64_v4i32:
3286 ; NONEON-NOSVE: // %bb.0:
3287 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3288 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
3289 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
3290 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
3291 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3292 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3293 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3294 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]
3295 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3296 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3297 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]
3298 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
3299 ; NONEON-NOSVE-NEXT: add sp, sp, #48
3300 ; NONEON-NOSVE-NEXT: ret
3301 %op1 = load <4 x double>, ptr %a
3302 %res = fptosi <4 x double> %op1 to <4 x i32>
3306 define void @fcvtzs_v8f64_v8i32(ptr %a, ptr %b) {
3307 ; CHECK-LABEL: fcvtzs_v8f64_v8i32:
3309 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
3310 ; CHECK-NEXT: ptrue p0.d, vl2
3311 ; CHECK-NEXT: ldp q2, q3, [x0]
3312 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
3313 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3314 ; CHECK-NEXT: fcvtzs z3.d, p0/m, z3.d
3315 ; CHECK-NEXT: fcvtzs z2.d, p0/m, z2.d
3316 ; CHECK-NEXT: ptrue p0.s, vl2
3317 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
3318 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
3319 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
3320 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
3321 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
3322 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
3323 ; CHECK-NEXT: stp q2, q0, [x1]
3326 ; NONEON-NOSVE-LABEL: fcvtzs_v8f64_v8i32:
3327 ; NONEON-NOSVE: // %bb.0:
3328 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
3329 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
3330 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3331 ; NONEON-NOSVE-NEXT: ldp q2, q3, [x0, #32]
3332 ; NONEON-NOSVE-NEXT: str q1, [sp]
3333 ; NONEON-NOSVE-NEXT: stp q3, q0, [sp, #16]
3334 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #32]
3335 ; NONEON-NOSVE-NEXT: str q2, [sp, #48]
3336 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3337 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3338 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3339 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #72]
3340 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3341 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3342 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
3343 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #64]
3344 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3345 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3346 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #48]
3347 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #88]
3348 ; NONEON-NOSVE-NEXT: fcvtzs w9, d1
3349 ; NONEON-NOSVE-NEXT: fcvtzs w8, d0
3350 ; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #80]
3351 ; NONEON-NOSVE-NEXT: ldp q1, q0, [sp, #64]
3352 ; NONEON-NOSVE-NEXT: stp q1, q0, [x1]
3353 ; NONEON-NOSVE-NEXT: add sp, sp, #96
3354 ; NONEON-NOSVE-NEXT: ret
3355 %op1 = load <8 x double>, ptr %a
3356 %res = fptosi <8 x double> %op1 to <8 x i32>
3357 store <8 x i32> %res, ptr %b
3365 define <1 x i64> @fcvtzs_v1f64_v1i64(<1 x double> %op1) {
3366 ; CHECK-LABEL: fcvtzs_v1f64_v1i64:
3368 ; CHECK-NEXT: ptrue p0.d, vl1
3369 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
3370 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3371 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
3374 ; NONEON-NOSVE-LABEL: fcvtzs_v1f64_v1i64:
3375 ; NONEON-NOSVE: // %bb.0:
3376 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
3377 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
3378 ; NONEON-NOSVE-NEXT: fcvtzs x8, d0
3379 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
3380 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
3381 ; NONEON-NOSVE-NEXT: add sp, sp, #16
3382 ; NONEON-NOSVE-NEXT: ret
3383 %res = fptosi <1 x double> %op1 to <1 x i64>
3387 define <2 x i64> @fcvtzs_v2f64_v2i64(<2 x double> %op1) {
3388 ; CHECK-LABEL: fcvtzs_v2f64_v2i64:
3390 ; CHECK-NEXT: ptrue p0.d, vl2
3391 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
3392 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3393 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
3396 ; NONEON-NOSVE-LABEL: fcvtzs_v2f64_v2i64:
3397 ; NONEON-NOSVE: // %bb.0:
3398 ; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!
3399 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
3400 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3401 ; NONEON-NOSVE-NEXT: fcvtzs x9, d1
3402 ; NONEON-NOSVE-NEXT: fcvtzs x8, d0
3403 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]
3404 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]
3405 ; NONEON-NOSVE-NEXT: add sp, sp, #32
3406 ; NONEON-NOSVE-NEXT: ret
3407 %res = fptosi <2 x double> %op1 to <2 x i64>
3411 define void @fcvtzs_v4f64_v4i64(ptr %a, ptr %b) {
3412 ; CHECK-LABEL: fcvtzs_v4f64_v4i64:
3414 ; CHECK-NEXT: ldp q0, q1, [x0]
3415 ; CHECK-NEXT: ptrue p0.d, vl2
3416 ; CHECK-NEXT: fcvtzs z0.d, p0/m, z0.d
3417 ; CHECK-NEXT: fcvtzs z1.d, p0/m, z1.d
3418 ; CHECK-NEXT: stp q0, q1, [x1]
3421 ; NONEON-NOSVE-LABEL: fcvtzs_v4f64_v4i64:
3422 ; NONEON-NOSVE: // %bb.0:
3423 ; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]
3424 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!
3425 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 64
3426 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp, #16]
3427 ; NONEON-NOSVE-NEXT: fcvtzs x9, d1
3428 ; NONEON-NOSVE-NEXT: fcvtzs x8, d0
3429 ; NONEON-NOSVE-NEXT: ldp d0, d1, [sp]
3430 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]
3431 ; NONEON-NOSVE-NEXT: fcvtzs x9, d1
3432 ; NONEON-NOSVE-NEXT: fcvtzs x8, d0
3433 ; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]
3434 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]
3435 ; NONEON-NOSVE-NEXT: stp q0, q1, [x1]
3436 ; NONEON-NOSVE-NEXT: add sp, sp, #64
3437 ; NONEON-NOSVE-NEXT: ret
3438 %op1 = load <4 x double>, ptr %a
3439 %res = fptosi <4 x double> %op1 to <4 x i64>
3440 store <4 x i64> %res, ptr %b