Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/pr117186.c

raw
1 /* { dg-options "-O2" } */
2 /* { dg-final { check-function-bodies "**" "" "" } } */
3
4 /*
5 ** f1:
6 ** (
7 ** cmp w0, w1
8 ** cset w0, gt
9 ** |
10 ** cmp w1, w0
11 ** cset w0, lt
12 ** )
13 ** ret
14 */
15 int
16 f1 (int x, int y)
17 {
18 return (x < y) < (y < x);
19 }
20
21 /*
22 ** f2:
23 ** mov w0, 0
24 ** ret
25 */
26 int
27 f2 (int x, int y)
28 {
29 return (x <= y) < (x < y);
30 }
31
32 /*
33 ** f3:
34 ** cmp (w0, w1|w1, w0)
35 ** cset w0, ne
36 ** ret
37 */
38 int
39 f3 (int x, int y)
40 {
41 return (x <= y) == (x < y);
42 }
43
44 /*
45 ** f4:
46 ** cmp (w0, w1|w1, w0)
47 ** cset w0, ne
48 ** ret
49 */
50 int
51 f4 (int x, int y)
52 {
53 return (y < x) != (x < y);
54 }
55
56 /*
57 ** f5:
58 ** cmp (w0, w1|w1, w0)
59 ** cset w0, eq
60 ** ret
61 */
62 int
63 f5 (int x, int y)
64 {
65 return (y >= x) > (y > x);
66 }
67
68 /*
69 ** f6:
70 ** (
71 ** cmp w0, w1
72 ** cset w0, ge
73 ** |
74 ** cmp w1, w0
75 ** cset w0, le
76 ** )
77 ** ret
78 */
79 int
80 f6 (int x, int y)
81 {
82 return (x < y) < (y <= x);
83 }
84
85 /*
86 ** f7:
87 ** mov w0, 1
88 ** ret
89 */
90 int
91 f7 (int x, int y)
92 {
93 return (x < y) <= (x <= y);
94 }
95
96 /*
97 ** f8:
98 ** (
99 ** cmp w0, w1
100 ** cset w0, hi
101 ** |
102 ** cmp w1, w0
103 ** cset w0, (lo|cc)
104 ** )
105 ** ret
106 */
107 int
108 f8 (unsigned int x, unsigned int y)
109 {
110 return (x < y) < (y < x);
111 }
112
113 /*
114 ** f9:
115 ** (
116 ** cmp w0, w1
117 ** cset w0, (hs|cs)
118 ** |
119 ** cmp w1, w0
120 ** cset w0, ls
121 ** )
122 ** ret
123 */
124 int
125 f9 (unsigned int x, unsigned int y)
126 {
127 return (x < y) < (y <= x);
128 }