aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-hoist-6.c
blob: 0ddaa0d87fdd0e9d0ad55dd0ac807592be260106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */

int a[1024];
int b[1024], c[1024];
void foo ()
{
  for (int j = 0; j < 1024; ++j)
    {
      for (int i = 0; i < 1024; ++i)
	a[i] = j;
      b[j] = c[j];
    }
}

/* We should not hoist/PRE the outer loop IV increment or the load
   from c across the inner loop.  */

/* { dg-final { scan-tree-dump-not "HOIST inserted" "pre" } } */