Debian Codegraph @

clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_reinterpret-bfloat.c

raw
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x2 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE2
5 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x3 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE3
6 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x4 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE4
7 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x2 -triple aarch64 -target-feature +sme -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE2
9 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x3 -triple aarch64 -target-feature +sme -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE3
10 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x4 -triple aarch64 -target-feature +sme -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE4
11 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x2 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE2
13 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x3 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE3
14 // RUN: %clang_cc1 -fclang-abi-compat=latest -DTUPLE=x4 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE4
15 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
16 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x2 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE2
17 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x3 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE3
18 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x4 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=TUPLE4
19 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
20 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x2 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE2
21 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x3 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE3
22 // RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -DTUPLE=x4 -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-TUPLE4
23
24 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
25 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
26
27 #include <arm_sve.h>
28
29 #if defined __ARM_FEATURE_SME
30 #define MODE_ATTR __arm_streaming
31 #else
32 #define MODE_ATTR
33 #endif
34
35 #ifdef TUPLE
36 #define TYPE_1(base,tuple) base ## tuple ## _t
37 #define TYPE_0(base,tuple) TYPE_1(base,tuple)
38 #define TYPE(base) TYPE_0(base,TUPLE)
39 #else
40 #define TYPE(base) base ## _t
41 #endif
42
43 #ifdef SVE_OVERLOADED_FORMS
44 #define SVE_ACLE_FUNC(A1,A2_UNUSED) A1
45 #else
46 #ifdef TUPLE
47 #define SVE_ACLE_FUNC_1(A1,A2,T) A1##A2##_##T
48 #define SVE_ACLE_FUNC_0(A1,A2,T) SVE_ACLE_FUNC_1(A1,A2,T)
49 #define SVE_ACLE_FUNC(A1,A2) SVE_ACLE_FUNC_0(A1,A2,TUPLE)
50 #else
51 #define SVE_ACLE_FUNC(A1,A2) A1##A2
52 #endif
53 #endif
54
55 // CHECK-LABEL: @test_svreinterpret_s8_bf16(
56 // CHECK-NEXT: entry:
57 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
58 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
59 //
60 // TUPLE2-LABEL: @test_svreinterpret_s8_bf16(
61 // TUPLE2-NEXT: entry:
62 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 32 x i8>
63 // TUPLE2-NEXT: ret <vscale x 32 x i8> [[TMP0]]
64 //
65 // TUPLE3-LABEL: @test_svreinterpret_s8_bf16(
66 // TUPLE3-NEXT: entry:
67 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 48 x i8>
68 // TUPLE3-NEXT: ret <vscale x 48 x i8> [[TMP0]]
69 //
70 // TUPLE4-LABEL: @test_svreinterpret_s8_bf16(
71 // TUPLE4-NEXT: entry:
72 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 64 x i8>
73 // TUPLE4-NEXT: ret <vscale x 64 x i8> [[TMP0]]
74 //
75 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_s8_bf16u14__SVBfloat16_t(
76 // CPP-CHECK-NEXT: entry:
77 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
78 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
79 //
80 // CPP-TUPLE2-LABEL: @_Z26test_svreinterpret_s8_bf1614svbfloat16x2_t(
81 // CPP-TUPLE2-NEXT: entry:
82 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 32 x i8>
83 // CPP-TUPLE2-NEXT: ret <vscale x 32 x i8> [[TMP0]]
84 //
85 // CPP-TUPLE3-LABEL: @_Z26test_svreinterpret_s8_bf1614svbfloat16x3_t(
86 // CPP-TUPLE3-NEXT: entry:
87 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 48 x i8>
88 // CPP-TUPLE3-NEXT: ret <vscale x 48 x i8> [[TMP0]]
89 //
90 // CPP-TUPLE4-LABEL: @_Z26test_svreinterpret_s8_bf1614svbfloat16x4_t(
91 // CPP-TUPLE4-NEXT: entry:
92 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 64 x i8>
93 // CPP-TUPLE4-NEXT: ret <vscale x 64 x i8> [[TMP0]]
94 //
95 TYPE(svint8) test_svreinterpret_s8_bf16(TYPE(svbfloat16) op) MODE_ATTR {
96 return SVE_ACLE_FUNC(svreinterpret_s8, _bf16)(op);
97 }
98
99 // CHECK-LABEL: @test_svreinterpret_s16_bf16(
100 // CHECK-NEXT: entry:
101 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
102 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
103 //
104 // TUPLE2-LABEL: @test_svreinterpret_s16_bf16(
105 // TUPLE2-NEXT: entry:
106 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x i16>
107 // TUPLE2-NEXT: ret <vscale x 16 x i16> [[TMP0]]
108 //
109 // TUPLE3-LABEL: @test_svreinterpret_s16_bf16(
110 // TUPLE3-NEXT: entry:
111 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x i16>
112 // TUPLE3-NEXT: ret <vscale x 24 x i16> [[TMP0]]
113 //
114 // TUPLE4-LABEL: @test_svreinterpret_s16_bf16(
115 // TUPLE4-NEXT: entry:
116 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x i16>
117 // TUPLE4-NEXT: ret <vscale x 32 x i16> [[TMP0]]
118 //
119 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s16_bf16u14__SVBfloat16_t(
120 // CPP-CHECK-NEXT: entry:
121 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
122 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
123 //
124 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_s16_bf1614svbfloat16x2_t(
125 // CPP-TUPLE2-NEXT: entry:
126 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x i16>
127 // CPP-TUPLE2-NEXT: ret <vscale x 16 x i16> [[TMP0]]
128 //
129 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_s16_bf1614svbfloat16x3_t(
130 // CPP-TUPLE3-NEXT: entry:
131 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x i16>
132 // CPP-TUPLE3-NEXT: ret <vscale x 24 x i16> [[TMP0]]
133 //
134 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_s16_bf1614svbfloat16x4_t(
135 // CPP-TUPLE4-NEXT: entry:
136 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x i16>
137 // CPP-TUPLE4-NEXT: ret <vscale x 32 x i16> [[TMP0]]
138 //
139 TYPE(svint16) test_svreinterpret_s16_bf16(TYPE(svbfloat16) op) MODE_ATTR {
140 return SVE_ACLE_FUNC(svreinterpret_s16, _bf16)(op);
141 }
142
143 // CHECK-LABEL: @test_svreinterpret_s32_bf16(
144 // CHECK-NEXT: entry:
145 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
146 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
147 //
148 // TUPLE2-LABEL: @test_svreinterpret_s32_bf16(
149 // TUPLE2-NEXT: entry:
150 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x i32>
151 // TUPLE2-NEXT: ret <vscale x 8 x i32> [[TMP0]]
152 //
153 // TUPLE3-LABEL: @test_svreinterpret_s32_bf16(
154 // TUPLE3-NEXT: entry:
155 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x i32>
156 // TUPLE3-NEXT: ret <vscale x 12 x i32> [[TMP0]]
157 //
158 // TUPLE4-LABEL: @test_svreinterpret_s32_bf16(
159 // TUPLE4-NEXT: entry:
160 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x i32>
161 // TUPLE4-NEXT: ret <vscale x 16 x i32> [[TMP0]]
162 //
163 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s32_bf16u14__SVBfloat16_t(
164 // CPP-CHECK-NEXT: entry:
165 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
166 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
167 //
168 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_s32_bf1614svbfloat16x2_t(
169 // CPP-TUPLE2-NEXT: entry:
170 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x i32>
171 // CPP-TUPLE2-NEXT: ret <vscale x 8 x i32> [[TMP0]]
172 //
173 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_s32_bf1614svbfloat16x3_t(
174 // CPP-TUPLE3-NEXT: entry:
175 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x i32>
176 // CPP-TUPLE3-NEXT: ret <vscale x 12 x i32> [[TMP0]]
177 //
178 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_s32_bf1614svbfloat16x4_t(
179 // CPP-TUPLE4-NEXT: entry:
180 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x i32>
181 // CPP-TUPLE4-NEXT: ret <vscale x 16 x i32> [[TMP0]]
182 //
183 TYPE(svint32) test_svreinterpret_s32_bf16(TYPE(svbfloat16) op) MODE_ATTR {
184 return SVE_ACLE_FUNC(svreinterpret_s32, _bf16)(op);
185 }
186 // CHECK-LABEL: @test_svreinterpret_s64_bf16(
187 // CHECK-NEXT: entry:
188 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
189 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
190 //
191 // TUPLE2-LABEL: @test_svreinterpret_s64_bf16(
192 // TUPLE2-NEXT: entry:
193 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x i64>
194 // TUPLE2-NEXT: ret <vscale x 4 x i64> [[TMP0]]
195 //
196 // TUPLE3-LABEL: @test_svreinterpret_s64_bf16(
197 // TUPLE3-NEXT: entry:
198 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x i64>
199 // TUPLE3-NEXT: ret <vscale x 6 x i64> [[TMP0]]
200 //
201 // TUPLE4-LABEL: @test_svreinterpret_s64_bf16(
202 // TUPLE4-NEXT: entry:
203 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x i64>
204 // TUPLE4-NEXT: ret <vscale x 8 x i64> [[TMP0]]
205 //
206 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_s64_bf16u14__SVBfloat16_t(
207 // CPP-CHECK-NEXT: entry:
208 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
209 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
210 //
211 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_s64_bf1614svbfloat16x2_t(
212 // CPP-TUPLE2-NEXT: entry:
213 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x i64>
214 // CPP-TUPLE2-NEXT: ret <vscale x 4 x i64> [[TMP0]]
215 //
216 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_s64_bf1614svbfloat16x3_t(
217 // CPP-TUPLE3-NEXT: entry:
218 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x i64>
219 // CPP-TUPLE3-NEXT: ret <vscale x 6 x i64> [[TMP0]]
220 //
221 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_s64_bf1614svbfloat16x4_t(
222 // CPP-TUPLE4-NEXT: entry:
223 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x i64>
224 // CPP-TUPLE4-NEXT: ret <vscale x 8 x i64> [[TMP0]]
225 //
226 TYPE(svint64) test_svreinterpret_s64_bf16(TYPE(svbfloat16) op) MODE_ATTR {
227 return SVE_ACLE_FUNC(svreinterpret_s64, _bf16)(op);
228 }
229
230 // CHECK-LABEL: @test_svreinterpret_u8_bf16(
231 // CHECK-NEXT: entry:
232 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
233 // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
234 //
235 // TUPLE2-LABEL: @test_svreinterpret_u8_bf16(
236 // TUPLE2-NEXT: entry:
237 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 32 x i8>
238 // TUPLE2-NEXT: ret <vscale x 32 x i8> [[TMP0]]
239 //
240 // TUPLE3-LABEL: @test_svreinterpret_u8_bf16(
241 // TUPLE3-NEXT: entry:
242 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 48 x i8>
243 // TUPLE3-NEXT: ret <vscale x 48 x i8> [[TMP0]]
244 //
245 // TUPLE4-LABEL: @test_svreinterpret_u8_bf16(
246 // TUPLE4-NEXT: entry:
247 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 64 x i8>
248 // TUPLE4-NEXT: ret <vscale x 64 x i8> [[TMP0]]
249 //
250 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_u8_bf16u14__SVBfloat16_t(
251 // CPP-CHECK-NEXT: entry:
252 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 16 x i8>
253 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
254 //
255 // CPP-TUPLE2-LABEL: @_Z26test_svreinterpret_u8_bf1614svbfloat16x2_t(
256 // CPP-TUPLE2-NEXT: entry:
257 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 32 x i8>
258 // CPP-TUPLE2-NEXT: ret <vscale x 32 x i8> [[TMP0]]
259 //
260 // CPP-TUPLE3-LABEL: @_Z26test_svreinterpret_u8_bf1614svbfloat16x3_t(
261 // CPP-TUPLE3-NEXT: entry:
262 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 48 x i8>
263 // CPP-TUPLE3-NEXT: ret <vscale x 48 x i8> [[TMP0]]
264 //
265 // CPP-TUPLE4-LABEL: @_Z26test_svreinterpret_u8_bf1614svbfloat16x4_t(
266 // CPP-TUPLE4-NEXT: entry:
267 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 64 x i8>
268 // CPP-TUPLE4-NEXT: ret <vscale x 64 x i8> [[TMP0]]
269 //
270 TYPE(svuint8) test_svreinterpret_u8_bf16(TYPE(svbfloat16) op) MODE_ATTR {
271 return SVE_ACLE_FUNC(svreinterpret_u8, _bf16)(op);
272 }
273
274 // CHECK-LABEL: @test_svreinterpret_u16_bf16(
275 // CHECK-NEXT: entry:
276 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
277 // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
278 //
279 // TUPLE2-LABEL: @test_svreinterpret_u16_bf16(
280 // TUPLE2-NEXT: entry:
281 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x i16>
282 // TUPLE2-NEXT: ret <vscale x 16 x i16> [[TMP0]]
283 //
284 // TUPLE3-LABEL: @test_svreinterpret_u16_bf16(
285 // TUPLE3-NEXT: entry:
286 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x i16>
287 // TUPLE3-NEXT: ret <vscale x 24 x i16> [[TMP0]]
288 //
289 // TUPLE4-LABEL: @test_svreinterpret_u16_bf16(
290 // TUPLE4-NEXT: entry:
291 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x i16>
292 // TUPLE4-NEXT: ret <vscale x 32 x i16> [[TMP0]]
293 //
294 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u16_bf16u14__SVBfloat16_t(
295 // CPP-CHECK-NEXT: entry:
296 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x i16>
297 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
298 //
299 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_u16_bf1614svbfloat16x2_t(
300 // CPP-TUPLE2-NEXT: entry:
301 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x i16>
302 // CPP-TUPLE2-NEXT: ret <vscale x 16 x i16> [[TMP0]]
303 //
304 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_u16_bf1614svbfloat16x3_t(
305 // CPP-TUPLE3-NEXT: entry:
306 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x i16>
307 // CPP-TUPLE3-NEXT: ret <vscale x 24 x i16> [[TMP0]]
308 //
309 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_u16_bf1614svbfloat16x4_t(
310 // CPP-TUPLE4-NEXT: entry:
311 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x i16>
312 // CPP-TUPLE4-NEXT: ret <vscale x 32 x i16> [[TMP0]]
313 //
314 TYPE(svuint16) test_svreinterpret_u16_bf16(TYPE(svbfloat16) op) MODE_ATTR {
315 return SVE_ACLE_FUNC(svreinterpret_u16, _bf16)(op);
316 }
317
318 // CHECK-LABEL: @test_svreinterpret_u32_bf16(
319 // CHECK-NEXT: entry:
320 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
321 // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
322 //
323 // TUPLE2-LABEL: @test_svreinterpret_u32_bf16(
324 // TUPLE2-NEXT: entry:
325 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x i32>
326 // TUPLE2-NEXT: ret <vscale x 8 x i32> [[TMP0]]
327 //
328 // TUPLE3-LABEL: @test_svreinterpret_u32_bf16(
329 // TUPLE3-NEXT: entry:
330 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x i32>
331 // TUPLE3-NEXT: ret <vscale x 12 x i32> [[TMP0]]
332 //
333 // TUPLE4-LABEL: @test_svreinterpret_u32_bf16(
334 // TUPLE4-NEXT: entry:
335 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x i32>
336 // TUPLE4-NEXT: ret <vscale x 16 x i32> [[TMP0]]
337 //
338 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u32_bf16u14__SVBfloat16_t(
339 // CPP-CHECK-NEXT: entry:
340 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x i32>
341 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]]
342 //
343 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_u32_bf1614svbfloat16x2_t(
344 // CPP-TUPLE2-NEXT: entry:
345 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x i32>
346 // CPP-TUPLE2-NEXT: ret <vscale x 8 x i32> [[TMP0]]
347 //
348 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_u32_bf1614svbfloat16x3_t(
349 // CPP-TUPLE3-NEXT: entry:
350 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x i32>
351 // CPP-TUPLE3-NEXT: ret <vscale x 12 x i32> [[TMP0]]
352 //
353 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_u32_bf1614svbfloat16x4_t(
354 // CPP-TUPLE4-NEXT: entry:
355 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x i32>
356 // CPP-TUPLE4-NEXT: ret <vscale x 16 x i32> [[TMP0]]
357 //
358 TYPE(svuint32) test_svreinterpret_u32_bf16(TYPE(svbfloat16) op) MODE_ATTR {
359 return SVE_ACLE_FUNC(svreinterpret_u32, _bf16)(op);
360 }
361
362 // CHECK-LABEL: @test_svreinterpret_u64_bf16(
363 // CHECK-NEXT: entry:
364 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
365 // CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
366 //
367 // TUPLE2-LABEL: @test_svreinterpret_u64_bf16(
368 // TUPLE2-NEXT: entry:
369 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x i64>
370 // TUPLE2-NEXT: ret <vscale x 4 x i64> [[TMP0]]
371 //
372 // TUPLE3-LABEL: @test_svreinterpret_u64_bf16(
373 // TUPLE3-NEXT: entry:
374 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x i64>
375 // TUPLE3-NEXT: ret <vscale x 6 x i64> [[TMP0]]
376 //
377 // TUPLE4-LABEL: @test_svreinterpret_u64_bf16(
378 // TUPLE4-NEXT: entry:
379 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x i64>
380 // TUPLE4-NEXT: ret <vscale x 8 x i64> [[TMP0]]
381 //
382 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_u64_bf16u14__SVBfloat16_t(
383 // CPP-CHECK-NEXT: entry:
384 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x i64>
385 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]
386 //
387 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_u64_bf1614svbfloat16x2_t(
388 // CPP-TUPLE2-NEXT: entry:
389 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x i64>
390 // CPP-TUPLE2-NEXT: ret <vscale x 4 x i64> [[TMP0]]
391 //
392 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_u64_bf1614svbfloat16x3_t(
393 // CPP-TUPLE3-NEXT: entry:
394 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x i64>
395 // CPP-TUPLE3-NEXT: ret <vscale x 6 x i64> [[TMP0]]
396 //
397 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_u64_bf1614svbfloat16x4_t(
398 // CPP-TUPLE4-NEXT: entry:
399 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x i64>
400 // CPP-TUPLE4-NEXT: ret <vscale x 8 x i64> [[TMP0]]
401 //
402 TYPE(svuint64) test_svreinterpret_u64_bf16(TYPE(svbfloat16) op) MODE_ATTR {
403 return SVE_ACLE_FUNC(svreinterpret_u64, _bf16)(op);
404 }
405
406 // CHECK-LABEL: @test_svreinterpret_bf16_s8(
407 // CHECK-NEXT: entry:
408 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
409 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
410 //
411 // TUPLE2-LABEL: @test_svreinterpret_bf16_s8(
412 // TUPLE2-NEXT: entry:
413 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i8> [[OP:%.*]] to <vscale x 16 x bfloat>
414 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
415 //
416 // TUPLE3-LABEL: @test_svreinterpret_bf16_s8(
417 // TUPLE3-NEXT: entry:
418 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 48 x i8> [[OP:%.*]] to <vscale x 24 x bfloat>
419 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
420 //
421 // TUPLE4-LABEL: @test_svreinterpret_bf16_s8(
422 // TUPLE4-NEXT: entry:
423 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 64 x i8> [[OP:%.*]] to <vscale x 32 x bfloat>
424 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
425 //
426 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_bf16_s8u10__SVInt8_t(
427 // CPP-CHECK-NEXT: entry:
428 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
429 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
430 //
431 // CPP-TUPLE2-LABEL: @_Z26test_svreinterpret_bf16_s810svint8x2_t(
432 // CPP-TUPLE2-NEXT: entry:
433 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i8> [[OP:%.*]] to <vscale x 16 x bfloat>
434 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
435 //
436 // CPP-TUPLE3-LABEL: @_Z26test_svreinterpret_bf16_s810svint8x3_t(
437 // CPP-TUPLE3-NEXT: entry:
438 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 48 x i8> [[OP:%.*]] to <vscale x 24 x bfloat>
439 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
440 //
441 // CPP-TUPLE4-LABEL: @_Z26test_svreinterpret_bf16_s810svint8x4_t(
442 // CPP-TUPLE4-NEXT: entry:
443 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 64 x i8> [[OP:%.*]] to <vscale x 32 x bfloat>
444 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
445 //
446 TYPE(svbfloat16) test_svreinterpret_bf16_s8(TYPE(svint8) op) MODE_ATTR {
447 return SVE_ACLE_FUNC(svreinterpret_bf16, _s8)(op);
448 }
449
450 // CHECK-LABEL: @test_svreinterpret_bf16_s16(
451 // CHECK-NEXT: entry:
452 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
453 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
454 //
455 // TUPLE2-LABEL: @test_svreinterpret_bf16_s16(
456 // TUPLE2-NEXT: entry:
457 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i16> [[OP:%.*]] to <vscale x 16 x bfloat>
458 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
459 //
460 // TUPLE3-LABEL: @test_svreinterpret_bf16_s16(
461 // TUPLE3-NEXT: entry:
462 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x i16> [[OP:%.*]] to <vscale x 24 x bfloat>
463 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
464 //
465 // TUPLE4-LABEL: @test_svreinterpret_bf16_s16(
466 // TUPLE4-NEXT: entry:
467 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i16> [[OP:%.*]] to <vscale x 32 x bfloat>
468 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
469 //
470 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s16u11__SVInt16_t(
471 // CPP-CHECK-NEXT: entry:
472 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
473 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
474 //
475 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_s1611svint16x2_t(
476 // CPP-TUPLE2-NEXT: entry:
477 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i16> [[OP:%.*]] to <vscale x 16 x bfloat>
478 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
479 //
480 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_s1611svint16x3_t(
481 // CPP-TUPLE3-NEXT: entry:
482 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x i16> [[OP:%.*]] to <vscale x 24 x bfloat>
483 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
484 //
485 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_s1611svint16x4_t(
486 // CPP-TUPLE4-NEXT: entry:
487 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i16> [[OP:%.*]] to <vscale x 32 x bfloat>
488 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
489 //
490 TYPE(svbfloat16) test_svreinterpret_bf16_s16(TYPE(svint16) op) MODE_ATTR {
491 return SVE_ACLE_FUNC(svreinterpret_bf16, _s16)(op);
492 }
493
494 // CHECK-LABEL: @test_svreinterpret_bf16_s32(
495 // CHECK-NEXT: entry:
496 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
497 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
498 //
499 // TUPLE2-LABEL: @test_svreinterpret_bf16_s32(
500 // TUPLE2-NEXT: entry:
501 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i32> [[OP:%.*]] to <vscale x 16 x bfloat>
502 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
503 //
504 // TUPLE3-LABEL: @test_svreinterpret_bf16_s32(
505 // TUPLE3-NEXT: entry:
506 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x i32> [[OP:%.*]] to <vscale x 24 x bfloat>
507 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
508 //
509 // TUPLE4-LABEL: @test_svreinterpret_bf16_s32(
510 // TUPLE4-NEXT: entry:
511 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i32> [[OP:%.*]] to <vscale x 32 x bfloat>
512 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
513 //
514 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s32u11__SVInt32_t(
515 // CPP-CHECK-NEXT: entry:
516 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
517 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
518 //
519 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_s3211svint32x2_t(
520 // CPP-TUPLE2-NEXT: entry:
521 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i32> [[OP:%.*]] to <vscale x 16 x bfloat>
522 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
523 //
524 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_s3211svint32x3_t(
525 // CPP-TUPLE3-NEXT: entry:
526 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x i32> [[OP:%.*]] to <vscale x 24 x bfloat>
527 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
528 //
529 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_s3211svint32x4_t(
530 // CPP-TUPLE4-NEXT: entry:
531 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i32> [[OP:%.*]] to <vscale x 32 x bfloat>
532 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
533 //
534 TYPE(svbfloat16) test_svreinterpret_bf16_s32(TYPE(svint32) op) MODE_ATTR {
535 return SVE_ACLE_FUNC(svreinterpret_bf16, _s32)(op);
536 }
537
538 // CHECK-LABEL: @test_svreinterpret_bf16_s64(
539 // CHECK-NEXT: entry:
540 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
541 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
542 //
543 // TUPLE2-LABEL: @test_svreinterpret_bf16_s64(
544 // TUPLE2-NEXT: entry:
545 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i64> [[OP:%.*]] to <vscale x 16 x bfloat>
546 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
547 //
548 // TUPLE3-LABEL: @test_svreinterpret_bf16_s64(
549 // TUPLE3-NEXT: entry:
550 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x i64> [[OP:%.*]] to <vscale x 24 x bfloat>
551 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
552 //
553 // TUPLE4-LABEL: @test_svreinterpret_bf16_s64(
554 // TUPLE4-NEXT: entry:
555 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i64> [[OP:%.*]] to <vscale x 32 x bfloat>
556 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
557 //
558 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_s64u11__SVInt64_t(
559 // CPP-CHECK-NEXT: entry:
560 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
561 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
562 //
563 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_s6411svint64x2_t(
564 // CPP-TUPLE2-NEXT: entry:
565 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i64> [[OP:%.*]] to <vscale x 16 x bfloat>
566 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
567 //
568 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_s6411svint64x3_t(
569 // CPP-TUPLE3-NEXT: entry:
570 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x i64> [[OP:%.*]] to <vscale x 24 x bfloat>
571 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
572 //
573 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_s6411svint64x4_t(
574 // CPP-TUPLE4-NEXT: entry:
575 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i64> [[OP:%.*]] to <vscale x 32 x bfloat>
576 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
577 //
578 TYPE(svbfloat16) test_svreinterpret_bf16_s64(TYPE(svint64) op) MODE_ATTR {
579 return SVE_ACLE_FUNC(svreinterpret_bf16, _s64)(op);
580 }
581
582 // CHECK-LABEL: @test_svreinterpret_bf16_u8(
583 // CHECK-NEXT: entry:
584 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
585 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
586 //
587 // TUPLE2-LABEL: @test_svreinterpret_bf16_u8(
588 // TUPLE2-NEXT: entry:
589 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i8> [[OP:%.*]] to <vscale x 16 x bfloat>
590 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
591 //
592 // TUPLE3-LABEL: @test_svreinterpret_bf16_u8(
593 // TUPLE3-NEXT: entry:
594 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 48 x i8> [[OP:%.*]] to <vscale x 24 x bfloat>
595 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
596 //
597 // TUPLE4-LABEL: @test_svreinterpret_bf16_u8(
598 // TUPLE4-NEXT: entry:
599 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 64 x i8> [[OP:%.*]] to <vscale x 32 x bfloat>
600 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
601 //
602 // CPP-CHECK-LABEL: @_Z26test_svreinterpret_bf16_u8u11__SVUint8_t(
603 // CPP-CHECK-NEXT: entry:
604 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i8> [[OP:%.*]] to <vscale x 8 x bfloat>
605 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
606 //
607 // CPP-TUPLE2-LABEL: @_Z26test_svreinterpret_bf16_u811svuint8x2_t(
608 // CPP-TUPLE2-NEXT: entry:
609 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i8> [[OP:%.*]] to <vscale x 16 x bfloat>
610 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
611 //
612 // CPP-TUPLE3-LABEL: @_Z26test_svreinterpret_bf16_u811svuint8x3_t(
613 // CPP-TUPLE3-NEXT: entry:
614 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 48 x i8> [[OP:%.*]] to <vscale x 24 x bfloat>
615 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
616 //
617 // CPP-TUPLE4-LABEL: @_Z26test_svreinterpret_bf16_u811svuint8x4_t(
618 // CPP-TUPLE4-NEXT: entry:
619 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 64 x i8> [[OP:%.*]] to <vscale x 32 x bfloat>
620 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
621 //
622 TYPE(svbfloat16) test_svreinterpret_bf16_u8(TYPE(svuint8) op) MODE_ATTR {
623 return SVE_ACLE_FUNC(svreinterpret_bf16, _u8)(op);
624 }
625
626 // CHECK-LABEL: @test_svreinterpret_bf16_u16(
627 // CHECK-NEXT: entry:
628 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
629 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
630 //
631 // TUPLE2-LABEL: @test_svreinterpret_bf16_u16(
632 // TUPLE2-NEXT: entry:
633 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i16> [[OP:%.*]] to <vscale x 16 x bfloat>
634 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
635 //
636 // TUPLE3-LABEL: @test_svreinterpret_bf16_u16(
637 // TUPLE3-NEXT: entry:
638 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x i16> [[OP:%.*]] to <vscale x 24 x bfloat>
639 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
640 //
641 // TUPLE4-LABEL: @test_svreinterpret_bf16_u16(
642 // TUPLE4-NEXT: entry:
643 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i16> [[OP:%.*]] to <vscale x 32 x bfloat>
644 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
645 //
646 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u16u12__SVUint16_t(
647 // CPP-CHECK-NEXT: entry:
648 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i16> [[OP:%.*]] to <vscale x 8 x bfloat>
649 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
650 //
651 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_u1612svuint16x2_t(
652 // CPP-TUPLE2-NEXT: entry:
653 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i16> [[OP:%.*]] to <vscale x 16 x bfloat>
654 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
655 //
656 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_u1612svuint16x3_t(
657 // CPP-TUPLE3-NEXT: entry:
658 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x i16> [[OP:%.*]] to <vscale x 24 x bfloat>
659 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
660 //
661 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_u1612svuint16x4_t(
662 // CPP-TUPLE4-NEXT: entry:
663 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x i16> [[OP:%.*]] to <vscale x 32 x bfloat>
664 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
665 //
666 TYPE(svbfloat16) test_svreinterpret_bf16_u16(TYPE(svuint16) op) MODE_ATTR {
667 return SVE_ACLE_FUNC(svreinterpret_bf16, _u16)(op);
668 }
669
670 // CHECK-LABEL: @test_svreinterpret_bf16_u32(
671 // CHECK-NEXT: entry:
672 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
673 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
674 //
675 // TUPLE2-LABEL: @test_svreinterpret_bf16_u32(
676 // TUPLE2-NEXT: entry:
677 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i32> [[OP:%.*]] to <vscale x 16 x bfloat>
678 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
679 //
680 // TUPLE3-LABEL: @test_svreinterpret_bf16_u32(
681 // TUPLE3-NEXT: entry:
682 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x i32> [[OP:%.*]] to <vscale x 24 x bfloat>
683 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
684 //
685 // TUPLE4-LABEL: @test_svreinterpret_bf16_u32(
686 // TUPLE4-NEXT: entry:
687 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i32> [[OP:%.*]] to <vscale x 32 x bfloat>
688 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
689 //
690 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u32u12__SVUint32_t(
691 // CPP-CHECK-NEXT: entry:
692 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i32> [[OP:%.*]] to <vscale x 8 x bfloat>
693 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
694 //
695 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_u3212svuint32x2_t(
696 // CPP-TUPLE2-NEXT: entry:
697 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i32> [[OP:%.*]] to <vscale x 16 x bfloat>
698 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
699 //
700 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_u3212svuint32x3_t(
701 // CPP-TUPLE3-NEXT: entry:
702 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x i32> [[OP:%.*]] to <vscale x 24 x bfloat>
703 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
704 //
705 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_u3212svuint32x4_t(
706 // CPP-TUPLE4-NEXT: entry:
707 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x i32> [[OP:%.*]] to <vscale x 32 x bfloat>
708 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
709 //
710 TYPE(svbfloat16) test_svreinterpret_bf16_u32(TYPE(svuint32) op) MODE_ATTR {
711 return SVE_ACLE_FUNC(svreinterpret_bf16, _u32)(op);
712 }
713
714 // CHECK-LABEL: @test_svreinterpret_bf16_u64(
715 // CHECK-NEXT: entry:
716 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
717 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
718 //
719 // TUPLE2-LABEL: @test_svreinterpret_bf16_u64(
720 // TUPLE2-NEXT: entry:
721 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i64> [[OP:%.*]] to <vscale x 16 x bfloat>
722 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
723 //
724 // TUPLE3-LABEL: @test_svreinterpret_bf16_u64(
725 // TUPLE3-NEXT: entry:
726 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x i64> [[OP:%.*]] to <vscale x 24 x bfloat>
727 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
728 //
729 // TUPLE4-LABEL: @test_svreinterpret_bf16_u64(
730 // TUPLE4-NEXT: entry:
731 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i64> [[OP:%.*]] to <vscale x 32 x bfloat>
732 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
733 //
734 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_u64u12__SVUint64_t(
735 // CPP-CHECK-NEXT: entry:
736 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x i64> [[OP:%.*]] to <vscale x 8 x bfloat>
737 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
738 //
739 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_u6412svuint64x2_t(
740 // CPP-TUPLE2-NEXT: entry:
741 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x i64> [[OP:%.*]] to <vscale x 16 x bfloat>
742 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
743 //
744 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_u6412svuint64x3_t(
745 // CPP-TUPLE3-NEXT: entry:
746 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x i64> [[OP:%.*]] to <vscale x 24 x bfloat>
747 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
748 //
749 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_u6412svuint64x4_t(
750 // CPP-TUPLE4-NEXT: entry:
751 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x i64> [[OP:%.*]] to <vscale x 32 x bfloat>
752 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
753 //
754 TYPE(svbfloat16) test_svreinterpret_bf16_u64(TYPE(svuint64) op) MODE_ATTR {
755 return SVE_ACLE_FUNC(svreinterpret_bf16, _u64)(op);
756 }
757
758 // CHECK-LABEL: @test_svreinterpret_bf16_bf16(
759 // CHECK-NEXT: entry:
760 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[OP:%.*]]
761 //
762 // TUPLE2-LABEL: @test_svreinterpret_bf16_bf16(
763 // TUPLE2-NEXT: entry:
764 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[OP:%.*]]
765 //
766 // TUPLE3-LABEL: @test_svreinterpret_bf16_bf16(
767 // TUPLE3-NEXT: entry:
768 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[OP:%.*]]
769 //
770 // TUPLE4-LABEL: @test_svreinterpret_bf16_bf16(
771 // TUPLE4-NEXT: entry:
772 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[OP:%.*]]
773 //
774 // CPP-CHECK-LABEL: @_Z28test_svreinterpret_bf16_bf16u14__SVBfloat16_t(
775 // CPP-CHECK-NEXT: entry:
776 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[OP:%.*]]
777 //
778 // CPP-TUPLE2-LABEL: @_Z28test_svreinterpret_bf16_bf1614svbfloat16x2_t(
779 // CPP-TUPLE2-NEXT: entry:
780 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[OP:%.*]]
781 //
782 // CPP-TUPLE3-LABEL: @_Z28test_svreinterpret_bf16_bf1614svbfloat16x3_t(
783 // CPP-TUPLE3-NEXT: entry:
784 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[OP:%.*]]
785 //
786 // CPP-TUPLE4-LABEL: @_Z28test_svreinterpret_bf16_bf1614svbfloat16x4_t(
787 // CPP-TUPLE4-NEXT: entry:
788 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[OP:%.*]]
789 //
790 TYPE(svbfloat16) test_svreinterpret_bf16_bf16(TYPE(svbfloat16) op) MODE_ATTR {
791 return SVE_ACLE_FUNC(svreinterpret_bf16, _bf16)(op);
792 }
793
794 // CHECK-LABEL: @test_svreinterpret_bf16_f16(
795 // CHECK-NEXT: entry:
796 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x half> [[OP:%.*]] to <vscale x 8 x bfloat>
797 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
798 //
799 // TUPLE2-LABEL: @test_svreinterpret_bf16_f16(
800 // TUPLE2-NEXT: entry:
801 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x half> [[OP:%.*]] to <vscale x 16 x bfloat>
802 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
803 //
804 // TUPLE3-LABEL: @test_svreinterpret_bf16_f16(
805 // TUPLE3-NEXT: entry:
806 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x half> [[OP:%.*]] to <vscale x 24 x bfloat>
807 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
808 //
809 // TUPLE4-LABEL: @test_svreinterpret_bf16_f16(
810 // TUPLE4-NEXT: entry:
811 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x half> [[OP:%.*]] to <vscale x 32 x bfloat>
812 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
813 //
814 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f16u13__SVFloat16_t(
815 // CPP-CHECK-NEXT: entry:
816 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x half> [[OP:%.*]] to <vscale x 8 x bfloat>
817 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
818 //
819 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_f1613svfloat16x2_t(
820 // CPP-TUPLE2-NEXT: entry:
821 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x half> [[OP:%.*]] to <vscale x 16 x bfloat>
822 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
823 //
824 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_f1613svfloat16x3_t(
825 // CPP-TUPLE3-NEXT: entry:
826 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x half> [[OP:%.*]] to <vscale x 24 x bfloat>
827 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
828 //
829 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_f1613svfloat16x4_t(
830 // CPP-TUPLE4-NEXT: entry:
831 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x half> [[OP:%.*]] to <vscale x 32 x bfloat>
832 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
833 //
834 TYPE(svbfloat16) test_svreinterpret_bf16_f16(TYPE(svfloat16) op) MODE_ATTR {
835 return SVE_ACLE_FUNC(svreinterpret_bf16, _f16)(op);
836 }
837
838 // CHECK-LABEL: @test_svreinterpret_bf16_f32(
839 // CHECK-NEXT: entry:
840 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x float> [[OP:%.*]] to <vscale x 8 x bfloat>
841 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
842 //
843 // TUPLE2-LABEL: @test_svreinterpret_bf16_f32(
844 // TUPLE2-NEXT: entry:
845 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x float> [[OP:%.*]] to <vscale x 16 x bfloat>
846 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
847 //
848 // TUPLE3-LABEL: @test_svreinterpret_bf16_f32(
849 // TUPLE3-NEXT: entry:
850 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x float> [[OP:%.*]] to <vscale x 24 x bfloat>
851 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
852 //
853 // TUPLE4-LABEL: @test_svreinterpret_bf16_f32(
854 // TUPLE4-NEXT: entry:
855 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x float> [[OP:%.*]] to <vscale x 32 x bfloat>
856 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
857 //
858 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f32u13__SVFloat32_t(
859 // CPP-CHECK-NEXT: entry:
860 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x float> [[OP:%.*]] to <vscale x 8 x bfloat>
861 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
862 //
863 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_f3213svfloat32x2_t(
864 // CPP-TUPLE2-NEXT: entry:
865 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x float> [[OP:%.*]] to <vscale x 16 x bfloat>
866 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
867 //
868 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_f3213svfloat32x3_t(
869 // CPP-TUPLE3-NEXT: entry:
870 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 12 x float> [[OP:%.*]] to <vscale x 24 x bfloat>
871 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
872 //
873 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_f3213svfloat32x4_t(
874 // CPP-TUPLE4-NEXT: entry:
875 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x float> [[OP:%.*]] to <vscale x 32 x bfloat>
876 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
877 //
878 TYPE(svbfloat16) test_svreinterpret_bf16_f32(TYPE(svfloat32) op) MODE_ATTR {
879 return SVE_ACLE_FUNC(svreinterpret_bf16, _f32)(op);
880 }
881
882 // CHECK-LABEL: @test_svreinterpret_bf16_f64(
883 // CHECK-NEXT: entry:
884 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x double> [[OP:%.*]] to <vscale x 8 x bfloat>
885 // CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
886 //
887 // TUPLE2-LABEL: @test_svreinterpret_bf16_f64(
888 // TUPLE2-NEXT: entry:
889 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x double> [[OP:%.*]] to <vscale x 16 x bfloat>
890 // TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
891 //
892 // TUPLE3-LABEL: @test_svreinterpret_bf16_f64(
893 // TUPLE3-NEXT: entry:
894 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x double> [[OP:%.*]] to <vscale x 24 x bfloat>
895 // TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
896 //
897 // TUPLE4-LABEL: @test_svreinterpret_bf16_f64(
898 // TUPLE4-NEXT: entry:
899 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x double> [[OP:%.*]] to <vscale x 32 x bfloat>
900 // TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
901 //
902 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_bf16_f64u13__SVFloat64_t(
903 // CPP-CHECK-NEXT: entry:
904 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 2 x double> [[OP:%.*]] to <vscale x 8 x bfloat>
905 // CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
906 //
907 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_bf16_f6413svfloat64x2_t(
908 // CPP-TUPLE2-NEXT: entry:
909 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 4 x double> [[OP:%.*]] to <vscale x 16 x bfloat>
910 // CPP-TUPLE2-NEXT: ret <vscale x 16 x bfloat> [[TMP0]]
911 //
912 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_bf16_f6413svfloat64x3_t(
913 // CPP-TUPLE3-NEXT: entry:
914 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 6 x double> [[OP:%.*]] to <vscale x 24 x bfloat>
915 // CPP-TUPLE3-NEXT: ret <vscale x 24 x bfloat> [[TMP0]]
916 //
917 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_bf16_f6413svfloat64x4_t(
918 // CPP-TUPLE4-NEXT: entry:
919 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x double> [[OP:%.*]] to <vscale x 32 x bfloat>
920 // CPP-TUPLE4-NEXT: ret <vscale x 32 x bfloat> [[TMP0]]
921 //
922 TYPE(svbfloat16) test_svreinterpret_bf16_f64(TYPE(svfloat64) op) MODE_ATTR {
923 return SVE_ACLE_FUNC(svreinterpret_bf16, _f64)(op);
924 }
925
926 // CHECK-LABEL: @test_svreinterpret_f32_bf16(
927 // CHECK-NEXT: entry:
928 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x float>
929 // CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
930 //
931 // TUPLE2-LABEL: @test_svreinterpret_f32_bf16(
932 // TUPLE2-NEXT: entry:
933 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x float>
934 // TUPLE2-NEXT: ret <vscale x 8 x float> [[TMP0]]
935 //
936 // TUPLE3-LABEL: @test_svreinterpret_f32_bf16(
937 // TUPLE3-NEXT: entry:
938 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x float>
939 // TUPLE3-NEXT: ret <vscale x 12 x float> [[TMP0]]
940 //
941 // TUPLE4-LABEL: @test_svreinterpret_f32_bf16(
942 // TUPLE4-NEXT: entry:
943 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x float>
944 // TUPLE4-NEXT: ret <vscale x 16 x float> [[TMP0]]
945 //
946 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f32_bf16u14__SVBfloat16_t(
947 // CPP-CHECK-NEXT: entry:
948 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 4 x float>
949 // CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]]
950 //
951 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_f32_bf1614svbfloat16x2_t(
952 // CPP-TUPLE2-NEXT: entry:
953 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 8 x float>
954 // CPP-TUPLE2-NEXT: ret <vscale x 8 x float> [[TMP0]]
955 //
956 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_f32_bf1614svbfloat16x3_t(
957 // CPP-TUPLE3-NEXT: entry:
958 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 12 x float>
959 // CPP-TUPLE3-NEXT: ret <vscale x 12 x float> [[TMP0]]
960 //
961 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_f32_bf1614svbfloat16x4_t(
962 // CPP-TUPLE4-NEXT: entry:
963 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 16 x float>
964 // CPP-TUPLE4-NEXT: ret <vscale x 16 x float> [[TMP0]]
965 //
966 TYPE(svfloat32) test_svreinterpret_f32_bf16(TYPE(svbfloat16) op) MODE_ATTR {
967 return SVE_ACLE_FUNC(svreinterpret_f32, _bf16)(op);
968 }
969
970 // CHECK-LABEL: @test_svreinterpret_f16_bf16(
971 // CHECK-NEXT: entry:
972 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x half>
973 // CHECK-NEXT: ret <vscale x 8 x half> [[TMP0]]
974 //
975 // TUPLE2-LABEL: @test_svreinterpret_f16_bf16(
976 // TUPLE2-NEXT: entry:
977 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x half>
978 // TUPLE2-NEXT: ret <vscale x 16 x half> [[TMP0]]
979 //
980 // TUPLE3-LABEL: @test_svreinterpret_f16_bf16(
981 // TUPLE3-NEXT: entry:
982 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x half>
983 // TUPLE3-NEXT: ret <vscale x 24 x half> [[TMP0]]
984 //
985 // TUPLE4-LABEL: @test_svreinterpret_f16_bf16(
986 // TUPLE4-NEXT: entry:
987 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x half>
988 // TUPLE4-NEXT: ret <vscale x 32 x half> [[TMP0]]
989 //
990 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f16_bf16u14__SVBfloat16_t(
991 // CPP-CHECK-NEXT: entry:
992 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 8 x half>
993 // CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP0]]
994 //
995 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_f16_bf1614svbfloat16x2_t(
996 // CPP-TUPLE2-NEXT: entry:
997 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 16 x half>
998 // CPP-TUPLE2-NEXT: ret <vscale x 16 x half> [[TMP0]]
999 //
1000 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_f16_bf1614svbfloat16x3_t(
1001 // CPP-TUPLE3-NEXT: entry:
1002 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 24 x half>
1003 // CPP-TUPLE3-NEXT: ret <vscale x 24 x half> [[TMP0]]
1004 //
1005 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_f16_bf1614svbfloat16x4_t(
1006 // CPP-TUPLE4-NEXT: entry:
1007 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 32 x half>
1008 // CPP-TUPLE4-NEXT: ret <vscale x 32 x half> [[TMP0]]
1009 //
1010 TYPE(svfloat16) test_svreinterpret_f16_bf16(TYPE(svbfloat16) op) MODE_ATTR {
1011 return SVE_ACLE_FUNC(svreinterpret_f16, _bf16)(op);
1012 }
1013
1014 // CHECK-LABEL: @test_svreinterpret_f64_bf16(
1015 // CHECK-NEXT: entry:
1016 // CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x double>
1017 // CHECK-NEXT: ret <vscale x 2 x double> [[TMP0]]
1018 //
1019 // TUPLE2-LABEL: @test_svreinterpret_f64_bf16(
1020 // TUPLE2-NEXT: entry:
1021 // TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x double>
1022 // TUPLE2-NEXT: ret <vscale x 4 x double> [[TMP0]]
1023 //
1024 // TUPLE3-LABEL: @test_svreinterpret_f64_bf16(
1025 // TUPLE3-NEXT: entry:
1026 // TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x double>
1027 // TUPLE3-NEXT: ret <vscale x 6 x double> [[TMP0]]
1028 //
1029 // TUPLE4-LABEL: @test_svreinterpret_f64_bf16(
1030 // TUPLE4-NEXT: entry:
1031 // TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x double>
1032 // TUPLE4-NEXT: ret <vscale x 8 x double> [[TMP0]]
1033 //
1034 // CPP-CHECK-LABEL: @_Z27test_svreinterpret_f64_bf16u14__SVBfloat16_t(
1035 // CPP-CHECK-NEXT: entry:
1036 // CPP-CHECK-NEXT: [[TMP0:%.*]] = bitcast <vscale x 8 x bfloat> [[OP:%.*]] to <vscale x 2 x double>
1037 // CPP-CHECK-NEXT: ret <vscale x 2 x double> [[TMP0]]
1038 //
1039 // CPP-TUPLE2-LABEL: @_Z27test_svreinterpret_f64_bf1614svbfloat16x2_t(
1040 // CPP-TUPLE2-NEXT: entry:
1041 // CPP-TUPLE2-NEXT: [[TMP0:%.*]] = bitcast <vscale x 16 x bfloat> [[OP:%.*]] to <vscale x 4 x double>
1042 // CPP-TUPLE2-NEXT: ret <vscale x 4 x double> [[TMP0]]
1043 //
1044 // CPP-TUPLE3-LABEL: @_Z27test_svreinterpret_f64_bf1614svbfloat16x3_t(
1045 // CPP-TUPLE3-NEXT: entry:
1046 // CPP-TUPLE3-NEXT: [[TMP0:%.*]] = bitcast <vscale x 24 x bfloat> [[OP:%.*]] to <vscale x 6 x double>
1047 // CPP-TUPLE3-NEXT: ret <vscale x 6 x double> [[TMP0]]
1048 //
1049 // CPP-TUPLE4-LABEL: @_Z27test_svreinterpret_f64_bf1614svbfloat16x4_t(
1050 // CPP-TUPLE4-NEXT: entry:
1051 // CPP-TUPLE4-NEXT: [[TMP0:%.*]] = bitcast <vscale x 32 x bfloat> [[OP:%.*]] to <vscale x 8 x double>
1052 // CPP-TUPLE4-NEXT: ret <vscale x 8 x double> [[TMP0]]
1053 //
1054 TYPE(svfloat64) test_svreinterpret_f64_bf16(TYPE(svbfloat16) op) MODE_ATTR {
1055 return SVE_ACLE_FUNC(svreinterpret_f64, _bf16)(op);
1056 }