Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / vect / vect-93.c
blobaf2f1663a22de82107d148868d95e58ffc113d8b
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 3001
9 int
10 main1 (float *pa)
12 int i;
14 for (i = 0; i < 3001; i++)
16 pa[i] = 2.0;
19 /* check results: */
20 for (i = 0; i < 3001; i++)
22 if (pa[i] != 2.0)
23 abort ();
26 for (i = 1; i <= 10; i++)
28 pa[i] = 3.0;
31 /* check results: */
32 for (i = 1; i <= 10; i++)
34 if (pa[i] != 3.0)
35 abort ();
38 return 0;
41 int main (void)
43 int i;
44 float a[N] __attribute__ ((__aligned__(16)));
45 float b[N] __attribute__ ((__aligned__(16)));
47 check_vect ();
49 /* from bzip2: */
50 for (i=0; i<N; i++) b[i] = i;
51 a[0] = 0;
52 for (i = 1; i <= 256; i++) a[i] = b[i-1];
54 /* check results: */
55 for (i = 1; i <= 256; i++)
57 if (a[i] != i-1)
58 abort ();
60 if (a[0] != 0)
61 abort ();
63 main1 (a);
65 return 0;
68 /* in main1 */
69 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
70 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } } */
71 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } } */
73 /* in main */
74 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
75 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
76 /* { dg-final { cleanup-tree-dump "vect" } } */