Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/user-6.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=rv32gc_zve32f -mabi=ilp32d" } */
3
4 #include "riscv_vector.h"
5
6 void foo0 () {vbool64_t t;}
7 void foo1 () {vbool32_t t;}
8 void foo2 () {vbool16_t t;}
9 void foo3 () {vbool8_t t;}
10 void foo4 () {vbool4_t t;}
11 void foo5 () {vbool2_t t;}
12 void foo6 () {vbool1_t t;}
13 void foo7 () {vint8mf8_t t;}
14 void foo8 () {vuint8mf8_t t;}
15 void foo9 () {vint8mf4_t t;}
16 void foo10 () {vuint8mf4_t t;}
17 void foo11 () {vint8mf2_t t;}
18 void foo12 () {vuint8mf2_t t;}
19 void foo13 () {vint8m1_t t;}
20 void foo14 () {vuint8m1_t t;}
21 void foo15 () {vint8m2_t t;}
22 void foo16 () {vuint8m2_t t;}
23 void foo17 () {vint8m4_t t;}
24 void foo18 () {vuint8m4_t t;}
25 void foo19 () {vint8m8_t t;}
26 void foo20 () {vuint8m8_t t;}
27 void foo21 () {vint16mf4_t t;}
28 void foo22 () {vuint16mf4_t t;}
29 void foo23 () {vint16mf2_t t;}
30 void foo24 () {vuint16mf2_t t;}
31 void foo25 () {vint16m1_t t;}
32 void foo26 () {vuint16m1_t t;}
33 void foo27 () {vint16m2_t t;}
34 void foo28 () {vuint16m2_t t;}
35 void foo29 () {vint16m4_t t;}
36 void foo30 () {vuint16m4_t t;}
37 void foo31 () {vint16m8_t t;}
38 void foo32 () {vuint16m8_t t;}
39
40 /* To support target attribute, the vfloat*m*x*_t need to be registered
41 in advance. We add type and args/return value check during the
42 set current function but cannot cover below cases. It is the same
43 behavior compared to aarch64 sve. */
44 void foo33 () {vint32mf2_t t;}
45 void foo34 () {vuint32mf2_t t;}
46 void foo35 () {vint32m1_t t;}
47 void foo36 () {vuint32m1_t t;}
48 void foo37 () {vint32m2_t t;}
49 void foo38 () {vuint32m2_t t;}
50 void foo39 () {vint32m4_t t;}
51 void foo40 () {vuint32m4_t t;}
52 void foo41 () {vint32m8_t t;}
53 void foo42 () {vuint32m8_t t;}
54 void foo43 () {vint64m1_t t;}
55 void foo44 () {vuint64m1_t t;}
56 void foo45 () {vint64m2_t t;}
57 void foo46 () {vuint64m2_t t;}
58 void foo47 () {vint64m4_t t;}
59 void foo48 () {vuint64m4_t t;}
60 void foo49 () {vint64m8_t t;}
61 void foo50 () {vuint64m8_t t;}
62 void foo57 () {vfloat32mf2_t t;}
63 void foo58 () {vfloat32m1_t t;}
64 void foo59 () {vfloat32m2_t t;}
65 void foo60 () {vfloat32m4_t t;}
66 void foo61 () {vfloat32m8_t t;}
67 void foo62 () {vfloat64m1_t t;}
68 void foo63 () {vfloat64m2_t t;}
69 void foo64 () {vfloat64m4_t t;}
70 void foo65 () {vfloat64m8_t t;}
71
72 void new_foo0 (vbool64_t t) { } /* { dg-error {argument type 'vbool64_t' requires the minimal vector length '64' but '32' is given} } */
73 void new_foo7 (vint8mf8_t t) { } /* { dg-error {argument type 'vint8mf8_t' requires the minimal vector length '64' but '32' is given} } */
74 void new_foo8 (vuint8mf8_t t) { } /* { dg-error {argument type 'vuint8mf8_t' requires the minimal vector length '64' but '32'} } */
75 void new_foo21 (vint16mf4_t t) { } /* { dg-error {argument type 'vint16mf4_t' requires the minimal vector length '64' but '32' is given} } */
76 void new_foo22 (vuint16mf4_t t) { } /* { dg-error {argument type 'vuint16mf4_t' requires the minimal vector length '64' but '32' is given} } */
77 void new_foo33 (vint32mf2_t t) {} /* { dg-error {argument type 'vint32mf2_t' requires the minimal vector length '64' but '32' is given} } */
78 void new_foo34 (vuint32mf2_t t) { } /* { dg-error {argument type 'vuint32mf2_t' requires the minimal vector length '64' but '32' is given} } */
79 void new_foo43 (vint64m1_t t) { } /* { dg-error {argument type 'vint64m1_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
80 void new_foo44 (vuint64m1_t t) { } /* { dg-error {argument type 'vuint64m1_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
81 void new_foo45 (vint64m2_t t) { } /* { dg-error {argument type 'vint64m2_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
82 void new_foo46 (vuint64m2_t t) { } /* { dg-error {argument type 'vuint64m2_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
83 void new_foo47 (vint64m4_t t) { } /* { dg-error {argument type 'vint64m4_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
84 void new_foo48 (vuint64m4_t t) { } /* { dg-error {argument type 'vuint64m4_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
85 void new_foo49 (vint64m8_t t) { } /* { dg-error {argument type 'vint64m8_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
86 void new_foo50 (vuint64m8_t t) { } /* { dg-error {argument type 'vuint64m8_t' requires the zve64x, zve64f, zve64d or v ISA extension} } */
87 void new_foo57 (vfloat32mf2_t t) { } /* { dg-error {argument type 'vfloat32mf2_t' requires the minimal vector length '64' but '32' is given} } */
88 void new_foo62 (vfloat64m1_t t) { } /* { dg-error {argument type 'vfloat64m1_t' requires the zve64d or v ISA extension} } */
89 void new_foo63 (vfloat64m2_t t) { } /* { dg-error {argument type 'vfloat64m2_t' requires the zve64d or v ISA extension} } */
90 void new_foo64 (vfloat64m4_t t) { } /* { dg-error {argument type 'vfloat64m4_t' requires the zve64d or v ISA extension} } */
91 void new_foo65 (vfloat64m8_t t) { } /* { dg-error {argument type 'vfloat64m8_t' requires the zve64d or v ISA extension} } */