cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-multitypes-2.c
blobc15baa00dd00fb8fa0ae79470d846b31ee4dd578
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 #pragma GCC novector
45 for (i = 0; i < N; i++)
47 if (out[i*16] != a8
48 || out[i*16 + 1] != a7
49 || out[i*16 + 2] != a1
50 || out[i*16 + 3] != a2
51 || out[i*16 + 4] != a8
52 || out[i*16 + 5] != a5
53 || out[i*16 + 6] != a5
54 || out[i*16 + 7] != a4
55 || out[i*16 + 8] != a12
56 || out[i*16 + 9] != a13
57 || out[i*16 + 10] != a14
58 || out[i*16 + 11] != a15
59 || out[i*16 + 12] != a6
60 || out[i*16 + 13] != a9
61 || out[i*16 + 14] != a0
62 || out[i*16 + 15] != a7
63 || out2[i*2] != b1
64 || out2[i*2 + 1] != b0)
65 abort ();
68 return 0;
71 int main (void)
73 check_vect ();
75 main1 (15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,20,21);
77 return 0;
80 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
81 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */