ebe4a35bb3f17b3c95018d04cc8880fd4a3f3be5
[gcc.git] / gcc / testsuite / gcc.dg / vect / pr97678.c
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-mavx2" { target avx2_runtime } } */
3
4 #include "tree-vect.h"
5
6 int
7 main ()
8 {
9 unsigned int i = 0;
10 unsigned short b[158 * 2];
11
12 check_vect ();
13
14 for (i = 0; i < 158; i++)
15 {
16 b[i * 2] = i * 7;
17 b[i * 2 + 1] = i * 8;
18 }
19
20 for (i = 0; i < 158; ++i)
21 if (b[i*2] != (unsigned short)(i*7)
22 || b[i*2+1] != (unsigned short)(i*8))
23 abort ();
24
25 return 0;
26 }
27
28 /* The init loop should be vectorized with SLP. */
29 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */