1 /* { dg-require-effective-target vect_int } */
9 /* Test vectorization of reduction of signed-int. */
11 void main1 (int x
, int max_result
, int min_result
)
14 int b
[N
] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
15 int c
[N
] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
20 for (i
= 0; i
< N
; i
++) {
21 diff
+= (b
[i
] - c
[i
]);
24 for (i
= 0; i
< N
; i
++) {
25 max
= max
< c
[i
] ? c
[i
] : max
;
28 for (i
= 0; i
< N
; i
++) {
29 min
= min
> c
[i
] ? c
[i
] : min
;
35 if (max
!= max_result
)
37 if (min
!= min_result
)
50 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail { vect_no_int_add || vect_no_int_max } } } } */
51 /* { dg-final { cleanup-tree-dump "vect" } } */