Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
3
4 double mat[100][4];
5 double mat2[100][8];
6 double mat3[100][12];
7 double mat4[100][3];
8
9 void
10 slp_non_chained_reduc (int n, double * restrict out)
11 {
12 for (int i = 0; i < 3; i++)
13 out[i] = 0;
14
15 for (int i = 0; i < n; i++)
16 {
17 out[0] = out[0] + mat4[i][0];
18 out[1] = out[1] + mat4[i][1];
19 out[2] = out[2] + mat4[i][2];
20 }
21 }
22
23 /* { dg-final { scan-assembler-times {\tld3d\t} 1 } } */
24 /* { dg-final { scan-assembler-times {\tfadda\td[0-9]+, p[0-7], d[0-9]+, z[0-9]+\.d} 3 } } */