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_lane(svint16_t zn_i16
, svint16_t zm_i16
, svfloat16_t zn_f16
, svfloat16_t zm_f16
){
142 svextq_s16(zn_i16
, zm_i16
, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
143 svextq_f16(zn_f16
, zm_f16
, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
146 __attribute__((target("+sve2p1")))
147 void test_svpmov_lane(){
154 svpmov_lane_u8(zn_u8
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 0]}}
155 svpmov_lane_u16(zn_u16
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
156 svpmov_lane_u32(zn_u32
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
157 svpmov_lane_u64(zn_u64
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
159 svpmov_lane_u8(zn_u8
, 1); // expected-error {{argument value 1 is outside the valid range [0, 0]}}
160 svpmov_lane_u16(zn_u16
, 3); // expected-error {{argument value 3 is outside the valid range [0, 1]}}
161 svpmov_lane_u32(zn_u32
, 5); // expected-error {{argument value 5 is outside the valid range [0, 3]}}
162 svpmov_lane_u64(zn_u64
, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
165 zn_u16
= svpmov_lane_u16_m(zn_u16
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 1]}}
166 zn_u32
= svpmov_lane_u32_m(zn_u32
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 3]}}
167 zn_u64
= svpmov_lane_u64_m(zn_u64
, pn
, 0); // expected-error {{argument value 0 is outside the valid range [1, 7]}}
169 zn_u16
= svpmov_lane_u16_m(zn_u16
, pn
, 3); // expected-error {{argument value 3 is outside the valid range [1, 1]}}
170 zn_u32
= svpmov_lane_u32_m(zn_u32
, pn
, 5); // expected-error {{argument value 5 is outside the valid range [1, 3]}}
171 zn_u64
= svpmov_lane_u64_m(zn_u64
, pn
, 8); // expected-error {{argument value 8 is outside the valid range [1, 7]}}
174 __attribute__((target("+sve2p1")))
175 void test_svget_svset_b(uint64_t idx
, svboolx2_t tuple2
, svboolx4_t tuple4
, svbool_t res
){
176 svset2_b(tuple2
, -1, res
); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
177 svset2_b(tuple2
, 2, res
); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
178 svset4_b(tuple4
, -1, res
); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
179 svset4_b(tuple4
, 4, res
); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
181 svget2_b(tuple2
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
182 svget2_b(tuple2
, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
183 svget4_b(tuple4
, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
184 svget4_b(tuple4
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
186 svset2_b(tuple2
, idx
, res
); // expected-error {{argument to 'svset2_b' must be a constant integer}}
187 svset4_b(tuple4
, idx
, res
); // expected-error {{argument to 'svset4_b' must be a constant integer}}
188 svget2_b(tuple2
, idx
); // expected-error {{argument to 'svget2_b' must be a constant integer}}
189 svget4_b(tuple4
, idx
); // expected-error {{argument to 'svget4_b' must be a constant integer}}
192 __attribute__((target("+sve2p1")))
193 void test_svdup_laneq(){
205 svbfloat16_t zn_bf16
;
207 svdup_laneq_u8(zn_u8
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 15]}}
208 svdup_laneq_u16(zn_u16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
209 svdup_laneq_u32(zn_u32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
210 svdup_laneq_u64(zn_u64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
211 svdup_laneq_s8(zn_s8
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 15]}}
212 svdup_laneq_s16(zn_s16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
213 svdup_laneq_s32(zn_s32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
214 svdup_laneq_s64(zn_s64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
215 svdup_laneq_f16(zn_f16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
216 svdup_laneq_f32(zn_f32
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
217 svdup_laneq_f64(zn_f64
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
218 svdup_laneq_bf16(zn_bf16
,-1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}