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
)
14 for (int i
= 0; i
< N
; i
+= 4)
24 int __attribute__ ((optimize (1)))
29 for (int i
= 0; i
< N
; i
++)
31 a
[i
] = (i
* 0.1) * (i
& 1 ? 1 : -1);
32 r
+= a
[i
] * (i
% 4 + 2);
33 asm volatile ("" ::: "memory");
35 double res
= reduc_plus_double (a
);
41 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
42 /* { dg-final { scan-tree-dump-times {vectorizing stmts using SLP} 1 "vect" } } */