| 1 |
/* { dg-do run { target aarch64_sve_hw } } */ |
| 2 |
/* { dg-options "-O2 -ftree-vectorize -fno-inline" } */ |
| 3 |
|
| 4 |
#include "unpack_float_1.c" |
| 5 |
|
| 6 |
#define ARRAY_SIZE 199 |
| 7 |
|
| 8 |
#define VAL1 ((float) ((i * 645.56665) - (645.56665))) |
| 9 |
|
| 10 |
int __attribute__ ((optimize (1))) |
| 11 |
main (void) |
| 12 |
{ |
| 13 |
double array_dest[ARRAY_SIZE]; |
| 14 |
float array_source[ARRAY_SIZE]; |
| 15 |
|
| 16 |
for (int i = 0; i < ARRAY_SIZE; i++) |
| 17 |
{ |
| 18 |
array_source[i] = VAL1; |
| 19 |
asm volatile ("" ::: "memory"); |
| 20 |
} |
| 21 |
|
| 22 |
unpack_float_plus_7point9 (array_dest, array_source, ARRAY_SIZE); |
| 23 |
for (int i = 0; i < ARRAY_SIZE; i++) |
| 24 |
if (array_dest[i] != (double) (VAL1 + 7.9)) |
| 25 |
__builtin_abort (); |
| 26 |
|
| 27 |
return 0; |
| 28 |
} |