Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/mov-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv32gcv -mabi=ilp32d -O3" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include "riscv_vector.h"
6
7 /*
8 ** mov3:
9 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]
10 ** vle32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
11 ** vse32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
12 ** ret
13 */
14 void mov3 (int32_t *in, int32_t *out)
15 {
16 vint32mf2_t v = *(vint32mf2_t*)in;
17 *(vint32mf2_t*)out = v;
18 }
19
20 /*
21 ** mov4:
22 ** vl1re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
23 ** vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
24 ** ret
25 */
26 void mov4 (int32_t *in, int32_t *out)
27 {
28 vint32m1_t v = *(vint32m1_t*)in;
29 *(vint32m1_t*)out = v;
30 }
31
32 /*
33 ** mov5:
34 ** vl2re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
35 ** vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
36 ** ret
37 */
38 void mov5 (int32_t *in, int32_t *out)
39 {
40 vint32m2_t v = *(vint32m2_t*)in;
41 *(vint32m2_t*)out = v;
42 }
43
44 /*
45 ** mov6:
46 ** vl4re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
47 ** vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
48 ** ret
49 */
50 void mov6 (int32_t *in, int32_t *out)
51 {
52 vint32m4_t v = *(vint32m4_t*)in;
53 *(vint32m4_t*)out = v;
54 }
55
56 /*
57 ** mov7:
58 ** vl8re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
59 ** vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
60 ** ret
61 */
62 void mov7 (int32_t *in, int32_t *out)
63 {
64 vint32m8_t v = *(vint32m8_t*)in;
65 *(vint32m8_t*)out = v;
66 }
67
68 /*
69 ** mov8:
70 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]
71 ** vle32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
72 ** vse32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
73 ** ret
74 */
75 void mov8 (uint32_t *in, uint32_t *out)
76 {
77 vuint32mf2_t v = *(vuint32mf2_t*)in;
78 *(vuint32mf2_t*)out = v;
79 }
80
81 /*
82 ** mov9:
83 ** vl1re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
84 ** vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
85 ** ret
86 */
87 void mov9 (uint32_t *in, uint32_t *out)
88 {
89 vuint32m1_t v = *(vuint32m1_t*)in;
90 *(vuint32m1_t*)out = v;
91 }
92
93 /*
94 ** mov10:
95 ** vl2re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
96 ** vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
97 ** ret
98 */
99 void mov10 (uint32_t *in, uint32_t *out)
100 {
101 vuint32m2_t v = *(vuint32m2_t*)in;
102 *(vuint32m2_t*)out = v;
103 }
104
105 /*
106 ** mov11:
107 ** vl4re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
108 ** vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
109 ** ret
110 */
111 void mov11 (uint32_t *in, uint32_t *out)
112 {
113 vuint32m4_t v = *(vuint32m4_t*)in;
114 *(vuint32m4_t*)out = v;
115 }
116
117 /*
118 ** mov12:
119 ** vl8re32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
120 ** vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
121 ** ret
122 */
123 void mov12 (uint32_t *in, uint32_t *out)
124 {
125 vuint32m8_t v = *(vuint32m8_t*)in;
126 *(vuint32m8_t*)out = v;
127 }