1 /* { dg-require-effective-target size32plus } */
2 /* { dg-additional-options "-O2 -fopenmp -fdump-tree-vect-details" } */
3 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
4 /* { dg-additional-options "-mavx" { target avx_runtime } } */
5 /* { dg-final { scan-tree-dump-times "vectorized \[2-6] loops" 2 "vect" { target sse2_runtime } } } */
7 extern void abort (void);
8 int r
, a
[1024], b
[1024];
10 __attribute__((noipa
)) void
13 #pragma omp for simd reduction (inscan, +:r)
14 for (int i
= 0; i
< 1024; i
++)
17 #pragma omp scan exclusive(r)
22 __attribute__((noipa
)) int
27 #pragma omp for simd reduction (inscan, +:s)
28 for (int i
= 0; i
< 1024; i
++)
31 #pragma omp scan exclusive(s)
37 __attribute__((noipa
)) void
40 #pragma omp parallel for simd simdlen (1) reduction (inscan, +:r)
41 for (int i
= 0; i
< 1024; i
++)
44 #pragma omp scan exclusive(r)
49 __attribute__((noipa
)) int
53 #pragma omp parallel for simd if (simd: 0) reduction (inscan, +:s)
54 for (int i
= 0; i
< 1024; i
++)
57 #pragma omp scan exclusive(s)
67 for (int i
= 0; i
< 1024; ++i
)
75 if (r
!= 1024 * 1023 / 2)
77 for (int i
= 0; i
< 1024; ++i
)
85 if (bar () != 1024 * 1023)
88 for (int i
= 0; i
< 1024; ++i
)
98 if (r
!= 1024 * 1023 / 2)
101 for (int i
= 0; i
< 1024; ++i
)
109 if (qux () != 1024 * 1023)
112 for (int i
= 0; i
< 1024; ++i
)