aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
blob: 53a9fa4f9e3b1e54f795cff4dae271bfe79c80ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-ldist-details" } */

int x[1000];

void foo (int n)
{
  int i;

  for (i = 0; i < n; ++i)
    {
      x[i] = 0;
      x[2*i + 1] = 1;
    }
}

/* We should not apply loop distribution and not generate a memset (0).  */

/* { dg-final { scan-tree-dump "Loop 1 is the same" "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 0 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */