1 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s
2 ; RUN: llc < %s -mtriple=arm64-eabi -pass-remarks-missed=gisel-* \
3 ; RUN: -aarch64-neon-syntax=apple -global-isel -global-isel-abort=2 2>&1 | \
4 ; RUN: FileCheck %s --check-prefixes=FALLBACK,CHECK
6 ; FALLBACK-NOT: remark{{.*}}fcvtas_2s
7 define <2 x i32> @fcvtas_2s(<2 x float> %A) nounwind {
8 ;CHECK-LABEL: fcvtas_2s:
10 ;CHECK: fcvtas.2s v0, v0
12 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtas.v2i32.v2f32(<2 x float> %A)
16 ; FALLBACK-NOT: remark{{.*}}fcvtas_4s
17 define <4 x i32> @fcvtas_4s(<4 x float> %A) nounwind {
18 ;CHECK-LABEL: fcvtas_4s:
20 ;CHECK: fcvtas.4s v0, v0
22 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtas.v4i32.v4f32(<4 x float> %A)
26 ; FALLBACK-NOT: remark{{.*}}fcvtas_2d
27 define <2 x i64> @fcvtas_2d(<2 x double> %A) nounwind {
28 ;CHECK-LABEL: fcvtas_2d:
30 ;CHECK: fcvtas.2d v0, v0
32 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtas.v2i64.v2f64(<2 x double> %A)
36 define <1 x i64> @fcvtas_1d(<1 x double> %A) nounwind {
37 ;CHECK-LABEL: fcvtas_1d:
41 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtas.v1i64.v1f64(<1 x double> %A)
45 declare <2 x i32> @llvm.aarch64.neon.fcvtas.v2i32.v2f32(<2 x float>) nounwind readnone
46 declare <4 x i32> @llvm.aarch64.neon.fcvtas.v4i32.v4f32(<4 x float>) nounwind readnone
47 declare <2 x i64> @llvm.aarch64.neon.fcvtas.v2i64.v2f64(<2 x double>) nounwind readnone
48 declare <1 x i64> @llvm.aarch64.neon.fcvtas.v1i64.v1f64(<1 x double>) nounwind readnone
50 define <2 x i32> @fcvtau_2s(<2 x float> %A) nounwind {
51 ;CHECK-LABEL: fcvtau_2s:
53 ;CHECK: fcvtau.2s v0, v0
55 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtau.v2i32.v2f32(<2 x float> %A)
59 define <4 x i32> @fcvtau_4s(<4 x float> %A) nounwind {
60 ;CHECK-LABEL: fcvtau_4s:
62 ;CHECK: fcvtau.4s v0, v0
64 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtau.v4i32.v4f32(<4 x float> %A)
68 define <2 x i64> @fcvtau_2d(<2 x double> %A) nounwind {
69 ;CHECK-LABEL: fcvtau_2d:
71 ;CHECK: fcvtau.2d v0, v0
73 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtau.v2i64.v2f64(<2 x double> %A)
77 define <1 x i64> @fcvtau_1d(<1 x double> %A) nounwind {
78 ;CHECK-LABEL: fcvtau_1d:
82 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtau.v1i64.v1f64(<1 x double> %A)
86 declare <2 x i32> @llvm.aarch64.neon.fcvtau.v2i32.v2f32(<2 x float>) nounwind readnone
87 declare <4 x i32> @llvm.aarch64.neon.fcvtau.v4i32.v4f32(<4 x float>) nounwind readnone
88 declare <2 x i64> @llvm.aarch64.neon.fcvtau.v2i64.v2f64(<2 x double>) nounwind readnone
89 declare <1 x i64> @llvm.aarch64.neon.fcvtau.v1i64.v1f64(<1 x double>) nounwind readnone
91 define <2 x i32> @fcvtms_2s(<2 x float> %A) nounwind {
92 ;CHECK-LABEL: fcvtms_2s:
94 ;CHECK: fcvtms.2s v0, v0
96 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtms.v2i32.v2f32(<2 x float> %A)
100 define <4 x i32> @fcvtms_4s(<4 x float> %A) nounwind {
101 ;CHECK-LABEL: fcvtms_4s:
103 ;CHECK: fcvtms.4s v0, v0
105 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtms.v4i32.v4f32(<4 x float> %A)
109 define <2 x i64> @fcvtms_2d(<2 x double> %A) nounwind {
110 ;CHECK-LABEL: fcvtms_2d:
112 ;CHECK: fcvtms.2d v0, v0
114 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtms.v2i64.v2f64(<2 x double> %A)
118 define <1 x i64> @fcvtms_1d(<1 x double> %A) nounwind {
119 ;CHECK-LABEL: fcvtms_1d:
121 ;CHECK: fcvtms d0, d0
123 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtms.v1i64.v1f64(<1 x double> %A)
127 declare <2 x i32> @llvm.aarch64.neon.fcvtms.v2i32.v2f32(<2 x float>) nounwind readnone
128 declare <4 x i32> @llvm.aarch64.neon.fcvtms.v4i32.v4f32(<4 x float>) nounwind readnone
129 declare <2 x i64> @llvm.aarch64.neon.fcvtms.v2i64.v2f64(<2 x double>) nounwind readnone
130 declare <1 x i64> @llvm.aarch64.neon.fcvtms.v1i64.v1f64(<1 x double>) nounwind readnone
132 define <2 x i32> @fcvtmu_2s(<2 x float> %A) nounwind {
133 ;CHECK-LABEL: fcvtmu_2s:
135 ;CHECK: fcvtmu.2s v0, v0
137 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtmu.v2i32.v2f32(<2 x float> %A)
141 define <4 x i32> @fcvtmu_4s(<4 x float> %A) nounwind {
142 ;CHECK-LABEL: fcvtmu_4s:
144 ;CHECK: fcvtmu.4s v0, v0
146 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtmu.v4i32.v4f32(<4 x float> %A)
150 define <2 x i64> @fcvtmu_2d(<2 x double> %A) nounwind {
151 ;CHECK-LABEL: fcvtmu_2d:
153 ;CHECK: fcvtmu.2d v0, v0
155 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtmu.v2i64.v2f64(<2 x double> %A)
159 define <1 x i64> @fcvtmu_1d(<1 x double> %A) nounwind {
160 ;CHECK-LABEL: fcvtmu_1d:
162 ;CHECK: fcvtmu d0, d0
164 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtmu.v1i64.v1f64(<1 x double> %A)
168 declare <2 x i32> @llvm.aarch64.neon.fcvtmu.v2i32.v2f32(<2 x float>) nounwind readnone
169 declare <4 x i32> @llvm.aarch64.neon.fcvtmu.v4i32.v4f32(<4 x float>) nounwind readnone
170 declare <2 x i64> @llvm.aarch64.neon.fcvtmu.v2i64.v2f64(<2 x double>) nounwind readnone
171 declare <1 x i64> @llvm.aarch64.neon.fcvtmu.v1i64.v1f64(<1 x double>) nounwind readnone
173 define <2 x i32> @fcvtps_2s(<2 x float> %A) nounwind {
174 ;CHECK-LABEL: fcvtps_2s:
176 ;CHECK: fcvtps.2s v0, v0
178 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtps.v2i32.v2f32(<2 x float> %A)
182 define <4 x i32> @fcvtps_4s(<4 x float> %A) nounwind {
183 ;CHECK-LABEL: fcvtps_4s:
185 ;CHECK: fcvtps.4s v0, v0
187 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtps.v4i32.v4f32(<4 x float> %A)
191 define <2 x i64> @fcvtps_2d(<2 x double> %A) nounwind {
192 ;CHECK-LABEL: fcvtps_2d:
194 ;CHECK: fcvtps.2d v0, v0
196 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtps.v2i64.v2f64(<2 x double> %A)
200 define <1 x i64> @fcvtps_1d(<1 x double> %A) nounwind {
201 ;CHECK-LABEL: fcvtps_1d:
203 ;CHECK: fcvtps d0, d0
205 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtps.v1i64.v1f64(<1 x double> %A)
209 declare <2 x i32> @llvm.aarch64.neon.fcvtps.v2i32.v2f32(<2 x float>) nounwind readnone
210 declare <4 x i32> @llvm.aarch64.neon.fcvtps.v4i32.v4f32(<4 x float>) nounwind readnone
211 declare <2 x i64> @llvm.aarch64.neon.fcvtps.v2i64.v2f64(<2 x double>) nounwind readnone
212 declare <1 x i64> @llvm.aarch64.neon.fcvtps.v1i64.v1f64(<1 x double>) nounwind readnone
214 define <2 x i32> @fcvtpu_2s(<2 x float> %A) nounwind {
215 ;CHECK-LABEL: fcvtpu_2s:
217 ;CHECK: fcvtpu.2s v0, v0
219 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtpu.v2i32.v2f32(<2 x float> %A)
223 define <4 x i32> @fcvtpu_4s(<4 x float> %A) nounwind {
224 ;CHECK-LABEL: fcvtpu_4s:
226 ;CHECK: fcvtpu.4s v0, v0
228 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtpu.v4i32.v4f32(<4 x float> %A)
232 define <2 x i64> @fcvtpu_2d(<2 x double> %A) nounwind {
233 ;CHECK-LABEL: fcvtpu_2d:
235 ;CHECK: fcvtpu.2d v0, v0
237 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtpu.v2i64.v2f64(<2 x double> %A)
241 define <1 x i64> @fcvtpu_1d(<1 x double> %A) nounwind {
242 ;CHECK-LABEL: fcvtpu_1d:
244 ;CHECK: fcvtpu d0, d0
246 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtpu.v1i64.v1f64(<1 x double> %A)
250 declare <2 x i32> @llvm.aarch64.neon.fcvtpu.v2i32.v2f32(<2 x float>) nounwind readnone
251 declare <4 x i32> @llvm.aarch64.neon.fcvtpu.v4i32.v4f32(<4 x float>) nounwind readnone
252 declare <2 x i64> @llvm.aarch64.neon.fcvtpu.v2i64.v2f64(<2 x double>) nounwind readnone
253 declare <1 x i64> @llvm.aarch64.neon.fcvtpu.v1i64.v1f64(<1 x double>) nounwind readnone
255 define <2 x i32> @fcvtns_2s(<2 x float> %A) nounwind {
256 ;CHECK-LABEL: fcvtns_2s:
258 ;CHECK: fcvtns.2s v0, v0
260 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtns.v2i32.v2f32(<2 x float> %A)
264 define <4 x i32> @fcvtns_4s(<4 x float> %A) nounwind {
265 ;CHECK-LABEL: fcvtns_4s:
267 ;CHECK: fcvtns.4s v0, v0
269 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtns.v4i32.v4f32(<4 x float> %A)
273 define <2 x i64> @fcvtns_2d(<2 x double> %A) nounwind {
274 ;CHECK-LABEL: fcvtns_2d:
276 ;CHECK: fcvtns.2d v0, v0
278 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtns.v2i64.v2f64(<2 x double> %A)
282 define <1 x i64> @fcvtns_1d(<1 x double> %A) nounwind {
283 ;CHECK-LABEL: fcvtns_1d:
285 ;CHECK: fcvtns d0, d0
287 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtns.v1i64.v1f64(<1 x double> %A)
291 declare <2 x i32> @llvm.aarch64.neon.fcvtns.v2i32.v2f32(<2 x float>) nounwind readnone
292 declare <4 x i32> @llvm.aarch64.neon.fcvtns.v4i32.v4f32(<4 x float>) nounwind readnone
293 declare <2 x i64> @llvm.aarch64.neon.fcvtns.v2i64.v2f64(<2 x double>) nounwind readnone
294 declare <1 x i64> @llvm.aarch64.neon.fcvtns.v1i64.v1f64(<1 x double>) nounwind readnone
296 define <2 x i32> @fcvtnu_2s(<2 x float> %A) nounwind {
297 ;CHECK-LABEL: fcvtnu_2s:
299 ;CHECK: fcvtnu.2s v0, v0
301 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtnu.v2i32.v2f32(<2 x float> %A)
305 define <4 x i32> @fcvtnu_4s(<4 x float> %A) nounwind {
306 ;CHECK-LABEL: fcvtnu_4s:
308 ;CHECK: fcvtnu.4s v0, v0
310 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtnu.v4i32.v4f32(<4 x float> %A)
314 define <2 x i64> @fcvtnu_2d(<2 x double> %A) nounwind {
315 ;CHECK-LABEL: fcvtnu_2d:
317 ;CHECK: fcvtnu.2d v0, v0
319 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtnu.v2i64.v2f64(<2 x double> %A)
323 define <1 x i64> @fcvtnu_1d(<1 x double> %A) nounwind {
324 ;CHECK-LABEL: fcvtnu_1d:
326 ;CHECK: fcvtnu d0, d0
328 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtnu.v1i64.v1f64(<1 x double> %A)
332 declare <2 x i32> @llvm.aarch64.neon.fcvtnu.v2i32.v2f32(<2 x float>) nounwind readnone
333 declare <4 x i32> @llvm.aarch64.neon.fcvtnu.v4i32.v4f32(<4 x float>) nounwind readnone
334 declare <2 x i64> @llvm.aarch64.neon.fcvtnu.v2i64.v2f64(<2 x double>) nounwind readnone
335 declare <1 x i64> @llvm.aarch64.neon.fcvtnu.v1i64.v1f64(<1 x double>) nounwind readnone
337 define <2 x i32> @fcvtzs_2s(<2 x float> %A) nounwind {
338 ;CHECK-LABEL: fcvtzs_2s:
340 ;CHECK: fcvtzs.2s v0, v0
342 %tmp3 = fptosi <2 x float> %A to <2 x i32>
346 define <4 x i32> @fcvtzs_4s(<4 x float> %A) nounwind {
347 ;CHECK-LABEL: fcvtzs_4s:
349 ;CHECK: fcvtzs.4s v0, v0
351 %tmp3 = fptosi <4 x float> %A to <4 x i32>
355 define <2 x i64> @fcvtzs_2d(<2 x double> %A) nounwind {
356 ;CHECK-LABEL: fcvtzs_2d:
358 ;CHECK: fcvtzs.2d v0, v0
360 %tmp3 = fptosi <2 x double> %A to <2 x i64>
364 ; FIXME: Generate "fcvtzs d0, d0"?
365 define <1 x i64> @fcvtzs_1d(<1 x double> %A) nounwind {
366 ;CHECK-LABEL: fcvtzs_1d:
368 ;CHECK: fcvtzs x8, d0
369 ;CHECK-NEXT: mov d0, x8
371 %tmp3 = fptosi <1 x double> %A to <1 x i64>
375 define <2 x i32> @fcvtzs_2s_intrinsic(<2 x float> %A) nounwind {
376 ;CHECK-LABEL: fcvtzs_2s_intrinsic:
378 ;CHECK: fcvtzs.2s v0, v0
380 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtzs.v2i32.v2f32(<2 x float> %A)
384 define <4 x i32> @fcvtzs_4s_intrinsic(<4 x float> %A) nounwind {
385 ;CHECK-LABEL: fcvtzs_4s_intrinsic:
387 ;CHECK: fcvtzs.4s v0, v0
389 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtzs.v4i32.v4f32(<4 x float> %A)
393 define <2 x i64> @fcvtzs_2d_intrinsic(<2 x double> %A) nounwind {
394 ;CHECK-LABEL: fcvtzs_2d_intrinsic:
396 ;CHECK: fcvtzs.2d v0, v0
398 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtzs.v2i64.v2f64(<2 x double> %A)
402 define <1 x i64> @fcvtzs_1d_intrinsic(<1 x double> %A) nounwind {
403 ;CHECK-LABEL: fcvtzs_1d_intrinsic:
405 ;CHECK: fcvtzs{{.*}}, d0
407 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtzs.v1i64.v1f64(<1 x double> %A)
411 declare <2 x i32> @llvm.aarch64.neon.fcvtzs.v2i32.v2f32(<2 x float>) nounwind readnone
412 declare <4 x i32> @llvm.aarch64.neon.fcvtzs.v4i32.v4f32(<4 x float>) nounwind readnone
413 declare <2 x i64> @llvm.aarch64.neon.fcvtzs.v2i64.v2f64(<2 x double>) nounwind readnone
414 declare <1 x i64> @llvm.aarch64.neon.fcvtzs.v1i64.v1f64(<1 x double>) nounwind readnone
416 define <2 x i32> @fcvtzu_2s(<2 x float> %A) nounwind {
417 ;CHECK-LABEL: fcvtzu_2s:
419 ;CHECK: fcvtzu.2s v0, v0
421 %tmp3 = fptoui <2 x float> %A to <2 x i32>
425 define <4 x i32> @fcvtzu_4s(<4 x float> %A) nounwind {
426 ;CHECK-LABEL: fcvtzu_4s:
428 ;CHECK: fcvtzu.4s v0, v0
430 %tmp3 = fptoui <4 x float> %A to <4 x i32>
434 define <2 x i64> @fcvtzu_2d(<2 x double> %A) nounwind {
435 ;CHECK-LABEL: fcvtzu_2d:
437 ;CHECK: fcvtzu.2d v0, v0
439 %tmp3 = fptoui <2 x double> %A to <2 x i64>
443 ; FIXME: Generate "fcvtzu d0, d0"?
444 define <1 x i64> @fcvtzu_1d(<1 x double> %A) nounwind {
445 ;CHECK-LABEL: fcvtzu_1d:
447 ;CHECK: fcvtzu x8, d0
448 ;CHECK-NEXT: mov d0, x8
450 %tmp3 = fptoui <1 x double> %A to <1 x i64>
454 define <2 x i32> @fcvtzu_2s_intrinsic(<2 x float> %A) nounwind {
455 ;CHECK-LABEL: fcvtzu_2s_intrinsic:
457 ;CHECK: fcvtzu.2s v0, v0
459 %tmp3 = call <2 x i32> @llvm.aarch64.neon.fcvtzu.v2i32.v2f32(<2 x float> %A)
463 define <4 x i32> @fcvtzu_4s_intrinsic(<4 x float> %A) nounwind {
464 ;CHECK-LABEL: fcvtzu_4s_intrinsic:
466 ;CHECK: fcvtzu.4s v0, v0
468 %tmp3 = call <4 x i32> @llvm.aarch64.neon.fcvtzu.v4i32.v4f32(<4 x float> %A)
472 define <2 x i64> @fcvtzu_2d_intrinsic(<2 x double> %A) nounwind {
473 ;CHECK-LABEL: fcvtzu_2d_intrinsic:
475 ;CHECK: fcvtzu.2d v0, v0
477 %tmp3 = call <2 x i64> @llvm.aarch64.neon.fcvtzu.v2i64.v2f64(<2 x double> %A)
481 define <1 x i64> @fcvtzu_1d_intrinsic(<1 x double> %A) nounwind {
482 ;CHECK-LABEL: fcvtzu_1d_intrinsic:
484 ;CHECK: fcvtzu{{.*}}, d0
486 %tmp3 = call <1 x i64> @llvm.aarch64.neon.fcvtzu.v1i64.v1f64(<1 x double> %A)
490 declare <2 x i32> @llvm.aarch64.neon.fcvtzu.v2i32.v2f32(<2 x float>) nounwind readnone
491 declare <4 x i32> @llvm.aarch64.neon.fcvtzu.v4i32.v4f32(<4 x float>) nounwind readnone
492 declare <2 x i64> @llvm.aarch64.neon.fcvtzu.v2i64.v2f64(<2 x double>) nounwind readnone
493 declare <1 x i64> @llvm.aarch64.neon.fcvtzu.v1i64.v1f64(<1 x double>) nounwind readnone
495 define <2 x float> @frinta_2s(<2 x float> %A) nounwind {
496 ;CHECK-LABEL: frinta_2s:
498 ;CHECK: frinta.2s v0, v0
500 %tmp3 = call <2 x float> @llvm.round.v2f32(<2 x float> %A)
501 ret <2 x float> %tmp3
504 define <4 x float> @frinta_4s(<4 x float> %A) nounwind {
505 ;CHECK-LABEL: frinta_4s:
507 ;CHECK: frinta.4s v0, v0
509 %tmp3 = call <4 x float> @llvm.round.v4f32(<4 x float> %A)
510 ret <4 x float> %tmp3
513 define <2 x double> @frinta_2d(<2 x double> %A) nounwind {
514 ;CHECK-LABEL: frinta_2d:
516 ;CHECK: frinta.2d v0, v0
518 %tmp3 = call <2 x double> @llvm.round.v2f64(<2 x double> %A)
519 ret <2 x double> %tmp3
522 declare <2 x float> @llvm.round.v2f32(<2 x float>) nounwind readnone
523 declare <4 x float> @llvm.round.v4f32(<4 x float>) nounwind readnone
524 declare <2 x double> @llvm.round.v2f64(<2 x double>) nounwind readnone
526 define <2 x float> @frinti_2s(<2 x float> %A) nounwind {
527 ;CHECK-LABEL: frinti_2s:
529 ;CHECK: frinti.2s v0, v0
531 %tmp3 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %A)
532 ret <2 x float> %tmp3
535 define <4 x float> @frinti_4s(<4 x float> %A) nounwind {
536 ;CHECK-LABEL: frinti_4s:
538 ;CHECK: frinti.4s v0, v0
540 %tmp3 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %A)
541 ret <4 x float> %tmp3
544 define <2 x double> @frinti_2d(<2 x double> %A) nounwind {
545 ;CHECK-LABEL: frinti_2d:
547 ;CHECK: frinti.2d v0, v0
549 %tmp3 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %A)
550 ret <2 x double> %tmp3
553 declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>) nounwind readnone
554 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) nounwind readnone
555 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>) nounwind readnone
557 define <2 x float> @frintm_2s(<2 x float> %A) nounwind {
558 ;CHECK-LABEL: frintm_2s:
560 ;CHECK: frintm.2s v0, v0
562 %tmp3 = call <2 x float> @llvm.floor.v2f32(<2 x float> %A)
563 ret <2 x float> %tmp3
566 define <4 x float> @frintm_4s(<4 x float> %A) nounwind {
567 ;CHECK-LABEL: frintm_4s:
569 ;CHECK: frintm.4s v0, v0
571 %tmp3 = call <4 x float> @llvm.floor.v4f32(<4 x float> %A)
572 ret <4 x float> %tmp3
575 define <2 x double> @frintm_2d(<2 x double> %A) nounwind {
576 ;CHECK-LABEL: frintm_2d:
578 ;CHECK: frintm.2d v0, v0
580 %tmp3 = call <2 x double> @llvm.floor.v2f64(<2 x double> %A)
581 ret <2 x double> %tmp3
584 declare <2 x float> @llvm.floor.v2f32(<2 x float>) nounwind readnone
585 declare <4 x float> @llvm.floor.v4f32(<4 x float>) nounwind readnone
586 declare <2 x double> @llvm.floor.v2f64(<2 x double>) nounwind readnone
588 define <2 x float> @frintn_2s(<2 x float> %A) nounwind {
589 ;CHECK-LABEL: frintn_2s:
591 ;CHECK: frintn.2s v0, v0
593 %tmp3 = call <2 x float> @llvm.roundeven.v2f32(<2 x float> %A)
594 ret <2 x float> %tmp3
597 define <4 x float> @frintn_4s(<4 x float> %A) nounwind {
598 ;CHECK-LABEL: frintn_4s:
600 ;CHECK: frintn.4s v0, v0
602 %tmp3 = call <4 x float> @llvm.roundeven.v4f32(<4 x float> %A)
603 ret <4 x float> %tmp3
606 define <2 x double> @frintn_2d(<2 x double> %A) nounwind {
607 ;CHECK-LABEL: frintn_2d:
609 ;CHECK: frintn.2d v0, v0
611 %tmp3 = call <2 x double> @llvm.roundeven.v2f64(<2 x double> %A)
612 ret <2 x double> %tmp3
615 declare <2 x float> @llvm.roundeven.v2f32(<2 x float>) nounwind readnone
616 declare <4 x float> @llvm.roundeven.v4f32(<4 x float>) nounwind readnone
617 declare <2 x double> @llvm.roundeven.v2f64(<2 x double>) nounwind readnone
619 ; FALLBACK-NOT: remark{{.*}}frintp_2s
620 define <2 x float> @frintp_2s(<2 x float> %A) nounwind {
621 ;CHECK-LABEL: frintp_2s:
623 ;CHECK: frintp.2s v0, v0
625 %tmp3 = call <2 x float> @llvm.ceil.v2f32(<2 x float> %A)
626 ret <2 x float> %tmp3
629 ; FALLBACK-NOT: remark{{.*}}frintp_4s
630 define <4 x float> @frintp_4s(<4 x float> %A) nounwind {
631 ;CHECK-LABEL: frintp_4s:
633 ;CHECK: frintp.4s v0, v0
635 %tmp3 = call <4 x float> @llvm.ceil.v4f32(<4 x float> %A)
636 ret <4 x float> %tmp3
639 ; FALLBACK-NOT: remark{{.*}}frintp_2d
640 define <2 x double> @frintp_2d(<2 x double> %A) nounwind {
641 ;CHECK-LABEL: frintp_2d:
643 ;CHECK: frintp.2d v0, v0
645 %tmp3 = call <2 x double> @llvm.ceil.v2f64(<2 x double> %A)
646 ret <2 x double> %tmp3
649 declare <2 x float> @llvm.ceil.v2f32(<2 x float>) nounwind readnone
650 declare <4 x float> @llvm.ceil.v4f32(<4 x float>) nounwind readnone
651 declare <2 x double> @llvm.ceil.v2f64(<2 x double>) nounwind readnone
653 define <2 x float> @frintx_2s(<2 x float> %A) nounwind {
654 ;CHECK-LABEL: frintx_2s:
656 ;CHECK: frintx.2s v0, v0
658 %tmp3 = call <2 x float> @llvm.rint.v2f32(<2 x float> %A)
659 ret <2 x float> %tmp3
662 define <4 x float> @frintx_4s(<4 x float> %A) nounwind {
663 ;CHECK-LABEL: frintx_4s:
665 ;CHECK: frintx.4s v0, v0
667 %tmp3 = call <4 x float> @llvm.rint.v4f32(<4 x float> %A)
668 ret <4 x float> %tmp3
671 define <2 x double> @frintx_2d(<2 x double> %A) nounwind {
672 ;CHECK-LABEL: frintx_2d:
674 ;CHECK: frintx.2d v0, v0
676 %tmp3 = call <2 x double> @llvm.rint.v2f64(<2 x double> %A)
677 ret <2 x double> %tmp3
680 declare <2 x float> @llvm.rint.v2f32(<2 x float>) nounwind readnone
681 declare <4 x float> @llvm.rint.v4f32(<4 x float>) nounwind readnone
682 declare <2 x double> @llvm.rint.v2f64(<2 x double>) nounwind readnone
684 define <2 x float> @frintz_2s(<2 x float> %A) nounwind {
685 ;CHECK-LABEL: frintz_2s:
687 ;CHECK: frintz.2s v0, v0
689 %tmp3 = call <2 x float> @llvm.trunc.v2f32(<2 x float> %A)
690 ret <2 x float> %tmp3
693 define <4 x float> @frintz_4s(<4 x float> %A) nounwind {
694 ;CHECK-LABEL: frintz_4s:
696 ;CHECK: frintz.4s v0, v0
698 %tmp3 = call <4 x float> @llvm.trunc.v4f32(<4 x float> %A)
699 ret <4 x float> %tmp3
702 define <2 x double> @frintz_2d(<2 x double> %A) nounwind {
703 ;CHECK-LABEL: frintz_2d:
705 ;CHECK: frintz.2d v0, v0
707 %tmp3 = call <2 x double> @llvm.trunc.v2f64(<2 x double> %A)
708 ret <2 x double> %tmp3
711 declare <2 x float> @llvm.trunc.v2f32(<2 x float>) nounwind readnone
712 declare <4 x float> @llvm.trunc.v4f32(<4 x float>) nounwind readnone
713 declare <2 x double> @llvm.trunc.v2f64(<2 x double>) nounwind readnone
715 define <2 x float> @fcvtxn_2s(<2 x double> %A) nounwind {
716 ;CHECK-LABEL: fcvtxn_2s:
718 ;CHECK: fcvtxn v0.2s, v0.2d
720 %tmp3 = call <2 x float> @llvm.aarch64.neon.fcvtxn.v2f32.v2f64(<2 x double> %A)
721 ret <2 x float> %tmp3
724 define <4 x float> @fcvtxn_4s(<2 x float> %ret, <2 x double> %A) nounwind {
725 ;CHECK-LABEL: fcvtxn_4s:
727 ;CHECK: fcvtxn2 v0.4s, v1.2d
729 %tmp3 = call <2 x float> @llvm.aarch64.neon.fcvtxn.v2f32.v2f64(<2 x double> %A)
730 %res = shufflevector <2 x float> %ret, <2 x float> %tmp3, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
734 declare <2 x float> @llvm.aarch64.neon.fcvtxn.v2f32.v2f64(<2 x double>) nounwind readnone
736 define <2 x i32> @fcvtzsc_2s(<2 x float> %A) nounwind {
737 ;CHECK-LABEL: fcvtzsc_2s:
739 ;CHECK: fcvtzs.2s v0, v0, #1
741 %tmp3 = call <2 x i32> @llvm.aarch64.neon.vcvtfp2fxs.v2i32.v2f32(<2 x float> %A, i32 1)
745 define <4 x i32> @fcvtzsc_4s(<4 x float> %A) nounwind {
746 ;CHECK-LABEL: fcvtzsc_4s:
748 ;CHECK: fcvtzs.4s v0, v0, #1
750 %tmp3 = call <4 x i32> @llvm.aarch64.neon.vcvtfp2fxs.v4i32.v4f32(<4 x float> %A, i32 1)
754 define <2 x i64> @fcvtzsc_2d(<2 x double> %A) nounwind {
755 ;CHECK-LABEL: fcvtzsc_2d:
757 ;CHECK: fcvtzs.2d v0, v0, #1
759 %tmp3 = call <2 x i64> @llvm.aarch64.neon.vcvtfp2fxs.v2i64.v2f64(<2 x double> %A, i32 1)
763 declare <2 x i32> @llvm.aarch64.neon.vcvtfp2fxs.v2i32.v2f32(<2 x float>, i32) nounwind readnone
764 declare <4 x i32> @llvm.aarch64.neon.vcvtfp2fxs.v4i32.v4f32(<4 x float>, i32) nounwind readnone
765 declare <2 x i64> @llvm.aarch64.neon.vcvtfp2fxs.v2i64.v2f64(<2 x double>, i32) nounwind readnone
767 define <2 x i32> @fcvtzuc_2s(<2 x float> %A) nounwind {
768 ;CHECK-LABEL: fcvtzuc_2s:
770 ;CHECK: fcvtzu.2s v0, v0, #1
772 %tmp3 = call <2 x i32> @llvm.aarch64.neon.vcvtfp2fxu.v2i32.v2f32(<2 x float> %A, i32 1)
776 define <4 x i32> @fcvtzuc_4s(<4 x float> %A) nounwind {
777 ;CHECK-LABEL: fcvtzuc_4s:
779 ;CHECK: fcvtzu.4s v0, v0, #1
781 %tmp3 = call <4 x i32> @llvm.aarch64.neon.vcvtfp2fxu.v4i32.v4f32(<4 x float> %A, i32 1)
785 define <2 x i64> @fcvtzuc_2d(<2 x double> %A) nounwind {
786 ;CHECK-LABEL: fcvtzuc_2d:
788 ;CHECK: fcvtzu.2d v0, v0, #1
790 %tmp3 = call <2 x i64> @llvm.aarch64.neon.vcvtfp2fxu.v2i64.v2f64(<2 x double> %A, i32 1)
794 declare <2 x i32> @llvm.aarch64.neon.vcvtfp2fxu.v2i32.v2f32(<2 x float>, i32) nounwind readnone
795 declare <4 x i32> @llvm.aarch64.neon.vcvtfp2fxu.v4i32.v4f32(<4 x float>, i32) nounwind readnone
796 declare <2 x i64> @llvm.aarch64.neon.vcvtfp2fxu.v2i64.v2f64(<2 x double>, i32) nounwind readnone
798 define <2 x float> @scvtf_2sc(<2 x i32> %A) nounwind {
799 ;CHECK-LABEL: scvtf_2sc:
801 ;CHECK: scvtf.2s v0, v0, #1
803 %tmp3 = call <2 x float> @llvm.aarch64.neon.vcvtfxs2fp.v2f32.v2i32(<2 x i32> %A, i32 1)
804 ret <2 x float> %tmp3
807 define <4 x float> @scvtf_4sc(<4 x i32> %A) nounwind {
808 ;CHECK-LABEL: scvtf_4sc:
810 ;CHECK: scvtf.4s v0, v0, #1
812 %tmp3 = call <4 x float> @llvm.aarch64.neon.vcvtfxs2fp.v4f32.v4i32(<4 x i32> %A, i32 1)
813 ret <4 x float> %tmp3
816 define <2 x double> @scvtf_2dc(<2 x i64> %A) nounwind {
817 ;CHECK-LABEL: scvtf_2dc:
819 ;CHECK: scvtf.2d v0, v0, #1
821 %tmp3 = call <2 x double> @llvm.aarch64.neon.vcvtfxs2fp.v2f64.v2i64(<2 x i64> %A, i32 1)
822 ret <2 x double> %tmp3
825 declare <2 x float> @llvm.aarch64.neon.vcvtfxs2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone
826 declare <4 x float> @llvm.aarch64.neon.vcvtfxs2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone
827 declare <2 x double> @llvm.aarch64.neon.vcvtfxs2fp.v2f64.v2i64(<2 x i64>, i32) nounwind readnone
829 define <2 x float> @ucvtf_2sc(<2 x i32> %A) nounwind {
830 ;CHECK-LABEL: ucvtf_2sc:
832 ;CHECK: ucvtf.2s v0, v0, #1
834 %tmp3 = call <2 x float> @llvm.aarch64.neon.vcvtfxu2fp.v2f32.v2i32(<2 x i32> %A, i32 1)
835 ret <2 x float> %tmp3
838 define <4 x float> @ucvtf_4sc(<4 x i32> %A) nounwind {
839 ;CHECK-LABEL: ucvtf_4sc:
841 ;CHECK: ucvtf.4s v0, v0, #1
843 %tmp3 = call <4 x float> @llvm.aarch64.neon.vcvtfxu2fp.v4f32.v4i32(<4 x i32> %A, i32 1)
844 ret <4 x float> %tmp3
847 define <2 x double> @ucvtf_2dc(<2 x i64> %A) nounwind {
848 ;CHECK-LABEL: ucvtf_2dc:
850 ;CHECK: ucvtf.2d v0, v0, #1
852 %tmp3 = call <2 x double> @llvm.aarch64.neon.vcvtfxu2fp.v2f64.v2i64(<2 x i64> %A, i32 1)
853 ret <2 x double> %tmp3
857 ;CHECK-LABEL: autogen_SD28458:
860 define void @autogen_SD28458(<8 x double> %val.f64, ptr %addr.f32) {
861 %Tr53 = fptrunc <8 x double> %val.f64 to <8 x float>
862 store <8 x float> %Tr53, ptr %addr.f32
866 ;CHECK-LABEL: autogen_SD19225:
869 define void @autogen_SD19225(ptr %addr.f64, ptr %addr.f32) {
870 %A = load <8 x float>, ptr %addr.f32
871 %Tr53 = fpext <8 x float> %A to <8 x double>
872 store <8 x double> %Tr53, ptr %addr.f64
876 declare <2 x float> @llvm.aarch64.neon.vcvtfxu2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone
877 declare <4 x float> @llvm.aarch64.neon.vcvtfxu2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone
878 declare <2 x double> @llvm.aarch64.neon.vcvtfxu2fp.v2f64.v2i64(<2 x i64>, i32) nounwind readnone