1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 #define NUM_ELEMS(TYPE) ((int) (5 * (256 / sizeof (TYPE)) + 3))
6 #define DEF_REDUC_PLUS(TYPE) \
7 void __attribute__ ((noinline, noclone)) \
8 reduc_plus_##TYPE (TYPE (*restrict a)[NUM_ELEMS (TYPE)], \
9 TYPE *restrict r, int n) \
11 for (int i = 0; i < n; i++) \
14 for (int j = 0; j < NUM_ELEMS (TYPE); j++) \
24 TEST_ALL (DEF_REDUC_PLUS
)
26 /* { dg-final { scan-assembler-times {\tfadda\th[0-9]+, p[0-7], h[0-9]+, z[0-9]+\.h} 1 } } */
27 /* { dg-final { scan-assembler-times {\tfadda\ts[0-9]+, p[0-7], s[0-9]+, z[0-9]+\.s} 1 } } */
28 /* { dg-final { scan-assembler-times {\tfadda\td[0-9]+, p[0-7], d[0-9]+, z[0-9]+\.d} 1 } } */