1 /* { dg-require-effective-target vect_int } */
9 unsigned int ub
[N
] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
10 unsigned int uc
[N
] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
12 /* Test vectorization of reduction of unsigned-int. */
14 __attribute__ ((noinline
))
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
)
55 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_min_max } } } } */