summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/sve_loop_add_3.c
blob: 7e6c5e08c1b4f6ba4ea46e408bab076adda572b6 (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 "-std=c99 -O3 -march=armv8-a+sve" } */

void
f (int *__restrict a,
   int *__restrict b,
   int *__restrict c,
   int *__restrict d,
   int *__restrict e,
   int *__restrict f,
   int *__restrict g,
   int *__restrict h,
   int count)
{
  for (int i = 0; i < count; ++i)
    a[i] = b[i] + c[i] + d[i] + e[i] + f[i] + g[i] + h[i];
}

/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+.s, p[0-7]+/z, \[x[0-9]+, x[0-9]+, lsl 2\]\n} 7 } } */
/* { dg-final { scan-assembler-times {\tst1w\tz[0-9]+.s, p[0-7]+, \[x[0-9]+, x[0-9]+, lsl 2\]\n} 1 } } */