aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ldist-15.c
blob: 7ce3b956b96c126b0f5db762580853624444f9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { 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[2*i] = 0;
      x[2*i + 1] = 1;
    }
}

/* We should not apply loop distribution as it is not beneficial from
   a data locality point of view.  Also it is not possible to generate
   a memset (0) as the write has a stride of 2.  */

/* { dg-final { scan-tree-dump-not "distributed: split to" "ldist" } } */
/* { dg-final { scan-tree-dump-not "__builtin_memset" "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */