Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_strict-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv_zvfh -mabi=ilp32d -mrvv-vector-bits=scalable -fno-vect-cost-model" } */
3
4 double mat[100][2];
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 }
15 return tmp;
16 }
17
18 /* { dg-final { scan-assembler-times {vfredosum\.vs\s+v[0-9]+,\s*v[0-9]+,\s*v[0-9]+} 1 } } */