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