1/* { dg-do compile } */
2/* { dg-options "-O3 -mavx512f" } */
3
4long long *D;
5int *S;
6short *H;
7char *Q;
8
9long long foo_unpack_1 (int low, int high, int ind)
10{
11  int i;
12
13  for (i = low; i <= high; i++)
14    D[i] *= S[i];
15
16  return D[ind];
17}
18
19long long foo_unpack_2 (int low, int high, int ind)
20{
21  int i;
22
23  for (i = low; i <= high; i++)
24    D[i] *= H[i];
25
26  return D[ind];
27}
28
29long long foo_unpack_3 (int low, int high, int ind)
30{
31  int i;
32
33  for (i = low; i <= high; i++)
34    D[i] *= Q[i];
35
36  return D[ind];
37}
38
39int foo_unpack_4 (int low, int high, int ind)
40{
41  int i;
42
43  for (i = low; i <= high; i++)
44    S[i] *= H[i];
45
46  return S[ind];
47}
48
49int foo_unpack_5 (int low, int high, int ind)
50{
51  int i;
52
53  for (i = low; i <= high; i++)
54    S[i] *= Q[i];
55
56  return S[ind];
57}
58
59short foo_unpack_6 (int low, int high, int ind)
60{
61  int i;
62
63  for (i = low; i <= high; i++)
64    H[i] *= Q[i];
65
66  return H[ind];
67}
68
69int foo_expand_1 (int low, int high, int ind)
70{
71  int i;
72
73  for (i = low; i <= high; i++)
74    S[i] *= D[i];
75
76  return S[ind];
77}
78
79short foo_expand_2 (int low, int high, int ind)
80{
81  int i;
82
83  for (i = low; i <= high; i++)
84    H[i] *= D[i];
85
86  return H[ind];
87}
88
89char foo_expand_3 (int low, int high, int ind)
90{
91  int i;
92
93  for (i = low; i <= high; i++)
94    Q[i] *= D[i];
95
96  return Q[ind];
97}
98
99short foo_expand_4 (int low, int high, int ind)
100{
101  int i;
102
103  for (i = low; i <= high; i++)
104    H[i] *= S[i];
105
106  return H[ind];
107}
108
109char foo_expand_5 (int low, int high, int ind)
110{
111  int i;
112
113  for (i = low; i <= high; i++)
114    Q[i] *= S[i];
115
116  return Q[ind];
117}
118
119char foo_expand_6 (int low, int high, int ind)
120{
121  int i;
122
123  for (i = low; i <= high; i++)
124    Q[i] *= H[i];
125
126  return Q[ind];
127}
128