Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / tree-ssa / gen-vect-25.c
blobad6b2d93b2272718d8afb7863ad12ecf21e2548f
1 /* { dg-do run { target vect_cmdline_needed } } */
2 /* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
4 #include <stdlib.h>
6 #define N 128
8 #if __LONG_MAX__ == 2147483647
9 typedef short half_word;
10 #else
11 typedef int half_word;
12 #endif
14 int main_1 (int n, int *p)
16 int i;
17 half_word ib[N];
18 half_word ia[N];
19 int k;
21 for (i = 0; i < N; i++)
23 ia[i] = n;
26 /* check results: */
27 for (i = 0; i < N; i++)
29 if (ia[i] != n)
30 abort ();
33 k = *p;
34 for (i = 0; i < N; i++)
36 ib[i] = k;
39 /* check results: */
40 for (i = 0; i < N; i++)
42 if (ib[i] != k)
43 abort ();
46 return 0;
49 int main (int n)
51 return main_1 (n + 2, &n);
54 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
55 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
56 /* { dg-final { cleanup-tree-dump "vect" } } */