2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr64617.c
blob6877d6ac01c79b9eb660dd4d7e48ac779a995d45
1 /* { dg-do compile } */
2 /* { dg-options "-O -ftree-vectorize -mavx512bw -march=slm" } */
4 unsigned short out2[128 * 8], b0, b1, b2, b3, b4, b5, b6, b7, b8;
6 void
7 foo (unsigned short a0, unsigned short a1, unsigned short a2,
8 unsigned short a3, unsigned short a4, unsigned short a5,
9 unsigned short a6, unsigned short a7, unsigned short a8)
11 int i;
12 for (i = 0; i < 128; i++)
14 out2[i * 4] = a0 + 8;
16 for (i = 0; i < 128; i++)
18 b0 = a0 + 8;
19 b1 = a1 + 7;
20 b2 = a2 + 6;
21 b3 = a3 + 5;
22 b4 = a4 + 4;
23 b5 = a5 + 3;
24 b6 = a6 + 2;
25 b7 = a7 + 1;
26 b8 = a8 + 9;
28 out2[i * 8] = b0;
29 out2[i * 8 + 1] = b1;
30 out2[i * 8 + 2] = b4;
31 out2[i * 8 + 3] = b5;
32 out2[i * 8 + 4] = b6;
33 out2[i * 8 + 5] = b2;
34 out2[i * 8 + 6] = b7;
35 out2[i * 8 + 7] = b8;