1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify %s
3
4 #ifdef SVE_OVERLOADED_FORMS
5 // A simple used,unused... macro, long enough to represent any SVE builtin.
6 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
7 #else
8 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
9 #endif
10
11 #include <arm_sve.h>
12
test_svqdech_n_s32(int32_t op)13 int32_t test_svqdech_n_s32(int32_t op)
14 {
15 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
16 return SVE_ACLE_FUNC(svqdech,_n_s32,,)(op, 0);
17 }
18
test_svqdech_n_s32_1(int32_t op)19 int32_t test_svqdech_n_s32_1(int32_t op)
20 {
21 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
22 return SVE_ACLE_FUNC(svqdech,_n_s32,,)(op, 17);
23 }
24
test_svqdech_n_s64(int64_t op)25 int64_t test_svqdech_n_s64(int64_t op)
26 {
27 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
28 return SVE_ACLE_FUNC(svqdech,_n_s64,,)(op, 0);
29 }
30
test_svqdech_n_s64_1(int64_t op)31 int64_t test_svqdech_n_s64_1(int64_t op)
32 {
33 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
34 return SVE_ACLE_FUNC(svqdech,_n_s64,,)(op, 17);
35 }
36
test_svqdech_n_u32(uint32_t op)37 uint32_t test_svqdech_n_u32(uint32_t op)
38 {
39 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
40 return SVE_ACLE_FUNC(svqdech,_n_u32,,)(op, 0);
41 }
42
test_svqdech_n_u32_1(uint32_t op)43 uint32_t test_svqdech_n_u32_1(uint32_t op)
44 {
45 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
46 return SVE_ACLE_FUNC(svqdech,_n_u32,,)(op, 17);
47 }
48
test_svqdech_n_u64(uint64_t op)49 uint64_t test_svqdech_n_u64(uint64_t op)
50 {
51 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
52 return SVE_ACLE_FUNC(svqdech,_n_u64,,)(op, 0);
53 }
54
test_svqdech_n_u64_1(uint64_t op)55 uint64_t test_svqdech_n_u64_1(uint64_t op)
56 {
57 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
58 return SVE_ACLE_FUNC(svqdech,_n_u64,,)(op, 17);
59 }
60
test_svqdech_pat_n_s32(int32_t op)61 int32_t test_svqdech_pat_n_s32(int32_t op)
62 {
63 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
64 return SVE_ACLE_FUNC(svqdech_pat,_n_s32,,)(op, SV_POW2, 0);
65 }
66
test_svqdech_pat_n_s32_1(int32_t op)67 int32_t test_svqdech_pat_n_s32_1(int32_t op)
68 {
69 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
70 return SVE_ACLE_FUNC(svqdech_pat,_n_s32,,)(op, SV_VL1, 17);
71 }
72
test_svqdech_pat_n_s64(int64_t op)73 int64_t test_svqdech_pat_n_s64(int64_t op)
74 {
75 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
76 return SVE_ACLE_FUNC(svqdech_pat,_n_s64,,)(op, SV_VL2, 0);
77 }
78
test_svqdech_pat_n_s64_1(int64_t op)79 int64_t test_svqdech_pat_n_s64_1(int64_t op)
80 {
81 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
82 return SVE_ACLE_FUNC(svqdech_pat,_n_s64,,)(op, SV_VL3, 17);
83 }
84
test_svqdech_pat_n_u32(uint32_t op)85 uint32_t test_svqdech_pat_n_u32(uint32_t op)
86 {
87 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
88 return SVE_ACLE_FUNC(svqdech_pat,_n_u32,,)(op, SV_VL4, 0);
89 }
90
test_svqdech_pat_n_u32_1(uint32_t op)91 uint32_t test_svqdech_pat_n_u32_1(uint32_t op)
92 {
93 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
94 return SVE_ACLE_FUNC(svqdech_pat,_n_u32,,)(op, SV_VL5, 17);
95 }
96
test_svqdech_pat_n_u64(uint64_t op)97 uint64_t test_svqdech_pat_n_u64(uint64_t op)
98 {
99 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
100 return SVE_ACLE_FUNC(svqdech_pat,_n_u64,,)(op, SV_VL6, 0);
101 }
102
test_svqdech_pat_n_u64_1(uint64_t op)103 uint64_t test_svqdech_pat_n_u64_1(uint64_t op)
104 {
105 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
106 return SVE_ACLE_FUNC(svqdech_pat,_n_u64,,)(op, SV_VL7, 17);
107 }
108
test_svqdech_s16(svint16_t op)109 svint16_t test_svqdech_s16(svint16_t op)
110 {
111 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
112 return SVE_ACLE_FUNC(svqdech,_s16,,)(op, 0);
113 }
114
test_svqdech_s16_1(svint16_t op)115 svint16_t test_svqdech_s16_1(svint16_t op)
116 {
117 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
118 return SVE_ACLE_FUNC(svqdech,_s16,,)(op, 17);
119 }
120
test_svqdech_u16(svuint16_t op)121 svuint16_t test_svqdech_u16(svuint16_t op)
122 {
123 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
124 return SVE_ACLE_FUNC(svqdech,_u16,,)(op, 0);
125 }
126
test_svqdech_u16_1(svuint16_t op)127 svuint16_t test_svqdech_u16_1(svuint16_t op)
128 {
129 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
130 return SVE_ACLE_FUNC(svqdech,_u16,,)(op, 17);
131 }
132
test_svqdech_pat_s16(svint16_t op)133 svint16_t test_svqdech_pat_s16(svint16_t op)
134 {
135 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
136 return SVE_ACLE_FUNC(svqdech_pat,_s16,,)(op, SV_VL8, 0);
137 }
138
test_svqdech_pat_s16_1(svint16_t op)139 svint16_t test_svqdech_pat_s16_1(svint16_t op)
140 {
141 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
142 return SVE_ACLE_FUNC(svqdech_pat,_s16,,)(op, SV_VL16, 17);
143 }
144
test_svqdech_pat_u16(svuint16_t op)145 svuint16_t test_svqdech_pat_u16(svuint16_t op)
146 {
147 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
148 return SVE_ACLE_FUNC(svqdech_pat,_u16,,)(op, SV_VL32, 0);
149 }
150
test_svqdech_pat_u16_1(svuint16_t op)151 svuint16_t test_svqdech_pat_u16_1(svuint16_t op)
152 {
153 // expected-error-re@+1 {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
154 return SVE_ACLE_FUNC(svqdech_pat,_u16,,)(op, SV_VL64, 17);
155 }
156