2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-ifcvt-3.c
blob1d8e9f52b23fc578542085381cfea6d7be166b1d
1 /* { dg-require-effective-target vect_condition } */
2 /* { dg-require-effective-target vect_int } */
4 #include <stdarg.h>
5 #include <signal.h>
6 #include "tree-vect.h"
8 #define N 16
9 #define MAX 42
11 int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
12 int B[N] = {0,0,0,42,42,0,0,0,0,0,42,42,42,42,42,0};
14 extern void abort(void);
16 int main ()
18 int i, j;
20 check_vect ();
22 for (i = 0; i < 16; i++)
23 A[i] = ( A[i] > MAX ? MAX : 0);
25 /* check results: */
26 for (i = 0; i < N; i++)
27 if (A[i] != B[i])
28 abort ();
30 return 0;
35 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
36 /* { dg-final { cleanup-tree-dump "vect" } } */