1 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s
3 define <2 x i64> @test_v2f32_to_signed_v2i64(<2 x float> %in) {
4 ; CHECK-LABEL: test_v2f32_to_signed_v2i64:
5 ; CHECK: fcvtl [[VAL64:v[0-9]+]].2d, v0.2s
6 ; CHECK: fcvtzs.2d v0, [[VAL64]]
8 %val = fptosi <2 x float> %in to <2 x i64>
12 define <2 x i64> @test_v2f32_to_unsigned_v2i64(<2 x float> %in) {
13 ; CHECK-LABEL: test_v2f32_to_unsigned_v2i64:
14 ; CHECK: fcvtl [[VAL64:v[0-9]+]].2d, v0.2s
15 ; CHECK: fcvtzu.2d v0, [[VAL64]]
17 %val = fptoui <2 x float> %in to <2 x i64>
21 define <2 x i16> @test_v2f32_to_signed_v2i16(<2 x float> %in) {
22 ; CHECK-LABEL: test_v2f32_to_signed_v2i16:
23 ; CHECK: fcvtzs.2s v0, v0
25 %val = fptosi <2 x float> %in to <2 x i16>
29 define <2 x i16> @test_v2f32_to_unsigned_v2i16(<2 x float> %in) {
30 ; CHECK-LABEL: test_v2f32_to_unsigned_v2i16:
31 ; CHECK: fcvtzs.2s v0, v0
33 %val = fptoui <2 x float> %in to <2 x i16>
37 define <2 x i8> @test_v2f32_to_signed_v2i8(<2 x float> %in) {
38 ; CHECK-LABEL: test_v2f32_to_signed_v2i8:
39 ; CHECK: fcvtzs.2s v0, v0
41 %val = fptosi <2 x float> %in to <2 x i8>
45 define <2 x i8> @test_v2f32_to_unsigned_v2i8(<2 x float> %in) {
46 ; CHECK-LABEL: test_v2f32_to_unsigned_v2i8:
47 ; CHECK: fcvtzs.2s v0, v0
49 %val = fptoui <2 x float> %in to <2 x i8>
53 define <4 x i16> @test_v4f32_to_signed_v4i16(<4 x float> %in) {
54 ; CHECK-LABEL: test_v4f32_to_signed_v4i16:
55 ; CHECK: fcvtzs.4s [[VAL64:v[0-9]+]], v0
56 ; CHECK: xtn.4h v0, [[VAL64]]
58 %val = fptosi <4 x float> %in to <4 x i16>
62 define <4 x i16> @test_v4f32_to_unsigned_v4i16(<4 x float> %in) {
63 ; CHECK-LABEL: test_v4f32_to_unsigned_v4i16:
64 ; CHECK: fcvtzu.4s [[VAL64:v[0-9]+]], v0
65 ; CHECK: xtn.4h v0, [[VAL64]]
67 %val = fptoui <4 x float> %in to <4 x i16>
71 define <4 x i8> @test_v4f32_to_signed_v4i8(<4 x float> %in) {
72 ; CHECK-LABEL: test_v4f32_to_signed_v4i8:
73 ; CHECK: fcvtzs.4s [[VAL64:v[0-9]+]], v0
74 ; CHECK: xtn.4h v0, [[VAL64]]
76 %val = fptosi <4 x float> %in to <4 x i8>
80 define <4 x i8> @test_v4f32_to_unsigned_v4i8(<4 x float> %in) {
81 ; CHECK-LABEL: test_v4f32_to_unsigned_v4i8:
82 ; CHECK: fcvtzs.4s [[VAL64:v[0-9]+]], v0
83 ; CHECK: xtn.4h v0, [[VAL64]]
85 %val = fptoui <4 x float> %in to <4 x i8>
89 define <2 x i32> @test_v2f64_to_signed_v2i32(<2 x double> %in) {
90 ; CHECK-LABEL: test_v2f64_to_signed_v2i32:
91 ; CHECK: fcvtzs.2d [[VAL64:v[0-9]+]], v0
92 ; CHECK: xtn.2s v0, [[VAL64]]
94 %val = fptosi <2 x double> %in to <2 x i32>
98 define <2 x i32> @test_v2f64_to_unsigned_v2i32(<2 x double> %in) {
99 ; CHECK-LABEL: test_v2f64_to_unsigned_v2i32:
100 ; CHECK: fcvtzu.2d [[VAL64:v[0-9]+]], v0
101 ; CHECK: xtn.2s v0, [[VAL64]]
103 %val = fptoui <2 x double> %in to <2 x i32>
107 define <2 x i16> @test_v2f64_to_signed_v2i16(<2 x double> %in) {
108 ; CHECK-LABEL: test_v2f64_to_signed_v2i16:
109 ; CHECK: fcvtzs.2d [[VAL64:v[0-9]+]], v0
110 ; CHECK: xtn.2s v0, [[VAL64]]
112 %val = fptosi <2 x double> %in to <2 x i16>
116 define <2 x i16> @test_v2f64_to_unsigned_v2i16(<2 x double> %in) {
117 ; CHECK-LABEL: test_v2f64_to_unsigned_v2i16:
118 ; CHECK: fcvtzs.2d [[VAL64:v[0-9]+]], v0
119 ; CHECK: xtn.2s v0, [[VAL64]]
121 %val = fptoui <2 x double> %in to <2 x i16>
125 define <2 x i8> @test_v2f64_to_signed_v2i8(<2 x double> %in) {
126 ; CHECK-LABEL: test_v2f64_to_signed_v2i8:
127 ; CHECK: fcvtzs.2d [[VAL64:v[0-9]+]], v0
128 ; CHECK: xtn.2s v0, [[VAL64]]
130 %val = fptosi <2 x double> %in to <2 x i8>
134 define <2 x i8> @test_v2f64_to_unsigned_v2i8(<2 x double> %in) {
135 ; CHECK-LABEL: test_v2f64_to_unsigned_v2i8:
136 ; CHECK: fcvtzs.2d [[VAL64:v[0-9]+]], v0
137 ; CHECK: xtn.2s v0, [[VAL64]]
139 %val = fptoui <2 x double> %in to <2 x i8>