1 // REQUIRES: riscv-registered-target
2 // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
3 // RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
4 // RUN: -fsyntax-only -verify %s
6 #include <riscv_vector.h>
8 vint8m1_t
test_vset_v_index_not_constant(vint8m2_t dest
, vint8m1_t val
, int index
) {
9 // expected-error@+1 {{argument to '__riscv_vset_v_i8m1_i8m2' must be a constant integer}}
10 return __riscv_vset_v_i8m1_i8m2(dest
, index
, val
);
13 vint8m2_t
test_vset_v_i8m1_i8m2(vint8m2_t dest
, vint8m1_t val
) {
14 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
15 return __riscv_vset_v_i8m1_i8m2(dest
, 2, val
);
18 vint8m4_t
test_vset_v_i8m1_i8m4(vint8m4_t dest
, vint8m1_t val
) {
19 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
20 return __riscv_vset_v_i8m1_i8m4(dest
, 4, val
);
23 vint8m4_t
test_vset_v_i8m2_i8m4(vint8m4_t dest
, vint8m2_t val
) {
24 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
25 return __riscv_vset_v_i8m2_i8m4(dest
, 2, val
);
28 vint8m8_t
test_vset_v_i8m1_i8m8(vint8m8_t dest
, vint8m1_t val
) {
29 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
30 return __riscv_vset_v_i8m1_i8m8(dest
, 8, val
);
33 vint8m8_t
test_vset_v_i8m2_i8m8(vint8m8_t dest
, vint8m2_t val
) {
34 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
35 return __riscv_vset_v_i8m2_i8m8(dest
, 4, val
);
38 vint8m8_t
test_vset_v_i8m4_i8m8(vint8m8_t dest
, vint8m4_t val
) {
39 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
40 return __riscv_vset_v_i8m4_i8m8(dest
, 2, val
);
43 vint16m2_t
test_vset_v_i16m1_i16m2(vint16m2_t dest
, vint16m1_t val
) {
44 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
45 return __riscv_vset_v_i16m1_i16m2(dest
, 2, val
);
48 vint16m4_t
test_vset_v_i16m1_i16m4(vint16m4_t dest
, vint16m1_t val
) {
49 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
50 return __riscv_vset_v_i16m1_i16m4(dest
, 4, val
);
53 vint16m4_t
test_vset_v_i16m2_i16m4(vint16m4_t dest
, vint16m2_t val
) {
54 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
55 return __riscv_vset_v_i16m2_i16m4(dest
, 2, val
);
58 vint16m8_t
test_vset_v_i16m1_i16m8(vint16m8_t dest
, vint16m1_t val
) {
59 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
60 return __riscv_vset_v_i16m1_i16m8(dest
, 8, val
);
63 vint16m8_t
test_vset_v_i16m2_i16m8(vint16m8_t dest
, vint16m2_t val
) {
64 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
65 return __riscv_vset_v_i16m2_i16m8(dest
, 4, val
);
68 vint16m8_t
test_vset_v_i16m4_i16m8(vint16m8_t dest
, vint16m4_t val
) {
69 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
70 return __riscv_vset_v_i16m4_i16m8(dest
, 2, val
);
73 vint32m2_t
test_vset_v_i32m1_i32m2(vint32m2_t dest
, vint32m1_t val
) {
74 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
75 return __riscv_vset_v_i32m1_i32m2(dest
, 2, val
);
78 vint32m4_t
test_vset_v_i32m1_i32m4(vint32m4_t dest
, vint32m1_t val
) {
79 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
80 return __riscv_vset_v_i32m1_i32m4(dest
, 4, val
);
83 vint32m4_t
test_vset_v_i32m2_i32m4(vint32m4_t dest
, vint32m2_t val
) {
84 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
85 return __riscv_vset_v_i32m2_i32m4(dest
, 2, val
);
88 vint32m8_t
test_vset_v_i32m1_i32m8(vint32m8_t dest
, vint32m1_t val
) {
89 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
90 return __riscv_vset_v_i32m1_i32m8(dest
, 8, val
);
93 vint32m8_t
test_vset_v_i32m2_i32m8(vint32m8_t dest
, vint32m2_t val
) {
94 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
95 return __riscv_vset_v_i32m2_i32m8(dest
, 4, val
);
98 vint32m8_t
test_vset_v_i32m4_i32m8(vint32m8_t dest
, vint32m4_t val
) {
99 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
100 return __riscv_vset_v_i32m4_i32m8(dest
, 2, val
);
103 vint64m2_t
test_vset_v_i64m1_i64m2(vint64m2_t dest
, vint64m1_t val
) {
104 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
105 return __riscv_vset_v_i64m1_i64m2(dest
, 2, val
);
108 vint64m4_t
test_vset_v_i64m1_i64m4(vint64m4_t dest
, vint64m1_t val
) {
109 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
110 return __riscv_vset_v_i64m1_i64m4(dest
, 4, val
);
113 vint64m4_t
test_vset_v_i64m2_i64m4(vint64m4_t dest
, vint64m2_t val
) {
114 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
115 return __riscv_vset_v_i64m2_i64m4(dest
, 2, val
);
118 vint64m8_t
test_vset_v_i64m1_i64m8(vint64m8_t dest
, vint64m1_t val
) {
119 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
120 return __riscv_vset_v_i64m1_i64m8(dest
, 8, val
);
123 vint64m8_t
test_vset_v_i64m2_i64m8(vint64m8_t dest
, vint64m2_t val
) {
124 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
125 return __riscv_vset_v_i64m2_i64m8(dest
, 4, val
);
128 vint64m8_t
test_vset_v_i64m4_i64m8(vint64m8_t dest
, vint64m4_t val
) {
129 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
130 return __riscv_vset_v_i64m4_i64m8(dest
, 2, val
);
133 vuint8m2_t
test_vset_v_u8m1_u8m2(vuint8m2_t dest
, vuint8m1_t val
) {
134 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
135 return __riscv_vset_v_u8m1_u8m2(dest
, 2, val
);
138 vuint8m4_t
test_vset_v_u8m1_u8m4(vuint8m4_t dest
, vuint8m1_t val
) {
139 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
140 return __riscv_vset_v_u8m1_u8m4(dest
, 4, val
);
143 vuint8m4_t
test_vset_v_u8m2_u8m4(vuint8m4_t dest
, vuint8m2_t val
) {
144 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
145 return __riscv_vset_v_u8m2_u8m4(dest
, 2, val
);
148 vuint8m8_t
test_vset_v_u8m1_u8m8(vuint8m8_t dest
, vuint8m1_t val
) {
149 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
150 return __riscv_vset_v_u8m1_u8m8(dest
, 8, val
);
153 vuint8m8_t
test_vset_v_u8m2_u8m8(vuint8m8_t dest
, vuint8m2_t val
) {
154 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
155 return __riscv_vset_v_u8m2_u8m8(dest
, 4, val
);
158 vuint8m8_t
test_vset_v_u8m4_u8m8(vuint8m8_t dest
, vuint8m4_t val
) {
159 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
160 return __riscv_vset_v_u8m4_u8m8(dest
, 2, val
);
163 vuint16m2_t
test_vset_v_u16m1_u16m2(vuint16m2_t dest
, vuint16m1_t val
) {
164 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
165 return __riscv_vset_v_u16m1_u16m2(dest
, 2, val
);
168 vuint16m4_t
test_vset_v_u16m1_u16m4(vuint16m4_t dest
, vuint16m1_t val
) {
169 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
170 return __riscv_vset_v_u16m1_u16m4(dest
, 4, val
);
173 vuint16m4_t
test_vset_v_u16m2_u16m4(vuint16m4_t dest
, vuint16m2_t val
) {
174 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
175 return __riscv_vset_v_u16m2_u16m4(dest
, 2, val
);
178 vuint16m8_t
test_vset_v_u16m1_u16m8(vuint16m8_t dest
, vuint16m1_t val
) {
179 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
180 return __riscv_vset_v_u16m1_u16m8(dest
, 8, val
);
183 vuint16m8_t
test_vset_v_u16m2_u16m8(vuint16m8_t dest
, vuint16m2_t val
) {
184 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
185 return __riscv_vset_v_u16m2_u16m8(dest
, 4, val
);
188 vuint16m8_t
test_vset_v_u16m4_u16m8(vuint16m8_t dest
, vuint16m4_t val
) {
189 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
190 return __riscv_vset_v_u16m4_u16m8(dest
, 2, val
);
193 vuint32m2_t
test_vset_v_u32m1_u32m2(vuint32m2_t dest
, vuint32m1_t val
) {
194 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
195 return __riscv_vset_v_u32m1_u32m2(dest
, 2, val
);
198 vuint32m4_t
test_vset_v_u32m1_u32m4(vuint32m4_t dest
, vuint32m1_t val
) {
199 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
200 return __riscv_vset_v_u32m1_u32m4(dest
, 4, val
);
203 vuint32m4_t
test_vset_v_u32m2_u32m4(vuint32m4_t dest
, vuint32m2_t val
) {
204 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
205 return __riscv_vset_v_u32m2_u32m4(dest
, 2, val
);
208 vuint32m8_t
test_vset_v_u32m1_u32m8(vuint32m8_t dest
, vuint32m1_t val
) {
209 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
210 return __riscv_vset_v_u32m1_u32m8(dest
, 8, val
);
213 vuint32m8_t
test_vset_v_u32m2_u32m8(vuint32m8_t dest
, vuint32m2_t val
) {
214 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
215 return __riscv_vset_v_u32m2_u32m8(dest
, 4, val
);
218 vuint32m8_t
test_vset_v_u32m4_u32m8(vuint32m8_t dest
, vuint32m4_t val
) {
219 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
220 return __riscv_vset_v_u32m4_u32m8(dest
, 2, val
);
223 vuint64m2_t
test_vset_v_u64m1_u64m2(vuint64m2_t dest
, vuint64m1_t val
) {
224 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
225 return __riscv_vset_v_u64m1_u64m2(dest
, 2, val
);
228 vuint64m4_t
test_vset_v_u64m1_u64m4(vuint64m4_t dest
, vuint64m1_t val
) {
229 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
230 return __riscv_vset_v_u64m1_u64m4(dest
, 4, val
);
233 vuint64m4_t
test_vset_v_u64m2_u64m4(vuint64m4_t dest
, vuint64m2_t val
) {
234 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
235 return __riscv_vset_v_u64m2_u64m4(dest
, 2, val
);
238 vuint64m8_t
test_vset_v_u64m1_u64m8(vuint64m8_t dest
, vuint64m1_t val
) {
239 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
240 return __riscv_vset_v_u64m1_u64m8(dest
, 8, val
);
243 vuint64m8_t
test_vset_v_u64m2_u64m8(vuint64m8_t dest
, vuint64m2_t val
) {
244 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
245 return __riscv_vset_v_u64m2_u64m8(dest
, 4, val
);
248 vuint64m8_t
test_vset_v_u64m4_u64m8(vuint64m8_t dest
, vuint64m4_t val
) {
249 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
250 return __riscv_vset_v_u64m4_u64m8(dest
, 2, val
);
253 vfloat32m2_t
test_vset_v_f32m1_f32m2(vfloat32m2_t dest
, vfloat32m1_t val
) {
254 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
255 return __riscv_vset_v_f32m1_f32m2(dest
, 2, val
);
258 vfloat32m4_t
test_vset_v_f32m1_f32m4(vfloat32m4_t dest
, vfloat32m1_t val
) {
259 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
260 return __riscv_vset_v_f32m1_f32m4(dest
, 4, val
);
263 vfloat32m4_t
test_vset_v_f32m2_f32m4(vfloat32m4_t dest
, vfloat32m2_t val
) {
264 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
265 return __riscv_vset_v_f32m2_f32m4(dest
, 2, val
);
268 vfloat32m8_t
test_vset_v_f32m1_f32m8(vfloat32m8_t dest
, vfloat32m1_t val
) {
269 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
270 return __riscv_vset_v_f32m1_f32m8(dest
, 8, val
);
273 vfloat32m8_t
test_vset_v_f32m2_f32m8(vfloat32m8_t dest
, vfloat32m2_t val
) {
274 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
275 return __riscv_vset_v_f32m2_f32m8(dest
, 4, val
);
278 vfloat32m8_t
test_vset_v_f32m4_f32m8(vfloat32m8_t dest
, vfloat32m4_t val
) {
279 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
280 return __riscv_vset_v_f32m4_f32m8(dest
, 2, val
);
283 vfloat64m2_t
test_vset_v_f64m1_f64m2(vfloat64m2_t dest
, vfloat64m1_t val
) {
284 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
285 return __riscv_vset_v_f64m1_f64m2(dest
, 2, val
);
288 vfloat64m4_t
test_vset_v_f64m1_f64m4(vfloat64m4_t dest
, vfloat64m1_t val
) {
289 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
290 return __riscv_vset_v_f64m1_f64m4(dest
, 4, val
);
293 vfloat64m4_t
test_vset_v_f64m2_f64m4(vfloat64m4_t dest
, vfloat64m2_t val
) {
294 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
295 return __riscv_vset_v_f64m2_f64m4(dest
, 2, val
);
298 vfloat64m8_t
test_vset_v_f64m1_f64m8(vfloat64m8_t dest
, vfloat64m1_t val
) {
299 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
300 return __riscv_vset_v_f64m1_f64m8(dest
, 8, val
);
303 vfloat64m8_t
test_vset_v_f64m2_f64m8(vfloat64m8_t dest
, vfloat64m2_t val
) {
304 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
305 return __riscv_vset_v_f64m2_f64m8(dest
, 4, val
);
308 vfloat64m8_t
test_vset_v_f64m4_f64m8(vfloat64m8_t dest
, vfloat64m4_t val
) {
309 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
310 return __riscv_vset_v_f64m4_f64m8(dest
, 2, val
);
313 vfloat16m2_t
test_vset_v_f16m1_f16m2(vfloat16m2_t dest
, vfloat16m1_t val
) {
314 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
315 return __riscv_vset_v_f16m1_f16m2(dest
, 2, val
);
318 vfloat16m4_t
test_vset_v_f16m1_f16m4(vfloat16m4_t dest
, vfloat16m1_t val
) {
319 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
320 return __riscv_vset_v_f16m1_f16m4(dest
, 4, val
);
323 vfloat16m4_t
test_vset_v_f16m2_f16m4(vfloat16m4_t dest
, vfloat16m2_t val
) {
324 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
325 return __riscv_vset_v_f16m2_f16m4(dest
, 2, val
);
328 vfloat16m8_t
test_vset_v_f16m1_f16m8(vfloat16m8_t dest
, vfloat16m1_t val
) {
329 // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}
330 return __riscv_vset_v_f16m1_f16m8(dest
, 8, val
);
333 vfloat16m8_t
test_vset_v_f16m2_f16m8(vfloat16m8_t dest
, vfloat16m2_t val
) {
334 // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}
335 return __riscv_vset_v_f16m2_f16m8(dest
, 4, val
);
338 vfloat16m8_t
test_vset_v_f16m4_f16m8(vfloat16m8_t dest
, vfloat16m4_t val
) {
339 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
340 return __riscv_vset_v_f16m4_f16m8(dest
, 2, val
);
343 vint32m1x2_t
test_vset_v_i32m1_i32m1x2(vint32m1x2_t dest
, vint32m1_t val
) {
344 // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}
345 return __riscv_vset_v_i32m1_i32m1x2(dest
, 2, val
);