Debian Codegraph @

clang/test/Sema/zvk-invalid-features.c

raw
1 // REQUIRES: riscv-registered-target
2 // RUN: %clang_cc1 -triple riscv64 %s -target-feature +v -fsyntax-only -verify
3
4 #include <riscv_vector.h>
5
6 void test_zvk_features(vuint32m4_t vd, vuint32m4_t vs2, vuint32m4_t vs1, vuint64m1_t vs2_64, vuint64m1_t vs1_64, size_t vl) {
7 // zvbb
8 __riscv_vbrev(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvbb}}
9 __riscv_vclz(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvbb}}
10 __riscv_vctz(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvbb}}
11 __riscv_vcpop(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvbb}}
12 __riscv_vwsll(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvbb}}
13
14 // zvbc
15 __riscv_vclmul(vs2_64, vs1_64, vl); // expected-error {{builtin requires at least one of the following extensions: zvbc}}
16 __riscv_vclmulh(vs2_64, vs1_64, vl); // expected-error {{builtin requires at least one of the following extensions: zvbc}}
17
18 // zvkb
19 __riscv_vandn(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvkb}}
20 __riscv_vbrev8(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkb}}
21 __riscv_vrev8(vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkb}}
22 __riscv_vrol(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvkb}}
23 __riscv_vror(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvkb}}
24
25 // zvkg
26 __riscv_vghsh(vd, vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvkg}}
27 __riscv_vgmul(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvkg}}
28
29 // zvkned
30 __riscv_vaesdf_vv(vd, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
31 __riscv_vaesdm_vv(vd, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
32 __riscv_vaesef_vv(vd, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
33 __riscv_vaesem_vv(vd, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
34 __riscv_vaeskf1(vs2, 0, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
35 __riscv_vaeskf2(vd, vs2, 0, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
36 __riscv_vaesz(vd, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: zvkned}}
37
38 // zvknha or zvknhb
39 __riscv_vsha2ch(vd, vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvknha or zvknhb}}
40 __riscv_vsha2cl(vd, vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvknha or zvknhb}}
41 __riscv_vsha2ms(vd, vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvknha or zvknhb}}
42
43 //zvksed
44 __riscv_vsm4k(vs2, 0, vl); // expected-error {{builtin requires at least one of the following extensions: zvksed}}
45 __riscv_vsm4r_vv(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvksed}}
46
47 // zvksh
48 __riscv_vsm3c(vd, vs2, 0, vl); // expected-error {{builtin requires at least one of the following extensions: zvksh}}
49 __riscv_vsm3me(vs2, vs1, vl); // expected-error {{builtin requires at least one of the following extensions: zvksh}}
50 }