Debian Codegraph @

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

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