OSDN Git Service

* tree-loop-linear.c (try_interchange_loops): Compare memory access
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-20040816-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats" { target *-*-* } } */
3
4 #include <stdarg.h>
5 #include <signal.h>
6
7 #define N 16
8 #define MAX 42
9
10 extern void abort(void); 
11
12 int main1 ()
13 {  
14   int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
15
16   int i, j;
17
18   for (i = 0; i < N; i++)
19     {
20       j = A[i];
21       A[i] = ( j >= MAX ? MAX : 0); 
22     }
23
24   /* check results:  */
25   for (i = 0; i < N; i++)
26     {
27       if (A[i] > MAX)
28         abort ();
29     }
30
31   return 0;
32 }
33
34
35
36 /* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "ifcvt" } } */
37 /* { dg-final { cleanup-tree-dump "ifcvt" } } */