Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512f-vec-unpack.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -mavx512f" } */
3
4 long long *D;
5 int *S;
6 short *H;
7 char *Q;
8
9 long 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
19 long 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
29 long 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
39 int 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
49 int 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
59 short 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
69 int 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
79 short 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
89 char 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
99 short 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
109 char 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
119 char 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 }