1 /* { dg-xfail-run-if "" { { i?86-*-* x86_64-*-* } && ia32 } } */
2 /* { dg-require-effective-target vect_double } */
3 /* { dg-add-options ieee } */
4 /* { dg-additional-options "-fno-fast-math" } */
8 #define N (VECTOR_BITS * 17)
10 double __attribute__ ((noinline
, noclone
))
11 reduc_plus_double (double *a
, double *b
)
14 for (int i
= 0; i
< N
; i
++)
22 int __attribute__ ((optimize (1)))
28 for (int i
= 0; i
< N
; i
++)
30 a
[i
] = (i
* 0.1) * (i
& 1 ? 1 : -1);
31 b
[i
] = (i
* 0.3) * (i
& 1 ? 1 : -1);
34 asm volatile ("" ::: "memory");
36 double res
= reduc_plus_double (a
, b
);
42 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 2 "vect" } } */