1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s
3 // REQUIRES: aarch64-registered-target
7 #if defined __ARM_FEATURE_SME
8 #define MODE_ATTR __arm_streaming
13 __attribute__((target("sve-b16b16")))
14 void test_with_sve_b16b16(svbool_t pg
, svbfloat16_t op1
, svbfloat16_t op2
, svbfloat16_t op3
) MODE_ATTR
16 svclamp_bf16(op1
, op2
, op3
);
17 svadd_bf16_m(pg
, op1
, op2
);
18 svmax_bf16_m(pg
, op1
, op2
);
19 svmaxnm_bf16_m(pg
, op1
, op2
);
20 svmin_bf16_m(pg
, op1
, op2
);
21 svminnm_bf16_m(pg
, op1
, op2
);
22 svmla_lane_bf16(op1
, op2
, op3
, 1);
23 svmla_bf16_m(pg
, op1
, op2
, op3
);
24 svmls_bf16_m(pg
, op1
, op2
, op3
);
25 svmul_lane_bf16(op1
, op2
, 1);
26 svmul_bf16_m(pg
, op1
, op2
);
27 svsub_bf16_m(pg
, op1
, op2
);
30 void test_no_sve_b16b16(svbool_t pg
, svbfloat16_t op1
, svbfloat16_t op2
, svbfloat16_t op3
) MODE_ATTR
32 // expected-error@+1 {{'svclamp_bf16' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
33 svclamp_bf16(op1
, op2
, op3
);
34 // expected-error@+1 {{'svadd_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
35 svadd_bf16_m(pg
, op1
, op2
);
36 // expected-error@+1 {{'svmax_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
37 svmax_bf16_m(pg
, op1
, op2
);
38 // expected-error@+1 {{'svmaxnm_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
39 svmaxnm_bf16_m(pg
, op1
, op2
);
40 // expected-error@+1 {{'svmin_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
41 svmin_bf16_m(pg
, op1
, op2
);
42 // expected-error@+1 {{'svminnm_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
43 svminnm_bf16_m(pg
, op1
, op2
);
44 // expected-error@+1 {{'svmla_lane_bf16' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
45 svmla_lane_bf16(op1
, op2
, op3
, 1);
46 // expected-error@+1 {{'svmla_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
47 svmla_bf16_m(pg
, op1
, op2
, op3
);
48 // expected-error@+1 {{'svmls_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
49 svmls_bf16_m(pg
, op1
, op2
, op3
);
50 // expected-error@+1 {{'svmul_lane_bf16' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
51 svmul_lane_bf16(op1
, op2
, 1);
52 // expected-error@+1 {{'svmul_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
53 svmul_bf16_m(pg
, op1
, op2
);
54 // expected-error@+1 {{'svsub_bf16_m' needs target feature (sve,sve2,sve-b16b16)|(sme,sme2,sve-b16b16)}}
55 svsub_bf16_m(pg
, op1
, op2
);