aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-36.c
blob: a8a2dbaadbe6f9954fece5e6a222237099e8008d (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
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1-details" } */

extern int opening;
extern int middle_game;
int s;
extern int d[1];
void PreEvaluate(int wtm)
{
  int i, j;
  if (opening) {
      d[0]=1;
  }
  else if (middle_game) {
      d[0]=-1;
  }
  if (4 != opening) {
      return;
  }
  s = 1;
}

/* We should be able to CSE the second load of opening.  */

/* { dg-final { scan-tree-dump "Replaced opening" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */