Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-multitypes-1.c
blob1850f063eb4fc74c26a9b1a1016f9d70a0c28441
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 ()
11 int i;
12 unsigned short sout[N*8];
13 unsigned int iout[N*8];
15 for (i = 0; i < N; i++)
17 sout[i*4] = 8;
18 sout[i*4 + 1] = 18;
19 sout[i*4 + 2] = 28;
20 sout[i*4 + 3] = 38;
22 iout[i*4] = 8;
23 iout[i*4 + 1] = 18;
24 iout[i*4 + 2] = 28;
25 iout[i*4 + 3] = 38;
28 /* check results: */
29 for (i = 0; i < N; i++)
31 if (sout[i*4] != 8
32 || sout[i*4 + 1] != 18
33 || sout[i*4 + 2] != 28
34 || sout[i*4 + 3] != 38
35 || iout[i*4] != 8
36 || iout[i*4 + 1] != 18
37 || iout[i*4 + 2] != 28
38 || iout[i*4 + 3] != 38)
39 abort ();
42 return 0;
45 int main (void)
47 check_vect ();
49 main1 ();
51 return 0;
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
55 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */