2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-slp-31.c
blob2e43db1360191927db489137075ef5874de00997
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include <stdio.h>
5 #include "tree-vect.h"
7 #define N 128
9 int
10 main1 ()
12 int i, j;
13 unsigned short out[N*8], a[N][N];
15 for (i = 0; i < N; i++)
17 for (j = 0; j < N; j++)
19 a[i][j] = 8;
21 out[i*4] = 8;
22 out[i*4 + 1] = 18;
23 out[i*4 + 2] = 28;
24 out[i*4 + 3] = 38;
27 /* check results: */
28 for (i = 0; i < N; i++)
30 for (j = 0; j < N; j++)
32 if (a[i][j] != 8)
33 abort ();
35 if (out[i*4] != 8
36 || out[i*4 + 1] != 18
37 || out[i*4 + 2] != 28
38 || out[i*4 + 3] != 38)
39 abort();
43 return 0;
46 int main (void)
48 check_vect ();
50 main1 ();
52 return 0;
55 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
56 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
57 /* { dg-final { cleanup-tree-dump "vect" } } */