1 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2 -fsyntax-only -verify %s
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2 -fsyntax-only -verify %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
10 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
17 // expected-error@+1 {{argument should be the value 90 or 270}}
18 SVE_ACLE_FUNC(svcadd
,_s8
,,)(svundef_s8(), svundef_s8(), 0);
19 // expected-error@+1 {{argument should be the value 90 or 270}}
20 SVE_ACLE_FUNC(svcadd
,_u8
,,)(svundef_u8(), svundef_u8(), 180);
21 // expected-error@+1 {{argument should be the value 90 or 270}}
22 SVE_ACLE_FUNC(svcadd
,_s16
,,)(svundef_s16(), svundef_s16(), 0);
23 // expected-error@+1 {{argument should be the value 90 or 270}}
24 SVE_ACLE_FUNC(svcadd
,_u16
,,)(svundef_u16(), svundef_u16(), 180);
25 // expected-error@+1 {{argument should be the value 90 or 270}}
26 SVE_ACLE_FUNC(svcadd
,_s32
,,)(svundef_s32(), svundef_s32(), 0);
27 // expected-error@+1 {{argument should be the value 90 or 270}}
28 SVE_ACLE_FUNC(svcadd
,_u32
,,)(svundef_u32(), svundef_u32(), 180);
29 // expected-error@+1 {{argument should be the value 90 or 270}}
30 SVE_ACLE_FUNC(svcadd
,_s64
,,)(svundef_s64(), svundef_s64(), 0);
31 // expected-error@+1 {{argument should be the value 90 or 270}}
32 SVE_ACLE_FUNC(svcadd
,_u64
,,)(svundef_u64(), svundef_u64(), 180);
33 // expected-error@+1 {{argument should be the value 90 or 270}}
34 SVE_ACLE_FUNC(svqcadd
,_s8
,,)(svundef_s8(), svundef_s8(), 0);
35 // expected-error@+1 {{argument should be the value 90 or 270}}
36 SVE_ACLE_FUNC(svqcadd
,_s16
,,)(svundef_s16(), svundef_s16(), 180);
37 // expected-error@+1 {{argument should be the value 90 or 270}}
38 SVE_ACLE_FUNC(svqcadd
,_s32
,,)(svundef_s32(), svundef_s32(), 0);
39 // expected-error@+1 {{argument should be the value 90 or 270}}
40 SVE_ACLE_FUNC(svqcadd
,_s64
,,)(svundef_s64(), svundef_s64(), 180);
43 void test_0_90_180_270()
45 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
46 SVE_ACLE_FUNC(svcdot
,_s32
,,)(svundef_s32(), svundef_s8(), svundef_s8(), 19);
47 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
48 SVE_ACLE_FUNC(svcdot_lane
,_s32
,,)(svundef_s32(), svundef_s8(), svundef_s8(), 0, 19);
49 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
50 SVE_ACLE_FUNC(svcdot
,_s64
,,)(svundef_s64(), svundef_s16(), svundef_s16(), 19);
51 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
52 SVE_ACLE_FUNC(svcdot_lane
,_s64
,,)(svundef_s64(), svundef_s16(), svundef_s16(), 0, 19);
53 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
54 SVE_ACLE_FUNC(svcmla
,_s8
,,)(svundef_s8(), svundef_s8(), svundef_s8(), 19);
55 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
56 SVE_ACLE_FUNC(svcmla
,_u8
,,)(svundef_u8(), svundef_u8(), svundef_u8(), 19);
57 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
58 SVE_ACLE_FUNC(svcmla
,_s16
,,)(svundef_s16(), svundef_s16(), svundef_s16(), 19);
59 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
60 SVE_ACLE_FUNC(svcmla_lane
,_s16
,,)(svundef_s16(), svundef_s16(), svundef_s16(), 0, 19);
61 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
62 SVE_ACLE_FUNC(svcmla
,_u16
,,)(svundef_u16(), svundef_u16(), svundef_u16(), 19);
63 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
64 SVE_ACLE_FUNC(svcmla_lane
,_u16
,,)(svundef_u16(), svundef_u16(), svundef_u16(), 0, 19);
65 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
66 SVE_ACLE_FUNC(svcmla
,_s32
,,)(svundef_s32(), svundef_s32(), svundef_s32(), 19);
67 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
68 SVE_ACLE_FUNC(svcmla_lane
,_s32
,,)(svundef_s32(), svundef_s32(), svundef_s32(), 1, 19);
69 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
70 SVE_ACLE_FUNC(svcmla
,_u32
,,)(svundef_u32(), svundef_u32(), svundef_u32(), 19);
71 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
72 SVE_ACLE_FUNC(svcmla_lane
,_u32
,,)(svundef_u32(), svundef_u32(), svundef_u32(), 0, 19);
73 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
74 SVE_ACLE_FUNC(svcmla
,_s64
,,)(svundef_s64(), svundef_s64(), svundef_s64(), 19);
75 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
76 SVE_ACLE_FUNC(svcmla
,_u64
,,)(svundef_u64(), svundef_u64(), svundef_u64(), 19);
77 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
78 SVE_ACLE_FUNC(svqrdcmlah
,_s8
,,)(svundef_s8(), svundef_s8(), svundef_s8(), 19);
79 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
80 SVE_ACLE_FUNC(svqrdcmlah
,_s16
,,)(svundef_s16(), svundef_s16(), svundef_s16(), 19);
81 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
82 SVE_ACLE_FUNC(svqrdcmlah_lane
,_s16
,,)(svundef_s16(), svundef_s16(), svundef_s16(), 0, 19);
83 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
84 SVE_ACLE_FUNC(svqrdcmlah
,_s32
,,)(svundef_s32(), svundef_s32(), svundef_s32(), 19);
85 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
86 SVE_ACLE_FUNC(svqrdcmlah_lane
,_s32
,,)(svundef_s32(), svundef_s32(), svundef_s32(), 0, 19);
87 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
88 SVE_ACLE_FUNC(svqrdcmlah
,_s64
,,)(svundef_s64(), svundef_s64(), svundef_s64(), 19);