Add support for conditional reductions using SVE CLASTB
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / unpack_unsigned_1_run.c
blob3cc37789d320a4fab74613f35bf290d9c068418a
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O2 -ftree-vectorize -fno-inline" } */
4 #include "unpack_unsigned_1.c"
6 #define ARRAY_SIZE 85
8 #define TEST_LOOP(TYPED, TYPES) \
9 { \
10 TYPED arrayd[ARRAY_SIZE]; \
11 TYPES arrays[ARRAY_SIZE]; \
12 for (int i = 0; i < ARRAY_SIZE; i++) \
13 { \
14 arrays[i] = (i - 10) * 3; \
15 asm volatile ("" ::: "memory"); \
16 } \
17 unpack_##TYPED##_##TYPES (arrayd, arrays, ARRAY_SIZE); \
18 for (int i = 0; i < ARRAY_SIZE; i++) \
19 if (arrayd[i] != (TYPED) (TYPES) (((i - 10) * 3) + 1)) \
20 __builtin_abort (); \
23 int __attribute__ ((optimize (1)))
24 main (void)
26 TEST_ALL (TEST_LOOP)
27 return 0;