1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
7 
8 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -o /dev/null %s
9 
10 #include <arm_sve.h>
11 
12 #ifdef SVE_OVERLOADED_FORMS
13 // A simple used,unused... macro, long enough to represent any SVE builtin.
14 #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3
15 #else
16 #define SVE_ACLE_FUNC(A1, A2, A3, A4) A1##A2##A3##A4
17 #endif
18 
19 // CHECK-LABEL: @test_svreinterpret_s8_bf16(
20 // CHECK-NEXT:  entry:
21 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
22 // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
23 //
24 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_s8_bf16u14__SVBFloat16_t(
25 // CPP-CHECK-NEXT:  entry:
26 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
27 // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
28 //
test_svreinterpret_s8_bf16(svbfloat16_t op)29 svint8_t test_svreinterpret_s8_bf16(svbfloat16_t op) {
30   return SVE_ACLE_FUNC(svreinterpret_s8, _bf16, , )(op);
31 }
32 
33 // CHECK-LABEL: @test_svreinterpret_s16_bf16(
34 // CHECK-NEXT:  entry:
35 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
36 // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
37 //
38 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s16_bf16u14__SVBFloat16_t(
39 // CPP-CHECK-NEXT:  entry:
40 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
41 // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
42 //
test_svreinterpret_s16_bf16(svbfloat16_t op)43 svint16_t test_svreinterpret_s16_bf16(svbfloat16_t op) {
44   return SVE_ACLE_FUNC(svreinterpret_s16, _bf16, , )(op);
45 }
46 
47 // CHECK-LABEL: @test_svreinterpret_s32_bf16(
48 // CHECK-NEXT:  entry:
49 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
50 // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
51 //
52 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s32_bf16u14__SVBFloat16_t(
53 // CPP-CHECK-NEXT:  entry:
54 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
55 // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
56 //
test_svreinterpret_s32_bf16(svbfloat16_t op)57 svint32_t test_svreinterpret_s32_bf16(svbfloat16_t op) {
58   return SVE_ACLE_FUNC(svreinterpret_s32, _bf16, , )(op);
59 }
60 // CHECK-LABEL: @test_svreinterpret_s64_bf16(
61 // CHECK-NEXT:  entry:
62 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
63 // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
64 //
65 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s64_bf16u14__SVBFloat16_t(
66 // CPP-CHECK-NEXT:  entry:
67 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
68 // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
69 //
test_svreinterpret_s64_bf16(svbfloat16_t op)70 svint64_t test_svreinterpret_s64_bf16(svbfloat16_t op) {
71   return SVE_ACLE_FUNC(svreinterpret_s64, _bf16, , )(op);
72 }
73 
74 // CHECK-LABEL: @test_svreinterpret_u8_bf16(
75 // CHECK-NEXT:  entry:
76 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
77 // CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
78 //
79 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_u8_bf16u14__SVBFloat16_t(
80 // CPP-CHECK-NEXT:  entry:
81 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
82 // CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]
83 //
test_svreinterpret_u8_bf16(svbfloat16_t op)84 svuint8_t test_svreinterpret_u8_bf16(svbfloat16_t op) {
85   return SVE_ACLE_FUNC(svreinterpret_u8, _bf16, , )(op);
86 }
87 
88 // CHECK-LABEL: @test_svreinterpret_u16_bf16(
89 // CHECK-NEXT:  entry:
90 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
91 // CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
92 //
93 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u16_bf16u14__SVBFloat16_t(
94 // CPP-CHECK-NEXT:  entry:
95 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
96 // CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP0]]
97 //
test_svreinterpret_u16_bf16(svbfloat16_t op)98 svuint16_t test_svreinterpret_u16_bf16(svbfloat16_t op) {
99   return SVE_ACLE_FUNC(svreinterpret_u16, _bf16, , )(op);
100 }
101 
102 // CHECK-LABEL: @test_svreinterpret_u32_bf16(
103 // CHECK-NEXT:  entry:
104 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
105 // CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
106 //
107 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u32_bf16u14__SVBFloat16_t(
108 // CPP-CHECK-NEXT:  entry:
109 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
110 // CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]
111 //
test_svreinterpret_u32_bf16(svbfloat16_t op)112 svuint32_t test_svreinterpret_u32_bf16(svbfloat16_t op) {
113   return SVE_ACLE_FUNC(svreinterpret_u32, _bf16, , )(op);
114 }
115 
116 // CHECK-LABEL: @test_svreinterpret_u64_bf16(
117 // CHECK-NEXT:  entry:
118 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
119 // CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
120 //
121 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u64_bf16u14__SVBFloat16_t(
122 // CPP-CHECK-NEXT:  entry:
123 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
124 // CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP0]]
125 //
test_svreinterpret_u64_bf16(svbfloat16_t op)126 svuint64_t test_svreinterpret_u64_bf16(svbfloat16_t op) {
127   return SVE_ACLE_FUNC(svreinterpret_u64, _bf16, , )(op);
128 }
129 
130 // CHECK-LABEL: @test_svreinterpret_bf16_s8(
131 // CHECK-NEXT:  entry:
132 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
133 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
134 //
135 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_bf16_s8u10__SVInt8_t(
136 // CPP-CHECK-NEXT:  entry:
137 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
138 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
139 //
test_svreinterpret_bf16_s8(svint8_t op)140 svbfloat16_t test_svreinterpret_bf16_s8(svint8_t op) {
141   return SVE_ACLE_FUNC(svreinterpret_bf16, _s8, , )(op);
142 }
143 
144 // CHECK-LABEL: @test_svreinterpret_bf16_s16(
145 // CHECK-NEXT:  entry:
146 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
147 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
148 //
149 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s16u11__SVInt16_t(
150 // CPP-CHECK-NEXT:  entry:
151 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
152 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
153 //
test_svreinterpret_bf16_s16(svint16_t op)154 svbfloat16_t test_svreinterpret_bf16_s16(svint16_t op) {
155   return SVE_ACLE_FUNC(svreinterpret_bf16, _s16, , )(op);
156 }
157 
158 // CHECK-LABEL: @test_svreinterpret_bf16_s32(
159 // CHECK-NEXT:  entry:
160 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
161 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
162 //
163 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s32u11__SVInt32_t(
164 // CPP-CHECK-NEXT:  entry:
165 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
166 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
167 //
test_svreinterpret_bf16_s32(svint32_t op)168 svbfloat16_t test_svreinterpret_bf16_s32(svint32_t op) {
169   return SVE_ACLE_FUNC(svreinterpret_bf16, _s32, , )(op);
170 }
171 
172 // CHECK-LABEL: @test_svreinterpret_bf16_s64(
173 // CHECK-NEXT:  entry:
174 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
175 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
176 //
177 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s64u11__SVInt64_t(
178 // CPP-CHECK-NEXT:  entry:
179 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
180 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
181 //
test_svreinterpret_bf16_s64(svint64_t op)182 svbfloat16_t test_svreinterpret_bf16_s64(svint64_t op) {
183   return SVE_ACLE_FUNC(svreinterpret_bf16, _s64, , )(op);
184 }
185 
186 // CHECK-LABEL: @test_svreinterpret_bf16_u8(
187 // CHECK-NEXT:  entry:
188 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
189 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
190 //
191 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_bf16_u8u11__SVUint8_t(
192 // CPP-CHECK-NEXT:  entry:
193 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
194 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
195 //
test_svreinterpret_bf16_u8(svuint8_t op)196 svbfloat16_t test_svreinterpret_bf16_u8(svuint8_t op) {
197   return SVE_ACLE_FUNC(svreinterpret_bf16, _u8, , )(op);
198 }
199 
200 // CHECK-LABEL: @test_svreinterpret_bf16_u16(
201 // CHECK-NEXT:  entry:
202 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
203 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
204 //
205 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u16u12__SVUint16_t(
206 // CPP-CHECK-NEXT:  entry:
207 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
208 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
209 //
test_svreinterpret_bf16_u16(svuint16_t op)210 svbfloat16_t test_svreinterpret_bf16_u16(svuint16_t op) {
211   return SVE_ACLE_FUNC(svreinterpret_bf16, _u16, , )(op);
212 }
213 
214 // CHECK-LABEL: @test_svreinterpret_bf16_u32(
215 // CHECK-NEXT:  entry:
216 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
217 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
218 //
219 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u32u12__SVUint32_t(
220 // CPP-CHECK-NEXT:  entry:
221 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
222 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
223 //
test_svreinterpret_bf16_u32(svuint32_t op)224 svbfloat16_t test_svreinterpret_bf16_u32(svuint32_t op) {
225   return SVE_ACLE_FUNC(svreinterpret_bf16, _u32, , )(op);
226 }
227 
228 // CHECK-LABEL: @test_svreinterpret_bf16_u64(
229 // CHECK-NEXT:  entry:
230 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
231 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
232 //
233 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u64u12__SVUint64_t(
234 // CPP-CHECK-NEXT:  entry:
235 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
236 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
237 //
test_svreinterpret_bf16_u64(svuint64_t op)238 svbfloat16_t test_svreinterpret_bf16_u64(svuint64_t op) {
239   return SVE_ACLE_FUNC(svreinterpret_bf16, _u64, , )(op);
240 }
241 
242 // CHECK-LABEL: @test_svreinterpret_bf16_bf16(
243 // CHECK-NEXT:  entry:
244 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[OP:%.*]]
245 //
246 // CPP-CHECK-LABEL: @_Z28test_svreinterpret_bf16_bf16u14__SVBFloat16_t(
247 // CPP-CHECK-NEXT:  entry:
248 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[OP:%.*]]
249 //
test_svreinterpret_bf16_bf16(svbfloat16_t op)250 svbfloat16_t test_svreinterpret_bf16_bf16(svbfloat16_t op) {
251   return SVE_ACLE_FUNC(svreinterpret_bf16, _bf16, , )(op);
252 }
253 
254 // CHECK-LABEL: @test_svreinterpret_bf16_f16(
255 // CHECK-NEXT:  entry:
256 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x half> [[OP:%.*]] to <vscale x 8 x bfloat>
257 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
258 //
259 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f16u13__SVFloat16_t(
260 // CPP-CHECK-NEXT:  entry:
261 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x half> [[OP:%.*]] to <vscale x 8 x bfloat>
262 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
263 //
test_svreinterpret_bf16_f16(svfloat16_t op)264 svbfloat16_t test_svreinterpret_bf16_f16(svfloat16_t op) {
265   return SVE_ACLE_FUNC(svreinterpret_bf16, _f16, , )(op);
266 }
267 
268 // CHECK-LABEL: @test_svreinterpret_bf16_f32(
269 // CHECK-NEXT:  entry:
270 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x float> [[OP:%.*]] to <vscale x 8 x bfloat>
271 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
272 //
273 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f32u13__SVFloat32_t(
274 // CPP-CHECK-NEXT:  entry:
275 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 4 x float> [[OP:%.*]] to <vscale x 8 x bfloat>
276 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
277 //
test_svreinterpret_bf16_f32(svfloat32_t op)278 svbfloat16_t test_svreinterpret_bf16_f32(svfloat32_t op) {
279   return SVE_ACLE_FUNC(svreinterpret_bf16, _f32, , )(op);
280 }
281 
282 // CHECK-LABEL: @test_svreinterpret_bf16_f64(
283 // CHECK-NEXT:  entry:
284 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x double> [[OP:%.*]] to <vscale x 8 x bfloat>
285 // CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
286 //
287 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f64u13__SVFloat64_t(
288 // CPP-CHECK-NEXT:  entry:
289 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 2 x double> [[OP:%.*]] to <vscale x 8 x bfloat>
290 // CPP-CHECK-NEXT:    ret <vscale x 8 x bfloat> [[TMP0]]
291 //
test_svreinterpret_bf16_f64(svfloat64_t op)292 svbfloat16_t test_svreinterpret_bf16_f64(svfloat64_t op) {
293   return SVE_ACLE_FUNC(svreinterpret_bf16, _f64, , )(op);
294 }
295 
296 // CHECK-LABEL: @test_svreinterpret_f32_bf16(
297 // CHECK-NEXT:  entry:
298 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x float>
299 // CHECK-NEXT:    ret <vscale x 4 x float> [[TMP0]]
300 //
301 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f32_bf16u14__SVBFloat16_t(
302 // CPP-CHECK-NEXT:  entry:
303 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x float>
304 // CPP-CHECK-NEXT:    ret <vscale x 4 x float> [[TMP0]]
305 //
test_svreinterpret_f32_bf16(svbfloat16_t op)306 svfloat32_t test_svreinterpret_f32_bf16(svbfloat16_t op) {
307   return SVE_ACLE_FUNC(svreinterpret_f32, _bf16, , )(op);
308 }
309 
310 // CHECK-LABEL: @test_svreinterpret_f16_bf16(
311 // CHECK-NEXT:  entry:
312 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x half>
313 // CHECK-NEXT:    ret <vscale x 8 x half> [[TMP0]]
314 //
315 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f16_bf16u14__SVBFloat16_t(
316 // CPP-CHECK-NEXT:  entry:
317 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x half>
318 // CPP-CHECK-NEXT:    ret <vscale x 8 x half> [[TMP0]]
319 //
test_svreinterpret_f16_bf16(svbfloat16_t op)320 svfloat16_t test_svreinterpret_f16_bf16(svbfloat16_t op) {
321   return SVE_ACLE_FUNC(svreinterpret_f16, _bf16, , )(op);
322 }
323 
324 // CHECK-LABEL: @test_svreinterpret_f64_bf16(
325 // CHECK-NEXT:  entry:
326 // CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x double>
327 // CHECK-NEXT:    ret <vscale x 2 x double> [[TMP0]]
328 //
329 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f64_bf16u14__SVBFloat16_t(
330 // CPP-CHECK-NEXT:  entry:
331 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x double>
332 // CPP-CHECK-NEXT:    ret <vscale x 2 x double> [[TMP0]]
333 //
test_svreinterpret_f64_bf16(svbfloat16_t op)334 svfloat64_t test_svreinterpret_f64_bf16(svbfloat16_t op) {
335   return SVE_ACLE_FUNC(svreinterpret_f64, _bf16, , )(op);
336 }
337