gcc/testsuite/gcc.target/aarch64/sve/reduc_15_run.c
raw| 1 | /* { dg-do run { target aarch64_sve256_hw } } */ |
| 2 | /* { dg-options "-O3 -msve-vector-bits=256 --param vect-partial-vector-usage=1" } */ |
| 3 | |
| 4 | #define N 0x1100 |
| 5 | |
| 6 | #include "reduc_15.c" |
| 7 | |
| 8 | int |
| 9 | main (void) |
| 10 | { |
| 11 | int x[N]; |
| 12 | for (int i = 0; i < N; ++i) |
| 13 | x[i] = ((i + 1) * (i + 2)) & 0xfffff; |
| 14 | |
| 15 | if (add_loop (x, 0, 33) != 33 |
| 16 | || add_loop (x, 11, 30) != 4078 |
| 17 | || add_loop (x, 0x100, 45) != 45001773 |
| 18 | || add_loop (x, 0x11f, 300) != 63369900) |
| 19 | __builtin_abort (); |
| 20 | |
| 21 | return 0; |
| 22 | } |