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