1 /* { dg-require-effective-target vect_float } */
2 /* { dg-additional-options "-fno-fast-math" } */
10 __attribute__ ((noinline
))
11 int main1 (float x
, float max_result
)
14 float b
[N
] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
15 float c
[N
] = {0,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
)
52 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */