blob: 7d6af7b82f3b48827ff3fb3761a0cc27348f7eb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
#define N 128
int out[N*4], out2[N], in[N*4];
void
foo ()
{
int i, a0, a1, a2, a3;
for (i = 0; i < N; i++)
{
a0 = in[i*4];
a1 = in[i*4 + 1];
a2 = in[i*4 + 2];
a3 = in[i*4 + 3];
out[i*4] = a0;
out[i*4 + 1] = a1;
out[i*4 + 2] = a2;
out[i*4 + 3] = a3;
out2[i] = a0;
}
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided_wide } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_strided_wide } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
|