24 lines · cpp
1// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s2// REQUIRES: aarch64-registered-target3 4#include <arm_sve.h>5 6__attribute__((target("bf16")))7void test_bf16(svfloat32_t svf32, svbfloat16_t svbf16)8{9 svbfmmla_f32(svf32, svbf16, svbf16);10}11 12void 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")))19void test_bf16_streaming(svfloat32_t svf32, svbfloat16_t svbf16) __arm_streaming20{21 // expected-error@+1 {{builtin can only be called from a non-streaming function}}22 svbfmmla_f32(svf32, svbf16, svbf16);23}24