1 /* { dg-require-effective-target vect_condition } */
2 /* { dg-require-effective-target vect_int } */
3
4 #include <stdarg.h>
5 #include "tree-vect.h"
6
7 #define N 16
8 #define MAX 42
9
10 int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
11 int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0};
12
13 extern void abort(void);
14
main()15 int main ()
16 {
17 int i, j;
18
19 check_vect ();
20
21 for (i = 0; i < 16; i++)
22 A[i] = ( A[i] >= MAX ? MAX : 0);
23
24 /* check results: */
25 for (i = 0; i < N; i++)
26 if (A[i] != B[i])
27 abort ();
28
29 return 0;
30 }
31
32
33
34 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
35