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 *restrict a
, int n
)
14 for (int i
= 0; i
< n
; i
++)
15 for (int j
= 0; j
< N
; j
++)
20 int __attribute__ ((optimize (1)))
26 for (int i
= 0; i
< N
; i
++)
28 a
[i
] = (i
* 0.1) * (i
& 1 ? 1 : -1);
29 asm volatile ("" ::: "memory");
31 for (int i
= 0; i
< n
; i
++)
32 for (int j
= 0; j
< N
; j
++)
35 asm volatile ("" ::: "memory");
37 double res
= reduc_plus_double (a
, n
);
43 /* { dg-final { scan-tree-dump {in-order double reduction not supported} "vect" } } */
44 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */