| 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_9.c" |
| 7 |
|
| 8 |
int |
| 9 |
main (void) |
| 10 |
{ |
| 11 |
unsigned short x[N]; |
| 12 |
for (int i = 0; i < N; ++i) |
| 13 |
x[i] = (i + 1) * (i + 2); |
| 14 |
|
| 15 |
if (add_loop (x) != 20480 |
| 16 |
|| max_loop (x) != 65504 |
| 17 |
|| or_loop (x) != 0xfffe |
| 18 |
|| eor_loop (x) != 0xa000) |
| 19 |
__builtin_abort (); |
| 20 |
|
| 21 |
for (int i = 0; i < N; ++i) |
| 22 |
x[i] = ~x[i]; |
| 23 |
|
| 24 |
if (min_loop (x) != 31 |
| 25 |
|| and_loop (x) != 1) |
| 26 |
__builtin_abort (); |
| 27 |
|
| 28 |
return 0; |
| 29 |
} |