1 /* { dg-require-effective-target section_anchors } */
19 struct s a
; /* array a.n is unaligned */
22 struct s e
; /* array e.n is aligned */
26 struct s2 a
; /* array a.n is unaligned */
29 struct s2 e
; /* array e.n is aligned */
41 for (i
= 0; i
< N
; i
++)
43 tmp1
[2].a
.n
[1][2][i
] = 5;
47 for (i
= 0; i
<N
; i
++)
49 if (tmp1
[2].a
.n
[1][2][i
] != 5)
54 for (i
= 3; i
< N
-1; i
++)
56 tmp1
[2].a
.n
[1][2][i
] = 6;
60 for (i
= 3; i
< N
-1; i
++)
62 if (tmp1
[2].a
.n
[1][2][i
] != 6)
67 for (i
= 0; i
< N
; i
++)
69 for (j
= 0; j
< N
; j
++)
71 tmp1
[2].e
.n
[1][i
][j
] = 8;
76 for (i
= 0; i
< N
; i
++)
78 for (j
= 0; j
< N
; j
++)
80 if (tmp1
[2].e
.n
[1][i
][j
] != 8)
86 for (i
= 0; i
< N
-4; i
++)
88 for (j
= 0; j
< N
-4; j
++)
90 tmp2
[2].e
.n
[1][i
][j
] = 8;
95 for (i
= 0; i
< N
-4; i
++)
97 for (j
= 0; j
< N
-4; j
++)
99 if (tmp2
[2].e
.n
[1][i
][j
] != 8)
114 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target vect_int } } } */
115 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
116 /* Alignment forced using versioning until the pass that increases alignment
117 is extended to handle structs. */
118 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target {vect_int && vector_alignment_reachable } } } } */
119 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target {vect_int && {! vector_alignment_reachable} } } } } */
120 /* { dg-final { cleanup-tree-dump "vect" } } */