1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops2-details -fdump-tree-optimized" } */
13 /* Reduction of unsigned-int. */
15 void main1 (unsigned int x
, unsigned int max_result
, unsigned int min_result
)
18 unsigned int udiff
= 2;
19 unsigned int umax
= x
;
20 unsigned int umin
= x
;
23 for (i
= 0; i
< N
; i
++) {
24 udiff
+= (ub
[i
] - uc
[i
]);
28 for (i
= 0; i
< N
; i
++) {
29 umax
= umax
< uc
[i
] ? uc
[i
] : umax
;
33 for (i
= 0; i
< N
; i
++) {
34 umin
= umin
> uc
[i
] ? uc
[i
] : umin
;
40 if (umax
!= max_result
)
42 if (umin
!= min_result
)
46 __attribute__((noinline
))
63 main1 (2000, 2000, 1);
69 /* { dg-final { scan-tree-dump-times "Detected reduction" 3 "parloops2" } } */
70 /* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 4 "parloops2" } } */