1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible-sve < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
10 define <4 x half> @ucvtf_v4i16_v4f16(<4 x i16> %op1) {
11 ; CHECK-LABEL: ucvtf_v4i16_v4f16:
13 ; CHECK-NEXT: ptrue p0.h, vl4
14 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
15 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.h
16 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
18 %res = uitofp <4 x i16> %op1 to <4 x half>
22 define void @ucvtf_v8i16_v8f16(ptr %a, ptr %b) {
23 ; CHECK-LABEL: ucvtf_v8i16_v8f16:
25 ; CHECK-NEXT: ptrue p0.h, vl8
26 ; CHECK-NEXT: ldr q0, [x0]
27 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.h
28 ; CHECK-NEXT: str q0, [x1]
30 %op1 = load <8 x i16>, ptr %a
31 %res = uitofp <8 x i16> %op1 to <8 x half>
32 store <8 x half> %res, ptr %b
36 define void @ucvtf_v16i16_v16f16(ptr %a, ptr %b) {
37 ; CHECK-LABEL: ucvtf_v16i16_v16f16:
39 ; CHECK-NEXT: ptrue p0.h, vl8
40 ; CHECK-NEXT: ldp q0, q1, [x0]
41 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.h
42 ; CHECK-NEXT: ucvtf z1.h, p0/m, z1.h
43 ; CHECK-NEXT: stp q0, q1, [x1]
45 %op1 = load <16 x i16>, ptr %a
46 %res = uitofp <16 x i16> %op1 to <16 x half>
47 store <16 x half> %res, ptr %b
55 define <2 x float> @ucvtf_v2i16_v2f32(<2 x i16> %op1) {
56 ; CHECK-LABEL: ucvtf_v2i16_v2f32:
58 ; CHECK-NEXT: ptrue p0.s, vl2
59 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
60 ; CHECK-NEXT: and z0.s, z0.s, #0xffff
61 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
62 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
64 %res = uitofp <2 x i16> %op1 to <2 x float>
68 define <4 x float> @ucvtf_v4i16_v4f32(<4 x i16> %op1) {
69 ; CHECK-LABEL: ucvtf_v4i16_v4f32:
71 ; CHECK-NEXT: ptrue p0.s, vl4
72 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
73 ; CHECK-NEXT: uunpklo z0.s, z0.h
74 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
75 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
77 %res = uitofp <4 x i16> %op1 to <4 x float>
81 define void @ucvtf_v8i16_v8f32(ptr %a, ptr %b) {
82 ; CHECK-LABEL: ucvtf_v8i16_v8f32:
84 ; CHECK-NEXT: ldr q0, [x0]
85 ; CHECK-NEXT: ptrue p0.s, vl4
86 ; CHECK-NEXT: uunpklo z1.s, z0.h
87 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
88 ; CHECK-NEXT: uunpklo z0.s, z0.h
89 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.s
90 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
91 ; CHECK-NEXT: stp q1, q0, [x1]
93 %op1 = load <8 x i16>, ptr %a
94 %res = uitofp <8 x i16> %op1 to <8 x float>
95 store <8 x float> %res, ptr %b
99 define void @ucvtf_v16i16_v16f32(ptr %a, ptr %b) {
100 ; CHECK-LABEL: ucvtf_v16i16_v16f32:
102 ; CHECK-NEXT: ldp q1, q0, [x0]
103 ; CHECK-NEXT: ptrue p0.s, vl4
104 ; CHECK-NEXT: uunpklo z2.s, z0.h
105 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
106 ; CHECK-NEXT: uunpklo z3.s, z1.h
107 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
108 ; CHECK-NEXT: uunpklo z0.s, z0.h
109 ; CHECK-NEXT: uunpklo z1.s, z1.h
110 ; CHECK-NEXT: ucvtf z2.s, p0/m, z2.s
111 ; CHECK-NEXT: ucvtf z3.s, p0/m, z3.s
112 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
113 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.s
114 ; CHECK-NEXT: stp q2, q0, [x1, #32]
115 ; CHECK-NEXT: stp q3, q1, [x1]
117 %op1 = load <16 x i16>, ptr %a
118 %res = uitofp <16 x i16> %op1 to <16 x float>
119 store <16 x float> %res, ptr %b
127 define <1 x double> @ucvtf_v1i16_v1f64(<1 x i16> %op1) {
128 ; CHECK-LABEL: ucvtf_v1i16_v1f64:
130 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
131 ; CHECK-NEXT: fmov w8, s0
132 ; CHECK-NEXT: and w8, w8, #0xffff
133 ; CHECK-NEXT: ucvtf d0, w8
135 %res = uitofp <1 x i16> %op1 to <1 x double>
136 ret <1 x double> %res
139 define <2 x double> @ucvtf_v2i16_v2f64(<2 x i16> %op1) {
140 ; CHECK-LABEL: ucvtf_v2i16_v2f64:
142 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
143 ; CHECK-NEXT: ptrue p0.d, vl2
144 ; CHECK-NEXT: and z0.s, z0.s, #0xffff
145 ; CHECK-NEXT: uunpklo z0.d, z0.s
146 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
147 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
149 %res = uitofp <2 x i16> %op1 to <2 x double>
150 ret <2 x double> %res
153 define void @ucvtf_v4i16_v4f64(ptr %a, ptr %b) {
154 ; CHECK-LABEL: ucvtf_v4i16_v4f64:
156 ; CHECK-NEXT: ldr d0, [x0]
157 ; CHECK-NEXT: ptrue p0.d, vl2
158 ; CHECK-NEXT: uunpklo z0.s, z0.h
159 ; CHECK-NEXT: uunpklo z1.d, z0.s
160 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
161 ; CHECK-NEXT: uunpklo z0.d, z0.s
162 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
163 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
164 ; CHECK-NEXT: stp q1, q0, [x1]
166 %op1 = load <4 x i16>, ptr %a
167 %res = uitofp <4 x i16> %op1 to <4 x double>
168 store <4 x double> %res, ptr %b
172 define void @ucvtf_v8i16_v8f64(ptr %a, ptr %b) {
173 ; CHECK-LABEL: ucvtf_v8i16_v8f64:
175 ; CHECK-NEXT: ldr q0, [x0]
176 ; CHECK-NEXT: ptrue p0.d, vl2
177 ; CHECK-NEXT: uunpklo z1.s, z0.h
178 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
179 ; CHECK-NEXT: uunpklo z0.s, z0.h
180 ; CHECK-NEXT: uunpklo z2.d, z1.s
181 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
182 ; CHECK-NEXT: uunpklo z3.d, z0.s
183 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
184 ; CHECK-NEXT: uunpklo z1.d, z1.s
185 ; CHECK-NEXT: ucvtf z2.d, p0/m, z2.d
186 ; CHECK-NEXT: uunpklo z0.d, z0.s
187 ; CHECK-NEXT: ucvtf z3.d, p0/m, z3.d
188 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
189 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
190 ; CHECK-NEXT: stp q2, q1, [x1]
191 ; CHECK-NEXT: stp q3, q0, [x1, #32]
193 %op1 = load <8 x i16>, ptr %a
194 %res = uitofp <8 x i16> %op1 to <8 x double>
195 store <8 x double> %res, ptr %b
199 define void @ucvtf_v16i16_v16f64(ptr %a, ptr %b) {
200 ; CHECK-LABEL: ucvtf_v16i16_v16f64:
202 ; CHECK-NEXT: ldp q1, q0, [x0]
203 ; CHECK-NEXT: ptrue p0.d, vl2
204 ; CHECK-NEXT: uunpklo z2.s, z0.h
205 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
206 ; CHECK-NEXT: uunpklo z3.s, z1.h
207 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
208 ; CHECK-NEXT: uunpklo z0.s, z0.h
209 ; CHECK-NEXT: uunpklo z1.s, z1.h
210 ; CHECK-NEXT: mov z4.d, z2.d
211 ; CHECK-NEXT: mov z7.d, z3.d
212 ; CHECK-NEXT: mov z5.d, z0.d
213 ; CHECK-NEXT: ext z4.b, z4.b, z2.b, #8
214 ; CHECK-NEXT: uunpklo z2.d, z2.s
215 ; CHECK-NEXT: mov z6.d, z1.d
216 ; CHECK-NEXT: ext z7.b, z7.b, z3.b, #8
217 ; CHECK-NEXT: uunpklo z3.d, z3.s
218 ; CHECK-NEXT: ext z5.b, z5.b, z0.b, #8
219 ; CHECK-NEXT: uunpklo z4.d, z4.s
220 ; CHECK-NEXT: uunpklo z0.d, z0.s
221 ; CHECK-NEXT: ext z6.b, z6.b, z1.b, #8
222 ; CHECK-NEXT: uunpklo z1.d, z1.s
223 ; CHECK-NEXT: ucvtf z2.d, p0/m, z2.d
224 ; CHECK-NEXT: ucvtf z3.d, p0/m, z3.d
225 ; CHECK-NEXT: uunpklo z7.d, z7.s
226 ; CHECK-NEXT: uunpklo z5.d, z5.s
227 ; CHECK-NEXT: ucvtf z4.d, p0/m, z4.d
228 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
229 ; CHECK-NEXT: uunpklo z6.d, z6.s
230 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
231 ; CHECK-NEXT: ucvtf z5.d, p0/m, z5.d
232 ; CHECK-NEXT: stp q2, q4, [x1, #64]
233 ; CHECK-NEXT: movprfx z2, z6
234 ; CHECK-NEXT: ucvtf z2.d, p0/m, z6.d
235 ; CHECK-NEXT: stp q1, q2, [x1, #32]
236 ; CHECK-NEXT: stp q0, q5, [x1, #96]
237 ; CHECK-NEXT: movprfx z0, z7
238 ; CHECK-NEXT: ucvtf z0.d, p0/m, z7.d
239 ; CHECK-NEXT: stp q3, q0, [x1]
241 %op1 = load <16 x i16>, ptr %a
242 %res = uitofp <16 x i16> %op1 to <16 x double>
243 store <16 x double> %res, ptr %b
251 define <2 x half> @ucvtf_v2i32_v2f16(<2 x i32> %op1) {
252 ; CHECK-LABEL: ucvtf_v2i32_v2f16:
254 ; CHECK-NEXT: ptrue p0.s, vl4
255 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
256 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.s
257 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
258 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
260 %res = uitofp <2 x i32> %op1 to <2 x half>
264 define <4 x half> @ucvtf_v4i32_v4f16(<4 x i32> %op1) {
265 ; CHECK-LABEL: ucvtf_v4i32_v4f16:
267 ; CHECK-NEXT: ptrue p0.s, vl4
268 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
269 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.s
270 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
271 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
273 %res = uitofp <4 x i32> %op1 to <4 x half>
277 define <8 x half> @ucvtf_v8i32_v8f16(ptr %a) {
278 ; CHECK-LABEL: ucvtf_v8i32_v8f16:
280 ; CHECK-NEXT: ptrue p0.s, vl4
281 ; CHECK-NEXT: ldp q0, q1, [x0]
282 ; CHECK-NEXT: ucvtf z1.h, p0/m, z1.s
283 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.s
284 ; CHECK-NEXT: ptrue p0.h, vl4
285 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
286 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
287 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
288 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
290 %op1 = load <8 x i32>, ptr %a
291 %res = uitofp <8 x i32> %op1 to <8 x half>
295 define void @ucvtf_v16i32_v16f16(ptr %a, ptr %b) {
296 ; CHECK-LABEL: ucvtf_v16i32_v16f16:
298 ; CHECK-NEXT: ptrue p0.s, vl4
299 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
300 ; CHECK-NEXT: ldp q2, q3, [x0]
301 ; CHECK-NEXT: ucvtf z1.h, p0/m, z1.s
302 ; CHECK-NEXT: ucvtf z0.h, p0/m, z0.s
303 ; CHECK-NEXT: ucvtf z3.h, p0/m, z3.s
304 ; CHECK-NEXT: ucvtf z2.h, p0/m, z2.s
305 ; CHECK-NEXT: ptrue p0.h, vl4
306 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
307 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
308 ; CHECK-NEXT: uzp1 z3.h, z3.h, z3.h
309 ; CHECK-NEXT: uzp1 z2.h, z2.h, z2.h
310 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
311 ; CHECK-NEXT: splice z2.h, p0, z2.h, z3.h
312 ; CHECK-NEXT: stp q2, q0, [x1]
314 %op1 = load <16 x i32>, ptr %a
315 %res = uitofp <16 x i32> %op1 to <16 x half>
316 store <16 x half> %res, ptr %b
324 define <2 x float> @ucvtf_v2i32_v2f32(<2 x i32> %op1) {
325 ; CHECK-LABEL: ucvtf_v2i32_v2f32:
327 ; CHECK-NEXT: ptrue p0.s, vl2
328 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
329 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
330 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
332 %res = uitofp <2 x i32> %op1 to <2 x float>
336 define <4 x float> @ucvtf_v4i32_v4f32(<4 x i32> %op1) {
337 ; CHECK-LABEL: ucvtf_v4i32_v4f32:
339 ; CHECK-NEXT: ptrue p0.s, vl4
340 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
341 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
342 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
344 %res = uitofp <4 x i32> %op1 to <4 x float>
348 define void @ucvtf_v8i32_v8f32(ptr %a, ptr %b) {
349 ; CHECK-LABEL: ucvtf_v8i32_v8f32:
351 ; CHECK-NEXT: ptrue p0.s, vl4
352 ; CHECK-NEXT: ldp q0, q1, [x0]
353 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
354 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.s
355 ; CHECK-NEXT: stp q0, q1, [x1]
357 %op1 = load <8 x i32>, ptr %a
358 %res = uitofp <8 x i32> %op1 to <8 x float>
359 store <8 x float> %res, ptr %b
367 define <2 x double> @ucvtf_v2i32_v2f64(<2 x i32> %op1) {
368 ; CHECK-LABEL: ucvtf_v2i32_v2f64:
370 ; CHECK-NEXT: ptrue p0.d, vl2
371 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
372 ; CHECK-NEXT: uunpklo z0.d, z0.s
373 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
374 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
376 %res = uitofp <2 x i32> %op1 to <2 x double>
377 ret <2 x double> %res
380 define void @ucvtf_v4i32_v4f64(ptr %a, ptr %b) {
381 ; CHECK-LABEL: ucvtf_v4i32_v4f64:
383 ; CHECK-NEXT: ldr q0, [x0]
384 ; CHECK-NEXT: ptrue p0.d, vl2
385 ; CHECK-NEXT: uunpklo z1.d, z0.s
386 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
387 ; CHECK-NEXT: uunpklo z0.d, z0.s
388 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
389 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
390 ; CHECK-NEXT: stp q1, q0, [x1]
392 %op1 = load <4 x i32>, ptr %a
393 %res = uitofp <4 x i32> %op1 to <4 x double>
394 store <4 x double> %res, ptr %b
398 define void @ucvtf_v8i32_v8f64(ptr %a, ptr %b) {
399 ; CHECK-LABEL: ucvtf_v8i32_v8f64:
401 ; CHECK-NEXT: ldp q1, q0, [x0]
402 ; CHECK-NEXT: ptrue p0.d, vl2
403 ; CHECK-NEXT: uunpklo z2.d, z0.s
404 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
405 ; CHECK-NEXT: uunpklo z3.d, z1.s
406 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
407 ; CHECK-NEXT: uunpklo z0.d, z0.s
408 ; CHECK-NEXT: uunpklo z1.d, z1.s
409 ; CHECK-NEXT: ucvtf z2.d, p0/m, z2.d
410 ; CHECK-NEXT: ucvtf z3.d, p0/m, z3.d
411 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
412 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
413 ; CHECK-NEXT: stp q2, q0, [x1, #32]
414 ; CHECK-NEXT: stp q3, q1, [x1]
416 %op1 = load <8 x i32>, ptr %a
417 %res = uitofp <8 x i32> %op1 to <8 x double>
418 store <8 x double> %res, ptr %b
426 define <2 x half> @ucvtf_v2i64_v2f16(<2 x i64> %op1) {
427 ; CHECK-LABEL: ucvtf_v2i64_v2f16:
429 ; CHECK-NEXT: sub sp, sp, #16
430 ; CHECK-NEXT: .cfi_def_cfa_offset 16
431 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
432 ; CHECK-NEXT: mov z1.d, z0.d[1]
433 ; CHECK-NEXT: fmov x8, d0
434 ; CHECK-NEXT: ucvtf h0, x8
435 ; CHECK-NEXT: fmov x8, d1
436 ; CHECK-NEXT: ucvtf h1, x8
437 ; CHECK-NEXT: str h0, [sp, #8]
438 ; CHECK-NEXT: str h1, [sp, #10]
439 ; CHECK-NEXT: ldr d0, [sp, #8]
440 ; CHECK-NEXT: add sp, sp, #16
442 %res = uitofp <2 x i64> %op1 to <2 x half>
446 define <4 x half> @ucvtf_v4i64_v4f16(ptr %a) {
447 ; CHECK-LABEL: ucvtf_v4i64_v4f16:
449 ; CHECK-NEXT: ptrue p0.d, vl2
450 ; CHECK-NEXT: ldp q0, q1, [x0]
451 ; CHECK-NEXT: ptrue p1.s
452 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.d
453 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.d
454 ; CHECK-NEXT: ptrue p0.s, vl2
455 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
456 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
457 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
458 ; CHECK-NEXT: fcvt z0.h, p1/m, z0.s
459 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
460 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
462 %op1 = load <4 x i64>, ptr %a
463 %res = uitofp <4 x i64> %op1 to <4 x half>
467 define <8 x half> @ucvtf_v8i64_v8f16(ptr %a) {
468 ; CHECK-LABEL: ucvtf_v8i64_v8f16:
470 ; CHECK-NEXT: ptrue p0.d, vl2
471 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
472 ; CHECK-NEXT: ldp q2, q3, [x0]
473 ; CHECK-NEXT: ptrue p1.s
474 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.d
475 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.d
476 ; CHECK-NEXT: ucvtf z3.s, p0/m, z3.d
477 ; CHECK-NEXT: ucvtf z2.s, p0/m, z2.d
478 ; CHECK-NEXT: ptrue p0.s, vl2
479 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
480 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
481 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
482 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
483 ; CHECK-NEXT: splice z1.s, p0, z1.s, z0.s
484 ; CHECK-NEXT: movprfx z0, z1
485 ; CHECK-NEXT: fcvt z0.h, p1/m, z1.s
486 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
487 ; CHECK-NEXT: ptrue p0.h, vl4
488 ; CHECK-NEXT: movprfx z1, z2
489 ; CHECK-NEXT: fcvt z1.h, p1/m, z2.s
490 ; CHECK-NEXT: uzp1 z2.h, z0.h, z0.h
491 ; CHECK-NEXT: uzp1 z0.h, z1.h, z1.h
492 ; CHECK-NEXT: splice z0.h, p0, z0.h, z2.h
493 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
495 %op1 = load <8 x i64>, ptr %a
496 %res = uitofp <8 x i64> %op1 to <8 x half>
504 define <2 x float> @ucvtf_v2i64_v2f32(<2 x i64> %op1) {
505 ; CHECK-LABEL: ucvtf_v2i64_v2f32:
507 ; CHECK-NEXT: ptrue p0.d, vl2
508 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
509 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.d
510 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
511 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
513 %res = uitofp <2 x i64> %op1 to <2 x float>
517 define <4 x float> @ucvtf_v4i64_v4f32(ptr %a) {
518 ; CHECK-LABEL: ucvtf_v4i64_v4f32:
520 ; CHECK-NEXT: ptrue p0.d, vl2
521 ; CHECK-NEXT: ldp q0, q1, [x0]
522 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.d
523 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.d
524 ; CHECK-NEXT: ptrue p0.s, vl2
525 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
526 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
527 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
528 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
530 %op1 = load <4 x i64>, ptr %a
531 %res = uitofp <4 x i64> %op1 to <4 x float>
535 define void @ucvtf_v8i64_v8f32(ptr %a, ptr %b) {
536 ; CHECK-LABEL: ucvtf_v8i64_v8f32:
538 ; CHECK-NEXT: ptrue p0.d, vl2
539 ; CHECK-NEXT: ldp q0, q1, [x0, #32]
540 ; CHECK-NEXT: ldp q2, q3, [x0]
541 ; CHECK-NEXT: ucvtf z1.s, p0/m, z1.d
542 ; CHECK-NEXT: ucvtf z0.s, p0/m, z0.d
543 ; CHECK-NEXT: ucvtf z3.s, p0/m, z3.d
544 ; CHECK-NEXT: ucvtf z2.s, p0/m, z2.d
545 ; CHECK-NEXT: ptrue p0.s, vl2
546 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
547 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
548 ; CHECK-NEXT: uzp1 z3.s, z3.s, z3.s
549 ; CHECK-NEXT: uzp1 z2.s, z2.s, z2.s
550 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
551 ; CHECK-NEXT: splice z2.s, p0, z2.s, z3.s
552 ; CHECK-NEXT: stp q2, q0, [x1]
554 %op1 = load <8 x i64>, ptr %a
555 %res = uitofp <8 x i64> %op1 to <8 x float>
556 store <8 x float> %res, ptr %b
564 define <2 x double> @ucvtf_v2i64_v2f64(<2 x i64> %op1) {
565 ; CHECK-LABEL: ucvtf_v2i64_v2f64:
567 ; CHECK-NEXT: ptrue p0.d, vl2
568 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
569 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
570 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
572 %res = uitofp <2 x i64> %op1 to <2 x double>
573 ret <2 x double> %res
576 define void @ucvtf_v4i64_v4f64(ptr %a, ptr %b) {
577 ; CHECK-LABEL: ucvtf_v4i64_v4f64:
579 ; CHECK-NEXT: ptrue p0.d, vl2
580 ; CHECK-NEXT: ldp q0, q1, [x0]
581 ; CHECK-NEXT: ucvtf z0.d, p0/m, z0.d
582 ; CHECK-NEXT: ucvtf z1.d, p0/m, z1.d
583 ; CHECK-NEXT: stp q0, q1, [x1]
585 %op1 = load <4 x i64>, ptr %a
586 %res = uitofp <4 x i64> %op1 to <4 x double>
587 store <4 x double> %res, ptr %b
595 define <4 x half> @scvtf_v4i16_v4f16(<4 x i16> %op1) {
596 ; CHECK-LABEL: scvtf_v4i16_v4f16:
598 ; CHECK-NEXT: ptrue p0.h, vl4
599 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
600 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.h
601 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
603 %res = sitofp <4 x i16> %op1 to <4 x half>
607 define void @scvtf_v8i16_v8f16(ptr %a, ptr %b) {
608 ; CHECK-LABEL: scvtf_v8i16_v8f16:
610 ; CHECK-NEXT: ptrue p0.h, vl8
611 ; CHECK-NEXT: ldr q0, [x0]
612 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.h
613 ; CHECK-NEXT: str q0, [x1]
615 %op1 = load <8 x i16>, ptr %a
616 %res = sitofp <8 x i16> %op1 to <8 x half>
617 store <8 x half> %res, ptr %b
621 define void @scvtf_v16i16_v16f16(ptr %a, ptr %b) {
622 ; CHECK-LABEL: scvtf_v16i16_v16f16:
624 ; CHECK-NEXT: ptrue p0.h, vl8
625 ; CHECK-NEXT: ldp q0, q1, [x0]
626 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.h
627 ; CHECK-NEXT: scvtf z1.h, p0/m, z1.h
628 ; CHECK-NEXT: stp q0, q1, [x1]
630 %op1 = load <16 x i16>, ptr %a
631 %res = sitofp <16 x i16> %op1 to <16 x half>
632 store <16 x half> %res, ptr %b
639 define <2 x float> @scvtf_v2i16_v2f32(<2 x i16> %op1) {
640 ; CHECK-LABEL: scvtf_v2i16_v2f32:
642 ; CHECK-NEXT: ptrue p0.s, vl2
643 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
644 ; CHECK-NEXT: sxth z0.s, p0/m, z0.s
645 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
646 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
648 %res = sitofp <2 x i16> %op1 to <2 x float>
652 define <4 x float> @scvtf_v4i16_v4f32(<4 x i16> %op1) {
653 ; CHECK-LABEL: scvtf_v4i16_v4f32:
655 ; CHECK-NEXT: ptrue p0.s, vl4
656 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
657 ; CHECK-NEXT: sunpklo z0.s, z0.h
658 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
659 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
661 %res = sitofp <4 x i16> %op1 to <4 x float>
665 define void @scvtf_v8i16_v8f32(ptr %a, ptr %b) {
666 ; CHECK-LABEL: scvtf_v8i16_v8f32:
668 ; CHECK-NEXT: ldr q0, [x0]
669 ; CHECK-NEXT: ptrue p0.s, vl4
670 ; CHECK-NEXT: sunpklo z1.s, z0.h
671 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
672 ; CHECK-NEXT: sunpklo z0.s, z0.h
673 ; CHECK-NEXT: scvtf z1.s, p0/m, z1.s
674 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
675 ; CHECK-NEXT: stp q1, q0, [x1]
677 %op1 = load <8 x i16>, ptr %a
678 %res = sitofp <8 x i16> %op1 to <8 x float>
679 store <8 x float> %res, ptr %b
683 define void @scvtf_v16i16_v16f32(ptr %a, ptr %b) {
684 ; CHECK-LABEL: scvtf_v16i16_v16f32:
686 ; CHECK-NEXT: ldp q1, q0, [x0]
687 ; CHECK-NEXT: ptrue p0.s, vl4
688 ; CHECK-NEXT: sunpklo z2.s, z0.h
689 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
690 ; CHECK-NEXT: sunpklo z3.s, z1.h
691 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
692 ; CHECK-NEXT: sunpklo z0.s, z0.h
693 ; CHECK-NEXT: sunpklo z1.s, z1.h
694 ; CHECK-NEXT: scvtf z2.s, p0/m, z2.s
695 ; CHECK-NEXT: scvtf z3.s, p0/m, z3.s
696 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
697 ; CHECK-NEXT: scvtf z1.s, p0/m, z1.s
698 ; CHECK-NEXT: stp q2, q0, [x1, #32]
699 ; CHECK-NEXT: stp q3, q1, [x1]
701 %op1 = load <16 x i16>, ptr %a
702 %res = sitofp <16 x i16> %op1 to <16 x float>
703 store <16 x float> %res, ptr %b
711 define <2 x double> @scvtf_v2i16_v2f64(<2 x i16> %op1) {
712 ; CHECK-LABEL: scvtf_v2i16_v2f64:
714 ; CHECK-NEXT: ptrue p0.s, vl2
715 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
716 ; CHECK-NEXT: sxth z0.s, p0/m, z0.s
717 ; CHECK-NEXT: ptrue p0.d, vl2
718 ; CHECK-NEXT: sunpklo z0.d, z0.s
719 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
720 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
722 %res = sitofp <2 x i16> %op1 to <2 x double>
723 ret <2 x double> %res
726 define void @scvtf_v4i16_v4f64(ptr %a, ptr %b) {
727 ; CHECK-LABEL: scvtf_v4i16_v4f64:
729 ; CHECK-NEXT: ldr d0, [x0]
730 ; CHECK-NEXT: ptrue p0.d, vl2
731 ; CHECK-NEXT: sunpklo z0.s, z0.h
732 ; CHECK-NEXT: sunpklo z1.d, z0.s
733 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
734 ; CHECK-NEXT: sunpklo z0.d, z0.s
735 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
736 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
737 ; CHECK-NEXT: stp q1, q0, [x1]
739 %op1 = load <4 x i16>, ptr %a
740 %res = sitofp <4 x i16> %op1 to <4 x double>
741 store <4 x double> %res, ptr %b
745 define void @scvtf_v8i16_v8f64(ptr %a, ptr %b) {
746 ; CHECK-LABEL: scvtf_v8i16_v8f64:
748 ; CHECK-NEXT: ldr q0, [x0]
749 ; CHECK-NEXT: ptrue p0.d, vl2
750 ; CHECK-NEXT: sunpklo z1.s, z0.h
751 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
752 ; CHECK-NEXT: sunpklo z0.s, z0.h
753 ; CHECK-NEXT: sunpklo z2.d, z1.s
754 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
755 ; CHECK-NEXT: sunpklo z3.d, z0.s
756 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
757 ; CHECK-NEXT: sunpklo z1.d, z1.s
758 ; CHECK-NEXT: scvtf z2.d, p0/m, z2.d
759 ; CHECK-NEXT: sunpklo z0.d, z0.s
760 ; CHECK-NEXT: scvtf z3.d, p0/m, z3.d
761 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
762 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
763 ; CHECK-NEXT: stp q2, q1, [x1]
764 ; CHECK-NEXT: stp q3, q0, [x1, #32]
766 %op1 = load <8 x i16>, ptr %a
767 %res = sitofp <8 x i16> %op1 to <8 x double>
768 store <8 x double> %res, ptr %b
772 define void @scvtf_v16i16_v16f64(ptr %a, ptr %b) {
773 ; CHECK-LABEL: scvtf_v16i16_v16f64:
775 ; CHECK-NEXT: ldp q1, q0, [x0]
776 ; CHECK-NEXT: ptrue p0.d, vl2
777 ; CHECK-NEXT: sunpklo z2.s, z0.h
778 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
779 ; CHECK-NEXT: sunpklo z3.s, z1.h
780 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
781 ; CHECK-NEXT: sunpklo z0.s, z0.h
782 ; CHECK-NEXT: sunpklo z1.s, z1.h
783 ; CHECK-NEXT: mov z4.d, z2.d
784 ; CHECK-NEXT: mov z7.d, z3.d
785 ; CHECK-NEXT: mov z5.d, z0.d
786 ; CHECK-NEXT: ext z4.b, z4.b, z2.b, #8
787 ; CHECK-NEXT: sunpklo z2.d, z2.s
788 ; CHECK-NEXT: mov z6.d, z1.d
789 ; CHECK-NEXT: ext z7.b, z7.b, z3.b, #8
790 ; CHECK-NEXT: sunpklo z3.d, z3.s
791 ; CHECK-NEXT: ext z5.b, z5.b, z0.b, #8
792 ; CHECK-NEXT: sunpklo z4.d, z4.s
793 ; CHECK-NEXT: sunpklo z0.d, z0.s
794 ; CHECK-NEXT: ext z6.b, z6.b, z1.b, #8
795 ; CHECK-NEXT: sunpklo z1.d, z1.s
796 ; CHECK-NEXT: scvtf z2.d, p0/m, z2.d
797 ; CHECK-NEXT: scvtf z3.d, p0/m, z3.d
798 ; CHECK-NEXT: sunpklo z7.d, z7.s
799 ; CHECK-NEXT: sunpklo z5.d, z5.s
800 ; CHECK-NEXT: scvtf z4.d, p0/m, z4.d
801 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
802 ; CHECK-NEXT: sunpklo z6.d, z6.s
803 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
804 ; CHECK-NEXT: scvtf z5.d, p0/m, z5.d
805 ; CHECK-NEXT: stp q2, q4, [x1, #64]
806 ; CHECK-NEXT: movprfx z2, z6
807 ; CHECK-NEXT: scvtf z2.d, p0/m, z6.d
808 ; CHECK-NEXT: stp q1, q2, [x1, #32]
809 ; CHECK-NEXT: stp q0, q5, [x1, #96]
810 ; CHECK-NEXT: movprfx z0, z7
811 ; CHECK-NEXT: scvtf z0.d, p0/m, z7.d
812 ; CHECK-NEXT: stp q3, q0, [x1]
814 %op1 = load <16 x i16>, ptr %a
815 %res = sitofp <16 x i16> %op1 to <16 x double>
816 store <16 x double> %res, ptr %b
824 define <2 x half> @scvtf_v2i32_v2f16(<2 x i32> %op1) {
825 ; CHECK-LABEL: scvtf_v2i32_v2f16:
827 ; CHECK-NEXT: ptrue p0.s, vl4
828 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
829 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.s
830 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
831 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
833 %res = sitofp <2 x i32> %op1 to <2 x half>
837 define <4 x half> @scvtf_v4i32_v4f16(<4 x i32> %op1) {
838 ; CHECK-LABEL: scvtf_v4i32_v4f16:
840 ; CHECK-NEXT: ptrue p0.s, vl4
841 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
842 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.s
843 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
844 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
846 %res = sitofp <4 x i32> %op1 to <4 x half>
850 define <8 x half> @scvtf_v8i32_v8f16(ptr %a) {
851 ; CHECK-LABEL: scvtf_v8i32_v8f16:
853 ; CHECK-NEXT: ptrue p0.s, vl4
854 ; CHECK-NEXT: ldp q0, q1, [x0]
855 ; CHECK-NEXT: scvtf z1.h, p0/m, z1.s
856 ; CHECK-NEXT: scvtf z0.h, p0/m, z0.s
857 ; CHECK-NEXT: ptrue p0.h, vl4
858 ; CHECK-NEXT: uzp1 z1.h, z1.h, z1.h
859 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
860 ; CHECK-NEXT: splice z0.h, p0, z0.h, z1.h
861 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
863 %op1 = load <8 x i32>, ptr %a
864 %res = sitofp <8 x i32> %op1 to <8 x half>
872 define <2 x float> @scvtf_v2i32_v2f32(<2 x i32> %op1) {
873 ; CHECK-LABEL: scvtf_v2i32_v2f32:
875 ; CHECK-NEXT: ptrue p0.s, vl2
876 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
877 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
878 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
880 %res = sitofp <2 x i32> %op1 to <2 x float>
884 define <4 x float> @scvtf_v4i32_v4f32(<4 x i32> %op1) {
885 ; CHECK-LABEL: scvtf_v4i32_v4f32:
887 ; CHECK-NEXT: ptrue p0.s, vl4
888 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
889 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
890 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
892 %res = sitofp <4 x i32> %op1 to <4 x float>
896 define void @scvtf_v8i32_v8f32(ptr %a, ptr %b) {
897 ; CHECK-LABEL: scvtf_v8i32_v8f32:
899 ; CHECK-NEXT: ptrue p0.s, vl4
900 ; CHECK-NEXT: ldp q0, q1, [x0]
901 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.s
902 ; CHECK-NEXT: scvtf z1.s, p0/m, z1.s
903 ; CHECK-NEXT: stp q0, q1, [x1]
905 %op1 = load <8 x i32>, ptr %a
906 %res = sitofp <8 x i32> %op1 to <8 x float>
907 store <8 x float> %res, ptr %b
915 define <2 x double> @scvtf_v2i32_v2f64(<2 x i32> %op1) {
916 ; CHECK-LABEL: scvtf_v2i32_v2f64:
918 ; CHECK-NEXT: ptrue p0.d, vl2
919 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
920 ; CHECK-NEXT: sunpklo z0.d, z0.s
921 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
922 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
924 %res = sitofp <2 x i32> %op1 to <2 x double>
925 ret <2 x double> %res
928 define void @scvtf_v4i32_v4f64(ptr %a, ptr %b) {
929 ; CHECK-LABEL: scvtf_v4i32_v4f64:
931 ; CHECK-NEXT: ldr q0, [x0]
932 ; CHECK-NEXT: ptrue p0.d, vl2
933 ; CHECK-NEXT: sunpklo z1.d, z0.s
934 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
935 ; CHECK-NEXT: sunpklo z0.d, z0.s
936 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
937 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
938 ; CHECK-NEXT: stp q1, q0, [x1]
940 %op1 = load <4 x i32>, ptr %a
941 %res = sitofp <4 x i32> %op1 to <4 x double>
942 store <4 x double> %res, ptr %b
946 define void @scvtf_v8i32_v8f64(ptr %a, ptr %b) {
947 ; CHECK-LABEL: scvtf_v8i32_v8f64:
949 ; CHECK-NEXT: ldp q1, q0, [x0]
950 ; CHECK-NEXT: ptrue p0.d, vl2
951 ; CHECK-NEXT: sunpklo z2.d, z0.s
952 ; CHECK-NEXT: ext z0.b, z0.b, z0.b, #8
953 ; CHECK-NEXT: sunpklo z3.d, z1.s
954 ; CHECK-NEXT: ext z1.b, z1.b, z1.b, #8
955 ; CHECK-NEXT: sunpklo z0.d, z0.s
956 ; CHECK-NEXT: sunpklo z1.d, z1.s
957 ; CHECK-NEXT: scvtf z2.d, p0/m, z2.d
958 ; CHECK-NEXT: scvtf z3.d, p0/m, z3.d
959 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
960 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
961 ; CHECK-NEXT: stp q2, q0, [x1, #32]
962 ; CHECK-NEXT: stp q3, q1, [x1]
964 %op1 = load <8 x i32>, ptr %a
965 %res = sitofp <8 x i32> %op1 to <8 x double>
966 store <8 x double> %res, ptr %b
970 define void @scvtf_v16i32_v16f64(ptr %a, ptr %b) {
971 ; CHECK-LABEL: scvtf_v16i32_v16f64:
973 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
974 ; CHECK-NEXT: ptrue p0.d, vl2
975 ; CHECK-NEXT: ldp q5, q4, [x0]
976 ; CHECK-NEXT: mov z2.d, z0.d
977 ; CHECK-NEXT: mov z3.d, z1.d
978 ; CHECK-NEXT: mov z6.d, z4.d
979 ; CHECK-NEXT: mov z7.d, z5.d
980 ; CHECK-NEXT: ext z2.b, z2.b, z0.b, #8
981 ; CHECK-NEXT: ext z3.b, z3.b, z1.b, #8
982 ; CHECK-NEXT: sunpklo z0.d, z0.s
983 ; CHECK-NEXT: sunpklo z1.d, z1.s
984 ; CHECK-NEXT: ext z6.b, z6.b, z4.b, #8
985 ; CHECK-NEXT: sunpklo z4.d, z4.s
986 ; CHECK-NEXT: ext z7.b, z7.b, z5.b, #8
987 ; CHECK-NEXT: sunpklo z5.d, z5.s
988 ; CHECK-NEXT: sunpklo z2.d, z2.s
989 ; CHECK-NEXT: sunpklo z3.d, z3.s
990 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
991 ; CHECK-NEXT: sunpklo z6.d, z6.s
992 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
993 ; CHECK-NEXT: scvtf z4.d, p0/m, z4.d
994 ; CHECK-NEXT: sunpklo z7.d, z7.s
995 ; CHECK-NEXT: scvtf z2.d, p0/m, z2.d
996 ; CHECK-NEXT: scvtf z3.d, p0/m, z3.d
997 ; CHECK-NEXT: stp q1, q3, [x1, #64]
998 ; CHECK-NEXT: movprfx z1, z7
999 ; CHECK-NEXT: scvtf z1.d, p0/m, z7.d
1000 ; CHECK-NEXT: stp q0, q2, [x1, #96]
1001 ; CHECK-NEXT: movprfx z0, z6
1002 ; CHECK-NEXT: scvtf z0.d, p0/m, z6.d
1003 ; CHECK-NEXT: movprfx z2, z5
1004 ; CHECK-NEXT: scvtf z2.d, p0/m, z5.d
1005 ; CHECK-NEXT: stp q2, q1, [x1]
1006 ; CHECK-NEXT: stp q4, q0, [x1, #32]
1008 %op1 = load <16 x i32>, ptr %a
1009 %res = sitofp <16 x i32> %op1 to <16 x double>
1010 store <16 x double> %res, ptr %b
1018 define <2 x half> @scvtf_v2i64_v2f16(<2 x i64> %op1) {
1019 ; CHECK-LABEL: scvtf_v2i64_v2f16:
1021 ; CHECK-NEXT: sub sp, sp, #16
1022 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1023 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1024 ; CHECK-NEXT: mov z1.d, z0.d[1]
1025 ; CHECK-NEXT: fmov x8, d0
1026 ; CHECK-NEXT: scvtf h0, x8
1027 ; CHECK-NEXT: fmov x8, d1
1028 ; CHECK-NEXT: scvtf h1, x8
1029 ; CHECK-NEXT: str h0, [sp, #8]
1030 ; CHECK-NEXT: str h1, [sp, #10]
1031 ; CHECK-NEXT: ldr d0, [sp, #8]
1032 ; CHECK-NEXT: add sp, sp, #16
1034 %res = sitofp <2 x i64> %op1 to <2 x half>
1038 define <4 x half> @scvtf_v4i64_v4f16(ptr %a) {
1039 ; CHECK-LABEL: scvtf_v4i64_v4f16:
1041 ; CHECK-NEXT: ptrue p0.d, vl2
1042 ; CHECK-NEXT: ldp q0, q1, [x0]
1043 ; CHECK-NEXT: ptrue p1.s
1044 ; CHECK-NEXT: scvtf z1.s, p0/m, z1.d
1045 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.d
1046 ; CHECK-NEXT: ptrue p0.s, vl2
1047 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1048 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1049 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1050 ; CHECK-NEXT: fcvt z0.h, p1/m, z0.s
1051 ; CHECK-NEXT: uzp1 z0.h, z0.h, z0.h
1052 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1054 %op1 = load <4 x i64>, ptr %a
1055 %res = sitofp <4 x i64> %op1 to <4 x half>
1063 define <2 x float> @scvtf_v2i64_v2f32(<2 x i64> %op1) {
1064 ; CHECK-LABEL: scvtf_v2i64_v2f32:
1066 ; CHECK-NEXT: ptrue p0.d, vl2
1067 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1068 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.d
1069 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1070 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
1072 %res = sitofp <2 x i64> %op1 to <2 x float>
1073 ret <2 x float> %res
1076 define <4 x float> @scvtf_v4i64_v4f32(ptr %a) {
1077 ; CHECK-LABEL: scvtf_v4i64_v4f32:
1079 ; CHECK-NEXT: ptrue p0.d, vl2
1080 ; CHECK-NEXT: ldp q0, q1, [x0]
1081 ; CHECK-NEXT: scvtf z1.s, p0/m, z1.d
1082 ; CHECK-NEXT: scvtf z0.s, p0/m, z0.d
1083 ; CHECK-NEXT: ptrue p0.s, vl2
1084 ; CHECK-NEXT: uzp1 z1.s, z1.s, z1.s
1085 ; CHECK-NEXT: uzp1 z0.s, z0.s, z0.s
1086 ; CHECK-NEXT: splice z0.s, p0, z0.s, z1.s
1087 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1089 %op1 = load <4 x i64>, ptr %a
1090 %res = sitofp <4 x i64> %op1 to <4 x float>
1091 ret <4 x float> %res
1098 define <2 x double> @scvtf_v2i64_v2f64(<2 x i64> %op1) {
1099 ; CHECK-LABEL: scvtf_v2i64_v2f64:
1101 ; CHECK-NEXT: ptrue p0.d, vl2
1102 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
1103 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
1104 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
1106 %res = sitofp <2 x i64> %op1 to <2 x double>
1107 ret <2 x double> %res
1110 define void @scvtf_v4i64_v4f64(ptr %a, ptr %b) {
1111 ; CHECK-LABEL: scvtf_v4i64_v4f64:
1113 ; CHECK-NEXT: ptrue p0.d, vl2
1114 ; CHECK-NEXT: ldp q0, q1, [x0]
1115 ; CHECK-NEXT: scvtf z0.d, p0/m, z0.d
1116 ; CHECK-NEXT: scvtf z1.d, p0/m, z1.d
1117 ; CHECK-NEXT: stp q0, q1, [x1]
1119 %op1 = load <4 x i64>, ptr %a
1120 %res = sitofp <4 x i64> %op1 to <4 x double>
1121 store <4 x double> %res, ptr %b
1125 define half @scvtf_i16_f16(ptr %0) {
1126 ; CHECK-LABEL: scvtf_i16_f16:
1128 ; CHECK-NEXT: ldrsh w8, [x0]
1129 ; CHECK-NEXT: scvtf h0, w8
1131 %2 = load i16, ptr %0, align 64
1132 %3 = sitofp i16 %2 to half
1136 define float @scvtf_i16_f32(ptr %0) {
1137 ; CHECK-LABEL: scvtf_i16_f32:
1139 ; CHECK-NEXT: ldrsh w8, [x0]
1140 ; CHECK-NEXT: scvtf s0, w8
1142 %2 = load i16, ptr %0, align 64
1143 %3 = sitofp i16 %2 to float
1147 define double @scvtf_i16_f64(ptr %0) {
1148 ; CHECK-LABEL: scvtf_i16_f64:
1150 ; CHECK-NEXT: ldrsh w8, [x0]
1151 ; CHECK-NEXT: scvtf d0, w8
1153 %2 = load i16, ptr %0, align 64
1154 %3 = sitofp i16 %2 to double
1158 define half @scvtf_i32_f16(ptr %0) {
1159 ; CHECK-LABEL: scvtf_i32_f16:
1161 ; CHECK-NEXT: ldr w8, [x0]
1162 ; CHECK-NEXT: scvtf h0, w8
1164 %2 = load i32, ptr %0, align 64
1165 %3 = sitofp i32 %2 to half
1169 define float @scvtf_i32_f32(ptr %0) {
1170 ; CHECK-LABEL: scvtf_i32_f32:
1172 ; CHECK-NEXT: ldr w8, [x0]
1173 ; CHECK-NEXT: scvtf s0, w8
1175 %2 = load i32, ptr %0, align 64
1176 %3 = sitofp i32 %2 to float
1180 define double @scvtf_i32_f64(ptr %0) {
1181 ; CHECK-LABEL: scvtf_i32_f64:
1183 ; CHECK-NEXT: ldr w8, [x0]
1184 ; CHECK-NEXT: scvtf d0, w8
1186 %2 = load i32, ptr %0, align 64
1187 %3 = sitofp i32 %2 to double
1191 define half @scvtf_i64_f16(ptr %0) {
1192 ; CHECK-LABEL: scvtf_i64_f16:
1194 ; CHECK-NEXT: ldr x8, [x0]
1195 ; CHECK-NEXT: scvtf h0, x8
1197 %2 = load i64, ptr %0, align 64
1198 %3 = sitofp i64 %2 to half
1202 define float @scvtf_i64_f32(ptr %0) {
1203 ; CHECK-LABEL: scvtf_i64_f32:
1205 ; CHECK-NEXT: ldr x8, [x0]
1206 ; CHECK-NEXT: scvtf s0, x8
1208 %2 = load i64, ptr %0, align 64
1209 %3 = sitofp i64 %2 to float
1213 define double @scvtf_i64_f64(ptr %0) {
1214 ; CHECK-LABEL: scvtf_i64_f64:
1216 ; CHECK-NEXT: ldr x8, [x0]
1217 ; CHECK-NEXT: scvtf d0, x8
1219 %2 = load i64, ptr %0, align 64
1220 %3 = sitofp i64 %2 to double
1224 define half @ucvtf_i16_f16(ptr %0) {
1225 ; CHECK-LABEL: ucvtf_i16_f16:
1227 ; CHECK-NEXT: ldrh w8, [x0]
1228 ; CHECK-NEXT: ucvtf h0, w8
1230 %2 = load i16, ptr %0, align 64
1231 %3 = uitofp i16 %2 to half
1235 define float @ucvtf_i16_f32(ptr %0) {
1236 ; CHECK-LABEL: ucvtf_i16_f32:
1238 ; CHECK-NEXT: ldr h0, [x0]
1239 ; CHECK-NEXT: ucvtf s0, s0
1241 %2 = load i16, ptr %0, align 64
1242 %3 = uitofp i16 %2 to float
1246 define double @ucvtf_i16_f64(ptr %0) {
1247 ; CHECK-LABEL: ucvtf_i16_f64:
1249 ; CHECK-NEXT: ldr h0, [x0]
1250 ; CHECK-NEXT: ucvtf d0, d0
1252 %2 = load i16, ptr %0, align 64
1253 %3 = uitofp i16 %2 to double
1257 define half @ucvtf_i32_f16(ptr %0) {
1258 ; CHECK-LABEL: ucvtf_i32_f16:
1260 ; CHECK-NEXT: ldr w8, [x0]
1261 ; CHECK-NEXT: ucvtf h0, w8
1263 %2 = load i32, ptr %0, align 64
1264 %3 = uitofp i32 %2 to half
1268 define float @ucvtf_i32_f32(ptr %0) {
1269 ; CHECK-LABEL: ucvtf_i32_f32:
1271 ; CHECK-NEXT: ldr w8, [x0]
1272 ; CHECK-NEXT: ucvtf s0, w8
1274 %2 = load i32, ptr %0, align 64
1275 %3 = uitofp i32 %2 to float
1279 define double @ucvtf_i32_f64(ptr %0) {
1280 ; CHECK-LABEL: ucvtf_i32_f64:
1282 ; CHECK-NEXT: ldr s0, [x0]
1283 ; CHECK-NEXT: ucvtf d0, d0
1285 %2 = load i32, ptr %0, align 64
1286 %3 = uitofp i32 %2 to double
1290 define half @ucvtf_i64_f16(ptr %0) {
1291 ; CHECK-LABEL: ucvtf_i64_f16:
1293 ; CHECK-NEXT: ldr x8, [x0]
1294 ; CHECK-NEXT: ucvtf h0, x8
1296 %2 = load i64, ptr %0, align 64
1297 %3 = uitofp i64 %2 to half
1301 define float @ucvtf_i64_f32(ptr %0) {
1302 ; CHECK-LABEL: ucvtf_i64_f32:
1304 ; CHECK-NEXT: ldr x8, [x0]
1305 ; CHECK-NEXT: ucvtf s0, x8
1307 %2 = load i64, ptr %0, align 64
1308 %3 = uitofp i64 %2 to float
1312 define double @ucvtf_i64_f64(ptr %0) {
1313 ; CHECK-LABEL: ucvtf_i64_f64:
1315 ; CHECK-NEXT: ldr x8, [x0]
1316 ; CHECK-NEXT: ucvtf d0, x8
1318 %2 = load i64, ptr %0, align 64
1319 %3 = uitofp i64 %2 to double