summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c
blob: 7c7acd5bab69868a61a7fbbb38c1d7e3f3c3e3be (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-require-effective-target vect_double } */

double self[1024];
double a[1024][1024];
double b[1024];

void __attribute__((noinline,noclone))
foo (void)
{
  int i, j;
  for (i = 0; i < 1024; i+=6)
    for (j = 0; j < 1024; j+=6)
      {
	self[i] = self[i] + a[i][j]*b[j];
	self[i+1] = self[i+1] + a[i][j+1]*b[j+1];
      }
}

/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */