Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_5.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
3
4 double mat[100][12];
5
6 double
7 slp_reduc_plus (int n)
8 {
9 double tmp = 0.0;
10 for (int i = 0; i < n; i++)
11 {
12 tmp = tmp + mat[i][0];
13 tmp = tmp + mat[i][1];
14 tmp = tmp + mat[i][2];
15 tmp = tmp + mat[i][3];
16 tmp = tmp + mat[i][4];
17 tmp = tmp + mat[i][5];
18 tmp = tmp + mat[i][6];
19 tmp = tmp + mat[i][7];
20 tmp = tmp + mat[i][8];
21 tmp = tmp + mat[i][9];
22 tmp = tmp + mat[i][10];
23 tmp = tmp + mat[i][11];
24 }
25 return tmp;
26 }
27
28 /* { dg-final { scan-assembler-times {\tfadda\td[0-9]+, p[0-7], d[0-9]+, z[0-9]+\.d} 6 } } */