| 1 |
/* { dg-do run { target aarch64_sve_hw } } */ |
| 2 |
/* { dg-additional-options "-O2" } */ |
| 3 |
|
| 4 |
#include <arm_sve.h> |
| 5 |
|
| 6 |
struct s { int x[32]; }; |
| 7 |
|
| 8 |
void __attribute__((noipa)) consume (void *ptr) {} |
| 9 |
|
| 10 |
void __attribute__((noipa)) |
| 11 |
check_var (svint32_t *ptr) |
| 12 |
{ |
| 13 |
svbool_t pg = svptrue_b8 (); |
| 14 |
if (svptest_any (pg, svcmpne (pg, *ptr, svindex_s32 (0, 1)))) |
| 15 |
__builtin_abort (); |
| 16 |
} |
| 17 |
|
| 18 |
int |
| 19 |
main (void) |
| 20 |
{ |
| 21 |
svint32_t res = svindex_s32 (0, 1); |
| 22 |
{ |
| 23 |
__SVBool_t pg = svptrue_b8 (); |
| 24 |
consume (&pg); |
| 25 |
} |
| 26 |
{ |
| 27 |
struct s zeros = { 0 }; |
| 28 |
consume (&zeros); |
| 29 |
} |
| 30 |
check_var (&res); |
| 31 |
return 0; |
| 32 |
} |