Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / vect / vect-118.c
blobe827526d6ccc6d8aa9904920f5387c68b330cc52
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 32
8 short sa[N];
9 short sc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
10 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
11 short sb[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
12 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
13 int ia[N];
14 int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
15 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
16 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
17 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
19 /* Current peeling-for-alignment scheme will consider the 'ia[i+3]'
20 access for peeling, and therefore will examine the option of
21 using a peeling factor = VF-3 = 8-3 = 5. However, this will not
22 align the access to 'sa[i+7]'. */
24 int main1 (int n)
26 int i;
28 /* Multiple types with different sizes, used in idependent
29 copmutations. Vectorizable. */
30 for (i = 0; i < n; i++)
32 ia[i+3] = ib[i] + ic[i];
33 sa[i+7] = sb[i] + sc[i];
36 /* check results: */
37 for (i = 0; i < n; i++)
39 if (sa[i+7] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
40 abort ();
43 return 0;
46 int main (void)
48 check_vect ();
50 main1 (N-7);
52 return 0;
55 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
56 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail *-*-* } } } */
57 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail *-*-* } } } */
58 /* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" } } */
59 /* { dg-final { cleanup-tree-dump "vect" } } */