OSDN Git Service

PR tree-optimization/40238
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-slp-31.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include <stdio.h>
5 #include "tree-vect.h"
6
7 #define N 128 
8
9 int
10 main1 ()
11 {
12   int i, j;
13   unsigned short out[N*8], a[N][N];
14    
15  for (i = 0; i < N; i++)
16    {
17     for (j = 0; j < N; j++)
18       {
19         a[i][j] = 8;
20       }
21     out[i*4] = 8;
22     out[i*4 + 1] = 18;
23     out[i*4 + 2] = 28;
24     out[i*4 + 3] = 38;
25    }
26
27   /* check results:  */
28  for (i = 0; i < N; i++)
29    {
30     for (j = 0; j < N; j++) 
31       {
32         if (a[i][j] != 8)
33            abort ();
34       }
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();
40    }
41
42
43   return 0;
44 }
45
46 int main (void)
47 {
48   check_vect ();
49
50   main1 ();
51
52   return 0;
53 }
54
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" } } */
58