1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
5 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s
6 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -o - %s >/dev/null
7 #include <arm_sve.h>
8
9 #ifdef SVE_OVERLOADED_FORMS
10 // A simple used,unused... macro, long enough to represent any SVE builtin.
11 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
12 #else
13 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
14 #endif
15
test_svcvt_s16_f16_z(svbool_t pg,svfloat16_t op)16 svint16_t test_svcvt_s16_f16_z(svbool_t pg, svfloat16_t op)
17 {
18 // CHECK-LABEL: test_svcvt_s16_f16_z
19 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
20 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
21 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
22 return SVE_ACLE_FUNC(svcvt_s16,_f16,_z,)(pg, op);
23 }
24
test_svcvt_s16_f16_m(svint16_t inactive,svbool_t pg,svfloat16_t op)25 svint16_t test_svcvt_s16_f16_m(svint16_t inactive, svbool_t pg, svfloat16_t op)
26 {
27 // CHECK-LABEL: test_svcvt_s16_f16_m
28 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
29 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16(<vscale x 8 x i16> %inactive, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
30 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
31 return SVE_ACLE_FUNC(svcvt_s16,_f16,_m,)(inactive, pg, op);
32 }
33
test_svcvt_s16_f16_x(svbool_t pg,svfloat16_t op)34 svint16_t test_svcvt_s16_f16_x(svbool_t pg, svfloat16_t op)
35 {
36 // CHECK-LABEL: test_svcvt_s16_f16_x
37 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
38 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzs.nxv8i16.nxv8f16(<vscale x 8 x i16> undef, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
39 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
40 return SVE_ACLE_FUNC(svcvt_s16,_f16,_x,)(pg, op);
41 }
42
test_svcvt_u16_f16_z(svbool_t pg,svfloat16_t op)43 svuint16_t test_svcvt_u16_f16_z(svbool_t pg, svfloat16_t op)
44 {
45 // CHECK-LABEL: test_svcvt_u16_f16_z
46 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
47 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16(<vscale x 8 x i16> zeroinitializer, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
48 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
49 return SVE_ACLE_FUNC(svcvt_u16,_f16,_z,)(pg, op);
50 }
51
test_svcvt_u16_f16_m(svuint16_t inactive,svbool_t pg,svfloat16_t op)52 svuint16_t test_svcvt_u16_f16_m(svuint16_t inactive, svbool_t pg, svfloat16_t op)
53 {
54 // CHECK-LABEL: test_svcvt_u16_f16_m
55 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
56 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16(<vscale x 8 x i16> %inactive, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
57 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
58 return SVE_ACLE_FUNC(svcvt_u16,_f16,_m,)(inactive, pg, op);
59 }
60
test_svcvt_u16_f16_x(svbool_t pg,svfloat16_t op)61 svuint16_t test_svcvt_u16_f16_x(svbool_t pg, svfloat16_t op)
62 {
63 // CHECK-LABEL: test_svcvt_u16_f16_x
64 // CHECK: %[[PG:.*]] = call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> %pg)
65 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzu.nxv8i16.nxv8f16(<vscale x 8 x i16> undef, <vscale x 8 x i1> %[[PG]], <vscale x 8 x half> %op)
66 // CHECK: ret <vscale x 8 x i16> %[[INTRINSIC]]
67 return SVE_ACLE_FUNC(svcvt_u16,_f16,_x,)(pg, op);
68 }
69
test_svcvt_s32_f16_z(svbool_t pg,svfloat16_t op)70 svint32_t test_svcvt_s32_f16_z(svbool_t pg, svfloat16_t op)
71 {
72 // CHECK-LABEL: test_svcvt_s32_f16_z
73 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
74 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f16(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
75 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
76 return SVE_ACLE_FUNC(svcvt_s32,_f16,_z,)(pg, op);
77 }
78
test_svcvt_s32_f32_z(svbool_t pg,svfloat32_t op)79 svint32_t test_svcvt_s32_f32_z(svbool_t pg, svfloat32_t op)
80 {
81 // CHECK-LABEL: test_svcvt_s32_f32_z
82 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
83 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
84 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
85 return SVE_ACLE_FUNC(svcvt_s32,_f32,_z,)(pg, op);
86 }
87
test_svcvt_s32_f64_z(svbool_t pg,svfloat64_t op)88 svint32_t test_svcvt_s32_f64_z(svbool_t pg, svfloat64_t op)
89 {
90 // CHECK-LABEL: test_svcvt_s32_f64_z
91 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
92 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f64(<vscale x 4 x i32> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
93 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
94 return SVE_ACLE_FUNC(svcvt_s32,_f64,_z,)(pg, op);
95 }
96
test_svcvt_s32_f16_m(svint32_t inactive,svbool_t pg,svfloat16_t op)97 svint32_t test_svcvt_s32_f16_m(svint32_t inactive, svbool_t pg, svfloat16_t op)
98 {
99 // CHECK-LABEL: test_svcvt_s32_f16_m
100 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
101 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f16(<vscale x 4 x i32> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
102 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
103 return SVE_ACLE_FUNC(svcvt_s32,_f16,_m,)(inactive, pg, op);
104 }
105
test_svcvt_s32_f32_m(svint32_t inactive,svbool_t pg,svfloat32_t op)106 svint32_t test_svcvt_s32_f32_m(svint32_t inactive, svbool_t pg, svfloat32_t op)
107 {
108 // CHECK-LABEL: test_svcvt_s32_f32_m
109 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
110 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32(<vscale x 4 x i32> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
111 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
112 return SVE_ACLE_FUNC(svcvt_s32,_f32,_m,)(inactive, pg, op);
113 }
114
test_svcvt_s32_f64_m(svint32_t inactive,svbool_t pg,svfloat64_t op)115 svint32_t test_svcvt_s32_f64_m(svint32_t inactive, svbool_t pg, svfloat64_t op)
116 {
117 // CHECK-LABEL: test_svcvt_s32_f64_m
118 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
119 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f64(<vscale x 4 x i32> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
120 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
121 return SVE_ACLE_FUNC(svcvt_s32,_f64,_m,)(inactive, pg, op);
122 }
123
test_svcvt_s32_f16_x(svbool_t pg,svfloat16_t op)124 svint32_t test_svcvt_s32_f16_x(svbool_t pg, svfloat16_t op)
125 {
126 // CHECK-LABEL: test_svcvt_s32_f16_x
127 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
128 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f16(<vscale x 4 x i32> undef, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
129 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
130 return SVE_ACLE_FUNC(svcvt_s32,_f16,_x,)(pg, op);
131 }
132
test_svcvt_s32_f32_x(svbool_t pg,svfloat32_t op)133 svint32_t test_svcvt_s32_f32_x(svbool_t pg, svfloat32_t op)
134 {
135 // CHECK-LABEL: test_svcvt_s32_f32_x
136 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
137 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.nxv4i32.nxv4f32(<vscale x 4 x i32> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
138 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
139 return SVE_ACLE_FUNC(svcvt_s32,_f32,_x,)(pg, op);
140 }
141
test_svcvt_s32_f64_x(svbool_t pg,svfloat64_t op)142 svint32_t test_svcvt_s32_f64_x(svbool_t pg, svfloat64_t op)
143 {
144 // CHECK-LABEL: test_svcvt_s32_f64_x
145 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
146 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzs.i32f64(<vscale x 4 x i32> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
147 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
148 return SVE_ACLE_FUNC(svcvt_s32,_f64,_x,)(pg, op);
149 }
150
test_svcvt_s64_f16_z(svbool_t pg,svfloat16_t op)151 svint64_t test_svcvt_s64_f16_z(svbool_t pg, svfloat16_t op)
152 {
153 // CHECK-LABEL: test_svcvt_s64_f16_z
154 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
155 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f16(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
156 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
157 return SVE_ACLE_FUNC(svcvt_s64,_f16,_z,)(pg, op);
158 }
159
test_svcvt_s64_f32_z(svbool_t pg,svfloat32_t op)160 svint64_t test_svcvt_s64_f32_z(svbool_t pg, svfloat32_t op)
161 {
162 // CHECK-LABEL: test_svcvt_s64_f32_z
163 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
164 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f32(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
165 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
166 return SVE_ACLE_FUNC(svcvt_s64,_f32,_z,)(pg, op);
167 }
168
test_svcvt_s64_f64_z(svbool_t pg,svfloat64_t op)169 svint64_t test_svcvt_s64_f64_z(svbool_t pg, svfloat64_t op)
170 {
171 // CHECK-LABEL: test_svcvt_s64_f64_z
172 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
173 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
174 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
175 return SVE_ACLE_FUNC(svcvt_s64,_f64,_z,)(pg, op);
176 }
177
test_svcvt_s64_f16_m(svint64_t inactive,svbool_t pg,svfloat16_t op)178 svint64_t test_svcvt_s64_f16_m(svint64_t inactive, svbool_t pg, svfloat16_t op)
179 {
180 // CHECK-LABEL: test_svcvt_s64_f16_m
181 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
182 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f16(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
183 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
184 return SVE_ACLE_FUNC(svcvt_s64,_f16,_m,)(inactive, pg, op);
185 }
186
test_svcvt_s64_f32_m(svint64_t inactive,svbool_t pg,svfloat32_t op)187 svint64_t test_svcvt_s64_f32_m(svint64_t inactive, svbool_t pg, svfloat32_t op)
188 {
189 // CHECK-LABEL: test_svcvt_s64_f32_m
190 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
191 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f32(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
192 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
193 return SVE_ACLE_FUNC(svcvt_s64,_f32,_m,)(inactive, pg, op);
194 }
195
test_svcvt_s64_f64_m(svint64_t inactive,svbool_t pg,svfloat64_t op)196 svint64_t test_svcvt_s64_f64_m(svint64_t inactive, svbool_t pg, svfloat64_t op)
197 {
198 // CHECK-LABEL: test_svcvt_s64_f64_m
199 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
200 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
201 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
202 return SVE_ACLE_FUNC(svcvt_s64,_f64,_m,)(inactive, pg, op);
203 }
204
test_svcvt_s64_f16_x(svbool_t pg,svfloat16_t op)205 svint64_t test_svcvt_s64_f16_x(svbool_t pg, svfloat16_t op)
206 {
207 // CHECK-LABEL: test_svcvt_s64_f16_x
208 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
209 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f16(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
210 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
211 return SVE_ACLE_FUNC(svcvt_s64,_f16,_x,)(pg, op);
212 }
213
test_svcvt_s64_f32_x(svbool_t pg,svfloat32_t op)214 svint64_t test_svcvt_s64_f32_x(svbool_t pg, svfloat32_t op)
215 {
216 // CHECK-LABEL: test_svcvt_s64_f32_x
217 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
218 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.i64f32(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
219 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
220 return SVE_ACLE_FUNC(svcvt_s64,_f32,_x,)(pg, op);
221 }
222
test_svcvt_s64_f64_x(svbool_t pg,svfloat64_t op)223 svint64_t test_svcvt_s64_f64_x(svbool_t pg, svfloat64_t op)
224 {
225 // CHECK-LABEL: test_svcvt_s64_f64_x
226 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
227 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzs.nxv2i64.nxv2f64(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
228 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
229 return SVE_ACLE_FUNC(svcvt_s64,_f64,_x,)(pg, op);
230 }
231
test_svcvt_u32_f16_z(svbool_t pg,svfloat16_t op)232 svuint32_t test_svcvt_u32_f16_z(svbool_t pg, svfloat16_t op)
233 {
234 // CHECK-LABEL: test_svcvt_u32_f16_z
235 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
236 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f16(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
237 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
238 return SVE_ACLE_FUNC(svcvt_u32,_f16,_z,)(pg, op);
239 }
240
test_svcvt_u32_f32_z(svbool_t pg,svfloat32_t op)241 svuint32_t test_svcvt_u32_f32_z(svbool_t pg, svfloat32_t op)
242 {
243 // CHECK-LABEL: test_svcvt_u32_f32_z
244 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
245 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
246 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
247 return SVE_ACLE_FUNC(svcvt_u32,_f32,_z,)(pg, op);
248 }
249
test_svcvt_u32_f64_z(svbool_t pg,svfloat64_t op)250 svuint32_t test_svcvt_u32_f64_z(svbool_t pg, svfloat64_t op)
251 {
252 // CHECK-LABEL: test_svcvt_u32_f64_z
253 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
254 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f64(<vscale x 4 x i32> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
255 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
256 return SVE_ACLE_FUNC(svcvt_u32,_f64,_z,)(pg, op);
257 }
258
test_svcvt_u32_f16_m(svuint32_t inactive,svbool_t pg,svfloat16_t op)259 svuint32_t test_svcvt_u32_f16_m(svuint32_t inactive, svbool_t pg, svfloat16_t op)
260 {
261 // CHECK-LABEL: test_svcvt_u32_f16_m
262 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
263 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f16(<vscale x 4 x i32> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
264 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
265 return SVE_ACLE_FUNC(svcvt_u32,_f16,_m,)(inactive, pg, op);
266 }
267
test_svcvt_u32_f32_m(svuint32_t inactive,svbool_t pg,svfloat32_t op)268 svuint32_t test_svcvt_u32_f32_m(svuint32_t inactive, svbool_t pg, svfloat32_t op)
269 {
270 // CHECK-LABEL: test_svcvt_u32_f32_m
271 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
272 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32(<vscale x 4 x i32> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
273 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
274 return SVE_ACLE_FUNC(svcvt_u32,_f32,_m,)(inactive, pg, op);
275 }
276
test_svcvt_u32_f64_m(svuint32_t inactive,svbool_t pg,svfloat64_t op)277 svuint32_t test_svcvt_u32_f64_m(svuint32_t inactive, svbool_t pg, svfloat64_t op)
278 {
279 // CHECK-LABEL: test_svcvt_u32_f64_m
280 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
281 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f64(<vscale x 4 x i32> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
282 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
283 return SVE_ACLE_FUNC(svcvt_u32,_f64,_m,)(inactive, pg, op);
284 }
285
test_svcvt_u32_f16_x(svbool_t pg,svfloat16_t op)286 svuint32_t test_svcvt_u32_f16_x(svbool_t pg, svfloat16_t op)
287 {
288 // CHECK-LABEL: test_svcvt_u32_f16_x
289 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
290 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f16(<vscale x 4 x i32> undef, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
291 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
292 return SVE_ACLE_FUNC(svcvt_u32,_f16,_x,)(pg, op);
293 }
294
test_svcvt_u32_f32_x(svbool_t pg,svfloat32_t op)295 svuint32_t test_svcvt_u32_f32_x(svbool_t pg, svfloat32_t op)
296 {
297 // CHECK-LABEL: test_svcvt_u32_f32_x
298 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
299 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.nxv4i32.nxv4f32(<vscale x 4 x i32> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
300 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
301 return SVE_ACLE_FUNC(svcvt_u32,_f32,_x,)(pg, op);
302 }
303
test_svcvt_u32_f64_x(svbool_t pg,svfloat64_t op)304 svuint32_t test_svcvt_u32_f64_x(svbool_t pg, svfloat64_t op)
305 {
306 // CHECK-LABEL: test_svcvt_u32_f64_x
307 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
308 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzu.i32f64(<vscale x 4 x i32> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
309 // CHECK: ret <vscale x 4 x i32> %[[INTRINSIC]]
310 return SVE_ACLE_FUNC(svcvt_u32,_f64,_x,)(pg, op);
311 }
312
test_svcvt_u64_f16_z(svbool_t pg,svfloat16_t op)313 svuint64_t test_svcvt_u64_f16_z(svbool_t pg, svfloat16_t op)
314 {
315 // CHECK-LABEL: test_svcvt_u64_f16_z
316 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
317 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f16(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
318 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
319 return SVE_ACLE_FUNC(svcvt_u64,_f16,_z,)(pg, op);
320 }
321
test_svcvt_u64_f32_z(svbool_t pg,svfloat32_t op)322 svuint64_t test_svcvt_u64_f32_z(svbool_t pg, svfloat32_t op)
323 {
324 // CHECK-LABEL: test_svcvt_u64_f32_z
325 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
326 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f32(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
327 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
328 return SVE_ACLE_FUNC(svcvt_u64,_f32,_z,)(pg, op);
329 }
330
test_svcvt_u64_f64_z(svbool_t pg,svfloat64_t op)331 svuint64_t test_svcvt_u64_f64_z(svbool_t pg, svfloat64_t op)
332 {
333 // CHECK-LABEL: test_svcvt_u64_f64_z
334 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
335 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64(<vscale x 2 x i64> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
336 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
337 return SVE_ACLE_FUNC(svcvt_u64,_f64,_z,)(pg, op);
338 }
339
test_svcvt_u64_f16_m(svuint64_t inactive,svbool_t pg,svfloat16_t op)340 svuint64_t test_svcvt_u64_f16_m(svuint64_t inactive, svbool_t pg, svfloat16_t op)
341 {
342 // CHECK-LABEL: test_svcvt_u64_f16_m
343 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
344 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f16(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
345 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
346 return SVE_ACLE_FUNC(svcvt_u64,_f16,_m,)(inactive, pg, op);
347 }
348
test_svcvt_u64_f32_m(svuint64_t inactive,svbool_t pg,svfloat32_t op)349 svuint64_t test_svcvt_u64_f32_m(svuint64_t inactive, svbool_t pg, svfloat32_t op)
350 {
351 // CHECK-LABEL: test_svcvt_u64_f32_m
352 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
353 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f32(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
354 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
355 return SVE_ACLE_FUNC(svcvt_u64,_f32,_m,)(inactive, pg, op);
356 }
357
test_svcvt_u64_f64_m(svuint64_t inactive,svbool_t pg,svfloat64_t op)358 svuint64_t test_svcvt_u64_f64_m(svuint64_t inactive, svbool_t pg, svfloat64_t op)
359 {
360 // CHECK-LABEL: test_svcvt_u64_f64_m
361 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
362 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64(<vscale x 2 x i64> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
363 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
364 return SVE_ACLE_FUNC(svcvt_u64,_f64,_m,)(inactive, pg, op);
365 }
366
test_svcvt_u64_f16_x(svbool_t pg,svfloat16_t op)367 svuint64_t test_svcvt_u64_f16_x(svbool_t pg, svfloat16_t op)
368 {
369 // CHECK-LABEL: test_svcvt_u64_f16_x
370 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
371 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f16(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
372 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
373 return SVE_ACLE_FUNC(svcvt_u64,_f16,_x,)(pg, op);
374 }
375
test_svcvt_u64_f32_x(svbool_t pg,svfloat32_t op)376 svuint64_t test_svcvt_u64_f32_x(svbool_t pg, svfloat32_t op)
377 {
378 // CHECK-LABEL: test_svcvt_u64_f32_x
379 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
380 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.i64f32(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
381 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
382 return SVE_ACLE_FUNC(svcvt_u64,_f32,_x,)(pg, op);
383 }
384
test_svcvt_u64_f64_x(svbool_t pg,svfloat64_t op)385 svuint64_t test_svcvt_u64_f64_x(svbool_t pg, svfloat64_t op)
386 {
387 // CHECK-LABEL: test_svcvt_u64_f64_x
388 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
389 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x i64> @llvm.aarch64.sve.fcvtzu.nxv2i64.nxv2f64(<vscale x 2 x i64> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
390 // CHECK: ret <vscale x 2 x i64> %[[INTRINSIC]]
391 return SVE_ACLE_FUNC(svcvt_u64,_f64,_x,)(pg, op);
392 }
393
test_svcvt_f16_s32_z(svbool_t pg,svint32_t op)394 svfloat16_t test_svcvt_f16_s32_z(svbool_t pg, svint32_t op)
395 {
396 // CHECK-LABEL: test_svcvt_f16_s32_z
397 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
398 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i32(<vscale x 8 x half> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
399 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
400 return SVE_ACLE_FUNC(svcvt_f16,_s32,_z,)(pg, op);
401 }
402
test_svcvt_f32_s32_z(svbool_t pg,svint32_t op)403 svfloat32_t test_svcvt_f32_s32_z(svbool_t pg, svint32_t op)
404 {
405 // CHECK-LABEL: test_svcvt_f32_s32_z
406 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
407 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32(<vscale x 4 x float> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
408 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
409 return SVE_ACLE_FUNC(svcvt_f32,_s32,_z,)(pg, op);
410 }
411
test_svcvt_f64_s32_z(svbool_t pg,svint32_t op)412 svfloat64_t test_svcvt_f64_s32_z(svbool_t pg, svint32_t op)
413 {
414 // CHECK-LABEL: test_svcvt_f64_s32_z
415 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
416 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.f64i32(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
417 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
418 return SVE_ACLE_FUNC(svcvt_f64,_s32,_z,)(pg, op);
419 }
420
test_svcvt_f16_s32_m(svfloat16_t inactive,svbool_t pg,svint32_t op)421 svfloat16_t test_svcvt_f16_s32_m(svfloat16_t inactive, svbool_t pg, svint32_t op)
422 {
423 // CHECK-LABEL: test_svcvt_f16_s32_m
424 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
425 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i32(<vscale x 8 x half> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
426 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
427 return SVE_ACLE_FUNC(svcvt_f16,_s32,_m,)(inactive, pg, op);
428 }
429
test_svcvt_f32_s32_m(svfloat32_t inactive,svbool_t pg,svint32_t op)430 svfloat32_t test_svcvt_f32_s32_m(svfloat32_t inactive, svbool_t pg, svint32_t op)
431 {
432 // CHECK-LABEL: test_svcvt_f32_s32_m
433 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
434 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32(<vscale x 4 x float> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
435 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
436 return SVE_ACLE_FUNC(svcvt_f32,_s32,_m,)(inactive, pg, op);
437 }
438
test_svcvt_f64_s32_m(svfloat64_t inactive,svbool_t pg,svint32_t op)439 svfloat64_t test_svcvt_f64_s32_m(svfloat64_t inactive, svbool_t pg, svint32_t op)
440 {
441 // CHECK-LABEL: test_svcvt_f64_s32_m
442 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
443 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.f64i32(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
444 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
445 return SVE_ACLE_FUNC(svcvt_f64,_s32,_m,)(inactive, pg, op);
446 }
447
test_svcvt_f16_s32_x(svbool_t pg,svint32_t op)448 svfloat16_t test_svcvt_f16_s32_x(svbool_t pg, svint32_t op)
449 {
450 // CHECK-LABEL: test_svcvt_f16_s32_x
451 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
452 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i32(<vscale x 8 x half> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
453 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
454 return SVE_ACLE_FUNC(svcvt_f16,_s32,_x,)(pg, op);
455 }
456
test_svcvt_f32_s32_x(svbool_t pg,svint32_t op)457 svfloat32_t test_svcvt_f32_s32_x(svbool_t pg, svint32_t op)
458 {
459 // CHECK-LABEL: test_svcvt_f32_s32_x
460 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
461 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.nxv4f32.nxv4i32(<vscale x 4 x float> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
462 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
463 return SVE_ACLE_FUNC(svcvt_f32,_s32,_x,)(pg, op);
464 }
465
test_svcvt_f64_s32_x(svbool_t pg,svint32_t op)466 svfloat64_t test_svcvt_f64_s32_x(svbool_t pg, svint32_t op)
467 {
468 // CHECK-LABEL: test_svcvt_f64_s32_x
469 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
470 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.f64i32(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
471 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
472 return SVE_ACLE_FUNC(svcvt_f64,_s32,_x,)(pg, op);
473 }
474
test_svcvt_f16_s64_z(svbool_t pg,svint64_t op)475 svfloat16_t test_svcvt_f16_s64_z(svbool_t pg, svint64_t op)
476 {
477 // CHECK-LABEL: test_svcvt_f16_s64_z
478 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
479 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i64(<vscale x 8 x half> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
480 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
481 return SVE_ACLE_FUNC(svcvt_f16,_s64,_z,)(pg, op);
482 }
483
test_svcvt_f32_s64_z(svbool_t pg,svint64_t op)484 svfloat32_t test_svcvt_f32_s64_z(svbool_t pg, svint64_t op)
485 {
486 // CHECK-LABEL: test_svcvt_f32_s64_z
487 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
488 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.f32i64(<vscale x 4 x float> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
489 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
490 return SVE_ACLE_FUNC(svcvt_f32,_s64,_z,)(pg, op);
491 }
492
test_svcvt_f64_s64_z(svbool_t pg,svint64_t op)493 svfloat64_t test_svcvt_f64_s64_z(svbool_t pg, svint64_t op)
494 {
495 // CHECK-LABEL: test_svcvt_f64_s64_z
496 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
497 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
498 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
499 return SVE_ACLE_FUNC(svcvt_f64,_s64,_z,)(pg, op);
500 }
501
test_svcvt_f16_s64_m(svfloat16_t inactive,svbool_t pg,svint64_t op)502 svfloat16_t test_svcvt_f16_s64_m(svfloat16_t inactive, svbool_t pg, svint64_t op)
503 {
504 // CHECK-LABEL: test_svcvt_f16_s64_m
505 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
506 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i64(<vscale x 8 x half> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
507 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
508 return SVE_ACLE_FUNC(svcvt_f16,_s64,_m,)(inactive, pg, op);
509 }
510
test_svcvt_f32_s64_m(svfloat32_t inactive,svbool_t pg,svint64_t op)511 svfloat32_t test_svcvt_f32_s64_m(svfloat32_t inactive, svbool_t pg, svint64_t op)
512 {
513 // CHECK-LABEL: test_svcvt_f32_s64_m
514 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
515 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.f32i64(<vscale x 4 x float> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
516 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
517 return SVE_ACLE_FUNC(svcvt_f32,_s64,_m,)(inactive, pg, op);
518 }
519
test_svcvt_f64_s64_m(svfloat64_t inactive,svbool_t pg,svint64_t op)520 svfloat64_t test_svcvt_f64_s64_m(svfloat64_t inactive, svbool_t pg, svint64_t op)
521 {
522 // CHECK-LABEL: test_svcvt_f64_s64_m
523 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
524 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
525 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
526 return SVE_ACLE_FUNC(svcvt_f64,_s64,_m,)(inactive, pg, op);
527 }
528
test_svcvt_f16_s64_x(svbool_t pg,svint64_t op)529 svfloat16_t test_svcvt_f16_s64_x(svbool_t pg, svint64_t op)
530 {
531 // CHECK-LABEL: test_svcvt_f16_s64_x
532 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
533 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.scvtf.f16i64(<vscale x 8 x half> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
534 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
535 return SVE_ACLE_FUNC(svcvt_f16,_s64,_x,)(pg, op);
536 }
537
test_svcvt_f32_s64_x(svbool_t pg,svint64_t op)538 svfloat32_t test_svcvt_f32_s64_x(svbool_t pg, svint64_t op)
539 {
540 // CHECK-LABEL: test_svcvt_f32_s64_x
541 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
542 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.scvtf.f32i64(<vscale x 4 x float> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
543 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
544 return SVE_ACLE_FUNC(svcvt_f32,_s64,_x,)(pg, op);
545 }
546
test_svcvt_f64_s64_x(svbool_t pg,svint64_t op)547 svfloat64_t test_svcvt_f64_s64_x(svbool_t pg, svint64_t op)
548 {
549 // CHECK-LABEL: test_svcvt_f64_s64_x
550 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
551 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.scvtf.nxv2f64.nxv2i64(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
552 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
553 return SVE_ACLE_FUNC(svcvt_f64,_s64,_x,)(pg, op);
554 }
555
test_svcvt_f16_u32_z(svbool_t pg,svuint32_t op)556 svfloat16_t test_svcvt_f16_u32_z(svbool_t pg, svuint32_t op)
557 {
558 // CHECK-LABEL: test_svcvt_f16_u32_z
559 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
560 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i32(<vscale x 8 x half> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
561 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
562 return SVE_ACLE_FUNC(svcvt_f16,_u32,_z,)(pg, op);
563 }
564
test_svcvt_f32_u32_z(svbool_t pg,svuint32_t op)565 svfloat32_t test_svcvt_f32_u32_z(svbool_t pg, svuint32_t op)
566 {
567 // CHECK-LABEL: test_svcvt_f32_u32_z
568 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
569 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32(<vscale x 4 x float> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
570 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
571 return SVE_ACLE_FUNC(svcvt_f32,_u32,_z,)(pg, op);
572 }
573
test_svcvt_f64_u32_z(svbool_t pg,svuint32_t op)574 svfloat64_t test_svcvt_f64_u32_z(svbool_t pg, svuint32_t op)
575 {
576 // CHECK-LABEL: test_svcvt_f64_u32_z
577 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
578 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.f64i32(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
579 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
580 return SVE_ACLE_FUNC(svcvt_f64,_u32,_z,)(pg, op);
581 }
582
test_svcvt_f16_u32_m(svfloat16_t inactive,svbool_t pg,svuint32_t op)583 svfloat16_t test_svcvt_f16_u32_m(svfloat16_t inactive, svbool_t pg, svuint32_t op)
584 {
585 // CHECK-LABEL: test_svcvt_f16_u32_m
586 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
587 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i32(<vscale x 8 x half> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
588 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
589 return SVE_ACLE_FUNC(svcvt_f16,_u32,_m,)(inactive, pg, op);
590 }
591
test_svcvt_f32_u32_m(svfloat32_t inactive,svbool_t pg,svuint32_t op)592 svfloat32_t test_svcvt_f32_u32_m(svfloat32_t inactive, svbool_t pg, svuint32_t op)
593 {
594 // CHECK-LABEL: test_svcvt_f32_u32_m
595 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
596 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32(<vscale x 4 x float> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
597 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
598 return SVE_ACLE_FUNC(svcvt_f32,_u32,_m,)(inactive, pg, op);
599 }
600
test_svcvt_f64_u32_m(svfloat64_t inactive,svbool_t pg,svuint32_t op)601 svfloat64_t test_svcvt_f64_u32_m(svfloat64_t inactive, svbool_t pg, svuint32_t op)
602 {
603 // CHECK-LABEL: test_svcvt_f64_u32_m
604 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
605 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.f64i32(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
606 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
607 return SVE_ACLE_FUNC(svcvt_f64,_u32,_m,)(inactive, pg, op);
608 }
609
test_svcvt_f16_u32_x(svbool_t pg,svuint32_t op)610 svfloat16_t test_svcvt_f16_u32_x(svbool_t pg, svuint32_t op)
611 {
612 // CHECK-LABEL: test_svcvt_f16_u32_x
613 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
614 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i32(<vscale x 8 x half> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
615 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
616 return SVE_ACLE_FUNC(svcvt_f16,_u32,_x,)(pg, op);
617 }
618
test_svcvt_f32_u32_x(svbool_t pg,svuint32_t op)619 svfloat32_t test_svcvt_f32_u32_x(svbool_t pg, svuint32_t op)
620 {
621 // CHECK-LABEL: test_svcvt_f32_u32_x
622 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
623 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.nxv4f32.nxv4i32(<vscale x 4 x float> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x i32> %op)
624 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
625 return SVE_ACLE_FUNC(svcvt_f32,_u32,_x,)(pg, op);
626 }
627
test_svcvt_f64_u32_x(svbool_t pg,svuint32_t op)628 svfloat64_t test_svcvt_f64_u32_x(svbool_t pg, svuint32_t op)
629 {
630 // CHECK-LABEL: test_svcvt_f64_u32_x
631 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
632 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.f64i32(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 4 x i32> %op)
633 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
634 return SVE_ACLE_FUNC(svcvt_f64,_u32,_x,)(pg, op);
635 }
636
test_svcvt_f16_u64_z(svbool_t pg,svuint64_t op)637 svfloat16_t test_svcvt_f16_u64_z(svbool_t pg, svuint64_t op)
638 {
639 // CHECK-LABEL: test_svcvt_f16_u64_z
640 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
641 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i64(<vscale x 8 x half> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
642 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
643 return SVE_ACLE_FUNC(svcvt_f16,_u64,_z,)(pg, op);
644 }
645
test_svcvt_f32_u64_z(svbool_t pg,svuint64_t op)646 svfloat32_t test_svcvt_f32_u64_z(svbool_t pg, svuint64_t op)
647 {
648 // CHECK-LABEL: test_svcvt_f32_u64_z
649 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
650 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.f32i64(<vscale x 4 x float> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
651 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
652 return SVE_ACLE_FUNC(svcvt_f32,_u64,_z,)(pg, op);
653 }
654
test_svcvt_f64_u64_z(svbool_t pg,svuint64_t op)655 svfloat64_t test_svcvt_f64_u64_z(svbool_t pg, svuint64_t op)
656 {
657 // CHECK-LABEL: test_svcvt_f64_u64_z
658 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
659 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
660 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
661 return SVE_ACLE_FUNC(svcvt_f64,_u64,_z,)(pg, op);
662 }
663
test_svcvt_f16_u64_m(svfloat16_t inactive,svbool_t pg,svuint64_t op)664 svfloat16_t test_svcvt_f16_u64_m(svfloat16_t inactive, svbool_t pg, svuint64_t op)
665 {
666 // CHECK-LABEL: test_svcvt_f16_u64_m
667 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
668 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i64(<vscale x 8 x half> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
669 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
670 return SVE_ACLE_FUNC(svcvt_f16,_u64,_m,)(inactive, pg, op);
671 }
672
test_svcvt_f32_u64_m(svfloat32_t inactive,svbool_t pg,svuint64_t op)673 svfloat32_t test_svcvt_f32_u64_m(svfloat32_t inactive, svbool_t pg, svuint64_t op)
674 {
675 // CHECK-LABEL: test_svcvt_f32_u64_m
676 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
677 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.f32i64(<vscale x 4 x float> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
678 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
679 return SVE_ACLE_FUNC(svcvt_f32,_u64,_m,)(inactive, pg, op);
680 }
681
test_svcvt_f64_u64_m(svfloat64_t inactive,svbool_t pg,svuint64_t op)682 svfloat64_t test_svcvt_f64_u64_m(svfloat64_t inactive, svbool_t pg, svuint64_t op)
683 {
684 // CHECK-LABEL: test_svcvt_f64_u64_m
685 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
686 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
687 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
688 return SVE_ACLE_FUNC(svcvt_f64,_u64,_m,)(inactive, pg, op);
689 }
690
test_svcvt_f16_u64_x(svbool_t pg,svuint64_t op)691 svfloat16_t test_svcvt_f16_u64_x(svbool_t pg, svuint64_t op)
692 {
693 // CHECK-LABEL: test_svcvt_f16_u64_x
694 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
695 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.ucvtf.f16i64(<vscale x 8 x half> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
696 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
697 return SVE_ACLE_FUNC(svcvt_f16,_u64,_x,)(pg, op);
698 }
699
test_svcvt_f32_u64_x(svbool_t pg,svuint64_t op)700 svfloat32_t test_svcvt_f32_u64_x(svbool_t pg, svuint64_t op)
701 {
702 // CHECK-LABEL: test_svcvt_f32_u64_x
703 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
704 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.ucvtf.f32i64(<vscale x 4 x float> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
705 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
706 return SVE_ACLE_FUNC(svcvt_f32,_u64,_x,)(pg, op);
707 }
708
test_svcvt_f64_u64_x(svbool_t pg,svuint64_t op)709 svfloat64_t test_svcvt_f64_u64_x(svbool_t pg, svuint64_t op)
710 {
711 // CHECK-LABEL: test_svcvt_f64_u64_x
712 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
713 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.ucvtf.nxv2f64.nxv2i64(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x i64> %op)
714 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
715 return SVE_ACLE_FUNC(svcvt_f64,_u64,_x,)(pg, op);
716 }
717
test_svcvt_f32_f16_z(svbool_t pg,svfloat16_t op)718 svfloat32_t test_svcvt_f32_f16_z(svbool_t pg, svfloat16_t op)
719 {
720 // CHECK-LABEL: test_svcvt_f32_f16_z
721 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
722 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f16(<vscale x 4 x float> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
723 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
724 return SVE_ACLE_FUNC(svcvt_f32,_f16,_z,)(pg, op);
725 }
726
test_svcvt_f64_f16_z(svbool_t pg,svfloat16_t op)727 svfloat64_t test_svcvt_f64_f16_z(svbool_t pg, svfloat16_t op)
728 {
729 // CHECK-LABEL: test_svcvt_f64_f16_z
730 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
731 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f16(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
732 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
733 return SVE_ACLE_FUNC(svcvt_f64,_f16,_z,)(pg, op);
734 }
735
test_svcvt_f32_f16_m(svfloat32_t inactive,svbool_t pg,svfloat16_t op)736 svfloat32_t test_svcvt_f32_f16_m(svfloat32_t inactive, svbool_t pg, svfloat16_t op)
737 {
738 // CHECK-LABEL: test_svcvt_f32_f16_m
739 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
740 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f16(<vscale x 4 x float> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
741 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
742 return SVE_ACLE_FUNC(svcvt_f32,_f16,_m,)(inactive, pg, op);
743 }
744
test_svcvt_f64_f16_m(svfloat64_t inactive,svbool_t pg,svfloat16_t op)745 svfloat64_t test_svcvt_f64_f16_m(svfloat64_t inactive, svbool_t pg, svfloat16_t op)
746 {
747 // CHECK-LABEL: test_svcvt_f64_f16_m
748 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
749 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f16(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
750 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
751 return SVE_ACLE_FUNC(svcvt_f64,_f16,_m,)(inactive, pg, op);
752 }
753
test_svcvt_f32_f16_x(svbool_t pg,svfloat16_t op)754 svfloat32_t test_svcvt_f32_f16_x(svbool_t pg, svfloat16_t op)
755 {
756 // CHECK-LABEL: test_svcvt_f32_f16_x
757 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
758 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f16(<vscale x 4 x float> undef, <vscale x 4 x i1> %[[PG]], <vscale x 8 x half> %op)
759 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
760 return SVE_ACLE_FUNC(svcvt_f32,_f16,_x,)(pg, op);
761 }
762
test_svcvt_f64_f16_x(svbool_t pg,svfloat16_t op)763 svfloat64_t test_svcvt_f64_f16_x(svbool_t pg, svfloat16_t op)
764 {
765 // CHECK-LABEL: test_svcvt_f64_f16_x
766 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
767 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f16(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 8 x half> %op)
768 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
769 return SVE_ACLE_FUNC(svcvt_f64,_f16,_x,)(pg, op);
770 }
771
test_svcvt_f64_f32_z(svbool_t pg,svfloat32_t op)772 svfloat64_t test_svcvt_f64_f32_z(svbool_t pg, svfloat32_t op)
773 {
774 // CHECK-LABEL: test_svcvt_f64_f32_z
775 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
776 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f32(<vscale x 2 x double> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
777 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
778 return SVE_ACLE_FUNC(svcvt_f64,_f32,_z,)(pg, op);
779 }
780
test_svcvt_f64_f32_m(svfloat64_t inactive,svbool_t pg,svfloat32_t op)781 svfloat64_t test_svcvt_f64_f32_m(svfloat64_t inactive, svbool_t pg, svfloat32_t op)
782 {
783 // CHECK-LABEL: test_svcvt_f64_f32_m
784 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
785 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f32(<vscale x 2 x double> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
786 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
787 return SVE_ACLE_FUNC(svcvt_f64,_f32,_m,)(inactive, pg, op);
788 }
789
test_svcvt_f64_f32_x(svbool_t pg,svfloat32_t op)790 svfloat64_t test_svcvt_f64_f32_x(svbool_t pg, svfloat32_t op)
791 {
792 // CHECK-LABEL: test_svcvt_f64_f32_x
793 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
794 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 2 x double> @llvm.aarch64.sve.fcvt.f64f32(<vscale x 2 x double> undef, <vscale x 2 x i1> %[[PG]], <vscale x 4 x float> %op)
795 // CHECK: ret <vscale x 2 x double> %[[INTRINSIC]]
796 return SVE_ACLE_FUNC(svcvt_f64,_f32,_x,)(pg, op);
797 }
798
test_svcvt_f16_f32_z(svbool_t pg,svfloat32_t op)799 svfloat16_t test_svcvt_f16_f32_z(svbool_t pg, svfloat32_t op)
800 {
801 // CHECK-LABEL: test_svcvt_f16_f32_z
802 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
803 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f32(<vscale x 8 x half> zeroinitializer, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
804 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
805 return SVE_ACLE_FUNC(svcvt_f16,_f32,_z,)(pg, op);
806 }
807
test_svcvt_f16_f64_z(svbool_t pg,svfloat64_t op)808 svfloat16_t test_svcvt_f16_f64_z(svbool_t pg, svfloat64_t op)
809 {
810 // CHECK-LABEL: test_svcvt_f16_f64_z
811 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
812 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f64(<vscale x 8 x half> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
813 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
814 return SVE_ACLE_FUNC(svcvt_f16,_f64,_z,)(pg, op);
815 }
816
test_svcvt_f16_f32_m(svfloat16_t inactive,svbool_t pg,svfloat32_t op)817 svfloat16_t test_svcvt_f16_f32_m(svfloat16_t inactive, svbool_t pg, svfloat32_t op)
818 {
819 // CHECK-LABEL: test_svcvt_f16_f32_m
820 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
821 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f32(<vscale x 8 x half> %inactive, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
822 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
823 return SVE_ACLE_FUNC(svcvt_f16,_f32,_m,)(inactive, pg, op);
824 }
825
test_svcvt_f16_f64_m(svfloat16_t inactive,svbool_t pg,svfloat64_t op)826 svfloat16_t test_svcvt_f16_f64_m(svfloat16_t inactive, svbool_t pg, svfloat64_t op)
827 {
828 // CHECK-LABEL: test_svcvt_f16_f64_m
829 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
830 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f64(<vscale x 8 x half> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
831 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
832 return SVE_ACLE_FUNC(svcvt_f16,_f64,_m,)(inactive, pg, op);
833 }
834
test_svcvt_f16_f32_x(svbool_t pg,svfloat32_t op)835 svfloat16_t test_svcvt_f16_f32_x(svbool_t pg, svfloat32_t op)
836 {
837 // CHECK-LABEL: test_svcvt_f16_f32_x
838 // CHECK: %[[PG:.*]] = call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> %pg)
839 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f32(<vscale x 8 x half> undef, <vscale x 4 x i1> %[[PG]], <vscale x 4 x float> %op)
840 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
841 return SVE_ACLE_FUNC(svcvt_f16,_f32,_x,)(pg, op);
842 }
843
test_svcvt_f16_f64_x(svbool_t pg,svfloat64_t op)844 svfloat16_t test_svcvt_f16_f64_x(svbool_t pg, svfloat64_t op)
845 {
846 // CHECK-LABEL: test_svcvt_f16_f64_x
847 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
848 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 8 x half> @llvm.aarch64.sve.fcvt.f16f64(<vscale x 8 x half> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
849 // CHECK: ret <vscale x 8 x half> %[[INTRINSIC]]
850 return SVE_ACLE_FUNC(svcvt_f16,_f64,_x,)(pg, op);
851 }
852
test_svcvt_f32_f64_z(svbool_t pg,svfloat64_t op)853 svfloat32_t test_svcvt_f32_f64_z(svbool_t pg, svfloat64_t op)
854 {
855 // CHECK-LABEL: test_svcvt_f32_f64_z
856 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
857 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f64(<vscale x 4 x float> zeroinitializer, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
858 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
859 return SVE_ACLE_FUNC(svcvt_f32,_f64,_z,)(pg, op);
860 }
861
test_svcvt_f32_f64_m(svfloat32_t inactive,svbool_t pg,svfloat64_t op)862 svfloat32_t test_svcvt_f32_f64_m(svfloat32_t inactive, svbool_t pg, svfloat64_t op)
863 {
864 // CHECK-LABEL: test_svcvt_f32_f64_m
865 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
866 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f64(<vscale x 4 x float> %inactive, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
867 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
868 return SVE_ACLE_FUNC(svcvt_f32,_f64,_m,)(inactive, pg, op);
869 }
870
test_svcvt_f32_f64_x(svbool_t pg,svfloat64_t op)871 svfloat32_t test_svcvt_f32_f64_x(svbool_t pg, svfloat64_t op)
872 {
873 // CHECK-LABEL: test_svcvt_f32_f64_x
874 // CHECK: %[[PG:.*]] = call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> %pg)
875 // CHECK: %[[INTRINSIC:.*]] = call <vscale x 4 x float> @llvm.aarch64.sve.fcvt.f32f64(<vscale x 4 x float> undef, <vscale x 2 x i1> %[[PG]], <vscale x 2 x double> %op)
876 // CHECK: ret <vscale x 4 x float> %[[INTRINSIC]]
877 return SVE_ACLE_FUNC(svcvt_f32,_f64,_x,)(pg, op);
878 }
879