1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
2 // REQUIRES: riscv-registered-target
3 // RUN: %clang_cc1 -triple riscv64 -target-feature +v \
4 // RUN: -target-feature +zvfbfmin \
5 // RUN: -target-feature +zvfbfwma -disable-O0-optnone \
6 // RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
7 // RUN: FileCheck --check-prefix=CHECK-RV64 %s
9 #include <riscv_vector.h>
11 // CHECK-RV64-LABEL: define dso_local <vscale x 1 x bfloat> @test_vundefined_bf16mf4(
12 // CHECK-RV64-SAME: ) #[[ATTR0:[0-9]+]] {
13 // CHECK-RV64-NEXT: entry:
14 // CHECK-RV64-NEXT: ret <vscale x 1 x bfloat> poison
16 vbfloat16mf4_t
test_vundefined_bf16mf4() {
17 return __riscv_vundefined_bf16mf4();
20 // CHECK-RV64-LABEL: define dso_local <vscale x 2 x bfloat> @test_vundefined_bf16mf2(
21 // CHECK-RV64-SAME: ) #[[ATTR0]] {
22 // CHECK-RV64-NEXT: entry:
23 // CHECK-RV64-NEXT: ret <vscale x 2 x bfloat> poison
25 vbfloat16mf2_t
test_vundefined_bf16mf2() {
26 return __riscv_vundefined_bf16mf2();
29 // CHECK-RV64-LABEL: define dso_local <vscale x 4 x bfloat> @test_vundefined_bf16m1(
30 // CHECK-RV64-SAME: ) #[[ATTR0]] {
31 // CHECK-RV64-NEXT: entry:
32 // CHECK-RV64-NEXT: ret <vscale x 4 x bfloat> poison
34 vbfloat16m1_t
test_vundefined_bf16m1() { return __riscv_vundefined_bf16m1(); }
36 // CHECK-RV64-LABEL: define dso_local <vscale x 8 x bfloat> @test_vundefined_bf16m2(
37 // CHECK-RV64-SAME: ) #[[ATTR0]] {
38 // CHECK-RV64-NEXT: entry:
39 // CHECK-RV64-NEXT: ret <vscale x 8 x bfloat> poison
41 vbfloat16m2_t
test_vundefined_bf16m2() { return __riscv_vundefined_bf16m2(); }
43 // CHECK-RV64-LABEL: define dso_local <vscale x 16 x bfloat> @test_vundefined_bf16m4(
44 // CHECK-RV64-SAME: ) #[[ATTR0]] {
45 // CHECK-RV64-NEXT: entry:
46 // CHECK-RV64-NEXT: ret <vscale x 16 x bfloat> poison
48 vbfloat16m4_t
test_vundefined_bf16m4() { return __riscv_vundefined_bf16m4(); }
50 // CHECK-RV64-LABEL: define dso_local <vscale x 32 x bfloat> @test_vundefined_bf16m8(
51 // CHECK-RV64-SAME: ) #[[ATTR0]] {
52 // CHECK-RV64-NEXT: entry:
53 // CHECK-RV64-NEXT: ret <vscale x 32 x bfloat> poison
55 vbfloat16m8_t
test_vundefined_bf16m8() { return __riscv_vundefined_bf16m8(); }
57 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 2) @test_vundefined_bf16mf4x2(
58 // CHECK-RV64-SAME: ) #[[ATTR0]] {
59 // CHECK-RV64-NEXT: entry:
60 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 2) poison
62 vbfloat16mf4x2_t
test_vundefined_bf16mf4x2() {
63 return __riscv_vundefined_bf16mf4x2();
66 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 3) @test_vundefined_bf16mf4x3(
67 // CHECK-RV64-SAME: ) #[[ATTR0]] {
68 // CHECK-RV64-NEXT: entry:
69 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 3) poison
71 vbfloat16mf4x3_t
test_vundefined_bf16mf4x3() {
72 return __riscv_vundefined_bf16mf4x3();
75 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 4) @test_vundefined_bf16mf4x4(
76 // CHECK-RV64-SAME: ) #[[ATTR0]] {
77 // CHECK-RV64-NEXT: entry:
78 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 4) poison
80 vbfloat16mf4x4_t
test_vundefined_bf16mf4x4() {
81 return __riscv_vundefined_bf16mf4x4();
84 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 5) @test_vundefined_bf16mf4x5(
85 // CHECK-RV64-SAME: ) #[[ATTR0]] {
86 // CHECK-RV64-NEXT: entry:
87 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 5) poison
89 vbfloat16mf4x5_t
test_vundefined_bf16mf4x5() {
90 return __riscv_vundefined_bf16mf4x5();
93 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 6) @test_vundefined_bf16mf4x6(
94 // CHECK-RV64-SAME: ) #[[ATTR0]] {
95 // CHECK-RV64-NEXT: entry:
96 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 6) poison
98 vbfloat16mf4x6_t
test_vundefined_bf16mf4x6() {
99 return __riscv_vundefined_bf16mf4x6();
102 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 7) @test_vundefined_bf16mf4x7(
103 // CHECK-RV64-SAME: ) #[[ATTR0]] {
104 // CHECK-RV64-NEXT: entry:
105 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 7) poison
107 vbfloat16mf4x7_t
test_vundefined_bf16mf4x7() {
108 return __riscv_vundefined_bf16mf4x7();
111 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 2 x i8>, 8) @test_vundefined_bf16mf4x8(
112 // CHECK-RV64-SAME: ) #[[ATTR0]] {
113 // CHECK-RV64-NEXT: entry:
114 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 2 x i8>, 8) poison
116 vbfloat16mf4x8_t
test_vundefined_bf16mf4x8() {
117 return __riscv_vundefined_bf16mf4x8();
120 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 2) @test_vundefined_bf16mf2x2(
121 // CHECK-RV64-SAME: ) #[[ATTR0]] {
122 // CHECK-RV64-NEXT: entry:
123 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 2) poison
125 vbfloat16mf2x2_t
test_vundefined_bf16mf2x2() {
126 return __riscv_vundefined_bf16mf2x2();
129 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 3) @test_vundefined_bf16mf2x3(
130 // CHECK-RV64-SAME: ) #[[ATTR0]] {
131 // CHECK-RV64-NEXT: entry:
132 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 3) poison
134 vbfloat16mf2x3_t
test_vundefined_bf16mf2x3() {
135 return __riscv_vundefined_bf16mf2x3();
138 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 4) @test_vundefined_bf16mf2x4(
139 // CHECK-RV64-SAME: ) #[[ATTR0]] {
140 // CHECK-RV64-NEXT: entry:
141 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 4) poison
143 vbfloat16mf2x4_t
test_vundefined_bf16mf2x4() {
144 return __riscv_vundefined_bf16mf2x4();
147 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 5) @test_vundefined_bf16mf2x5(
148 // CHECK-RV64-SAME: ) #[[ATTR0]] {
149 // CHECK-RV64-NEXT: entry:
150 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 5) poison
152 vbfloat16mf2x5_t
test_vundefined_bf16mf2x5() {
153 return __riscv_vundefined_bf16mf2x5();
156 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 6) @test_vundefined_bf16mf2x6(
157 // CHECK-RV64-SAME: ) #[[ATTR0]] {
158 // CHECK-RV64-NEXT: entry:
159 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 6) poison
161 vbfloat16mf2x6_t
test_vundefined_bf16mf2x6() {
162 return __riscv_vundefined_bf16mf2x6();
165 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 7) @test_vundefined_bf16mf2x7(
166 // CHECK-RV64-SAME: ) #[[ATTR0]] {
167 // CHECK-RV64-NEXT: entry:
168 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 7) poison
170 vbfloat16mf2x7_t
test_vundefined_bf16mf2x7() {
171 return __riscv_vundefined_bf16mf2x7();
174 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 4 x i8>, 8) @test_vundefined_bf16mf2x8(
175 // CHECK-RV64-SAME: ) #[[ATTR0]] {
176 // CHECK-RV64-NEXT: entry:
177 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 4 x i8>, 8) poison
179 vbfloat16mf2x8_t
test_vundefined_bf16mf2x8() {
180 return __riscv_vundefined_bf16mf2x8();
183 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 2) @test_vundefined_bf16m1x2(
184 // CHECK-RV64-SAME: ) #[[ATTR0]] {
185 // CHECK-RV64-NEXT: entry:
186 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 2) poison
188 vbfloat16m1x2_t
test_vundefined_bf16m1x2() {
189 return __riscv_vundefined_bf16m1x2();
192 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 3) @test_vundefined_bf16m1x3(
193 // CHECK-RV64-SAME: ) #[[ATTR0]] {
194 // CHECK-RV64-NEXT: entry:
195 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 3) poison
197 vbfloat16m1x3_t
test_vundefined_bf16m1x3() {
198 return __riscv_vundefined_bf16m1x3();
201 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 4) @test_vundefined_bf16m1x4(
202 // CHECK-RV64-SAME: ) #[[ATTR0]] {
203 // CHECK-RV64-NEXT: entry:
204 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 4) poison
206 vbfloat16m1x4_t
test_vundefined_bf16m1x4() {
207 return __riscv_vundefined_bf16m1x4();
210 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 5) @test_vundefined_bf16m1x5(
211 // CHECK-RV64-SAME: ) #[[ATTR0]] {
212 // CHECK-RV64-NEXT: entry:
213 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 5) poison
215 vbfloat16m1x5_t
test_vundefined_bf16m1x5() {
216 return __riscv_vundefined_bf16m1x5();
219 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 6) @test_vundefined_bf16m1x6(
220 // CHECK-RV64-SAME: ) #[[ATTR0]] {
221 // CHECK-RV64-NEXT: entry:
222 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 6) poison
224 vbfloat16m1x6_t
test_vundefined_bf16m1x6() {
225 return __riscv_vundefined_bf16m1x6();
228 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 7) @test_vundefined_bf16m1x7(
229 // CHECK-RV64-SAME: ) #[[ATTR0]] {
230 // CHECK-RV64-NEXT: entry:
231 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 7) poison
233 vbfloat16m1x7_t
test_vundefined_bf16m1x7() {
234 return __riscv_vundefined_bf16m1x7();
237 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 8 x i8>, 8) @test_vundefined_bf16m1x8(
238 // CHECK-RV64-SAME: ) #[[ATTR0]] {
239 // CHECK-RV64-NEXT: entry:
240 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 8 x i8>, 8) poison
242 vbfloat16m1x8_t
test_vundefined_bf16m1x8() {
243 return __riscv_vundefined_bf16m1x8();
246 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 16 x i8>, 2) @test_vundefined_bf16m2x2(
247 // CHECK-RV64-SAME: ) #[[ATTR0]] {
248 // CHECK-RV64-NEXT: entry:
249 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 16 x i8>, 2) poison
251 vbfloat16m2x2_t
test_vundefined_bf16m2x2() {
252 return __riscv_vundefined_bf16m2x2();
255 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 16 x i8>, 3) @test_vundefined_bf16m2x3(
256 // CHECK-RV64-SAME: ) #[[ATTR0]] {
257 // CHECK-RV64-NEXT: entry:
258 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 16 x i8>, 3) poison
260 vbfloat16m2x3_t
test_vundefined_bf16m2x3() {
261 return __riscv_vundefined_bf16m2x3();
264 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 16 x i8>, 4) @test_vundefined_bf16m2x4(
265 // CHECK-RV64-SAME: ) #[[ATTR0]] {
266 // CHECK-RV64-NEXT: entry:
267 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 16 x i8>, 4) poison
269 vbfloat16m2x4_t
test_vundefined_bf16m2x4() {
270 return __riscv_vundefined_bf16m2x4();
273 // CHECK-RV64-LABEL: define dso_local target("riscv.vector.tuple", <vscale x 32 x i8>, 2) @test_vundefined_bf16m4x2(
274 // CHECK-RV64-SAME: ) #[[ATTR0]] {
275 // CHECK-RV64-NEXT: entry:
276 // CHECK-RV64-NEXT: ret target("riscv.vector.tuple", <vscale x 32 x i8>, 2) poison
278 vbfloat16m4x2_t
test_vundefined_bf16m4x2() {
279 return __riscv_vundefined_bf16m4x2();