Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / aarch64-sve2-intrinsics / acle_sve2_bfloat.cpp
blobb82592a12b83a73ed78e04a24f5ab1294e525f4c
1 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fsyntax-only -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fsyntax-only -verify=overload -verify-ignore-unexpected=error,note -emit-llvm -o - %s
6 #ifdef SVE_OVERLOADED_FORMS
7 // A simple used,unused... macro, long enough to represent any SVE builtin.
8 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
9 #else
10 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
11 #endif
13 #include <arm_sve.h>
15 void test_bfloat(const bfloat16_t *const_bf16_ptr, svbfloat16_t bf16, svbfloat16x2_t bf16x2)
17 // expected-error@+2 {{'svwhilerw_bf16' needs target feature sve2,bf16}}
18 // overload-error@+1 {{'svwhilerw' needs target feature sve2,bf16}}
19 SVE_ACLE_FUNC(svwhilerw,_bf16,,)(const_bf16_ptr, const_bf16_ptr);
20 // expected-error@+2 {{'svtbx_bf16' needs target feature sve2,bf16}}
21 // overload-error@+1 {{'svtbx' needs target feature sve2,bf16}}
22 SVE_ACLE_FUNC(svtbx,_bf16,,)(bf16, bf16, svundef_u16());
23 // expected-error@+2 {{'svtbl2_bf16' needs target feature sve2,bf16}}
24 // overload-error@+1 {{'svtbl2' needs target feature sve2,bf16}}
25 SVE_ACLE_FUNC(svtbl2,_bf16,,)(bf16x2, svundef_u16());
26 // expected-error@+2 {{'svwhilewr_bf16' needs target feature sve2,bf16}}
27 // overload-error@+1 {{'svwhilewr' needs target feature sve2,bf16}}
28 SVE_ACLE_FUNC(svwhilewr,_bf16,,)(const_bf16_ptr, const_bf16_ptr);