111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2 /* { dg-add-options bind_pic_locally } */
|
|
3
|
|
4 #include <stdarg.h>
|
|
5 #include "tree-vect.h"
|
|
6
|
131
|
7 #if VECTOR_BITS > 128
|
|
8 #define N (VECTOR_BITS * 2 / 8)
|
|
9 #else
|
111
|
10 #define N 32
|
131
|
11 #endif
|
111
|
12
|
|
13 struct {
|
|
14 char ca[N];
|
|
15 char cb[N];
|
|
16 } s;
|
|
17
|
|
18 __attribute__ ((noinline))
|
|
19 int main1 ()
|
|
20 {
|
|
21 int i;
|
|
22
|
|
23 for (i = 0; i < N; i++)
|
|
24 {
|
|
25 s.cb[i] = 3*i;
|
|
26 __asm__ volatile ("");
|
|
27 }
|
|
28
|
|
29 for (i = 0; i < N; i++)
|
|
30 {
|
|
31 s.ca[i] = s.cb[i];
|
|
32 }
|
|
33
|
|
34 /* check results: */
|
|
35 for (i = 0; i < N; i++)
|
|
36 {
|
|
37 if (s.ca[i] != s.cb[i])
|
|
38 abort ();
|
|
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" } } */
|
|
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|
|
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
|