1 /* PR tree-optimization/94718 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "= \[xy]_\[0-9]+\\\(D\\\) \\^ \[xy]_\[0-9]+\\\(D\\\);" 8 "optimized" } } */
5 /* { dg-final { scan-tree-dump-times "\[0-9]+ >= 0;" 8 "optimized" } } */
6 
7 int
f1(int x,int y)8 f1 (int x, int y)
9 {
10   return (x < 0) == (y < 0);
11 }
12 
13 int
f2(int x,int y)14 f2 (int x, int y)
15 {
16   return (x >= 0) == (y >= 0);
17 }
18 
19 int
f3(int x,int y)20 f3 (int x, int y)
21 {
22   return (x < 0) != (y >= 0);
23 }
24 
25 int
f4(int x,int y)26 f4 (int x, int y)
27 {
28   return (x >= 0) != (y < 0);
29 }
30 
31 int
f5(int x,int y)32 f5 (int x, int y)
33 {
34   int s = (x < 0);
35   int t = (y < 0);
36   return s == t;
37 }
38 
39 int
f6(int x,int y)40 f6 (int x, int y)
41 {
42   int s = (x >= 0);
43   int t = (y >= 0);
44   return s == t;
45 }
46 
47 int
f7(int x,int y)48 f7 (int x, int y)
49 {
50   int s = (x < 0);
51   int t = (y >= 0);
52   return s != t;
53 }
54 
55 int
f8(int x,int y)56 f8 (int x, int y)
57 {
58   int s = (x >= 0);
59   int t = (y < 0);
60   return s != t;
61 }
62