Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-multitypes-2.c
blob28a645c79472578d3775e9e2eb28cb7ee69efad0
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 __attribute__ ((noinline)) int
9 main1 (unsigned short a0, unsigned short a1, unsigned short a2,
10 unsigned short a3, unsigned short a4, unsigned short a5,
11 unsigned short a6, unsigned short a7, unsigned short a8,
12 unsigned short a9, unsigned short a10, unsigned short a11,
13 unsigned short a12, unsigned short a13, unsigned short a14,
14 unsigned short a15, unsigned char b0, unsigned char b1)
16 int i;
17 unsigned short out[N*16];
18 unsigned char out2[N*16];
20 for (i = 0; i < N; i++)
22 out[i*16] = a8;
23 out[i*16 + 1] = a7;
24 out[i*16 + 2] = a1;
25 out[i*16 + 3] = a2;
26 out[i*16 + 4] = a8;
27 out[i*16 + 5] = a5;
28 out[i*16 + 6] = a5;
29 out[i*16 + 7] = a4;
30 out[i*16 + 8] = a12;
31 out[i*16 + 9] = a13;
32 out[i*16 + 10] = a14;
33 out[i*16 + 11] = a15;
34 out[i*16 + 12] = a6;
35 out[i*16 + 13] = a9;
36 out[i*16 + 14] = a0;
37 out[i*16 + 15] = a7;
39 out2[i*2] = b1;
40 out2[i*2+1] = b0;
43 /* check results: */
44 for (i = 0; i < N; i++)
46 if (out[i*16] != a8
47 || out[i*16 + 1] != a7
48 || out[i*16 + 2] != a1
49 || out[i*16 + 3] != a2
50 || out[i*16 + 4] != a8
51 || out[i*16 + 5] != a5
52 || out[i*16 + 6] != a5
53 || out[i*16 + 7] != a4
54 || out[i*16 + 8] != a12
55 || out[i*16 + 9] != a13
56 || out[i*16 + 10] != a14
57 || out[i*16 + 11] != a15
58 || out[i*16 + 12] != a6
59 || out[i*16 + 13] != a9
60 || out[i*16 + 14] != a0
61 || out[i*16 + 15] != a7
62 || out2[i*2] != b1
63 || out2[i*2 + 1] != b0)
64 abort ();
67 return 0;
70 int main (void)
72 check_vect ();
74 main1 (15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,20,21);
76 return 0;
79 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
80 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */