Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc-9.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv -mabi=ilp32d -mrvv-vector-bits=scalable -ffast-math -fno-vect-cost-model -fdump-tree-optimized-details" } */
3
4 float __attribute__((noipa))
5 add_loop (float *x, int n, float res)
6 {
7 for (int i = 0; i < n; ++i)
8 {
9 res += x[i * 2];
10 res += x[i * 2 + 1];
11 }
12 return res;
13 }
14
15 /* { dg-final { scan-assembler-times {fadd\.s\s+f[a-x0-9]+,\s*f[a-x0-9]+,fa0} 1 } } */