1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O3" } */
4 #include "fcvtz_signed_1.c"
8 #define VAL1 ((i * 17) - 180)
9 #define VAL2 ((i * 237.86) - (29 * 237.86))
10 #define VAL3 ((double) ((i * 0xf8dfef2f) - (11 * 0xf8dfef2f)))
12 int __attribute__ ((optimize (1)))
15 static int16_t array_dest16
[ARRAY_SIZE
];
16 static int32_t array_dest32
[ARRAY_SIZE
];
17 static int64_t array_dest64
[ARRAY_SIZE
];
19 _Float16 array_source16
[ARRAY_SIZE
];
20 float array_source32
[ARRAY_SIZE
];
21 double array_source64
[ARRAY_SIZE
];
23 for (int i
= 0; i
< ARRAY_SIZE
; i
++)
25 array_source16
[i
] = VAL1
;
26 array_source32
[i
] = VAL2
;
27 array_source64
[i
] = VAL3
;
28 asm volatile ("" ::: "memory");
31 vfcvtz_16 (array_dest16
, array_source16
, ARRAY_SIZE
);
32 for (int i
= 0; i
< ARRAY_SIZE
; i
++)
33 if (array_dest16
[i
] != (int16_t) VAL1
)
36 vfcvtz_32 (array_dest32
, array_source32
, ARRAY_SIZE
);
37 for (int i
= 0; i
< ARRAY_SIZE
; i
++)
38 if (array_dest32
[i
] != (int32_t) VAL2
)
41 vfcvtz_64 (array_dest64
, array_source64
, ARRAY_SIZE
);
42 for (int i
= 0; i
< ARRAY_SIZE
; i
++)
43 if (array_dest64
[i
] != (int64_t) VAL3
)