2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-slp-31.c
blobdc5f16fcfd2c269a719f7dcc5d2d0d4f9dbbf556
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 int
9 main1 ()
11 int i, j;
12 unsigned short out[N*8], a[N][N];
14 for (i = 0; i < N; i++)
16 for (j = 0; j < N; j++)
18 a[i][j] = 8;
20 out[i*4] = 8;
21 out[i*4 + 1] = 18;
22 out[i*4 + 2] = 28;
23 out[i*4 + 3] = 38;
26 /* check results: */
27 for (i = 0; i < N; i++)
29 for (j = 0; j < N; j++)
31 if (a[i][j] != 8)
32 abort ();
34 if (out[i*4] != 8
35 || out[i*4 + 1] != 18
36 || out[i*4 + 2] != 28
37 || out[i*4 + 3] != 38)
38 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" 0 "vect" } } */