aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr94718-5.c
blob: 4bd373274992015101e6e102a911c30fff416507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* PR tree-optimization/94718 */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "= \[xy]_\[0-9]+\\\(D\\\) \\^ \[xy]_\[0-9]+\\\(D\\\);" 8 "optimized" } } */
/* { dg-final { scan-tree-dump-times "\[0-9]+ >= 0;" 8 "optimized" } } */

int
f1 (int x, int y)
{
  return (x < 0) == (y < 0);
}

int
f2 (int x, int y)
{
  return (x >= 0) == (y >= 0);
}

int
f3 (int x, int y)
{
  return (x < 0) != (y >= 0);
}

int
f4 (int x, int y)
{
  return (x >= 0) != (y < 0);
}

int
f5 (int x, int y)
{
  int s = (x < 0);
  int t = (y < 0);
  return s == t;
}

int
f6 (int x, int y)
{
  int s = (x >= 0);
  int t = (y >= 0);
  return s == t;
}

int
f7 (int x, int y)
{
  int s = (x < 0);
  int t = (y >= 0);
  return s != t;
}

int
f8 (int x, int y)
{
  int s = (x >= 0);
  int t = (y < 0);
  return s != t;
}