1 // expected-no-diagnostics
2 #ifndef HEADER
3 #define HEADER
4
5 // Test host codegen.
6 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 --check-prefix CK1-OMP45
7 // RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
8 // RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 --check-prefix CK1-OMP45
9 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 --check-prefix CK1-OMP45
10 // RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
11 // RUN: %clang_cc1 -DCK1 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 --check-prefix CK1-OMP45
12
13 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 --check-prefix CK1-OMP50
14 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
15 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-64 --check-prefix CK1-OMP50
16 // RUN: %clang_cc1 -DCK1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 --check-prefix CK1-OMP50
17 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
18 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK1 --check-prefix CK1-32 --check-prefix CK1-OMP50
19
20 // RUN: %clang_cc1 -DCK1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix SIMD-ONLY
21 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
22 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix SIMD-ONLY
23 // RUN: %clang_cc1 -DCK1 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix SIMD-ONLY
24 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
25 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix SIMD-ONLY
26 // SIMD-ONLY-NOT: {{__kmpc|__tgt}}
27
28 #ifdef CK1
29
30 template <typename T, int X, long long Y>
31 struct SS{
32 T a[X];
33 float b;
34 // CK1: define {{.*}}i32 @{{.+}}foo{{.+}}(
fooSS35 int foo(void) {
36
37 // CK1: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
38 // CK1: call void @[[OFFL1:.+]](
39 #pragma omp target teams distribute parallel for simd
40 for(int i = 0; i < X; i++) {
41 a[i] = (T)0;
42 }
43 // CK1: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
44 // CK1: call void @[[OFFL2:.+]](
45 #pragma omp target teams distribute parallel for simd schedule(static)
46 for(int i = 0; i < X; i++) {
47 a[i] = (T)0;
48 }
49 // CK1: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
50 // CK1: call void @[[OFFL3:.+]](
51 #pragma omp target teams distribute parallel for simd schedule(static, X/2)
52 for(int i = 0; i < X; i++) {
53 a[i] = (T)0;
54 }
55
56 // CK1: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
57 // CK1: call void @[[OFFL4:.+]](
58 #pragma omp target teams distribute parallel for simd schedule(dynamic)
59 for(int i = 0; i < X; i++) {
60 a[i] = (T)0;
61 }
62
63 // CK1: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
64 // CK1: call void @[[OFFL5:.+]](
65 #pragma omp target teams distribute parallel for simd schedule(dynamic, X/2)
66 for(int i = 0; i < X; i++) {
67 a[i] = (T)0;
68 }
69
70 // CK1: define internal void @[[OFFL1]](
71 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL1:.+]] to {{.+}},
72 // CK1: ret void
73
74 // CK1: define internal void @[[OUTL1]]({{.+}})
75 // CK1: call void @__kmpc_for_static_init_4(
76 // CK1: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL1:.+]] to
77 // CK1: call void @__kmpc_for_static_fini(
78 // CK1: ret void
79
80 // CK1: define internal void @[[PAR_OUTL1]]({{.+}})
81 // CK1: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
82 // CK1: call void @__kmpc_for_static_fini(
83 // CK1: ret void
84
85 // CK1: define internal void @[[OFFL2]](
86 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL2:.+]] to {{.+}},
87 // CK1: ret void
88
89 // CK1: define internal void @[[OUTL2]]({{.+}})
90 // CK1: call void @__kmpc_for_static_init_4(
91 // CK1: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL2:.+]] to
92 // CK1: call void @__kmpc_for_static_fini(
93 // CK1: ret void
94
95 // CK1: define internal void @[[PAR_OUTL2]]({{.+}})
96 // CK1: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
97 // CK1: call void @__kmpc_for_static_fini(
98 // CK1: ret void
99
100 // CK1: define internal void @[[OFFL3]](
101 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL3:.+]] to {{.+}},
102 // CK1: ret void
103
104 // CK1: define internal void @[[OUTL3]]({{.+}})
105 // CK1: call void @__kmpc_for_static_init_4(
106 // CK1: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL3:.+]] to
107 // CK1: call void @__kmpc_for_static_fini(
108 // CK1: ret void
109
110 // CK1: define internal void @[[PAR_OUTL3]]({{.+}})
111 // CK1: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 33,
112 // CK1: call void @__kmpc_for_static_fini(
113 // CK1: ret void
114
115 // CK1: define internal void @[[OFFL4]](
116 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL4:.+]] to {{.+}},
117 // CK1: ret void
118
119 // CK1: define internal void @[[OUTL4]]({{.+}})
120 // CK1: call void @__kmpc_for_static_init_4(
121 // CK1: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL4:.+]] to
122 // CK1: call void @__kmpc_for_static_fini(
123 // CK1: ret void
124
125 // CK1: define internal void @[[PAR_OUTL4]]({{.+}})
126 // CK1-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
127 // CK1-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
128 // CK1: call {{.+}} @__kmpc_dispatch_next_4(
129 // CK1: ret void
130
131 // CK1: define internal void @[[OFFL5]](
132 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL5:.+]] to {{.+}},
133 // CK1: ret void
134
135 // CK1: define internal void @[[OUTL5]]({{.+}})
136 // CK1: call void @__kmpc_for_static_init_4(
137 // CK1: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL5:.+]] to
138 // CK1: call void @__kmpc_for_static_fini(
139 // CK1: ret void
140
141 // CK1: define internal void @[[PAR_OUTL5]]({{.+}})
142 // CK1-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
143 // CK1-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
144 // CK1: call {{.+}} @__kmpc_dispatch_next_4(
145 // CK1: ret void
146
147 return a[0];
148 }
149 };
150
teams_template_struct(void)151 int teams_template_struct(void) {
152 SS<int, 123, 456> V;
153 return V.foo();
154
155 }
156 #endif // CK1
157
158 // Test host codegen.
159 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 --check-prefix CK2-OMP45
160 // RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
161 // RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 --check-prefix CK2-OMP45
162 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 --check-prefix CK2-OMP45
163 // RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
164 // RUN: %clang_cc1 -DCK2 -fopenmp -fopenmp-version=45 -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 --check-prefix CK2-OMP45
165
166 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 --check-prefix CK2-OMP50
167 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
168 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-64 --check-prefix CK2-OMP50
169 // RUN: %clang_cc1 -DCK2 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 --check-prefix CK2-OMP50
170 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
171 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK2 --check-prefix CK2-32 --check-prefix CK2-OMP50
172
173 // RUN: %clang_cc1 -DCK2 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix SIMD-ONLY
174 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
175 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix SIMD-ONLY
176 // RUN: %clang_cc1 -DCK2 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix SIMD-ONLY
177 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
178 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix SIMD-ONLY
179 // SIMD-ONLY-NOT: {{__kmpc|__tgt}}
180 #ifdef CK2
181
182 template <typename T, int n>
tmain(T argc)183 int tmain(T argc) {
184 T a[n];
185 int m = 10;
186 #pragma omp target teams distribute parallel for simd
187 for(int i = 0; i < n; i++) {
188 a[i] = (T)0;
189 }
190 #pragma omp target teams distribute parallel for simd schedule(static)
191 for(int i = 0; i < n; i++) {
192 a[i] = (T)0;
193 }
194 #pragma omp target teams distribute parallel for simd schedule(static, m)
195 for(int i = 0; i < n; i++) {
196 a[i] = (T)0;
197 }
198 #pragma omp target teams distribute parallel for simd schedule(dynamic)
199 for(int i = 0; i < n; i++) {
200 a[i] = (T)0;
201 }
202 #pragma omp target teams distribute parallel for simd schedule(dynamic, m)
203 for(int i = 0; i < n; i++) {
204 a[i] = (T)0;
205 }
206 return 0;
207 }
208
main(int argc,char ** argv)209 int main (int argc, char **argv) {
210 int n = 100;
211 int a[n];
212 int m = 10;
213 #pragma omp target teams distribute parallel for simd
214 for(int i = 0; i < n; i++) {
215 a[i] = 0;
216 }
217 #pragma omp target teams distribute parallel for simd dist_schedule(static)
218 for(int i = 0; i < n; i++) {
219 a[i] = 0;
220 }
221 #pragma omp target teams distribute parallel for simd dist_schedule(static, m)
222 for(int i = 0; i < n; i++) {
223 a[i] = 0;
224 }
225 #pragma omp target teams distribute parallel for simd schedule(dynamic)
226 for(int i = 0; i < n; i++) {
227 a[i] = 0;
228 }
229 #pragma omp target teams distribute parallel for simd schedule(dynamic, m)
230 for(int i = 0; i < n; i++) {
231 a[i] = 0;
232 }
233 return tmain<int, 10>(argc);
234 }
235
236 // CK2: define {{.*}}i32 @{{[^,]+}}(i{{.+}}{{.+}} %[[ARGC:.+]], {{.+}})
237 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
238 // CK2: call void @[[OFFL1:.+]]({{.+}})
239 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
240 // CK2: call void @[[OFFL2:.+]]({{.+}})
241 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
242 // CK2: call void @[[OFFL3:.+]]({{.+}})
243 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
244 // CK2: call void @[[OFFL4:.+]]({{.+}})
245 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
246 // CK2: call void @[[OFFL5:.+]]({{.+}})
247 // CK2: {{%.+}} = call{{.*}} i32 @[[TMAIN:.+]]({{.+}})
248 // CK2: ret
249
250 // CK2: define {{.*}}void @[[OFFL1]]({{.+}})
251 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}},
252 // CK2: ret void
253
254 // CK2: define internal void @[[OUTL1]]({{.+}})
255 // CK2: call void @__kmpc_for_static_init_4(
256 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL1:.+]] to
257 // CK2: call void @__kmpc_for_static_fini(
258 // CK2: ret void
259
260 // CK2: define internal void @[[PAR_OUTL1]]({{.+}})
261 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
262 // CK2: call void @__kmpc_for_static_fini(
263 // CK2: ret void
264
265 // CK2: define {{.*}}void @[[OFFL2]]({{.+}})
266 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL2:.+]] to {{.+}},
267 // CK2: ret void
268
269 // CK2: define internal void @[[OUTL2]]({{.+}})
270 // CK2: call void @__kmpc_for_static_init_4(
271 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL2:.+]] to
272 // CK2: call void @__kmpc_for_static_fini(
273 // CK2: ret void
274
275 // CK2: define internal void @[[PAR_OUTL2]]({{.+}})
276 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
277 // CK2: call void @__kmpc_for_static_fini(
278 // CK2: ret void
279
280 // CK2: define {{.*}}void @[[OFFL3]]({{.+}})
281 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 4, {{.+}} @[[OUTL3:.+]] to {{.+}},
282 // CK2: ret void
283
284 // CK2: define internal void @[[OUTL3]]({{.+}})
285 // CK2: call void @__kmpc_for_static_init_4(
286 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL3:.+]] to
287 // CK2: call void @__kmpc_for_static_fini(
288 // CK2: ret void
289
290 // CK2: define internal void @[[PAR_OUTL3]]({{.+}})
291 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34
292 // CK2: call void @__kmpc_for_static_fini(
293 // CK2: ret void
294
295 // CK2: define {{.*}}void @[[OFFL4]]({{.+}})
296 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 {{.+}}, {{.+}} @[[OUTL4:.+]] to {{.+}},
297 // CK2: ret void
298
299 // CK2: define internal void @[[OUTL4]]({{.+}})
300 // CK2: call void @__kmpc_for_static_init_4(
301 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL4:.+]] to
302 // CK2: call void @__kmpc_for_static_fini(
303 // CK2: ret void
304
305 // CK2: define internal void @[[PAR_OUTL4]]({{.+}})
306 // CK2-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
307 // CK2-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
308 // CK2: call {{.+}} @__kmpc_dispatch_next_4(
309 // CK2: ret void
310
311
312 // CK2: define {{.*}}void @[[OFFL5]]({{.+}})
313 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 {{.+}}, {{.+}} @[[OUTL5:.+]] to {{.+}},
314 // CK2: ret void
315
316 // CK2: define internal void @[[OUTL5]]({{.+}})
317 // CK2: call void @__kmpc_for_static_init_4(
318 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTL5:.+]] to
319 // CK2: call void @__kmpc_for_static_fini(
320 // CK2: ret void
321
322 // CK2: define internal void @[[PAR_OUTL5]]({{.+}})
323 // CK2-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
324 // CK2-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
325 // CK2: call {{.+}} @__kmpc_dispatch_next_4(
326 // CK2: ret void
327
328 // CK2: define {{.*}}i32 @[[TMAIN]]({{.+}})
329 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
330 // CK2: call void @[[OFFLT1:.+]]({{.+}})
331 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
332 // CK2: call void @[[OFFLT2:.+]]({{.+}})
333 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
334 // CK2: call void @[[OFFLT3:.+]]({{.+}})
335 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
336 // CK2: call void @[[OFFLT4:.+]]({{.+}})
337 // CK2: call i32 @__tgt_target_teams_mapper(%struct.ident_t* @{{.+}},
338 // CK2: call void @[[OFFLT5:.+]]({{.+}})
339 // CK2: ret
340 // CK2-NEXT: }
341
342 // CK2: define {{.*}}void @[[OFFLT1]]({{.+}})
343 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTLT1:.+]] to {{.+}},
344 // CK2: ret void
345
346 // CK2: define internal void @[[OUTLT1]]({{.+}})
347 // CK2: call void @__kmpc_for_static_init_4(
348 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTLT1:.+]] to
349 // CK2: call void @__kmpc_for_static_fini(
350 // CK2: ret void
351
352 // CK2: define internal void @[[PAR_OUTLT1]]({{.+}})
353 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
354 // CK2: call void @__kmpc_for_static_fini(
355 // CK2: ret void
356
357 // CK2: define {{.*}}void @[[OFFLT2]]({{.+}})
358 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTLT2:.+]] to {{.+}},
359 // CK2: ret void
360
361 // CK2: define internal void @[[OUTLT2]]({{.+}})
362 // CK2: call void @__kmpc_for_static_init_4(
363 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTLT2:.+]] to
364 // CK2: call void @__kmpc_for_static_fini(
365 // CK2: ret void
366
367 // CK2: define internal void @[[PAR_OUTLT2]]({{.+}})
368 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 34,
369 // CK2: call void @__kmpc_for_static_fini(
370 // CK2: ret void
371
372 // CK2: define {{.*}}void @[[OFFLT3]]({{.+}})
373 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 {{.+}}, {{.+}} @[[OUTLT3:.+]] to {{.+}},
374 // CK2: ret void
375
376 // CK2: define internal void @[[OUTLT3]]({{.+}})
377 // CK2: call void @__kmpc_for_static_init_4(
378 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTLT3:.+]] to
379 // CK2: call void @__kmpc_for_static_fini(
380 // CK2: ret void
381
382 // CK2: define internal void @[[PAR_OUTLT3]]({{.+}})
383 // CK2: call void @__kmpc_for_static_init_4({{.+}}, {{.+}}, i32 33,
384 // CK2: call void @__kmpc_for_static_fini(
385 // CK2: ret void
386
387 // CK2: define {{.*}}void @[[OFFLT4]]({{.+}})
388 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 {{.+}}, {{.+}} @[[OUTLT4:.+]] to {{.+}},
389 // CK2: ret void
390
391 // CK2: define internal void @[[OUTLT4]]({{.+}})
392 // CK2: call void @__kmpc_for_static_init_4(
393 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTLT4:.+]] to
394 // CK2: call void @__kmpc_for_static_fini(
395 // CK2: ret void
396
397 // CK2: define internal void @[[PAR_OUTLT4]]({{.+}})
398 // CK2-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
399 // CK2-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
400 // CK2: call {{.+}} @__kmpc_dispatch_next_4(
401 // CK2: ret void
402
403 // CK2: define {{.*}}void @[[OFFLT5]]({{.+}})
404 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 {{.+}}, {{.+}} @[[OUTLT5:.+]] to {{.+}},
405 // CK2: ret void
406
407 // CK2: define internal void @[[OUTLT5]]({{.+}})
408 // CK2: call void @__kmpc_for_static_init_4(
409 // CK2: call void {{.*}} @__kmpc_fork_call({{.+}}, {{.+}}, {{.+}} @[[PAR_OUTLT5:.+]] to
410 // CK2: call void @__kmpc_for_static_fini(
411 // CK2: ret void
412
413 // CK2: define internal void @[[PAR_OUTLT5]]({{.+}})
414 // CK2-OMP45: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 35,
415 // CK2-OMP50: call void @__kmpc_dispatch_init_4({{.+}}, {{.+}}, i32 1073741859,
416 // CK2: call {{.+}} @__kmpc_dispatch_next_4(
417 // CK2: ret void
418
419 #endif // CK2
420 #endif // #ifndef HEADER
421