Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / costmodel / ppc / costmodel-vect-31c.c
blob9dcd09aba42ab3266c68ead749fa3e1e851d73e1
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "../../tree-vect.h"
6 #define N 32
8 struct t{
9 int k[N];
10 int l;
13 struct s{
14 char a; /* aligned */
15 char b[N-1]; /* unaligned (offset 1B) */
16 char c[N]; /* aligned (offset NB) */
17 struct t d; /* aligned (offset 2NB) */
18 struct t e; /* unaligned (offset 2N+4N+4 B) */
21 int main1 ()
23 int i;
24 struct s tmp;
26 /* aligned */
27 for (i = 0; i < N/2; i++)
29 tmp.d.k[i] = 7;
32 /* check results: */
33 for (i = 0; i <N/2; i++)
35 if (tmp.d.k[i] != 7)
36 abort ();
39 return 0;
42 int main (void)
44 check_vect ();
46 return main1 ();
49 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */