1 /* { dg-do run { target { aarch64_sve_hw } } } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 #include "maxmin_strict_1.c"
6 #define TEST_LOOP(TYPE, FUN) \
8 TYPE a[NUM_ELEMS (TYPE)]; \
9 TYPE b[NUM_ELEMS (TYPE)]; \
10 TYPE r[NUM_ELEMS (TYPE)]; \
11 for (int i = 0; i < NUM_ELEMS (TYPE); i++) \
13 a[i] = ((i * 2) % 3) * (i & 1 ? 1 : -1); \
14 b[i] = (1 + (i % 4)) * (i & 1 ? -1 : 1); \
15 asm volatile ("" ::: "memory"); \
17 test_##FUN##_##TYPE (r, a, b); \
18 for (int i = 0; i < NUM_ELEMS (TYPE); i++) \
19 if (r[i] != FUN (a[i], b[i])) \