Add support for conditional reductions using SVE CLASTB
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / pack_fcvt_signed_1_run.c
blob2fcd18b7fa91c748e1fae721e1aeb8363c4b1cbb
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 #include "pack_fcvt_signed_1.c"
6 #define ARRAY_SIZE 107
8 #define VAL1 ((i * 345.434) - (19 * 345.434))
10 int __attribute__ ((optimize (1)))
11 main (void)
13 static int32_t array_dest[ARRAY_SIZE];
14 double array_source[ARRAY_SIZE];
16 for (int i = 0; i < ARRAY_SIZE; i++)
18 array_source[i] = VAL1;
19 asm volatile ("" ::: "memory");
22 pack_int_double_plus_3 (array_dest, array_source, ARRAY_SIZE);
23 for (int i = 0; i < ARRAY_SIZE; i++)
24 if (array_dest[i] != (int32_t) VAL1 + 3)
25 __builtin_abort ();
27 return 0;