Debian Codegraph @

clang/test/Sema/sifive_sf_vset_invalid.c

raw
1 // REQUIRES: riscv-registered-target
2 // RUN: %clang_cc1 -triple riscv64 -target-feature +v \
3 // RUN: -target-feature +xsfmmbase -disable-O0-optnone \
4 // RUN: -o - -fsyntax-only %s -verify
5
6 #include <sifive_vector.h>
7
8 void test(size_t vl) {
9 __riscv_sf_vsettnt(vl, 1, 8);
10 // expected-error@-1 {{argument value 8 is outside the valid range [1, 3]}}
11 __riscv_sf_vsettm(vl, 8, 9);
12 // expected-error@-1 {{argument value 8 is outside the valid range [0, 3]}}
13 __riscv_sf_vsettn(vl, 8, 2);
14 // expected-error@-1 {{argument value 8 is outside the valid range [0, 3]}}
15 __riscv_sf_vsettk(vl, 0, 0);
16 // expected-error@-1 {{argument value 0 is outside the valid range [1, 3]}}
17 }