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
|
|
7 #define N 128
|
|
8
|
|
9 /* Unaligned stores. */
|
|
10
|
|
11 int ia[N+2];
|
|
12 short sa[N+2];
|
|
13
|
|
14 int main1 (int n)
|
|
15 {
|
|
16 int i;
|
|
17
|
|
18 for (i = 1; i <= N/2; i++)
|
|
19 {
|
|
20 ia[2*i] = 25;
|
|
21 ia[2*i + 1] = 5;
|
|
22 }
|
|
23
|
|
24 /* check results: */
|
|
25 for (i = 1; i <= N/2; i++)
|
|
26 {
|
|
27 if (ia[2*i] != 25
|
|
28 || ia[2*i + 1] != 5)
|
|
29 abort ();
|
|
30 }
|
|
31
|
|
32 for (i = 1; i <= n/2; i++)
|
|
33 {
|
|
34 sa[2*i] = 25;
|
|
35 sa[2*i + 1] = 5;
|
|
36 }
|
|
37
|
|
38 /* check results: */
|
|
39 for (i = 1; i <= n/2; i++)
|
|
40 {
|
|
41 if (sa[2*i] != 25
|
|
42 || sa[2*i + 1] != 5)
|
|
43 abort ();
|
|
44 }
|
|
45
|
|
46
|
|
47 return 0;
|
|
48 }
|
|
49
|
|
50 int main (void)
|
|
51 {
|
|
52
|
|
53 check_vect ();
|
|
54
|
|
55 return main1 (N);
|
|
56 }
|
|
57
|
|
58 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
|
|
59 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|
131
|
60 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */
|