summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ifc-10.c
blob: fbac009944606dbad8ed6911c30666940318a36f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-Ofast -fno-split-loops -fdump-tree-ifcvt-stats" } */
/* { dg-require-visibility "" } */

int b[256] = {0}, y;
void bar (int *);
int foo (int x, int n)
{
  int i;
  int a[128];

  for (i = 0; i < n; i++)
    {
      a[i] = i;
      if (x > i)
	b[i] = y;
    }
  bar (a);
  return 0;
}

/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */