Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/asm/ptest_first.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_first:
9 ** ptest p0, p1\.b
10 ** cset [wx]0, first
11 ** ret
12 */
13 TEST_PTEST (test_bool_first, bool,
14 x0 = svptest_first (p0, p1));
15
16 /*
17 ** test_bool_nfrst:
18 ** ptest p0, p1\.b
19 ** cset [wx]0, nfrst
20 ** ret
21 */
22 TEST_PTEST (test_bool_nfrst, bool,
23 x0 = !svptest_first (p0, p1));
24
25 /*
26 ** test_int_first:
27 ** ptest p0, p1\.b
28 ** cset [wx]0, first
29 ** ret
30 */
31 TEST_PTEST (test_int_first, int,
32 x0 = svptest_first (p0, p1));
33
34 /*
35 ** test_int_nfrst:
36 ** ptest p0, p1\.b
37 ** cset [wx]0, nfrst
38 ** ret
39 */
40 TEST_PTEST (test_int_nfrst, int,
41 x0 = !svptest_first (p0, p1));
42
43 /*
44 ** test_int64_t_first:
45 ** ptest p0, p1\.b
46 ** cset [wx]0, first
47 ** ret
48 */
49 TEST_PTEST (test_int64_t_first, int64_t,
50 x0 = svptest_first (p0, p1));
51
52 /*
53 ** test_int64_t_nfrst:
54 ** ptest p0, p1\.b
55 ** cset [wx]0, nfrst
56 ** ret
57 */
58 TEST_PTEST (test_int64_t_nfrst, int64_t,
59 x0 = !svptest_first (p0, p1));
60
61 /*
62 ** sel_first:
63 ** ptest p0, p1\.b
64 ** csel x0, (x0, x1, first|x1, x0, nfrst)
65 ** ret
66 */
67 TEST_PTEST (sel_first, int64_t,
68 x0 = svptest_first (p0, p1) ? x0 : x1);
69
70 /*
71 ** sel_nfrst:
72 ** ptest p0, p1\.b
73 ** csel x0, (x0, x1, nfrst|x1, x0, first)
74 ** ret
75 */
76 TEST_PTEST (sel_nfrst, int64_t,
77 x0 = !svptest_first (p0, p1) ? x0 : x1);