aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c
blob: b48ecbf6e61fe3bfe9c342d5a65c8eb92f4679bc (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
/* { dg-do compile } */
/* { dg-options "-Ofast -fdump-tree-dom2" } */

void g (void);
void g1 (void);

void
f (long a, long b, long c, long d, int x)
{
  int t;
  if (x)
    t = a < b;
  else if (d == x)
    t = c < b;
  else
    t = d > c;

  if (t)
    {
      g1 ();
      g ();
    }
}

/* { dg-final { scan-tree-dump-times "Removing basic block" 1 "dom2" } } */