Debian Codegraph @

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

raw
1 /* { dg-do run { target { riscv_v } } } */
2
3 #define N 0x1100
4
5 #include "reduc-9.c"
6
7 int
8 main (void)
9 {
10 float x[N];
11 for (int i = 0; i < N; ++i)
12 x[i] = ((i + 1) * (i + 2)) & 0xfffff;
13
14 if (add_loop (x, 0, 33) != 33
15 || add_loop (x, 11, 30) != 4078
16 || add_loop (x, 0x100, 45) != 45001776
17 || add_loop (x, 0x11f, 300) != 63369904)
18 __builtin_abort ();
19
20 return 0;
21 }