Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-19.c
blobdf2166a5835af4887aa57b375d1cc151c06b4e55
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 int ia[N];
9 int ib[N]=
10 {1,1,0,0,1,0,1,0,
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 int ic[N] =
19 {1,1,0,0,1,0,1,0,
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};
28 char ca[N];
29 char cb[N] =
30 {1,1,0,0,1,0,1,0,
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};
39 char cc[N] =
40 {1,1,0,0,1,0,1,0,
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};
49 short sa[N];
50 short sb[N] =
51 {1,1,0,0,1,0,1,0,
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};
60 short sc[N] =
61 {1,1,0,0,1,0,1,0,
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};
70 __attribute__ ((noinline)) int
71 main1 ()
73 int i;
74 /* Check ints. */
76 for (i = 0; i < N; i++)
78 ia[i] = ib[i] ^ ic[i];
81 /* check results: */
82 for (i = 0; i <N; i++)
84 if (ia[i] != (ib[i] ^ ic[i]))
85 abort ();
88 /* Check chars. */
90 for (i = 0; i < N; i++)
92 ca[i] = cb[i] ^ cc[i];
95 /* check results: */
96 for (i = 0; i <N; i++)
98 if (ca[i] != (cb[i] ^ cc[i]))
99 abort ();
102 /* Check shorts. */
104 for (i = 0; i < N; i++)
106 sa[i] = sb[i] ^ sc[i];
109 /* check results: */
110 for (i = 0; i <N; i++)
112 if (sa[i] != (sb[i] ^ sc[i]))
113 abort ();
116 return 0;
119 int main (void)
121 check_vect ();
123 return main1 ();
126 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
127 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
128 /* { dg-final { cleanup-tree-dump "vect" } } */