Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr96681.c

raw
1 /* PR tree-optimization/96681 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times " \\^ " 5 "optimized" } } */
5 /* { dg-final { scan-tree-dump-times " (?:<|>=) 0" 5 "optimized" } } */
6
7 int
8 foo (int x, int y)
9 {
10 return (x < 0) ^ (y < 0);
11 }
12
13 int
14 bar (int x, int y)
15 {
16 return (x > -1) ^ (y > -1);
17 }
18
19 int
20 baz (int x, int y)
21 {
22 return (x ^ y) < 0;
23 }
24
25 int
26 qux (int x, int y)
27 {
28 return (x ^ y) >= 0;
29 }
30
31 int
32 corge (int x, int y)
33 {
34 return (x >= 0) ^ (y < 0);
35 }