Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-perm-10.c
blob1c2a8580d3c115160798fd54a024de6cc84d8ad2
1 /* { dg-require-effective-target vect_int } */
3 #include "tree-vect.h"
5 int a[256], b[256];
7 void __attribute__((noinline))
8 foo (void)
10 int i;
11 for (i = 0; i < 32; ++i)
13 b[i*8+0] = a[i*8+0];
14 b[i*8+1] = a[i*8+0];
15 b[i*8+2] = a[i*8+3];
16 b[i*8+3] = a[i*8+3];
17 b[i*8+4] = a[i*8+4];
18 b[i*8+5] = a[i*8+6];
19 b[i*8+6] = a[i*8+4];
20 b[i*8+7] = a[i*8+6];
24 int main ()
26 int i;
28 check_vect ();
30 for (i = 0; i < 256; ++i)
32 a[i] = i;
33 __asm__ volatile ("");
36 foo ();
38 for (i = 0; i < 32; ++i)
39 if (b[i*8+0] != i*8+0
40 || b[i*8+1] != i*8+0
41 || b[i*8+2] != i*8+3
42 || b[i*8+3] != i*8+3
43 || b[i*8+4] != i*8+4
44 || b[i*8+5] != i*8+6
45 || b[i*8+6] != i*8+4
46 || b[i*8+7] != i*8+6)
47 abort ();
49 return 0;
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */
53 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */