Debian Codegraph @

gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.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];
13
14 for (j = 0; j < N; j++)
15 {
16 for (i = 0; i < N; i++)
17 {
18 out[i*4] = 8;
19 out[i*4 + 1] = 18;
20 out[i*4 + 2] = 28;
21 out[i*4 + 3] = 38;
22 }
23 a[j] = 8;
24 }
25
26 /* check results: */
27 for (j = 0; j < N; j++)
28 {
29 #pragma GCC novector
30 for (i = 0; i < N; i++)
31 {
32 if (out[i*4] != 8
33 || out[i*4 + 1] != 18
34 || out[i*4 + 2] != 28
35 || out[i*4 + 3] != 38)
36 abort();
37 }
38
39 if (a[j] != 8)
40 abort ();
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" 1 "vect" } } */
57