1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -fsyntax-only -verify %s
3 // REQUIRES: aarch64-registered-target
6 void test_svpext_lane_imm_0_3(svcount_t c
) {
7 svpext_lane_c8(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
8 svpext_lane_c16(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
9 svpext_lane_c32(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
10 svpext_lane_c64(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
12 svpext_lane_c8(c
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
13 svpext_lane_c16(c
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
14 svpext_lane_c32(c
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
15 svpext_lane_c64(c
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
18 void test_svpext_lane_x2_imm_0_1(svcount_t c
) {
19 svpext_lane_c8_x2(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
20 svpext_lane_c16_x2(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
21 svpext_lane_c32_x2(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
22 svpext_lane_c64_x2(c
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
24 svpext_lane_c8_x2(c
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
25 svpext_lane_c16_x2(c
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
26 svpext_lane_c32_x2(c
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
27 svpext_lane_c64_x2(c
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
30 svcount_t
test_svwhile_pn_signed(int64_t op1
, int64_t op2
) {
31 svwhilege_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
32 svwhilege_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
33 svwhilege_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
34 svwhilege_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
35 svwhilegt_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
36 svwhilegt_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
37 svwhilegt_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
38 svwhilegt_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
39 svwhilele_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
40 svwhilele_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
41 svwhilele_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
42 svwhilele_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
43 svwhilelt_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
44 svwhilelt_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
45 svwhilelt_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
46 svwhilelt_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
48 svwhilege_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
49 svwhilege_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
50 svwhilege_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
51 svwhilege_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
52 svwhilegt_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
53 svwhilegt_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
54 svwhilegt_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
55 svwhilegt_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
56 svwhilele_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
57 svwhilele_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
58 svwhilele_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
59 svwhilele_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
60 svwhilelt_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
61 svwhilelt_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
62 svwhilelt_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
63 svwhilelt_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
66 svcount_t
test_svwhile_pn_unsigned(uint64_t op1
, uint64_t op2
) {
67 svwhilege_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
68 svwhilege_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
69 svwhilege_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
70 svwhilege_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
71 svwhilegt_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
72 svwhilegt_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
73 svwhilegt_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
74 svwhilegt_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
75 svwhilele_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
76 svwhilele_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
77 svwhilele_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
78 svwhilele_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
79 svwhilelt_c8(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
80 svwhilelt_c16(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
81 svwhilelt_c32(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
82 svwhilelt_c64(op1
, op2
, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
84 svwhilege_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
85 svwhilege_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
86 svwhilege_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
87 svwhilege_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
88 svwhilegt_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
89 svwhilegt_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
90 svwhilegt_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
91 svwhilegt_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
92 svwhilele_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
93 svwhilele_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
94 svwhilele_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
95 svwhilele_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
96 svwhilelt_c8(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
97 svwhilelt_c16(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
98 svwhilelt_c32(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
99 svwhilelt_c64(op1
, op2
, 3); // expected-error {{argument should be a multiple of 2}}
102 void test_cntp(svcount_t c
) {
103 svcntp_c8(c
, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
104 svcntp_c16(c
, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
105 svcntp_c32(c
, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
106 svcntp_c64(c
, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
108 svcntp_c8(c
, 3); // expected-error {{argument should be a multiple of 2}}
109 svcntp_c16(c
, 3); // expected-error {{argument should be a multiple of 2}}
110 svcntp_c32(c
, 3); // expected-error {{argument should be a multiple of 2}}
111 svcntp_c64(c
, 3); // expected-error {{argument should be a multiple of 2}}
115 void test_svdot_lane_2way(svint32_t s32
, svuint32_t u32
, svint16_t s16
, svuint16_t u16
,
116 svfloat32_t f32
, svfloat16_t f16
) {
117 svdot_lane_s32_s16(s32
, s16
, s16
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
118 svdot_lane_u32_u16(u32
, u16
, u16
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
119 svdot_lane_f32_f16(f32
, f16
, f16
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
123 __attribute__((target("+sve2p1+b16b16")))
124 void test_svbfml_lane(svbfloat16_t zda
, svbfloat16_t zn
, svbfloat16_t zm
, uint64_t idx
){
125 svmla_lane_bf16(zda
, zn
, zm
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
126 svmla_lane_bf16(zda
, zn
, zm
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
127 svmls_lane_bf16(zda
, zn
, zm
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
128 svmls_lane_bf16(zda
, zn
, zm
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
129 svmla_lane_bf16(zda
, zn
, zm
, idx
); // expected-error {{argument to 'svmla_lane_bf16' must be a constant integer}}
130 svmls_lane_bf16(zda
, zn
, zm
, idx
); // expected-error {{argument to 'svmls_lane_bf16' must be a constant integer}}
133 __attribute__((target("+sve2p1+b16b16")))
134 void test_svbfmul_lane(svbfloat16_t zn
, svbfloat16_t zm
, uint64_t idx
){
135 svmul_lane_bf16(zn
, zm
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
136 svmul_lane_bf16(zn
, zm
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
137 svmul_lane_bf16(zn
, zm
, idx
); // expected-error {{argument to 'svmul_lane_bf16' must be a constant integer}}
140 __attribute__((target("+sve2p1")))
141 void test_svextq_8b_offset(svint8_t s8
, svuint8_t u8
){
142 svextq_s8(s8
, s8
, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
143 svextq_u8(u8
, u8
, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
145 svextq_s8(s8
, s8
, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
146 svextq_u8(u8
, u8
, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
149 __attribute__((target("+sve2p1")))
150 void test_svextq_16b_offset(svint16_t s16
, svuint16_t u16
, svfloat16_t f16
, svbfloat16_t bf16
){
151 svextq_s16(s16
, s16
, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
152 svextq_u16(u16
, u16
, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
153 svextq_f16(f16
, f16
, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
154 svextq_bf16(bf16
, bf16
, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
156 svextq_s16(s16
, s16
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
157 svextq_u16(u16
, u16
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
158 svextq_f16(f16
, f16
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
159 svextq_bf16(bf16
, bf16
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
162 __attribute__((target("+sve2p1")))
163 void test_svextq_32b_offset(svint32_t s32
, svuint32_t u32
, svfloat32_t f32
){
164 svextq_s32(s32
, s32
, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
165 svextq_u32(u32
, u32
, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
166 svextq_f32(f32
, f32
, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
168 svextq_s32(s32
, s32
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
169 svextq_u32(u32
, u32
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
170 svextq_f32(f32
, f32
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
173 __attribute__((target("+sve2p1")))
174 void test_svextq_64b_offset(svint64_t s64
, svuint64_t u64
, svfloat64_t f64
){
175 svextq_s64(s64
, s64
, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
176 svextq_u64(u64
, u64
, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
177 svextq_f64(f64
, f64
, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
179 svextq_s64(s64
, s64
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
180 svextq_u64(u64
, u64
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
181 svextq_f64(f64
, f64
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
184 __attribute__((target("+sve2p1")))
185 void test_svpmov_lane(){
192 svpmov_lane_u8(zn_u8
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 0]}}
193 svpmov_lane_u16(zn_u16
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
194 svpmov_lane_u32(zn_u32
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
195 svpmov_lane_u64(zn_u64
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
197 svpmov_lane_u8(zn_u8
, 1); // expected-error {{argument value 1 is outside the valid range [0, 0]}}
198 svpmov_lane_u16(zn_u16
, 3); // expected-error {{argument value 3 is outside the valid range [0, 1]}}
199 svpmov_lane_u32(zn_u32
, 5); // expected-error {{argument value 5 is outside the valid range [0, 3]}}
200 svpmov_lane_u64(zn_u64
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
203 zn_u16
= svpmov_lane_u16_m(zn_u16
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 1]}}
204 zn_u32
= svpmov_lane_u32_m(zn_u32
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 3]}}
205 zn_u64
= svpmov_lane_u64_m(zn_u64
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 7]}}
207 zn_u16
= svpmov_lane_u16_m(zn_u16
, pn
, 3); // expected-error {{argument value 3 is outside the valid range [1, 1]}}
208 zn_u32
= svpmov_lane_u32_m(zn_u32
, pn
, 5); // expected-error {{argument value 5 is outside the valid range [1, 3]}}
209 zn_u64
= svpmov_lane_u64_m(zn_u64
, pn
, 8); // expected-error {{argument value 8 is outside the valid range [1, 7]}}
212 __attribute__((target("+sve2p1")))
213 void test_svget_svset_b(uint64_t idx
, svboolx2_t tuple2
, svboolx4_t tuple4
, svbool_t res
){
214 svset2_b(tuple2
, -1, res
); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
215 svset2_b(tuple2
, 2, res
); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
216 svset4_b(tuple4
, -1, res
); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
217 svset4_b(tuple4
, 4, res
); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
219 svget2_b(tuple2
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
220 svget2_b(tuple2
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
221 svget4_b(tuple4
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
222 svget4_b(tuple4
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
224 svset2_b(tuple2
, idx
, res
); // expected-error {{argument to 'svset2_b' must be a constant integer}}
225 svset4_b(tuple4
, idx
, res
); // expected-error {{argument to 'svset4_b' must be a constant integer}}
226 svget2_b(tuple2
, idx
); // expected-error {{argument to 'svget2_b' must be a constant integer}}
227 svget4_b(tuple4
, idx
); // expected-error {{argument to 'svget4_b' must be a constant integer}}
230 __attribute__((target("+sve2p1")))
231 void test_svdup_laneq(){
243 svbfloat16_t zn_bf16
;
245 svdup_laneq_u8(zn_u8
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 15]}}
246 svdup_laneq_u16(zn_u16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
247 svdup_laneq_u32(zn_u32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
248 svdup_laneq_u64(zn_u64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
249 svdup_laneq_s8(zn_s8
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 15]}}
250 svdup_laneq_s16(zn_s16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
251 svdup_laneq_s32(zn_s32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
252 svdup_laneq_s64(zn_s64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
253 svdup_laneq_f16(zn_f16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
254 svdup_laneq_f32(zn_f32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
255 svdup_laneq_f64(zn_f64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
256 svdup_laneq_bf16(zn_bf16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}