1 // expected-no-diagnostics
2 #ifndef HEADER
3 #define HEADER
4 // Test host codegen.
5 // 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
6 // 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
7 // 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
8 // 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
9 // 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
10 // 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
11
12 // 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
13 // 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
14 // 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
15 // 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
16 // 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
17 // 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
18 // SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
19 #ifdef CK1
20
21 int a[100];
22
23 // CK1: define {{.*}}i32 @{{.+}}teams_argument_globali(
teams_argument_global(int n)24 int teams_argument_global(int n) {
25 int i;
26 int te = n / 128;
27 int th = 128;
28 // discard n_addr and i
29 // CK1: alloca i32,
30 // CK1: alloca i32,
31 // CK1: [[TE:%.+]] = alloca i32,
32 // CK1: [[TH:%.+]] = alloca i32,
33 // CK1: alloca i32,
34 // CK1: alloca i32,
35 // CK1: alloca i32,
36 // CK1: [[TE_CAST:%.+]] = alloca i{{32|64}},
37 // CK1: [[TH_CAST:%.+]] = alloca i{{32|64}},
38 // CK1: call void @__kmpc_push_target_tripcount(i64 -1, i64 %{{.+}})
39 // CK1: [[TE_PAR:%.+]] = load{{.+}}, {{.+}} [[TE_CAST]],
40 // CK1: [[TH_PAR:%.+]] = load{{.+}}, {{.+}} [[TH_CAST]],
41
42 // CK1: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 5, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 {{.+}}, i32 1)
43
44 // CK1: call void @[[OFFL1:.+]](i{{32|64}} [[TE_PAR]], i{{32|64}} [[TH_PAR]],
45 #pragma omp target
46 #pragma omp teams distribute simd num_teams(te), thread_limit(th) aligned(a) simdlen(16) linear(i)
47 for(i = 0; i < n; i++) {
48 a[i] = 0;
49 }
50
51 // CK1: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 2, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1)
52 // CK1: call void @[[OFFL2:.+]](i{{64|32}} %{{.+}})
53 #pragma omp target
54 {{{
55 #pragma omp teams distribute simd safelen(32)
56 for(int i = 0; i < n; i++) {
57 a[i] = 0;
58 }
59 }}}
60
61 // outlined target regions
62 // CK1: define internal void @[[OFFL1]](i{{32|64}} [[TE_ARG:%.+]], i{{32|64}} [[TH_ARG:%.+]], [100 x i{{32|64}}]* {{.+}}, i{{32|64}} {{.+}}, {{.+}})
63 // CK1: [[TE_ADDR:%.+]] = alloca i{{32|64}},
64 // CK1: [[TH_ADDR:%.+]] = alloca i{{32|64}},
65 // CK1: store{{.+}} [[TE_ARG]], {{.+}} [[TE_ADDR]],
66 // CK1: store{{.+}} [[TH_ARG]], {{.+}} [[TH_ADDR]],
67 // CK1-64: [[TE_CONV:%.+]] = bitcast{{.+}} [[TE_ADDR]] to
68 // CK1-64: [[TH_CONV:%.+]] = bitcast{{.+}} [[TH_ADDR]] to
69 // CK1-64: [[TE_VAL:%.+]] = load i32, i32* [[TE_CONV]],
70 // CK1-64: [[TH_VAL:%.+]] = load i32, i32* [[TH_CONV]],
71 // CK1-32: [[TE_VAL:%.+]] = load i32, i32* [[TE_ADDR]],
72 // CK1-32: [[TH_VAL:%.+]] = load i32, i32* [[TH_ADDR]],
73 // CK1: {{%.+}} = call i32 @__kmpc_push_num_teams({{.+}}, {{.+}}, i32 [[TE_VAL]], i32 [[TH_VAL]])
74 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}})
75 // CK1: ret void
76
77 // CK1: define internal void @[[OUTL1]]({{.+}})
78 // CK1: call void @__kmpc_for_static_init_4(
79 // CK1: call void @__kmpc_for_static_fini(
80 // CK1: ret void
81
82 // CK1: define internal void @[[OFFL2]]({{.+}}, {{.+}})
83 // CK1: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 2, {{.+}} @[[OUTL2:.+]] to {{.+}}, {{.+}}, {{.+}})
84 // CK1: ret void
85
86 // CK1: define internal void @[[OUTL2]]({{.+}})
87 // CK1: call void @__kmpc_for_static_init_4(
88 // CK1: call void @__kmpc_for_static_fini(
89 // CK1: ret void
90
91 return a[0];
92 }
93
94 // CK1-DAG: !{!"llvm.loop.vectorize.width", i32 16}
95 // CK1-DAG: !{!"llvm.loop.vectorize.enable", i1 true}
96 // CK1-DAG: !{!"llvm.loop.vectorize.width", i32 32}
97
98 #endif // CK1
99
100 // Test host codegen.
101 // 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
102 // 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
103 // 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
104 // 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
105 // 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
106 // 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
107
108 // 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
109 // 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
110 // 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
111 // 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
112 // 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
113 // 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
114 // SIMD-ONLY1-NOT: {{__kmpc|__tgt}}
115 #ifdef CK2
116
117 // CK2: define {{.*}}i32 @{{.+}}teams_local_argv(
teams_local_arg(void)118 int teams_local_arg(void) {
119 int n = 100;
120 int a[n];
121
122 // CK2: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}, i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1)
123 // CK2: call void @[[OFFL1:.+]](i{{64|32}} %{{.+}})
124 #pragma omp target
125 #pragma omp teams distribute simd
126 for(int i = 0; i < n; i++) {
127 a[i] = 0;
128 }
129
130 // outlined target region
131 // CK2: define internal void @[[OFFL1]]({{.+}}, {{.+}})
132 // CK2: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}})
133 // CK2: ret void
134
135 // CK2: define internal void @[[OUTL1]]({{.+}})
136 // CK2: call void @__kmpc_for_static_init_4(
137 // CK2: call void @__kmpc_for_static_fini(
138 // CK2: ret void
139
140 return a[0];
141 }
142 // CK2: !{!"llvm.loop.vectorize.enable", i1 true}
143 #endif // CK2
144
145 // Test host codegen.
146 // RUN: %clang_cc1 -DCK3 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-64
147 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
148 // RUN: %clang_cc1 -DCK3 -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 CK3 --check-prefix CK3-64
149 // RUN: %clang_cc1 -DCK3 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK3 --check-prefix CK3-32
150 // RUN: %clang_cc1 -DCK3 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
151 // RUN: %clang_cc1 -DCK3 -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 CK3 --check-prefix CK3-32
152
153 // RUN: %clang_cc1 -DCK3 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s
154 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
155 // RUN: %clang_cc1 -DCK3 -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-ONLY2 %s
156 // RUN: %clang_cc1 -DCK3 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY2 %s
157 // RUN: %clang_cc1 -DCK3 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
158 // RUN: %clang_cc1 -DCK3 -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-ONLY2 %s
159 // SIMD-ONLY2-NOT: {{__kmpc|__tgt}}
160 #ifdef CK3
161
162 // CK3: [[SSI:%.+]] = type { [{{.+}} x i32], float }
163
164 template <typename T, int X, long long Y>
165 struct SS{
166 T a[X];
167 float b;
168 // CK3: define {{.*}}i32 @{{.+}}foo{{.+}}(
fooSS169 int foo(void) {
170
171 // CK3: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 1, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1)
172 // CK3: call void @[[OFFL1:.+]]([[SSI]]* %{{.+}})
173 #pragma omp target
174 #pragma omp teams distribute simd
175 for(int i = 0; i < X; i++) {
176 a[i] = (T)0;
177 }
178
179 // outlined target region
180 // CK3: define internal void @[[OFFL1]]([[SSI]]* {{.+}})
181 // CK3: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}})
182 // CK3: ret void
183
184 // CK3: define internal void @[[OUTL1]]({{.+}})
185 // CK3: call void @__kmpc_for_static_init_4(
186 // CK3: call void @__kmpc_for_static_fini(
187 // CK3: ret void
188
189 return a[0];
190 }
191 };
192
teams_template_struct(void)193 int teams_template_struct(void) {
194 SS<int, 123, 456> V;
195 return V.foo();
196
197 }
198 // CK3: !{!"llvm.loop.vectorize.enable", i1 true}
199 #endif // CK3
200
201 // Test host codegen.
202 // RUN: %clang_cc1 -DCK4 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-64
203 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
204 // RUN: %clang_cc1 -DCK4 -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 CK4 --check-prefix CK4-64
205 // RUN: %clang_cc1 -DCK4 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CK4 --check-prefix CK4-32
206 // RUN: %clang_cc1 -DCK4 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
207 // RUN: %clang_cc1 -DCK4 -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 CK4 --check-prefix CK4-32
208
209 // RUN: %clang_cc1 -DCK4 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s
210 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
211 // RUN: %clang_cc1 -DCK4 -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-ONLY3 %s
212 // RUN: %clang_cc1 -DCK4 -verify -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY3 %s
213 // RUN: %clang_cc1 -DCK4 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
214 // RUN: %clang_cc1 -DCK4 -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-ONLY3 %s
215 // SIMD-ONLY3-NOT: {{__kmpc|__tgt}}
216
217 #ifdef CK4
218
219 template <typename T, int n>
tmain(T argc)220 int tmain(T argc) {
221 T a[n];
222 int te = n/128;
223 int th = 128;
224 #pragma omp target
225 #pragma omp teams distribute simd num_teams(te) thread_limit(th)
226 for(int i = 0; i < n; i++) {
227 a[i] = (T)0;
228 }
229 return 0;
230 }
231
main(int argc,char ** argv)232 int main (int argc, char **argv) {
233 int n = 100;
234 int a[n];
235 #pragma omp target
236 #pragma omp teams distribute simd
237 for(int i = 0; i < n; i++) {
238 a[i] = 0;
239 }
240 return tmain<int, 10>(argc);
241 }
242
243 // CK4: define {{.*}}i32 @{{[^,]+}}(i{{.+}}{{.+}} %[[ARGC:.+]], {{.+}})
244 // CK4: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}, i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 1)
245 // CK4: call void @[[OFFL1:.+]]({{.+}})
246 // CK4: {{%.+}} = call{{.*}} i32 @[[TMAIN:.+]]({{.+}})
247 // CK4: ret
248
249 // CK4: define {{.*}}void @[[OFFL1]]({{.+}})
250 // CK4: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 3, {{.+}} @[[OUTL1:.+]] to {{.+}}, {{.+}}, {{.+}})
251 // CK4: ret void
252
253 // CK4: define internal void @[[OUTL1]]({{.+}})
254 // CK4: call void @__kmpc_for_static_init_4(
255 // CK4: call void @__kmpc_for_static_fini(
256 // CK4: ret void
257
258 // CK4: define {{.*}}i32 @[[TMAIN]]({{.+}})
259 // CK4: call i32 @__tgt_target_teams(i64 -1, i8* @{{[^,]+}}, i32 3, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i64* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 {{.+}}, i32 1)
260 // CK4: call void @[[OFFLT:.+]]({{.+}})
261 // CK4: ret
262 // CK4-NEXT: }
263
264 // CK4: define {{.*}}void @[[OFFLT]](i{{32|64}} [[TE_ARG:%.+]], i{{32|64}} [[TH_ARG:%.+]], {{.+}})
265 // CK4: [[TE_ADDR:%.+]] = alloca i{{32|64}},
266 // CK4: [[TH_ADDR:%.+]] = alloca i{{32|64}},
267 // CK4: store{{.+}} [[TE_ARG]], {{.+}} [[TE_ADDR]],
268 // CK4: store{{.+}} [[TH_ARG]], {{.+}} [[TH_ADDR]],
269 // CK4-64: [[TE_CONV:%.+]] = bitcast{{.+}} [[TE_ADDR]] to
270 // CK4-64: [[TH_CONV:%.+]] = bitcast{{.+}} [[TH_ADDR]] to
271 // CK4-64: [[TE_VAL:%.+]] = load i32, i32* [[TE_CONV]],
272 // CK4-64: [[TH_VAL:%.+]] = load i32, i32* [[TH_CONV]],
273 // CK4-32: [[TE_VAL:%.+]] = load i32, i32* [[TE_ADDR]],
274 // CK4-32: [[TH_VAL:%.+]] = load i32, i32* [[TH_ADDR]],
275 // CK4: {{%.+}} = call i32 @__kmpc_push_num_teams({{.+}}, {{.+}}, i32 [[TE_VAL]], i32 [[TH_VAL]])
276 // CK4: call void {{.+}} @__kmpc_fork_teams({{.+}}, i32 1, {{.+}} @[[OUTLT:.+]] to {{.+}}, {{.+}}, {{.+}})
277 // CK4: ret void
278
279 // CK4: define internal void @[[OUTLT]]({{.+}})
280 // CK4: call void @__kmpc_for_static_init_4(
281 // CK4: call void @__kmpc_for_static_fini(
282 // CK4: ret void
283
284 // CK4: !{!"llvm.loop.vectorize.enable", i1 true}
285 #endif // CK4
286 #endif
287
288