Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr106326_1.c

raw
1 /* { dg-options "-O2" } */
2 /* { dg-final { check-function-bodies "**" "" } } */
3
4 #include <arm_sve.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 /*
11 ** add1:
12 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
13 ** ret
14 */
15 svint32_t
16 add1 (svint32_t x, svint32_t y)
17 {
18 return svadd_z (svptrue_b8 (), x, y);
19 }
20
21 /*
22 ** add2:
23 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
24 ** ret
25 */
26 svint32_t
27 add2 (svint32_t x, svint32_t y)
28 {
29 return svadd_z (svptrue_b16 (), x, y);
30 }
31
32 /*
33 ** add3:
34 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
35 ** ret
36 */
37 svint32_t
38 add3 (svint32_t x, svint32_t y)
39 {
40 return svadd_z (svptrue_b32 (), x, y);
41 }
42
43 /*
44 ** add4:
45 ** ...
46 ** movprfx [^\n]+
47 ** ...
48 ** ret
49 */
50 svint32_t
51 add4 (svint32_t x, svint32_t y)
52 {
53 return svadd_z (svptrue_b64 (), x, y);
54 }
55
56 /*
57 ** add5:
58 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
59 ** ret
60 */
61 svint32_t
62 add5 (svint32_t x, svint32_t y)
63 {
64 return svadd_m (svptrue_b8 (), x, y);
65 }
66
67 /*
68 ** add6:
69 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
70 ** ret
71 */
72 svint32_t
73 add6 (svint32_t x, svint32_t y)
74 {
75 return svadd_m (svptrue_b16 (), x, y);
76 }
77
78 /*
79 ** add7:
80 ** add z0\.s, (z1\.s, z0\.s|z0\.s, z1\.s)
81 ** ret
82 */
83 svint32_t
84 add7 (svint32_t x, svint32_t y)
85 {
86 return svadd_m (svptrue_b32 (), x, y);
87 }
88
89 /*
90 ** add8:
91 ** ptrue (p[0-7])\.d(?:, all)?
92 ** add z0\.s, \1/m, z0\.s, z1\.s
93 ** ret
94 */
95 svint32_t
96 add8 (svint32_t x, svint32_t y)
97 {
98 return svadd_m (svptrue_b64 (), x, y);
99 }
100
101 /*
102 ** add9:
103 ** ptrue (p[0-7])\.s(?:, all)?
104 ** add z0\.h, \1/m, z0\.h, z1\.h
105 ** ret
106 */
107 svint16_t
108 add9 (svint16_t x, svint16_t y)
109 {
110 return svadd_m (svptrue_b32 (), x, y);
111 }
112
113 /*
114 ** and1:
115 ** and z0\.s, z0\.s, #(?:0x)?1
116 ** ret
117 */
118 svint32_t
119 and1 (svint32_t x)
120 {
121 return svand_z (svptrue_b8 (), x, 1);
122 }
123
124 /*
125 ** and2:
126 ** and z0\.s, z0\.s, #(?:0x)?1
127 ** ret
128 */
129 svint32_t
130 and2 (svint32_t x)
131 {
132 return svand_z (svptrue_b16 (), x, 1);
133 }
134
135 /*
136 ** and3:
137 ** and z0\.s, z0\.s, #(?:0x)?1
138 ** ret
139 */
140 svint32_t
141 and3 (svint32_t x)
142 {
143 return svand_z (svptrue_b32 (), x, 1);
144 }
145
146 /*
147 ** and4:
148 ** (?!and z0\.s, z0\.s, #).*
149 ** ret
150 */
151 svint32_t
152 and4 (svint32_t x)
153 {
154 return svand_z (svptrue_b64 (), x, 1);
155 }
156
157 /*
158 ** and5:
159 ** and z0\.s, z0\.s, #(?:0x)?1
160 ** ret
161 */
162 svint32_t
163 and5 (svint32_t x)
164 {
165 return svand_m (svptrue_b8 (), x, 1);
166 }
167
168 /*
169 ** and6:
170 ** and z0\.s, z0\.s, #(?:0x)?1
171 ** ret
172 */
173 svint32_t
174 and6 (svint32_t x)
175 {
176 return svand_m (svptrue_b16 (), x, 1);
177 }
178
179 /*
180 ** and7:
181 ** and z0\.s, z0\.s, #(?:0x)?1
182 ** ret
183 */
184 svint32_t
185 and7 (svint32_t x)
186 {
187 return svand_m (svptrue_b32 (), x, 1);
188 }
189
190 /*
191 ** and8:
192 ** (?!and z0\.s, z0\.s, #).*
193 ** ret
194 */
195 svint32_t
196 and8 (svint32_t x)
197 {
198 return svand_m (svptrue_b64 (), x, 1);
199 }
200
201 /*
202 ** and9:
203 ** (
204 ** and p0\.b, p0/z, p1\.b, p1\.b
205 ** |
206 ** and p0\.b, p1/z, p0\.b, p0\.b
207 ** )
208 ** ret
209 */
210 svbool_t
211 and9 (svbool_t x, svbool_t y)
212 {
213 return svand_z (svptrue_b8 (), x, y);
214 }
215
216 /*
217 ** not1:
218 ** ptrue (p[0-7])\.b(?:, all)?
219 ** not z0\.s, \1/m, z1\.s
220 ** ret
221 */
222 svint32_t
223 not1 (svint32_t x, svint32_t y)
224 {
225 return svnot_m (x, svptrue_b8 (), y);
226 }
227
228 /*
229 ** cvt1:
230 ** ptrue (p[0-7])\.b(?:, all)?
231 ** fcvtzs z0\.s, \1/m, z0\.h
232 ** ret
233 */
234 svint32_t
235 cvt1 (svfloat16_t x)
236 {
237 return svcvt_s32_z (svptrue_b8 (), x);
238 }
239
240 /*
241 ** cvt2:
242 ** ptrue (p[0-7])\.b(?:, all)?
243 ** fcvtzs z0\.s, \1/m, z0\.h
244 ** ret
245 */
246 svint32_t
247 cvt2 (svfloat16_t x)
248 {
249 return svcvt_s32_z (svptrue_b16 (), x);
250 }
251
252 /*
253 ** cvt3:
254 ** ptrue (p[0-7])\.b(?:, all)?
255 ** fcvtzs z0\.s, \1/m, z0\.h
256 ** ret
257 */
258 svint32_t
259 cvt3 (svfloat16_t x)
260 {
261 return svcvt_s32_z (svptrue_b32 (), x);
262 }
263
264 /*
265 ** cvt4:
266 ** ...
267 ** movprfx [^\n]+
268 ** ...
269 ** ret
270 */
271 svint32_t
272 cvt4 (svfloat16_t x)
273 {
274 return svcvt_s32_z (svptrue_b64 (), x);
275 }
276
277 /*
278 ** cvt5:
279 ** ptrue (p[0-7])\.b(?:, all)?
280 ** fcvt z0\.h, \1/m, z0\.s
281 ** ret
282 */
283 svfloat16_t
284 cvt5 (svfloat32_t x)
285 {
286 return svcvt_f16_z (svptrue_b8 (), x);
287 }
288
289 /*
290 ** cvt6:
291 ** ptrue (p[0-7])\.b(?:, all)?
292 ** fcvt z0\.h, \1/m, z0\.s
293 ** ret
294 */
295 svfloat16_t
296 cvt6 (svfloat32_t x)
297 {
298 return svcvt_f16_z (svptrue_b16 (), x);
299 }
300
301 /*
302 ** cvt7:
303 ** ptrue (p[0-7])\.b(?:, all)?
304 ** fcvt z0\.h, \1/m, z0\.s
305 ** ret
306 */
307 svfloat16_t
308 cvt7 (svfloat32_t x)
309 {
310 return svcvt_f16_z (svptrue_b32 (), x);
311 }
312
313 /*
314 ** cvt8:
315 ** ...
316 ** movprfx [^\n]+
317 ** ...
318 ** ret
319 */
320 svfloat16_t
321 cvt8 (svfloat32_t x)
322 {
323 return svcvt_f16_z (svptrue_b64 (), x);
324 }
325
326 /*
327 ** cvt9:
328 ** ptrue (p[0-7])\.b(?:, all)?
329 ** scvtf z0\.h, \1/m, z0\.h
330 ** ret
331 */
332 svfloat16_t
333 cvt9 (svint16_t x)
334 {
335 return svcvt_f16_z (svptrue_b8 (), x);
336 }
337
338 /*
339 ** cvt10:
340 ** ptrue (p[0-7])\.b(?:, all)?
341 ** scvtf z0\.h, \1/m, z0\.h
342 ** ret
343 */
344 svfloat16_t
345 cvt10 (svint16_t x)
346 {
347 return svcvt_f16_z (svptrue_b16 (), x);
348 }
349
350 /*
351 ** cvt11:
352 ** ...
353 ** movprfx [^\n]+
354 ** ...
355 ** ret
356 */
357 svfloat16_t
358 cvt11 (svint16_t x)
359 {
360 return svcvt_f16_z (svptrue_b32 (), x);
361 }
362
363 /*
364 ** cvt12:
365 ** ...
366 ** movprfx [^\n]+
367 ** ...
368 ** ret
369 */
370 svfloat16_t
371 cvt12 (svint16_t x)
372 {
373 return svcvt_f16_z (svptrue_b64 (), x);
374 }
375
376 #ifdef __cplusplus
377 }
378 #endif