Debian Codegraph @

clang/test/Sema/aarch64-sve-intrinsics/acle_sve_bf16_non_streaming_only.cpp

raw
1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s
2 // REQUIRES: aarch64-registered-target
3
4 #include <arm_sve.h>
5
6 __attribute__((target("bf16")))
7 void test_bf16(svfloat32_t svf32, svbfloat16_t svbf16)
8 {
9 svbfmmla_f32(svf32, svbf16, svbf16);
10 }
11
12 void test_no_bf16(svfloat32_t svf32, svbfloat16_t svbf16)
13 {
14 // expected-error@+1 {{'svbfmmla_f32' needs target feature sve,bf16}}
15 svbfmmla_f32(svf32, svbf16, svbf16);
16 }
17
18 __attribute__((target("sme,bf16")))
19 void test_bf16_streaming(svfloat32_t svf32, svbfloat16_t svbf16) __arm_streaming
20 {
21 // expected-error@+1 {{builtin can only be called from a non-streaming function}}
22 svbfmmla_f32(svf32, svbf16, svbf16);
23 }