111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2
|
|
3 #include <stdarg.h>
|
|
4 #include "tree-vect.h"
|
|
5
|
|
6 #define N 128
|
|
7
|
|
8 struct tmp_struct
|
|
9 {
|
|
10 int x;
|
|
11 int y[N];
|
|
12 };
|
|
13
|
|
14 __attribute__ ((noinline))
|
|
15 int main1 ()
|
|
16 {
|
|
17 int i, *q;
|
|
18 struct tmp_struct tmp, *p;
|
|
19
|
|
20 p = &tmp;
|
|
21 q = p->y;
|
|
22
|
|
23 for (i = 0; i < N; i++)
|
|
24 {
|
|
25 *q++ = 5;
|
|
26 }
|
|
27
|
|
28 /* check results: */
|
|
29 for (i = 0; i < N; i++)
|
|
30 {
|
|
31 if (p->y[i] != 5)
|
|
32 {
|
|
33 abort ();
|
|
34 }
|
|
35 }
|
|
36
|
|
37 return 0;
|
|
38 }
|
|
39
|
|
40 int main (void)
|
|
41 {
|
|
42 check_vect ();
|
|
43
|
|
44 return main1 ();
|
|
45 }
|
|
46
|
|
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
131
|
48 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
|
|
49 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
|