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 64
8 
9   int ia[N];
10   int ib[N]=
11     {1,1,0,0,1,0,1,0,
12      1,1,0,0,1,0,1,0,
13      1,1,0,0,1,0,1,0,
14      1,1,0,0,1,0,1,0,
15      1,1,0,0,1,0,1,0,
16      1,1,0,0,1,0,1,0,
17      1,1,0,0,1,0,1,0,
18      1,1,0,0,1,0,1,0};
19   int ic[N] =
20     {1,1,0,0,1,0,1,0,
21      1,1,0,0,1,0,1,0,
22      1,1,0,0,1,0,1,0,
23      1,1,0,0,1,0,1,0,
24      1,1,0,0,1,0,1,0,
25      1,1,0,0,1,0,1,0,
26      1,1,0,0,1,0,1,0,
27      1,1,0,0,1,0,1,0};
28 
29   char ca[N];
30   char cb[N] =
31     {1,1,0,0,1,0,1,0,
32      1,1,0,0,1,0,1,0,
33      1,1,0,0,1,0,1,0,
34      1,1,0,0,1,0,1,0,
35      1,1,0,0,1,0,1,0,
36      1,1,0,0,1,0,1,0,
37      1,1,0,0,1,0,1,0,
38      1,1,0,0,1,0,1,0};
39 
40   char cc[N] =
41     {1,1,0,0,1,0,1,0,
42      1,1,0,0,1,0,1,0,
43      1,1,0,0,1,0,1,0,
44      1,1,0,0,1,0,1,0,
45      1,1,0,0,1,0,1,0,
46      1,1,0,0,1,0,1,0,
47      1,1,0,0,1,0,1,0,
48      1,1,0,0,1,0,1,0};
49 
50   short sa[N];
51   short sb[N] =
52     {1,1,0,0,1,0,1,0,
53      1,1,0,0,1,0,1,0,
54      1,1,0,0,1,0,1,0,
55      1,1,0,0,1,0,1,0,
56      1,1,0,0,1,0,1,0,
57      1,1,0,0,1,0,1,0,
58      1,1,0,0,1,0,1,0,
59      1,1,0,0,1,0,1,0};
60 
61   short sc[N] =
62     {1,1,0,0,1,0,1,0,
63      1,1,0,0,1,0,1,0,
64      1,1,0,0,1,0,1,0,
65      1,1,0,0,1,0,1,0,
66      1,1,0,0,1,0,1,0,
67      1,1,0,0,1,0,1,0,
68      1,1,0,0,1,0,1,0,
69      1,1,0,0,1,0,1,0};
70 
71 __attribute__ ((noinline)) int
main1()72 main1 ()
73 {
74   int i;
75   /* Check ints.  */
76 
77   for (i = 0; i < N; i++)
78     {
79       ia[i] = !ib[i];
80     }
81 
82   /* check results:  */
83   for (i = 0; i <N; i++)
84     {
85       if (ia[i] != !ib[i])
86         abort ();
87     }
88 
89   /* Check chars.  */
90 
91   for (i = 0; i < N; i++)
92     {
93       ca[i] = !cb[i];
94     }
95 
96   /* check results:  */
97   for (i = 0; i <N; i++)
98     {
99       if (ca[i] != !cb[i])
100         abort ();
101     }
102 
103   /* Check shorts.  */
104 
105   for (i = 0; i < N; i++)
106     {
107       sa[i] = !sb[i];
108     }
109 
110   /* check results:  */
111   for (i = 0; i <N; i++)
112     {
113       if (sa[i] != !sb[i])
114         abort ();
115     }
116 
117   return 0;
118 }
119 
main(void)120 int main (void)
121 {
122   check_vect ();
123 
124   return main1 ();
125 }
126 
127 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target vect_condition } } } */
128 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
129 
130