Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/mov-2.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 ** mov2:
9 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*mf4,\s*t[au],\s*m[au]
10 ** vle16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
11 ** vse16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
12 ** ret
13 */
14 void mov2 (int16_t *in, int16_t *out)
15 {
16 vint16mf4_t v = *(vint16mf4_t*)in;
17 *(vint16mf4_t*)out = v;
18 }
19
20 /*
21 ** mov3:
22 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*mf2,\s*t[au],\s*m[au]
23 ** vle16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
24 ** vse16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
25 ** ret
26 */
27 void mov3 (int16_t *in, int16_t *out)
28 {
29 vint16mf2_t v = *(vint16mf2_t*)in;
30 *(vint16mf2_t*)out = v;
31 }
32
33 /*
34 ** mov4:
35 ** vl1re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
36 ** vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
37 ** ret
38 */
39 void mov4 (int16_t *in, int16_t *out)
40 {
41 vint16m1_t v = *(vint16m1_t*)in;
42 *(vint16m1_t*)out = v;
43 }
44
45 /*
46 ** mov5:
47 ** vl2re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
48 ** vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
49 ** ret
50 */
51 void mov5 (int16_t *in, int16_t *out)
52 {
53 vint16m2_t v = *(vint16m2_t*)in;
54 *(vint16m2_t*)out = v;
55 }
56
57 /*
58 ** mov6:
59 ** vl4re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
60 ** vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
61 ** ret
62 */
63 void mov6 (int16_t *in, int16_t *out)
64 {
65 vint16m4_t v = *(vint16m4_t*)in;
66 *(vint16m4_t*)out = v;
67 }
68
69 /*
70 ** mov7:
71 ** vl8re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
72 ** vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
73 ** ret
74 */
75 void mov7 (int16_t *in, int16_t *out)
76 {
77 vint16m8_t v = *(vint16m8_t*)in;
78 *(vint16m8_t*)out = v;
79 }
80
81 /*
82 ** mov8:
83 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*mf4,\s*t[au],\s*m[au]
84 ** vle16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
85 ** vse16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
86 ** ret
87 */
88 void mov8 (uint16_t *in, uint16_t *out)
89 {
90 vuint16mf4_t v = *(vuint16mf4_t*)in;
91 *(vuint16mf4_t*)out = v;
92 }
93
94 /*
95 ** mov9:
96 ** vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*mf2,\s*t[au],\s*m[au]
97 ** vle16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
98 ** vse16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
99 ** ret
100 */
101 void mov9 (uint16_t *in, uint16_t *out)
102 {
103 vuint16mf2_t v = *(vuint16mf2_t*)in;
104 *(vuint16mf2_t*)out = v;
105 }
106
107 /*
108 ** mov10:
109 ** vl1re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
110 ** vs1r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
111 ** ret
112 */
113 void mov10 (uint16_t *in, uint16_t *out)
114 {
115 vuint16m1_t v = *(vuint16m1_t*)in;
116 *(vuint16m1_t*)out = v;
117 }
118
119 /*
120 ** mov11:
121 ** vl2re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
122 ** vs2r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
123 ** ret
124 */
125 void mov11 (uint16_t *in, uint16_t *out)
126 {
127 vuint16m2_t v = *(vuint16m2_t*)in;
128 *(vuint16m2_t*)out = v;
129 }
130
131 /*
132 ** mov12:
133 ** vl4re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
134 ** vs4r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
135 ** ret
136 */
137 void mov12 (uint16_t *in, uint16_t *out)
138 {
139 vuint16m4_t v = *(vuint16m4_t*)in;
140 *(vuint16m4_t*)out = v;
141 }
142
143 /*
144 ** mov13:
145 ** vl8re16\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
146 ** vs8r\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)
147 ** ret
148 */
149 void mov13 (uint16_t *in, uint16_t *out)
150 {
151 vuint16m8_t v = *(vuint16m8_t*)in;
152 *(vuint16m8_t*)out = v;
153 }