summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ldist-13.c
blob: 8c9fd567e1e8914fe5cf0eddda8419d53caf7d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */

float * __restrict__ x;
float * __restrict__ y;

float foo (int n)
{
  int i;
  float tmp = 0.0;
  for (i = 0; i < n; ++i)
    {
      x[i] = 0.0;
      tmp += y[i];
    }
  return tmp;
}

/* Distributing the loop doesn't expose more parallelism.  */
/* { dg-final { scan-tree-dump-not "Loop 1 distributed: split to 2 loops" "ldist" } } */