Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/asm/cntd_pat.c

raw
1 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
2
3 #include "test_sve_acle.h"
4
5 /*
6 ** cntd_pow2:
7 ** cntd x0, pow2
8 ** ret
9 */
10 PROTO (cntd_pow2, uint64_t, ()) { return svcntd_pat (SV_POW2); }
11
12 /*
13 ** cntd_vl1:
14 ** mov x0, #?1
15 ** ret
16 */
17 PROTO (cntd_vl1, uint64_t, ()) { return svcntd_pat (SV_VL1); }
18
19 /*
20 ** cntd_vl2:
21 ** mov x0, #?2
22 ** ret
23 */
24 PROTO (cntd_vl2, uint64_t, ()) { return svcntd_pat (SV_VL2); }
25
26 /*
27 ** cntd_vl3:
28 ** cntd x0, vl3
29 ** ret
30 */
31 PROTO (cntd_vl3, uint64_t, ()) { return svcntd_pat (SV_VL3); }
32
33 /*
34 ** cntd_vl4:
35 ** cntd x0, vl4
36 ** ret
37 */
38 PROTO (cntd_vl4, uint64_t, ()) { return svcntd_pat (SV_VL4); }
39
40 /*
41 ** cntd_vl5:
42 ** cntd x0, vl5
43 ** ret
44 */
45 PROTO (cntd_vl5, uint64_t, ()) { return svcntd_pat (SV_VL5); }
46
47 /*
48 ** cntd_vl6:
49 ** cntd x0, vl6
50 ** ret
51 */
52 PROTO (cntd_vl6, uint64_t, ()) { return svcntd_pat (SV_VL6); }
53
54 /*
55 ** cntd_vl7:
56 ** cntd x0, vl7
57 ** ret
58 */
59 PROTO (cntd_vl7, uint64_t, ()) { return svcntd_pat (SV_VL7); }
60
61 /*
62 ** cntd_vl8:
63 ** cntd x0, vl8
64 ** ret
65 */
66 PROTO (cntd_vl8, uint64_t, ()) { return svcntd_pat (SV_VL8); }
67
68 /*
69 ** cntd_vl16:
70 ** cntd x0, vl16
71 ** ret
72 */
73 PROTO (cntd_vl16, uint64_t, ()) { return svcntd_pat (SV_VL16); }
74
75 /*
76 ** cntd_vl32:
77 ** cntd x0, vl32
78 ** ret
79 */
80 PROTO (cntd_vl32, uint64_t, ()) { return svcntd_pat (SV_VL32); }
81
82 /*
83 ** cntd_vl64:
84 ** cntd x0, vl64
85 ** ret
86 */
87 PROTO (cntd_vl64, uint64_t, ()) { return svcntd_pat (SV_VL64); }
88
89 /*
90 ** cntd_vl128:
91 ** cntd x0, vl128
92 ** ret
93 */
94 PROTO (cntd_vl128, uint64_t, ()) { return svcntd_pat (SV_VL128); }
95
96 /*
97 ** cntd_vl256:
98 ** cntd x0, vl256
99 ** ret
100 */
101 PROTO (cntd_vl256, uint64_t, ()) { return svcntd_pat (SV_VL256); }
102
103 /*
104 ** cntd_mul3:
105 ** cntd x0, mul3
106 ** ret
107 */
108 PROTO (cntd_mul3, uint64_t, ()) { return svcntd_pat (SV_MUL3); }
109
110 /*
111 ** cntd_mul4:
112 ** cntd x0, mul4
113 ** ret
114 */
115 PROTO (cntd_mul4, uint64_t, ()) { return svcntd_pat (SV_MUL4); }
116
117 /*
118 ** cntd_all:
119 ** cntd x0
120 ** ret
121 */
122 PROTO (cntd_all, uint64_t, ()) { return svcntd_pat (SV_ALL); }
123
124 /*
125 ** incd_32_pow2:
126 ** incd x0, pow2
127 ** ret
128 */
129 PROTO (incd_32_pow2, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_POW2); }
130
131 /*
132 ** incd_32_vl1:
133 ** add w0, w0, #?1
134 ** ret
135 */
136 PROTO (incd_32_vl1, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL1); }
137
138 /*
139 ** incd_32_vl2:
140 ** add w0, w0, #?2
141 ** ret
142 */
143 PROTO (incd_32_vl2, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL2); }
144
145 /*
146 ** incd_32_vl3:
147 ** incd x0, vl3
148 ** ret
149 */
150 PROTO (incd_32_vl3, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL3); }
151
152 /*
153 ** incd_32_vl4:
154 ** incd x0, vl4
155 ** ret
156 */
157 PROTO (incd_32_vl4, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL4); }
158
159 /*
160 ** incd_32_vl5:
161 ** incd x0, vl5
162 ** ret
163 */
164 PROTO (incd_32_vl5, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL5); }
165
166 /*
167 ** incd_32_vl6:
168 ** incd x0, vl6
169 ** ret
170 */
171 PROTO (incd_32_vl6, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL6); }
172
173 /*
174 ** incd_32_vl7:
175 ** incd x0, vl7
176 ** ret
177 */
178 PROTO (incd_32_vl7, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL7); }
179
180 /*
181 ** incd_32_vl8:
182 ** incd x0, vl8
183 ** ret
184 */
185 PROTO (incd_32_vl8, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL8); }
186
187 /*
188 ** incd_32_vl16:
189 ** incd x0, vl16
190 ** ret
191 */
192 PROTO (incd_32_vl16, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL16); }
193
194 /*
195 ** incd_32_vl32:
196 ** incd x0, vl32
197 ** ret
198 */
199 PROTO (incd_32_vl32, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL32); }
200
201 /*
202 ** incd_32_vl64:
203 ** incd x0, vl64
204 ** ret
205 */
206 PROTO (incd_32_vl64, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL64); }
207
208 /*
209 ** incd_32_vl128:
210 ** incd x0, vl128
211 ** ret
212 */
213 PROTO (incd_32_vl128, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL128); }
214
215 /*
216 ** incd_32_vl256:
217 ** incd x0, vl256
218 ** ret
219 */
220 PROTO (incd_32_vl256, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_VL256); }
221
222 /*
223 ** incd_32_mul3:
224 ** incd x0, mul3
225 ** ret
226 */
227 PROTO (incd_32_mul3, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_MUL3); }
228
229 /*
230 ** incd_32_mul4:
231 ** incd x0, mul4
232 ** ret
233 */
234 PROTO (incd_32_mul4, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_MUL4); }
235
236 /*
237 ** incd_32_all:
238 ** incd x0
239 ** ret
240 */
241 PROTO (incd_32_all, uint32_t, (uint32_t w0)) { return w0 + svcntd_pat (SV_ALL); }
242
243 /*
244 ** incd_64_pow2:
245 ** incd x0, pow2
246 ** ret
247 */
248 PROTO (incd_64_pow2, uint64_t, (uint64_t x0)) { return x0 + svcntd_pat (SV_POW2); }
249
250 /*
251 ** incd_64_all:
252 ** incd x0
253 ** ret
254 */
255 PROTO (incd_64_all, uint64_t, (uint64_t x0)) { return x0 + svcntd_pat (SV_ALL); }
256
257 /*
258 ** decd_32_pow2:
259 ** decd x0, pow2
260 ** ret
261 */
262 PROTO (decd_32_pow2, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_POW2); }
263
264 /*
265 ** decd_32_vl1:
266 ** sub w0, w0, #?1
267 ** ret
268 */
269 PROTO (decd_32_vl1, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL1); }
270
271 /*
272 ** decd_32_vl2:
273 ** sub w0, w0, #?2
274 ** ret
275 */
276 PROTO (decd_32_vl2, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL2); }
277
278 /*
279 ** decd_32_vl3:
280 ** decd x0, vl3
281 ** ret
282 */
283 PROTO (decd_32_vl3, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL3); }
284
285 /*
286 ** decd_32_vl4:
287 ** decd x0, vl4
288 ** ret
289 */
290 PROTO (decd_32_vl4, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL4); }
291
292 /*
293 ** decd_32_vl5:
294 ** decd x0, vl5
295 ** ret
296 */
297 PROTO (decd_32_vl5, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL5); }
298
299 /*
300 ** decd_32_vl6:
301 ** decd x0, vl6
302 ** ret
303 */
304 PROTO (decd_32_vl6, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL6); }
305
306 /*
307 ** decd_32_vl7:
308 ** decd x0, vl7
309 ** ret
310 */
311 PROTO (decd_32_vl7, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL7); }
312
313 /*
314 ** decd_32_vl8:
315 ** decd x0, vl8
316 ** ret
317 */
318 PROTO (decd_32_vl8, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL8); }
319
320 /*
321 ** decd_32_vl16:
322 ** decd x0, vl16
323 ** ret
324 */
325 PROTO (decd_32_vl16, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL16); }
326
327 /*
328 ** decd_32_vl32:
329 ** decd x0, vl32
330 ** ret
331 */
332 PROTO (decd_32_vl32, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL32); }
333
334 /*
335 ** decd_32_vl64:
336 ** decd x0, vl64
337 ** ret
338 */
339 PROTO (decd_32_vl64, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL64); }
340
341 /*
342 ** decd_32_vl128:
343 ** decd x0, vl128
344 ** ret
345 */
346 PROTO (decd_32_vl128, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL128); }
347
348 /*
349 ** decd_32_vl256:
350 ** decd x0, vl256
351 ** ret
352 */
353 PROTO (decd_32_vl256, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_VL256); }
354
355 /*
356 ** decd_32_mul3:
357 ** decd x0, mul3
358 ** ret
359 */
360 PROTO (decd_32_mul3, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_MUL3); }
361
362 /*
363 ** decd_32_mul4:
364 ** decd x0, mul4
365 ** ret
366 */
367 PROTO (decd_32_mul4, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_MUL4); }
368
369 /*
370 ** decd_32_all:
371 ** decd x0
372 ** ret
373 */
374 PROTO (decd_32_all, uint32_t, (uint32_t w0)) { return w0 - svcntd_pat (SV_ALL); }
375
376 /*
377 ** decd_64_pow2:
378 ** decd x0, pow2
379 ** ret
380 */
381 PROTO (decd_64_pow2, uint64_t, (uint64_t x0)) { return x0 - svcntd_pat (SV_POW2); }
382
383 /*
384 ** decd_64_all:
385 ** decd x0
386 ** ret
387 */
388 PROTO (decd_64_all, uint64_t, (uint64_t x0)) { return x0 - svcntd_pat (SV_ALL); }
389
390 /*
391 ** incd_s64_pow2_z0:
392 ** incd z0\.d, pow2
393 ** ret
394 */
395 TEST_UNIFORM_Z (incd_s64_pow2_z0, svint64_t,
396 z0 = svadd_n_s64_x (svptrue_b64 (), z0, svcntd_pat (SV_POW2)),
397 z0 = svadd_x (svptrue_b64 (), z0, svcntd_pat (SV_POW2)));
398
399 /*
400 ** incd_s64_pow2_z1:
401 ** movprfx z0, z1
402 ** incd z0\.d, pow2
403 ** ret
404 */
405 TEST_UNIFORM_Z (incd_s64_pow2_z1, svint64_t,
406 z0 = svadd_n_s64_x (svptrue_b64 (), z1, svcntd_pat (SV_POW2)),
407 z0 = svadd_x (svptrue_b64 (), z1, svcntd_pat (SV_POW2)));
408
409 /*
410 ** decd_s64_pow2_z0:
411 ** decd z0\.d, pow2
412 ** ret
413 */
414 TEST_UNIFORM_Z (decd_s64_pow2_z0, svint64_t,
415 z0 = svsub_n_s64_x (svptrue_b64 (), z0, svcntd_pat (SV_POW2)),
416 z0 = svsub_x (svptrue_b64 (), z0, svcntd_pat (SV_POW2)));
417
418 /*
419 ** decd_s64_pow2_z1:
420 ** movprfx z0, z1
421 ** decd z0\.d, pow2
422 ** ret
423 */
424 TEST_UNIFORM_Z (decd_s64_pow2_z1, svint64_t,
425 z0 = svsub_n_s64_x (svptrue_b64 (), z1, svcntd_pat (SV_POW2)),
426 z0 = svsub_x (svptrue_b64 (), z1, svcntd_pat (SV_POW2)));