1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
4 #include "mask_struct_load_1.c"
9 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE) \
14 for (int i = 0; i < N; ++i) \
17 mask[i] = i % 5 <= i % 3; \
18 asm volatile ("" ::: "memory"); \
20 for (int i = 0; i < N * 2; ++i) \
22 NAME##_2 (out, in, mask, N); \
23 for (int i = 0; i < N; ++i) \
25 OUTTYPE if_true = in[i * 2] + in[i * 2 + 1]; \
26 OUTTYPE if_false = i * 7 / 2; \
27 if (out[i] != (mask[i] ? if_true : if_false)) \
29 asm volatile ("" ::: "memory"); \
33 int __attribute__ ((optimize (1)))