Debian Codegraph @

gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c

raw
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 128
7
8 int
9 main1 ()
10 {
11 int i, j;
12 unsigned short out[N*8], a[N][N];
13
14 for (i = 0; i < N; i++)
15 {
16 for (j = 0; j < N; j++)
17 {
18 a[i][j] = 8;
19 }
20 out[i*4] = 8;
21 out[i*4 + 1] = 18;
22 out[i*4 + 2] = 28;
23 out[i*4 + 3] = 38;
24 }
25
26 /* check results: */
27 #pragma GCC novector
28 for (i = 0; i < N; i++)
29 {
30 #pragma GCC novector
31 for (j = 0; j < N; j++)
32 {
33 if (a[i][j] != 8)
34 abort ();
35 }
36 if (out[i*4] != 8
37 || out[i*4 + 1] != 18
38 || out[i*4 + 2] != 28
39 || out[i*4 + 3] != 38)
40 abort();
41 }
42
43
44 return 0;
45 }
46
47 int main (void)
48 {
49 check_vect ();
50
51 main1 ();
52
53 return 0;
54 }
55
56 /* We cannot handle grouped accesses in outer loops. */
57 /* { dg-final { scan-tree-dump-not "OUTER LOOP VECTORIZED" "vect" } } */
58 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
59 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */