Debian Codegraph @

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

raw
1 /* { dg-additional-options "-msve-vector-bits=scalable" } */
2 /* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
3
4 #include "test_sve_acle.h"
5 #include <stdbool.h>
6
7 /*
8 ** test_bool_any:
9 ** ptest p0, p1\.b
10 ** cset [wx]0, any
11 ** ret
12 */
13 TEST_PTEST (test_bool_any, bool,
14 x0 = svptest_any (p0, p1));
15
16 /*
17 ** test_bool_none:
18 ** ptest p0, p1\.b
19 ** cset [wx]0, none
20 ** ret
21 */
22 TEST_PTEST (test_bool_none, bool,
23 x0 = !svptest_any (p0, p1));
24
25 /*
26 ** test_int_any:
27 ** ptest p0, p1\.b
28 ** cset [wx]0, any
29 ** ret
30 */
31 TEST_PTEST (test_int_any, int,
32 x0 = svptest_any (p0, p1));
33
34 /*
35 ** test_int_none:
36 ** ptest p0, p1\.b
37 ** cset [wx]0, none
38 ** ret
39 */
40 TEST_PTEST (test_int_none, int,
41 x0 = !svptest_any (p0, p1));
42
43 /*
44 ** test_int64_t_any:
45 ** ptest p0, p1\.b
46 ** cset [wx]0, any
47 ** ret
48 */
49 TEST_PTEST (test_int64_t_any, int64_t,
50 x0 = svptest_any (p0, p1));
51
52 /*
53 ** test_int64_t_none:
54 ** ptest p0, p1\.b
55 ** cset [wx]0, none
56 ** ret
57 */
58 TEST_PTEST (test_int64_t_none, int64_t,
59 x0 = !svptest_any (p0, p1));
60
61 /*
62 ** sel_any:
63 ** ptest p0, p1\.b
64 ** csel x0, (x0, x1, any|x1, x0, none)
65 ** ret
66 */
67 TEST_PTEST (sel_any, int64_t,
68 x0 = svptest_any (p0, p1) ? x0 : x1);
69
70 /*
71 ** sel_none:
72 ** ptest p0, p1\.b
73 ** csel x0, (x0, x1, none|x1, x0, any)
74 ** ret
75 */
76 TEST_PTEST (sel_none, int64_t,
77 x0 = !svptest_any (p0, p1) ? x0 : x1);