| 1 |
/* Tests the TBAA information of lowered AArch64 SIMD loads. */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-save-temps -O2" } */ |
| 4 |
|
| 5 |
#include <arm_neon.h> |
| 6 |
|
| 7 |
void __attribute__((noipa)) |
| 8 |
g (float *) |
| 9 |
{ |
| 10 |
} |
| 11 |
|
| 12 |
int32x4_t __attribute__((noipa)) |
| 13 |
f (void) |
| 14 |
{ |
| 15 |
float a[4] = { 1, 2, 3, 4 }; |
| 16 |
g (a); |
| 17 |
a[0] = a[1] = a[2] = a[3] = 0; |
| 18 |
void *volatile ptr = a; |
| 19 |
return vld1q_s32 ((int32_t *) ptr); |
| 20 |
} |
| 21 |
|
| 22 |
int |
| 23 |
main (void) |
| 24 |
{ |
| 25 |
int32x4_t x = f (); |
| 26 |
int32x4_t y = vdupq_n_s32 (0); |
| 27 |
if (__builtin_memcmp (&x, &y, 16) != 0) |
| 28 |
__builtin_abort (); |
| 29 |
return 0; |
| 30 |
} |