[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / teams_distribute_parallel_for_lastprivate_codegen.cpp
blobf82a6da51728bb5f94c280f3df01d14556e7941d
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _
2 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
4 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK1
5 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK3
6 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
7 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK3
9 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
10 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
11 // RUN: %clang_cc1 -DLAMBDA -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 - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
12 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
13 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
14 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
16 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK9
17 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
18 // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK9
19 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK11
20 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
21 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK11
23 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
24 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
25 // RUN: %clang_cc1 -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 - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
26 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
27 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
28 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
29 // expected-no-diagnostics
30 #ifndef HEADER
31 #define HEADER
33 template <class T>
34 struct S {
35 T f;
36 S(T a) : f(a) {}
37 S() : f() {}
38 operator T() { return T(); }
39 ~S() {}
42 template <typename T>
43 T tmain() {
44 S<T> test;
45 T t_var = T();
46 T vec[] = {1, 2};
47 S<T> s_arr[] = {1, 2};
48 S<T> &var = test;
49 #pragma omp target
50 #pragma omp teams distribute parallel for lastprivate(t_var, vec, s_arr, s_arr, var, var)
51 for (int i = 0; i < 2; ++i) {
52 vec[i] = t_var;
53 s_arr[i] = var;
55 return T();
58 int main() {
59 static int svar;
60 volatile double g;
61 volatile double &g1 = g;
63 #ifdef LAMBDA
64 [&]() {
65 static float sfvar;
67 #pragma omp target
68 #pragma omp teams distribute parallel for lastprivate(g, g1, svar, sfvar)
69 for (int i = 0; i < 2; ++i) {
70 // loop variables
72 // init private variables
73 g = 1;
74 g1 = 1;
75 svar = 3;
76 sfvar = 4.0;
81 // loop variables
83 // init private variables
89 [&]() {
90 g = 2;
91 g1 = 2;
92 svar = 4;
93 sfvar = 8.0;
95 }();
97 }();
98 return 0;
99 #else
100 S<float> test;
101 int t_var = 0;
102 int vec[] = {1, 2};
103 S<float> s_arr[] = {1, 2};
104 S<float> &var = test;
106 #pragma omp target
107 #pragma omp teams distribute parallel for lastprivate(t_var, vec, s_arr, s_arr, var, var, svar)
108 for (int i = 0; i < 2; ++i) {
109 vec[i] = t_var;
110 s_arr[i] = var;
112 int i;
114 return tmain<int>();
115 #endif
119 // skip loop variables
121 // copy from parameters to local address variables
123 // load content of local address variables
124 // the distribute loop
126 // lastprivates
129 // gbl and bound tid vars, prev lb and ub vars
130 // skip loop variables
132 // copy from parameters to local address variables
134 // load content of local address variables
135 // the distribute loop
137 // assignment: vec[i] = t_var;
139 // assignment: s_arr[i] = var;
142 // lastprivates
145 // template tmain
148 // skip alloca of global_tid and bound_tid
149 // skip loop variables
151 // skip init of bound and global tid
152 // copy from parameters to local address variables
154 // load content of local address variables
157 // lastprivates
160 // skip alloca of global_tid and bound_tid, and prev lb and ub vars
161 // skip loop variables
163 // skip init of bound and global tid
164 // copy from parameters to local address variables
166 // load content of local address variables
169 // assignment: vec[i] = t_var;
171 // assignment: s_arr[i] = var;
174 // lastprivates
177 #endif
178 // CHECK1-LABEL: define {{[^@]+}}@main
179 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
180 // CHECK1-NEXT: entry:
181 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
182 // CHECK1-NEXT: [[G:%.*]] = alloca double, align 8
183 // CHECK1-NEXT: [[G1:%.*]] = alloca ptr, align 8
184 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
185 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
186 // CHECK1-NEXT: store ptr [[G]], ptr [[G1]], align 8
187 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds nuw [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
188 // CHECK1-NEXT: store ptr [[G]], ptr [[TMP0]], align 8
189 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds nuw [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1
190 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[G1]], align 8
191 // CHECK1-NEXT: store ptr [[TMP2]], ptr [[TMP1]], align 8
192 // CHECK1-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
193 // CHECK1-NEXT: ret i32 0
196 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67
197 // CHECK1-SAME: (i64 noundef [[G:%.*]], i64 noundef [[G1:%.*]], i64 noundef [[SVAR:%.*]], i64 noundef [[SFVAR:%.*]]) #[[ATTR2:[0-9]+]] {
198 // CHECK1-NEXT: entry:
199 // CHECK1-NEXT: [[G_ADDR:%.*]] = alloca i64, align 8
200 // CHECK1-NEXT: [[G1_ADDR:%.*]] = alloca i64, align 8
201 // CHECK1-NEXT: [[SVAR_ADDR:%.*]] = alloca i64, align 8
202 // CHECK1-NEXT: [[SFVAR_ADDR:%.*]] = alloca i64, align 8
203 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
204 // CHECK1-NEXT: store i64 [[G]], ptr [[G_ADDR]], align 8
205 // CHECK1-NEXT: store i64 [[G1]], ptr [[G1_ADDR]], align 8
206 // CHECK1-NEXT: store i64 [[SVAR]], ptr [[SVAR_ADDR]], align 8
207 // CHECK1-NEXT: store i64 [[SFVAR]], ptr [[SFVAR_ADDR]], align 8
208 // CHECK1-NEXT: store ptr [[G1_ADDR]], ptr [[TMP]], align 8
209 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[TMP]], align 8
210 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3:[0-9]+]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined, ptr [[G_ADDR]], ptr [[TMP0]], ptr [[SVAR_ADDR]], ptr [[SFVAR_ADDR]])
211 // CHECK1-NEXT: ret void
214 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined
215 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 8 dereferenceable(8) [[G:%.*]], ptr noundef nonnull align 8 dereferenceable(8) [[G1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SFVAR:%.*]]) #[[ATTR2]] {
216 // CHECK1-NEXT: entry:
217 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
218 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
219 // CHECK1-NEXT: [[G_ADDR:%.*]] = alloca ptr, align 8
220 // CHECK1-NEXT: [[G1_ADDR:%.*]] = alloca ptr, align 8
221 // CHECK1-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 8
222 // CHECK1-NEXT: [[SFVAR_ADDR:%.*]] = alloca ptr, align 8
223 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
224 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
225 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
226 // CHECK1-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
227 // CHECK1-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
228 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
229 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
230 // CHECK1-NEXT: [[G2:%.*]] = alloca double, align 8
231 // CHECK1-NEXT: [[G13:%.*]] = alloca double, align 8
232 // CHECK1-NEXT: [[_TMP4:%.*]] = alloca ptr, align 8
233 // CHECK1-NEXT: [[SVAR5:%.*]] = alloca i32, align 4
234 // CHECK1-NEXT: [[SFVAR6:%.*]] = alloca float, align 4
235 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
236 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
237 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
238 // CHECK1-NEXT: store ptr [[G]], ptr [[G_ADDR]], align 8
239 // CHECK1-NEXT: store ptr [[G1]], ptr [[G1_ADDR]], align 8
240 // CHECK1-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 8
241 // CHECK1-NEXT: store ptr [[SFVAR]], ptr [[SFVAR_ADDR]], align 8
242 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[G_ADDR]], align 8
243 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[G1_ADDR]], align 8
244 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 8
245 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[SFVAR_ADDR]], align 8
246 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 8
247 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
248 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
249 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
250 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
251 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 8
252 // CHECK1-NEXT: store ptr [[G13]], ptr [[_TMP4]], align 8
253 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
254 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
255 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
256 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
257 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
258 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
259 // CHECK1: cond.true:
260 // CHECK1-NEXT: br label [[COND_END:%.*]]
261 // CHECK1: cond.false:
262 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
263 // CHECK1-NEXT: br label [[COND_END]]
264 // CHECK1: cond.end:
265 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
266 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
267 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
268 // CHECK1-NEXT: store i32 [[TMP9]], ptr [[DOTOMP_IV]], align 4
269 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
270 // CHECK1: omp.inner.for.cond:
271 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
272 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
273 // CHECK1-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
274 // CHECK1-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
275 // CHECK1: omp.inner.for.body:
276 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
277 // CHECK1-NEXT: [[TMP13:%.*]] = zext i32 [[TMP12]] to i64
278 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
279 // CHECK1-NEXT: [[TMP15:%.*]] = zext i32 [[TMP14]] to i64
280 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP4]], align 8
281 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined.omp_outlined, i64 [[TMP13]], i64 [[TMP15]], ptr [[G2]], ptr [[TMP16]], ptr [[SVAR5]], ptr [[SFVAR6]])
282 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
283 // CHECK1: omp.inner.for.inc:
284 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
285 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
286 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
287 // CHECK1-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
288 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
289 // CHECK1: omp.inner.for.end:
290 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
291 // CHECK1: omp.loop.exit:
292 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP6]])
293 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
294 // CHECK1-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
295 // CHECK1-NEXT: br i1 [[TMP20]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
296 // CHECK1: .omp.lastprivate.then:
297 // CHECK1-NEXT: [[TMP21:%.*]] = load double, ptr [[G2]], align 8
298 // CHECK1-NEXT: store volatile double [[TMP21]], ptr [[TMP0]], align 8
299 // CHECK1-NEXT: [[TMP22:%.*]] = load ptr, ptr [[_TMP4]], align 8
300 // CHECK1-NEXT: [[TMP23:%.*]] = load double, ptr [[TMP22]], align 8
301 // CHECK1-NEXT: store volatile double [[TMP23]], ptr [[TMP4]], align 8
302 // CHECK1-NEXT: [[TMP24:%.*]] = load i32, ptr [[SVAR5]], align 4
303 // CHECK1-NEXT: store i32 [[TMP24]], ptr [[TMP2]], align 4
304 // CHECK1-NEXT: [[TMP25:%.*]] = load float, ptr [[SFVAR6]], align 4
305 // CHECK1-NEXT: store float [[TMP25]], ptr [[TMP3]], align 4
306 // CHECK1-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
307 // CHECK1: .omp.lastprivate.done:
308 // CHECK1-NEXT: ret void
311 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined.omp_outlined
312 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 8 dereferenceable(8) [[G:%.*]], ptr noundef nonnull align 8 dereferenceable(8) [[G1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SFVAR:%.*]]) #[[ATTR2]] {
313 // CHECK1-NEXT: entry:
314 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
315 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
316 // CHECK1-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
317 // CHECK1-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
318 // CHECK1-NEXT: [[G_ADDR:%.*]] = alloca ptr, align 8
319 // CHECK1-NEXT: [[G1_ADDR:%.*]] = alloca ptr, align 8
320 // CHECK1-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 8
321 // CHECK1-NEXT: [[SFVAR_ADDR:%.*]] = alloca ptr, align 8
322 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
323 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
324 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
325 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
326 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
327 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
328 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
329 // CHECK1-NEXT: [[G3:%.*]] = alloca double, align 8
330 // CHECK1-NEXT: [[G14:%.*]] = alloca double, align 8
331 // CHECK1-NEXT: [[_TMP5:%.*]] = alloca ptr, align 8
332 // CHECK1-NEXT: [[SVAR6:%.*]] = alloca i32, align 4
333 // CHECK1-NEXT: [[SFVAR7:%.*]] = alloca float, align 4
334 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
335 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
336 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
337 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
338 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
339 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
340 // CHECK1-NEXT: store ptr [[G]], ptr [[G_ADDR]], align 8
341 // CHECK1-NEXT: store ptr [[G1]], ptr [[G1_ADDR]], align 8
342 // CHECK1-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 8
343 // CHECK1-NEXT: store ptr [[SFVAR]], ptr [[SFVAR_ADDR]], align 8
344 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[G_ADDR]], align 8
345 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[G1_ADDR]], align 8
346 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 8
347 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[SFVAR_ADDR]], align 8
348 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 8
349 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
350 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
351 // CHECK1-NEXT: [[TMP4:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
352 // CHECK1-NEXT: [[CONV:%.*]] = trunc i64 [[TMP4]] to i32
353 // CHECK1-NEXT: [[TMP5:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
354 // CHECK1-NEXT: [[CONV2:%.*]] = trunc i64 [[TMP5]] to i32
355 // CHECK1-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
356 // CHECK1-NEXT: store i32 [[CONV2]], ptr [[DOTOMP_UB]], align 4
357 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
358 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
359 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 8
360 // CHECK1-NEXT: store ptr [[G14]], ptr [[_TMP5]], align 8
361 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
362 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
363 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP8]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
364 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
365 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
366 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
367 // CHECK1: cond.true:
368 // CHECK1-NEXT: br label [[COND_END:%.*]]
369 // CHECK1: cond.false:
370 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
371 // CHECK1-NEXT: br label [[COND_END]]
372 // CHECK1: cond.end:
373 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
374 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
375 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
376 // CHECK1-NEXT: store i32 [[TMP11]], ptr [[DOTOMP_IV]], align 4
377 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
378 // CHECK1: omp.inner.for.cond:
379 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
380 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
381 // CHECK1-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
382 // CHECK1-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
383 // CHECK1: omp.inner.for.body:
384 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
385 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
386 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
387 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
388 // CHECK1-NEXT: store double 1.000000e+00, ptr [[G3]], align 8
389 // CHECK1-NEXT: [[TMP15:%.*]] = load ptr, ptr [[_TMP5]], align 8
390 // CHECK1-NEXT: store volatile double 1.000000e+00, ptr [[TMP15]], align 8
391 // CHECK1-NEXT: store i32 3, ptr [[SVAR6]], align 4
392 // CHECK1-NEXT: store float 4.000000e+00, ptr [[SFVAR7]], align 4
393 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
394 // CHECK1-NEXT: store ptr [[G3]], ptr [[TMP16]], align 8
395 // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
396 // CHECK1-NEXT: [[TMP18:%.*]] = load ptr, ptr [[_TMP5]], align 8
397 // CHECK1-NEXT: store ptr [[TMP18]], ptr [[TMP17]], align 8
398 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
399 // CHECK1-NEXT: store ptr [[SVAR6]], ptr [[TMP19]], align 8
400 // CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
401 // CHECK1-NEXT: store ptr [[SFVAR7]], ptr [[TMP20]], align 8
402 // CHECK1-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
403 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
404 // CHECK1: omp.body.continue:
405 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
406 // CHECK1: omp.inner.for.inc:
407 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
408 // CHECK1-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP21]], 1
409 // CHECK1-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
410 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
411 // CHECK1: omp.inner.for.end:
412 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
413 // CHECK1: omp.loop.exit:
414 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP8]])
415 // CHECK1-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
416 // CHECK1-NEXT: [[TMP23:%.*]] = icmp ne i32 [[TMP22]], 0
417 // CHECK1-NEXT: br i1 [[TMP23]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
418 // CHECK1: .omp.lastprivate.then:
419 // CHECK1-NEXT: [[TMP24:%.*]] = load double, ptr [[G3]], align 8
420 // CHECK1-NEXT: store volatile double [[TMP24]], ptr [[TMP0]], align 8
421 // CHECK1-NEXT: [[TMP25:%.*]] = load ptr, ptr [[_TMP5]], align 8
422 // CHECK1-NEXT: [[TMP26:%.*]] = load double, ptr [[TMP25]], align 8
423 // CHECK1-NEXT: store volatile double [[TMP26]], ptr [[TMP6]], align 8
424 // CHECK1-NEXT: [[TMP27:%.*]] = load i32, ptr [[SVAR6]], align 4
425 // CHECK1-NEXT: store i32 [[TMP27]], ptr [[TMP2]], align 4
426 // CHECK1-NEXT: [[TMP28:%.*]] = load float, ptr [[SFVAR7]], align 4
427 // CHECK1-NEXT: store float [[TMP28]], ptr [[TMP3]], align 4
428 // CHECK1-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
429 // CHECK1: .omp.lastprivate.done:
430 // CHECK1-NEXT: ret void
433 // CHECK3-LABEL: define {{[^@]+}}@main
434 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
435 // CHECK3-NEXT: entry:
436 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
437 // CHECK3-NEXT: [[G:%.*]] = alloca double, align 8
438 // CHECK3-NEXT: [[G1:%.*]] = alloca ptr, align 4
439 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 4
440 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
441 // CHECK3-NEXT: store ptr [[G]], ptr [[G1]], align 4
442 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds nuw [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
443 // CHECK3-NEXT: store ptr [[G]], ptr [[TMP0]], align 4
444 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds nuw [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1
445 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[G1]], align 4
446 // CHECK3-NEXT: store ptr [[TMP2]], ptr [[TMP1]], align 4
447 // CHECK3-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 4 dereferenceable(8) [[REF_TMP]])
448 // CHECK3-NEXT: ret i32 0
451 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67
452 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[G:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[G1:%.*]], i32 noundef [[SVAR:%.*]], i32 noundef [[SFVAR:%.*]]) #[[ATTR2:[0-9]+]] {
453 // CHECK3-NEXT: entry:
454 // CHECK3-NEXT: [[G_ADDR:%.*]] = alloca ptr, align 4
455 // CHECK3-NEXT: [[G1_ADDR:%.*]] = alloca ptr, align 4
456 // CHECK3-NEXT: [[SVAR_ADDR:%.*]] = alloca i32, align 4
457 // CHECK3-NEXT: [[SFVAR_ADDR:%.*]] = alloca i32, align 4
458 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
459 // CHECK3-NEXT: [[G2:%.*]] = alloca double, align 8
460 // CHECK3-NEXT: [[G13:%.*]] = alloca double, align 8
461 // CHECK3-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
462 // CHECK3-NEXT: store ptr [[G]], ptr [[G_ADDR]], align 4
463 // CHECK3-NEXT: store ptr [[G1]], ptr [[G1_ADDR]], align 4
464 // CHECK3-NEXT: store i32 [[SVAR]], ptr [[SVAR_ADDR]], align 4
465 // CHECK3-NEXT: store i32 [[SFVAR]], ptr [[SFVAR_ADDR]], align 4
466 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[G_ADDR]], align 4
467 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[G1_ADDR]], align 4
468 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 4
469 // CHECK3-NEXT: [[TMP2:%.*]] = load double, ptr [[TMP0]], align 8
470 // CHECK3-NEXT: store double [[TMP2]], ptr [[G2]], align 8
471 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
472 // CHECK3-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 4
473 // CHECK3-NEXT: store double [[TMP4]], ptr [[G13]], align 8
474 // CHECK3-NEXT: store ptr [[G13]], ptr [[_TMP4]], align 4
475 // CHECK3-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP4]], align 4
476 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3:[0-9]+]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined, ptr [[G2]], ptr [[TMP5]], ptr [[SVAR_ADDR]], ptr [[SFVAR_ADDR]])
477 // CHECK3-NEXT: ret void
480 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined
481 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[G:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[G1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SFVAR:%.*]]) #[[ATTR2]] {
482 // CHECK3-NEXT: entry:
483 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
484 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
485 // CHECK3-NEXT: [[G_ADDR:%.*]] = alloca ptr, align 4
486 // CHECK3-NEXT: [[G1_ADDR:%.*]] = alloca ptr, align 4
487 // CHECK3-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 4
488 // CHECK3-NEXT: [[SFVAR_ADDR:%.*]] = alloca ptr, align 4
489 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
490 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
491 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
492 // CHECK3-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
493 // CHECK3-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
494 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
495 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
496 // CHECK3-NEXT: [[G2:%.*]] = alloca double, align 8
497 // CHECK3-NEXT: [[G13:%.*]] = alloca double, align 8
498 // CHECK3-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
499 // CHECK3-NEXT: [[SVAR5:%.*]] = alloca i32, align 4
500 // CHECK3-NEXT: [[SFVAR6:%.*]] = alloca float, align 4
501 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
502 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
503 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
504 // CHECK3-NEXT: store ptr [[G]], ptr [[G_ADDR]], align 4
505 // CHECK3-NEXT: store ptr [[G1]], ptr [[G1_ADDR]], align 4
506 // CHECK3-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 4
507 // CHECK3-NEXT: store ptr [[SFVAR]], ptr [[SFVAR_ADDR]], align 4
508 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[G_ADDR]], align 4
509 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[G1_ADDR]], align 4
510 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 4
511 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[SFVAR_ADDR]], align 4
512 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 4
513 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
514 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
515 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
516 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
517 // CHECK3-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 4
518 // CHECK3-NEXT: store ptr [[G13]], ptr [[_TMP4]], align 4
519 // CHECK3-NEXT: [[TMP5:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
520 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
521 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP6]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
522 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
523 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
524 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
525 // CHECK3: cond.true:
526 // CHECK3-NEXT: br label [[COND_END:%.*]]
527 // CHECK3: cond.false:
528 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
529 // CHECK3-NEXT: br label [[COND_END]]
530 // CHECK3: cond.end:
531 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
532 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
533 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
534 // CHECK3-NEXT: store i32 [[TMP9]], ptr [[DOTOMP_IV]], align 4
535 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
536 // CHECK3: omp.inner.for.cond:
537 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
538 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
539 // CHECK3-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
540 // CHECK3-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
541 // CHECK3: omp.inner.for.body:
542 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
543 // CHECK3-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
544 // CHECK3-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP4]], align 4
545 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined.omp_outlined, i32 [[TMP12]], i32 [[TMP13]], ptr [[G2]], ptr [[TMP14]], ptr [[SVAR5]], ptr [[SFVAR6]])
546 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
547 // CHECK3: omp.inner.for.inc:
548 // CHECK3-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
549 // CHECK3-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
550 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP15]], [[TMP16]]
551 // CHECK3-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
552 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
553 // CHECK3: omp.inner.for.end:
554 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
555 // CHECK3: omp.loop.exit:
556 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP6]])
557 // CHECK3-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
558 // CHECK3-NEXT: [[TMP18:%.*]] = icmp ne i32 [[TMP17]], 0
559 // CHECK3-NEXT: br i1 [[TMP18]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
560 // CHECK3: .omp.lastprivate.then:
561 // CHECK3-NEXT: [[TMP19:%.*]] = load double, ptr [[G2]], align 8
562 // CHECK3-NEXT: store volatile double [[TMP19]], ptr [[TMP0]], align 8
563 // CHECK3-NEXT: [[TMP20:%.*]] = load ptr, ptr [[_TMP4]], align 4
564 // CHECK3-NEXT: [[TMP21:%.*]] = load double, ptr [[TMP20]], align 4
565 // CHECK3-NEXT: store volatile double [[TMP21]], ptr [[TMP4]], align 4
566 // CHECK3-NEXT: [[TMP22:%.*]] = load i32, ptr [[SVAR5]], align 4
567 // CHECK3-NEXT: store i32 [[TMP22]], ptr [[TMP2]], align 4
568 // CHECK3-NEXT: [[TMP23:%.*]] = load float, ptr [[SFVAR6]], align 4
569 // CHECK3-NEXT: store float [[TMP23]], ptr [[TMP3]], align 4
570 // CHECK3-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
571 // CHECK3: .omp.lastprivate.done:
572 // CHECK3-NEXT: ret void
575 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l67.omp_outlined.omp_outlined
576 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[G:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[G1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SFVAR:%.*]]) #[[ATTR2]] {
577 // CHECK3-NEXT: entry:
578 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
579 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
580 // CHECK3-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
581 // CHECK3-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
582 // CHECK3-NEXT: [[G_ADDR:%.*]] = alloca ptr, align 4
583 // CHECK3-NEXT: [[G1_ADDR:%.*]] = alloca ptr, align 4
584 // CHECK3-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 4
585 // CHECK3-NEXT: [[SFVAR_ADDR:%.*]] = alloca ptr, align 4
586 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
587 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
588 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
589 // CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
590 // CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
591 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
592 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
593 // CHECK3-NEXT: [[G2:%.*]] = alloca double, align 8
594 // CHECK3-NEXT: [[G13:%.*]] = alloca double, align 8
595 // CHECK3-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
596 // CHECK3-NEXT: [[SVAR5:%.*]] = alloca i32, align 4
597 // CHECK3-NEXT: [[SFVAR6:%.*]] = alloca float, align 4
598 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
599 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
600 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
601 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
602 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
603 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
604 // CHECK3-NEXT: store ptr [[G]], ptr [[G_ADDR]], align 4
605 // CHECK3-NEXT: store ptr [[G1]], ptr [[G1_ADDR]], align 4
606 // CHECK3-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 4
607 // CHECK3-NEXT: store ptr [[SFVAR]], ptr [[SFVAR_ADDR]], align 4
608 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[G_ADDR]], align 4
609 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[G1_ADDR]], align 4
610 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 4
611 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[SFVAR_ADDR]], align 4
612 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 4
613 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
614 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
615 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
616 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
617 // CHECK3-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_LB]], align 4
618 // CHECK3-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_UB]], align 4
619 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
620 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
621 // CHECK3-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 4
622 // CHECK3-NEXT: store ptr [[G13]], ptr [[_TMP4]], align 4
623 // CHECK3-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
624 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
625 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP8]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
626 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
627 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
628 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
629 // CHECK3: cond.true:
630 // CHECK3-NEXT: br label [[COND_END:%.*]]
631 // CHECK3: cond.false:
632 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
633 // CHECK3-NEXT: br label [[COND_END]]
634 // CHECK3: cond.end:
635 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
636 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
637 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
638 // CHECK3-NEXT: store i32 [[TMP11]], ptr [[DOTOMP_IV]], align 4
639 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
640 // CHECK3: omp.inner.for.cond:
641 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
642 // CHECK3-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
643 // CHECK3-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
644 // CHECK3-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
645 // CHECK3: omp.inner.for.body:
646 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
647 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
648 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
649 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4
650 // CHECK3-NEXT: store double 1.000000e+00, ptr [[G2]], align 8
651 // CHECK3-NEXT: [[TMP15:%.*]] = load ptr, ptr [[_TMP4]], align 4
652 // CHECK3-NEXT: store volatile double 1.000000e+00, ptr [[TMP15]], align 4
653 // CHECK3-NEXT: store i32 3, ptr [[SVAR5]], align 4
654 // CHECK3-NEXT: store float 4.000000e+00, ptr [[SFVAR6]], align 4
655 // CHECK3-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
656 // CHECK3-NEXT: store ptr [[G2]], ptr [[TMP16]], align 4
657 // CHECK3-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
658 // CHECK3-NEXT: [[TMP18:%.*]] = load ptr, ptr [[_TMP4]], align 4
659 // CHECK3-NEXT: store ptr [[TMP18]], ptr [[TMP17]], align 4
660 // CHECK3-NEXT: [[TMP19:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
661 // CHECK3-NEXT: store ptr [[SVAR5]], ptr [[TMP19]], align 4
662 // CHECK3-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
663 // CHECK3-NEXT: store ptr [[SFVAR6]], ptr [[TMP20]], align 4
664 // CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 4 dereferenceable(16) [[REF_TMP]])
665 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
666 // CHECK3: omp.body.continue:
667 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
668 // CHECK3: omp.inner.for.inc:
669 // CHECK3-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
670 // CHECK3-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP21]], 1
671 // CHECK3-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_IV]], align 4
672 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
673 // CHECK3: omp.inner.for.end:
674 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
675 // CHECK3: omp.loop.exit:
676 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP8]])
677 // CHECK3-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
678 // CHECK3-NEXT: [[TMP23:%.*]] = icmp ne i32 [[TMP22]], 0
679 // CHECK3-NEXT: br i1 [[TMP23]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
680 // CHECK3: .omp.lastprivate.then:
681 // CHECK3-NEXT: [[TMP24:%.*]] = load double, ptr [[G2]], align 8
682 // CHECK3-NEXT: store volatile double [[TMP24]], ptr [[TMP0]], align 8
683 // CHECK3-NEXT: [[TMP25:%.*]] = load ptr, ptr [[_TMP4]], align 4
684 // CHECK3-NEXT: [[TMP26:%.*]] = load double, ptr [[TMP25]], align 4
685 // CHECK3-NEXT: store volatile double [[TMP26]], ptr [[TMP6]], align 4
686 // CHECK3-NEXT: [[TMP27:%.*]] = load i32, ptr [[SVAR5]], align 4
687 // CHECK3-NEXT: store i32 [[TMP27]], ptr [[TMP2]], align 4
688 // CHECK3-NEXT: [[TMP28:%.*]] = load float, ptr [[SFVAR6]], align 4
689 // CHECK3-NEXT: store float [[TMP28]], ptr [[TMP3]], align 4
690 // CHECK3-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
691 // CHECK3: .omp.lastprivate.done:
692 // CHECK3-NEXT: ret void
695 // CHECK9-LABEL: define {{[^@]+}}@main
696 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
697 // CHECK9-NEXT: entry:
698 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
699 // CHECK9-NEXT: [[G:%.*]] = alloca double, align 8
700 // CHECK9-NEXT: [[G1:%.*]] = alloca ptr, align 8
701 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
702 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
703 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
704 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
705 // CHECK9-NEXT: [[VAR:%.*]] = alloca ptr, align 8
706 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
707 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
708 // CHECK9-NEXT: [[SVAR_CASTED:%.*]] = alloca i64, align 8
709 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [5 x ptr], align 8
710 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [5 x ptr], align 8
711 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [5 x ptr], align 8
712 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
713 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
714 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
715 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
716 // CHECK9-NEXT: store ptr [[G]], ptr [[G1]], align 8
717 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
718 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
719 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
720 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[S_ARR]], float noundef 1.000000e+00)
721 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[S_ARR]], i64 1
722 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
723 // CHECK9-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
724 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
725 // CHECK9-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
726 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR]], align 4
727 // CHECK9-NEXT: store i32 [[TMP1]], ptr [[T_VAR_CASTED]], align 4
728 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
729 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
730 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr @_ZZ4mainE4svar, align 4
731 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[SVAR_CASTED]], align 4
732 // CHECK9-NEXT: [[TMP5:%.*]] = load i64, ptr [[SVAR_CASTED]], align 8
733 // CHECK9-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 8
734 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP]], align 8
735 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
736 // CHECK9-NEXT: store i64 [[TMP2]], ptr [[TMP8]], align 8
737 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
738 // CHECK9-NEXT: store i64 [[TMP2]], ptr [[TMP9]], align 8
739 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
740 // CHECK9-NEXT: store ptr null, ptr [[TMP10]], align 8
741 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
742 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP11]], align 8
743 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
744 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP12]], align 8
745 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
746 // CHECK9-NEXT: store ptr null, ptr [[TMP13]], align 8
747 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
748 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP14]], align 8
749 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
750 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP15]], align 8
751 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
752 // CHECK9-NEXT: store ptr null, ptr [[TMP16]], align 8
753 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
754 // CHECK9-NEXT: store ptr [[TMP6]], ptr [[TMP17]], align 8
755 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
756 // CHECK9-NEXT: store ptr [[TMP7]], ptr [[TMP18]], align 8
757 // CHECK9-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
758 // CHECK9-NEXT: store ptr null, ptr [[TMP19]], align 8
759 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
760 // CHECK9-NEXT: store i64 [[TMP5]], ptr [[TMP20]], align 8
761 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
762 // CHECK9-NEXT: store i64 [[TMP5]], ptr [[TMP21]], align 8
763 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
764 // CHECK9-NEXT: store ptr null, ptr [[TMP22]], align 8
765 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
766 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
767 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
768 // CHECK9-NEXT: store i32 3, ptr [[TMP25]], align 4
769 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
770 // CHECK9-NEXT: store i32 5, ptr [[TMP26]], align 4
771 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
772 // CHECK9-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 8
773 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
774 // CHECK9-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 8
775 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
776 // CHECK9-NEXT: store ptr @.offload_sizes, ptr [[TMP29]], align 8
777 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
778 // CHECK9-NEXT: store ptr @.offload_maptypes, ptr [[TMP30]], align 8
779 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
780 // CHECK9-NEXT: store ptr null, ptr [[TMP31]], align 8
781 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
782 // CHECK9-NEXT: store ptr null, ptr [[TMP32]], align 8
783 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
784 // CHECK9-NEXT: store i64 2, ptr [[TMP33]], align 8
785 // CHECK9-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
786 // CHECK9-NEXT: store i64 0, ptr [[TMP34]], align 8
787 // CHECK9-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
788 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
789 // CHECK9-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
790 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
791 // CHECK9-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
792 // CHECK9-NEXT: store i32 0, ptr [[TMP37]], align 4
793 // CHECK9-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.region_id, ptr [[KERNEL_ARGS]])
794 // CHECK9-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
795 // CHECK9-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
796 // CHECK9: omp_offload.failed:
797 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106(i64 [[TMP2]], ptr [[VEC]], ptr [[S_ARR]], ptr [[TMP3]], i64 [[TMP5]]) #[[ATTR4:[0-9]+]]
798 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
799 // CHECK9: omp_offload.cont:
800 // CHECK9-NEXT: [[CALL:%.*]] = call noundef signext i32 @_Z5tmainIiET_v()
801 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
802 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
803 // CHECK9-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
804 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
805 // CHECK9: arraydestroy.body:
806 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP40]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
807 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
808 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
809 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
810 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
811 // CHECK9: arraydestroy.done2:
812 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
813 // CHECK9-NEXT: [[TMP41:%.*]] = load i32, ptr [[RETVAL]], align 4
814 // CHECK9-NEXT: ret i32 [[TMP41]]
817 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
818 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
819 // CHECK9-NEXT: entry:
820 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
821 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
822 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
823 // CHECK9-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
824 // CHECK9-NEXT: ret void
827 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
828 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
829 // CHECK9-NEXT: entry:
830 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
831 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
832 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
833 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
834 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
835 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
836 // CHECK9-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
837 // CHECK9-NEXT: ret void
840 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106
841 // CHECK9-SAME: (i64 noundef [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], i64 noundef [[SVAR:%.*]]) #[[ATTR3:[0-9]+]] {
842 // CHECK9-NEXT: entry:
843 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
844 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
845 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
846 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
847 // CHECK9-NEXT: [[SVAR_ADDR:%.*]] = alloca i64, align 8
848 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
849 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
850 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
851 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
852 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
853 // CHECK9-NEXT: store i64 [[SVAR]], ptr [[SVAR_ADDR]], align 8
854 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
855 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
856 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
857 // CHECK9-NEXT: store ptr [[TMP2]], ptr [[TMP]], align 8
858 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
859 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined, ptr [[TMP0]], ptr [[T_VAR_ADDR]], ptr [[TMP1]], ptr [[TMP3]], ptr [[SVAR_ADDR]])
860 // CHECK9-NEXT: ret void
863 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined
864 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]]) #[[ATTR3]] {
865 // CHECK9-NEXT: entry:
866 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
867 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
868 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
869 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
870 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
871 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
872 // CHECK9-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 8
873 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
874 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
875 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
876 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
877 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
878 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
879 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
880 // CHECK9-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
881 // CHECK9-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
882 // CHECK9-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S], align 4
883 // CHECK9-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S:%.*]], align 4
884 // CHECK9-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
885 // CHECK9-NEXT: [[SVAR7:%.*]] = alloca i32, align 4
886 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
887 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
888 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
889 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
890 // CHECK9-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
891 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
892 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
893 // CHECK9-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 8
894 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
895 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
896 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
897 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
898 // CHECK9-NEXT: [[TMP4:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 8
899 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 8
900 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
901 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
902 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
903 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
904 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
905 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
906 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
907 // CHECK9: arrayctor.loop:
908 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
909 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
910 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
911 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
912 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
913 // CHECK9: arrayctor.cont:
914 // CHECK9-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 8
915 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
916 // CHECK9-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 8
917 // CHECK9-NEXT: [[TMP6:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
918 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
919 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP7]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
920 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
921 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP8]], 1
922 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
923 // CHECK9: cond.true:
924 // CHECK9-NEXT: br label [[COND_END:%.*]]
925 // CHECK9: cond.false:
926 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
927 // CHECK9-NEXT: br label [[COND_END]]
928 // CHECK9: cond.end:
929 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP9]], [[COND_FALSE]] ]
930 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
931 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
932 // CHECK9-NEXT: store i32 [[TMP10]], ptr [[DOTOMP_IV]], align 4
933 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
934 // CHECK9: omp.inner.for.cond:
935 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
936 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
937 // CHECK9-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
938 // CHECK9-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
939 // CHECK9: omp.inner.for.cond.cleanup:
940 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
941 // CHECK9: omp.inner.for.body:
942 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
943 // CHECK9-NEXT: [[TMP14:%.*]] = zext i32 [[TMP13]] to i64
944 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
945 // CHECK9-NEXT: [[TMP16:%.*]] = zext i32 [[TMP15]] to i64
946 // CHECK9-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP6]], align 8
947 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 7, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined, i64 [[TMP14]], i64 [[TMP16]], ptr [[VEC3]], ptr [[T_VAR2]], ptr [[S_ARR4]], ptr [[TMP17]], ptr [[SVAR7]])
948 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
949 // CHECK9: omp.inner.for.inc:
950 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
951 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
952 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
953 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
954 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
955 // CHECK9: omp.inner.for.end:
956 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
957 // CHECK9: omp.loop.exit:
958 // CHECK9-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
959 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
960 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP21]])
961 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
962 // CHECK9-NEXT: [[TMP23:%.*]] = icmp ne i32 [[TMP22]], 0
963 // CHECK9-NEXT: br i1 [[TMP23]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
964 // CHECK9: .omp.lastprivate.then:
965 // CHECK9-NEXT: [[TMP24:%.*]] = load i32, ptr [[T_VAR2]], align 4
966 // CHECK9-NEXT: store i32 [[TMP24]], ptr [[TMP1]], align 4
967 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i64 8, i1 false)
968 // CHECK9-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP2]], i32 0, i32 0
969 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN9]], i64 2
970 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN9]], [[TMP25]]
971 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE10:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
972 // CHECK9: omp.arraycpy.body:
973 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
974 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN9]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
975 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4, i1 false)
976 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
977 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
978 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
979 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE10]], label [[OMP_ARRAYCPY_BODY]]
980 // CHECK9: omp.arraycpy.done10:
981 // CHECK9-NEXT: [[TMP26:%.*]] = load ptr, ptr [[_TMP6]], align 8
982 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP5]], ptr align 4 [[TMP26]], i64 4, i1 false)
983 // CHECK9-NEXT: [[TMP27:%.*]] = load i32, ptr [[SVAR7]], align 4
984 // CHECK9-NEXT: store i32 [[TMP27]], ptr [[TMP4]], align 4
985 // CHECK9-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
986 // CHECK9: .omp.lastprivate.done:
987 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
988 // CHECK9-NEXT: [[ARRAY_BEGIN11:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
989 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN11]], i64 2
990 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
991 // CHECK9: arraydestroy.body:
992 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP28]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
993 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
994 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
995 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN11]]
996 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE12:%.*]], label [[ARRAYDESTROY_BODY]]
997 // CHECK9: arraydestroy.done12:
998 // CHECK9-NEXT: ret void
1001 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined
1002 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]]) #[[ATTR3]] {
1003 // CHECK9-NEXT: entry:
1004 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1005 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1006 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1007 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1008 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1009 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
1010 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1011 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1012 // CHECK9-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 8
1013 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1014 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1015 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1016 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1017 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1018 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1019 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1020 // CHECK9-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
1021 // CHECK9-NEXT: [[VEC4:%.*]] = alloca [2 x i32], align 4
1022 // CHECK9-NEXT: [[S_ARR5:%.*]] = alloca [2 x %struct.S], align 4
1023 // CHECK9-NEXT: [[VAR6:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1024 // CHECK9-NEXT: [[_TMP7:%.*]] = alloca ptr, align 8
1025 // CHECK9-NEXT: [[SVAR8:%.*]] = alloca i32, align 4
1026 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1027 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1028 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1029 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1030 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1031 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1032 // CHECK9-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1033 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1034 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1035 // CHECK9-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 8
1036 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1037 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
1038 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1039 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1040 // CHECK9-NEXT: [[TMP4:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 8
1041 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 8
1042 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1043 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1044 // CHECK9-NEXT: [[TMP5:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1045 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP5]] to i32
1046 // CHECK9-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1047 // CHECK9-NEXT: [[CONV2:%.*]] = trunc i64 [[TMP6]] to i32
1048 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1049 // CHECK9-NEXT: store i32 [[CONV2]], ptr [[DOTOMP_UB]], align 4
1050 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1051 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1052 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR5]], i32 0, i32 0
1053 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
1054 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1055 // CHECK9: arrayctor.loop:
1056 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1057 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1058 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
1059 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1060 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1061 // CHECK9: arrayctor.cont:
1062 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP]], align 8
1063 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR6]])
1064 // CHECK9-NEXT: store ptr [[VAR6]], ptr [[_TMP7]], align 8
1065 // CHECK9-NEXT: [[TMP8:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1066 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP8]], align 4
1067 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP9]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1068 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1069 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP10]], 1
1070 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1071 // CHECK9: cond.true:
1072 // CHECK9-NEXT: br label [[COND_END:%.*]]
1073 // CHECK9: cond.false:
1074 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1075 // CHECK9-NEXT: br label [[COND_END]]
1076 // CHECK9: cond.end:
1077 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP11]], [[COND_FALSE]] ]
1078 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1079 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1080 // CHECK9-NEXT: store i32 [[TMP12]], ptr [[DOTOMP_IV]], align 4
1081 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1082 // CHECK9: omp.inner.for.cond:
1083 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1084 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1085 // CHECK9-NEXT: [[CMP9:%.*]] = icmp sle i32 [[TMP13]], [[TMP14]]
1086 // CHECK9-NEXT: br i1 [[CMP9]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1087 // CHECK9: omp.inner.for.cond.cleanup:
1088 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1089 // CHECK9: omp.inner.for.body:
1090 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1091 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP15]], 1
1092 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1093 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1094 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[T_VAR3]], align 4
1095 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[I]], align 4
1096 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP17]] to i64
1097 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC4]], i64 0, i64 [[IDXPROM]]
1098 // CHECK9-NEXT: store i32 [[TMP16]], ptr [[ARRAYIDX]], align 4
1099 // CHECK9-NEXT: [[TMP18:%.*]] = load ptr, ptr [[_TMP7]], align 8
1100 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[I]], align 4
1101 // CHECK9-NEXT: [[IDXPROM10:%.*]] = sext i32 [[TMP19]] to i64
1102 // CHECK9-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR5]], i64 0, i64 [[IDXPROM10]]
1103 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX11]], ptr align 4 [[TMP18]], i64 4, i1 false)
1104 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1105 // CHECK9: omp.body.continue:
1106 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1107 // CHECK9: omp.inner.for.inc:
1108 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1109 // CHECK9-NEXT: [[ADD12:%.*]] = add nsw i32 [[TMP20]], 1
1110 // CHECK9-NEXT: store i32 [[ADD12]], ptr [[DOTOMP_IV]], align 4
1111 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1112 // CHECK9: omp.inner.for.end:
1113 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1114 // CHECK9: omp.loop.exit:
1115 // CHECK9-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1116 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
1117 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
1118 // CHECK9-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1119 // CHECK9-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
1120 // CHECK9-NEXT: br i1 [[TMP24]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
1121 // CHECK9: .omp.lastprivate.then:
1122 // CHECK9-NEXT: [[TMP25:%.*]] = load i32, ptr [[T_VAR3]], align 4
1123 // CHECK9-NEXT: store i32 [[TMP25]], ptr [[TMP1]], align 4
1124 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP0]], ptr align 4 [[VEC4]], i64 8, i1 false)
1125 // CHECK9-NEXT: [[ARRAY_BEGIN13:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP2]], i32 0, i32 0
1126 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN13]], i64 2
1127 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN13]], [[TMP26]]
1128 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE14:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1129 // CHECK9: omp.arraycpy.body:
1130 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR5]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1131 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN13]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1132 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4, i1 false)
1133 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1134 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1135 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP26]]
1136 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE14]], label [[OMP_ARRAYCPY_BODY]]
1137 // CHECK9: omp.arraycpy.done14:
1138 // CHECK9-NEXT: [[TMP27:%.*]] = load ptr, ptr [[_TMP7]], align 8
1139 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP7]], ptr align 4 [[TMP27]], i64 4, i1 false)
1140 // CHECK9-NEXT: [[TMP28:%.*]] = load i32, ptr [[SVAR8]], align 4
1141 // CHECK9-NEXT: store i32 [[TMP28]], ptr [[TMP4]], align 4
1142 // CHECK9-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
1143 // CHECK9: .omp.lastprivate.done:
1144 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR6]]) #[[ATTR4]]
1145 // CHECK9-NEXT: [[ARRAY_BEGIN15:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR5]], i32 0, i32 0
1146 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN15]], i64 2
1147 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1148 // CHECK9: arraydestroy.body:
1149 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP29]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1150 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1151 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1152 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN15]]
1153 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE16:%.*]], label [[ARRAYDESTROY_BODY]]
1154 // CHECK9: arraydestroy.done16:
1155 // CHECK9-NEXT: ret void
1158 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1159 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1160 // CHECK9-NEXT: entry:
1161 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1162 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1163 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1164 // CHECK9-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1165 // CHECK9-NEXT: ret void
1168 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1169 // CHECK9-SAME: () #[[ATTR1]] comdat {
1170 // CHECK9-NEXT: entry:
1171 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1172 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1173 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1174 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1175 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
1176 // CHECK9-NEXT: [[VAR:%.*]] = alloca ptr, align 8
1177 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1178 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
1179 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [4 x ptr], align 8
1180 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [4 x ptr], align 8
1181 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [4 x ptr], align 8
1182 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1183 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1184 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1185 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
1186 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
1187 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[S_ARR]], i32 noundef signext 1)
1188 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[S_ARR]], i64 1
1189 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef signext 2)
1190 // CHECK9-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
1191 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
1192 // CHECK9-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
1193 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR]], align 4
1194 // CHECK9-NEXT: store i32 [[TMP1]], ptr [[T_VAR_CASTED]], align 4
1195 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
1196 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
1197 // CHECK9-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 8
1198 // CHECK9-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 8
1199 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1200 // CHECK9-NEXT: store i64 [[TMP2]], ptr [[TMP6]], align 8
1201 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1202 // CHECK9-NEXT: store i64 [[TMP2]], ptr [[TMP7]], align 8
1203 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
1204 // CHECK9-NEXT: store ptr null, ptr [[TMP8]], align 8
1205 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1206 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP9]], align 8
1207 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1208 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP10]], align 8
1209 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
1210 // CHECK9-NEXT: store ptr null, ptr [[TMP11]], align 8
1211 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1212 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP12]], align 8
1213 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1214 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP13]], align 8
1215 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
1216 // CHECK9-NEXT: store ptr null, ptr [[TMP14]], align 8
1217 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1218 // CHECK9-NEXT: store ptr [[TMP4]], ptr [[TMP15]], align 8
1219 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1220 // CHECK9-NEXT: store ptr [[TMP5]], ptr [[TMP16]], align 8
1221 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
1222 // CHECK9-NEXT: store ptr null, ptr [[TMP17]], align 8
1223 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1224 // CHECK9-NEXT: [[TMP19:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1225 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1226 // CHECK9-NEXT: store i32 3, ptr [[TMP20]], align 4
1227 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1228 // CHECK9-NEXT: store i32 4, ptr [[TMP21]], align 4
1229 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1230 // CHECK9-NEXT: store ptr [[TMP18]], ptr [[TMP22]], align 8
1231 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1232 // CHECK9-NEXT: store ptr [[TMP19]], ptr [[TMP23]], align 8
1233 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1234 // CHECK9-NEXT: store ptr @.offload_sizes.1, ptr [[TMP24]], align 8
1235 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1236 // CHECK9-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP25]], align 8
1237 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1238 // CHECK9-NEXT: store ptr null, ptr [[TMP26]], align 8
1239 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1240 // CHECK9-NEXT: store ptr null, ptr [[TMP27]], align 8
1241 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1242 // CHECK9-NEXT: store i64 2, ptr [[TMP28]], align 8
1243 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1244 // CHECK9-NEXT: store i64 0, ptr [[TMP29]], align 8
1245 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1246 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP30]], align 4
1247 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1248 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP31]], align 4
1249 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1250 // CHECK9-NEXT: store i32 0, ptr [[TMP32]], align 4
1251 // CHECK9-NEXT: [[TMP33:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.region_id, ptr [[KERNEL_ARGS]])
1252 // CHECK9-NEXT: [[TMP34:%.*]] = icmp ne i32 [[TMP33]], 0
1253 // CHECK9-NEXT: br i1 [[TMP34]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1254 // CHECK9: omp_offload.failed:
1255 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49(i64 [[TMP2]], ptr [[VEC]], ptr [[S_ARR]], ptr [[TMP3]]) #[[ATTR4]]
1256 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
1257 // CHECK9: omp_offload.cont:
1258 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
1259 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1260 // CHECK9-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1261 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1262 // CHECK9: arraydestroy.body:
1263 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP35]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1264 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1265 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1266 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1267 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
1268 // CHECK9: arraydestroy.done2:
1269 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1270 // CHECK9-NEXT: [[TMP36:%.*]] = load i32, ptr [[RETVAL]], align 4
1271 // CHECK9-NEXT: ret i32 [[TMP36]]
1274 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1275 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1276 // CHECK9-NEXT: entry:
1277 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1278 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1279 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1280 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1281 // CHECK9-NEXT: store float 0.000000e+00, ptr [[F]], align 4
1282 // CHECK9-NEXT: ret void
1285 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1286 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1287 // CHECK9-NEXT: entry:
1288 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1289 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1290 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1291 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1292 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1293 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1294 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1295 // CHECK9-NEXT: store float [[TMP0]], ptr [[F]], align 4
1296 // CHECK9-NEXT: ret void
1299 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1300 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1301 // CHECK9-NEXT: entry:
1302 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1303 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1304 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1305 // CHECK9-NEXT: ret void
1308 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1309 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1310 // CHECK9-NEXT: entry:
1311 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1312 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1313 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1314 // CHECK9-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1315 // CHECK9-NEXT: ret void
1318 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
1319 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1320 // CHECK9-NEXT: entry:
1321 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1322 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1323 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1324 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1325 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1326 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1327 // CHECK9-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef signext [[TMP0]])
1328 // CHECK9-NEXT: ret void
1331 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49
1332 // CHECK9-SAME: (i64 noundef [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1333 // CHECK9-NEXT: entry:
1334 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
1335 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1336 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1337 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1338 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1339 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1340 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1341 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1342 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1343 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1344 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1345 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1346 // CHECK9-NEXT: store ptr [[TMP2]], ptr [[TMP]], align 8
1347 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
1348 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined, ptr [[TMP0]], ptr [[T_VAR_ADDR]], ptr [[TMP1]], ptr [[TMP3]])
1349 // CHECK9-NEXT: ret void
1352 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined
1353 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1354 // CHECK9-NEXT: entry:
1355 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1356 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1357 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1358 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
1359 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1360 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1361 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1362 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1363 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1364 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1365 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1366 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1367 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1368 // CHECK9-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
1369 // CHECK9-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
1370 // CHECK9-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S.0], align 4
1371 // CHECK9-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1372 // CHECK9-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
1373 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1374 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1375 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1376 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1377 // CHECK9-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1378 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1379 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1380 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1381 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
1382 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1383 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1384 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 8
1385 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1386 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
1387 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1388 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1389 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
1390 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1391 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1392 // CHECK9: arrayctor.loop:
1393 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1394 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1395 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
1396 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1397 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1398 // CHECK9: arrayctor.cont:
1399 // CHECK9-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 8
1400 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
1401 // CHECK9-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 8
1402 // CHECK9-NEXT: [[TMP5:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1403 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
1404 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP6]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1405 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1406 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
1407 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1408 // CHECK9: cond.true:
1409 // CHECK9-NEXT: br label [[COND_END:%.*]]
1410 // CHECK9: cond.false:
1411 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1412 // CHECK9-NEXT: br label [[COND_END]]
1413 // CHECK9: cond.end:
1414 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
1415 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1416 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1417 // CHECK9-NEXT: store i32 [[TMP9]], ptr [[DOTOMP_IV]], align 4
1418 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1419 // CHECK9: omp.inner.for.cond:
1420 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1421 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1422 // CHECK9-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
1423 // CHECK9-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1424 // CHECK9: omp.inner.for.cond.cleanup:
1425 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1426 // CHECK9: omp.inner.for.body:
1427 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1428 // CHECK9-NEXT: [[TMP13:%.*]] = zext i32 [[TMP12]] to i64
1429 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1430 // CHECK9-NEXT: [[TMP15:%.*]] = zext i32 [[TMP14]] to i64
1431 // CHECK9-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP6]], align 8
1432 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined.omp_outlined, i64 [[TMP13]], i64 [[TMP15]], ptr [[VEC3]], ptr [[T_VAR2]], ptr [[S_ARR4]], ptr [[TMP16]])
1433 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1434 // CHECK9: omp.inner.for.inc:
1435 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1436 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1437 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
1438 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1439 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1440 // CHECK9: omp.inner.for.end:
1441 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1442 // CHECK9: omp.loop.exit:
1443 // CHECK9-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1444 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
1445 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP20]])
1446 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1447 // CHECK9-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
1448 // CHECK9-NEXT: br i1 [[TMP22]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
1449 // CHECK9: .omp.lastprivate.then:
1450 // CHECK9-NEXT: [[TMP23:%.*]] = load i32, ptr [[T_VAR2]], align 4
1451 // CHECK9-NEXT: store i32 [[TMP23]], ptr [[TMP1]], align 4
1452 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i64 8, i1 false)
1453 // CHECK9-NEXT: [[ARRAY_BEGIN8:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[TMP2]], i32 0, i32 0
1454 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN8]], i64 2
1455 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN8]], [[TMP24]]
1456 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE9:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1457 // CHECK9: omp.arraycpy.body:
1458 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1459 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN8]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1460 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4, i1 false)
1461 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1462 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1463 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP24]]
1464 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE9]], label [[OMP_ARRAYCPY_BODY]]
1465 // CHECK9: omp.arraycpy.done9:
1466 // CHECK9-NEXT: [[TMP25:%.*]] = load ptr, ptr [[_TMP6]], align 8
1467 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP4]], ptr align 4 [[TMP25]], i64 4, i1 false)
1468 // CHECK9-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
1469 // CHECK9: .omp.lastprivate.done:
1470 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
1471 // CHECK9-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
1472 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN10]], i64 2
1473 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1474 // CHECK9: arraydestroy.body:
1475 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP26]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1476 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1477 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1478 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
1479 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
1480 // CHECK9: arraydestroy.done11:
1481 // CHECK9-NEXT: ret void
1484 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined.omp_outlined
1485 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1486 // CHECK9-NEXT: entry:
1487 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1488 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1489 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1490 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1491 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1492 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
1493 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1494 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1495 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1496 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1497 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1498 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1499 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1500 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1501 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1502 // CHECK9-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
1503 // CHECK9-NEXT: [[VEC4:%.*]] = alloca [2 x i32], align 4
1504 // CHECK9-NEXT: [[S_ARR5:%.*]] = alloca [2 x %struct.S.0], align 4
1505 // CHECK9-NEXT: [[VAR6:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1506 // CHECK9-NEXT: [[_TMP7:%.*]] = alloca ptr, align 8
1507 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1508 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1509 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1510 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1511 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1512 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1513 // CHECK9-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1514 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1515 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1516 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1517 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
1518 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1519 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1520 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 8
1521 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1522 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1523 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1524 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP4]] to i32
1525 // CHECK9-NEXT: [[TMP5:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1526 // CHECK9-NEXT: [[CONV2:%.*]] = trunc i64 [[TMP5]] to i32
1527 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1528 // CHECK9-NEXT: store i32 [[CONV2]], ptr [[DOTOMP_UB]], align 4
1529 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1530 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1531 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR5]], i32 0, i32 0
1532 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1533 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1534 // CHECK9: arrayctor.loop:
1535 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1536 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1537 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
1538 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1539 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1540 // CHECK9: arrayctor.cont:
1541 // CHECK9-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 8
1542 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR6]])
1543 // CHECK9-NEXT: store ptr [[VAR6]], ptr [[_TMP7]], align 8
1544 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1545 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1546 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP8]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1547 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1548 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
1549 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1550 // CHECK9: cond.true:
1551 // CHECK9-NEXT: br label [[COND_END:%.*]]
1552 // CHECK9: cond.false:
1553 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1554 // CHECK9-NEXT: br label [[COND_END]]
1555 // CHECK9: cond.end:
1556 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
1557 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1558 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1559 // CHECK9-NEXT: store i32 [[TMP11]], ptr [[DOTOMP_IV]], align 4
1560 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1561 // CHECK9: omp.inner.for.cond:
1562 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1563 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1564 // CHECK9-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
1565 // CHECK9-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1566 // CHECK9: omp.inner.for.cond.cleanup:
1567 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1568 // CHECK9: omp.inner.for.body:
1569 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1570 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
1571 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1572 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1573 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[T_VAR3]], align 4
1574 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[I]], align 4
1575 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP16]] to i64
1576 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC4]], i64 0, i64 [[IDXPROM]]
1577 // CHECK9-NEXT: store i32 [[TMP15]], ptr [[ARRAYIDX]], align 4
1578 // CHECK9-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP7]], align 8
1579 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[I]], align 4
1580 // CHECK9-NEXT: [[IDXPROM9:%.*]] = sext i32 [[TMP18]] to i64
1581 // CHECK9-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR5]], i64 0, i64 [[IDXPROM9]]
1582 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX10]], ptr align 4 [[TMP17]], i64 4, i1 false)
1583 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1584 // CHECK9: omp.body.continue:
1585 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1586 // CHECK9: omp.inner.for.inc:
1587 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1588 // CHECK9-NEXT: [[ADD11:%.*]] = add nsw i32 [[TMP19]], 1
1589 // CHECK9-NEXT: store i32 [[ADD11]], ptr [[DOTOMP_IV]], align 4
1590 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1591 // CHECK9: omp.inner.for.end:
1592 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1593 // CHECK9: omp.loop.exit:
1594 // CHECK9-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1595 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
1596 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP21]])
1597 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1598 // CHECK9-NEXT: [[TMP23:%.*]] = icmp ne i32 [[TMP22]], 0
1599 // CHECK9-NEXT: br i1 [[TMP23]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
1600 // CHECK9: .omp.lastprivate.then:
1601 // CHECK9-NEXT: [[TMP24:%.*]] = load i32, ptr [[T_VAR3]], align 4
1602 // CHECK9-NEXT: store i32 [[TMP24]], ptr [[TMP1]], align 4
1603 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP0]], ptr align 4 [[VEC4]], i64 8, i1 false)
1604 // CHECK9-NEXT: [[ARRAY_BEGIN12:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[TMP2]], i32 0, i32 0
1605 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN12]], i64 2
1606 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN12]], [[TMP25]]
1607 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE13:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1608 // CHECK9: omp.arraycpy.body:
1609 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR5]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1610 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN12]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1611 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4, i1 false)
1612 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1613 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1614 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
1615 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE13]], label [[OMP_ARRAYCPY_BODY]]
1616 // CHECK9: omp.arraycpy.done13:
1617 // CHECK9-NEXT: [[TMP26:%.*]] = load ptr, ptr [[_TMP7]], align 8
1618 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP6]], ptr align 4 [[TMP26]], i64 4, i1 false)
1619 // CHECK9-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
1620 // CHECK9: .omp.lastprivate.done:
1621 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR6]]) #[[ATTR4]]
1622 // CHECK9-NEXT: [[ARRAY_BEGIN14:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR5]], i32 0, i32 0
1623 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN14]], i64 2
1624 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1625 // CHECK9: arraydestroy.body:
1626 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP27]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1627 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1628 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1629 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN14]]
1630 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE15:%.*]], label [[ARRAYDESTROY_BODY]]
1631 // CHECK9: arraydestroy.done15:
1632 // CHECK9-NEXT: ret void
1635 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1636 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1637 // CHECK9-NEXT: entry:
1638 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1639 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1640 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1641 // CHECK9-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1642 // CHECK9-NEXT: ret void
1645 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
1646 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1647 // CHECK9-NEXT: entry:
1648 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1649 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1650 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1651 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1652 // CHECK9-NEXT: store i32 0, ptr [[F]], align 4
1653 // CHECK9-NEXT: ret void
1656 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1657 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1658 // CHECK9-NEXT: entry:
1659 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1660 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1661 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1662 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1663 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1664 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1665 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1666 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1667 // CHECK9-NEXT: ret void
1670 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1671 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1672 // CHECK9-NEXT: entry:
1673 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1674 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1675 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1676 // CHECK9-NEXT: ret void
1679 // CHECK11-LABEL: define {{[^@]+}}@main
1680 // CHECK11-SAME: () #[[ATTR0:[0-9]+]] {
1681 // CHECK11-NEXT: entry:
1682 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1683 // CHECK11-NEXT: [[G:%.*]] = alloca double, align 8
1684 // CHECK11-NEXT: [[G1:%.*]] = alloca ptr, align 4
1685 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1686 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1687 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1688 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1689 // CHECK11-NEXT: [[VAR:%.*]] = alloca ptr, align 4
1690 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1691 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1692 // CHECK11-NEXT: [[SVAR_CASTED:%.*]] = alloca i32, align 4
1693 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [5 x ptr], align 4
1694 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [5 x ptr], align 4
1695 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [5 x ptr], align 4
1696 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1697 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1698 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
1699 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1700 // CHECK11-NEXT: store ptr [[G]], ptr [[G1]], align 4
1701 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1702 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
1703 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
1704 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[S_ARR]], float noundef 1.000000e+00)
1705 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[S_ARR]], i32 1
1706 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
1707 // CHECK11-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
1708 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 4
1709 // CHECK11-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 4
1710 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR]], align 4
1711 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[T_VAR_CASTED]], align 4
1712 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1713 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
1714 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr @_ZZ4mainE4svar, align 4
1715 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[SVAR_CASTED]], align 4
1716 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[SVAR_CASTED]], align 4
1717 // CHECK11-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 4
1718 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP]], align 4
1719 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1720 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[TMP8]], align 4
1721 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1722 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[TMP9]], align 4
1723 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1724 // CHECK11-NEXT: store ptr null, ptr [[TMP10]], align 4
1725 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1726 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP11]], align 4
1727 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1728 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP12]], align 4
1729 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
1730 // CHECK11-NEXT: store ptr null, ptr [[TMP13]], align 4
1731 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1732 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP14]], align 4
1733 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1734 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP15]], align 4
1735 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
1736 // CHECK11-NEXT: store ptr null, ptr [[TMP16]], align 4
1737 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1738 // CHECK11-NEXT: store ptr [[TMP6]], ptr [[TMP17]], align 4
1739 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1740 // CHECK11-NEXT: store ptr [[TMP7]], ptr [[TMP18]], align 4
1741 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
1742 // CHECK11-NEXT: store ptr null, ptr [[TMP19]], align 4
1743 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
1744 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[TMP20]], align 4
1745 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
1746 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[TMP21]], align 4
1747 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
1748 // CHECK11-NEXT: store ptr null, ptr [[TMP22]], align 4
1749 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1750 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1751 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1752 // CHECK11-NEXT: store i32 3, ptr [[TMP25]], align 4
1753 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1754 // CHECK11-NEXT: store i32 5, ptr [[TMP26]], align 4
1755 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1756 // CHECK11-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 4
1757 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1758 // CHECK11-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 4
1759 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1760 // CHECK11-NEXT: store ptr @.offload_sizes, ptr [[TMP29]], align 4
1761 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1762 // CHECK11-NEXT: store ptr @.offload_maptypes, ptr [[TMP30]], align 4
1763 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1764 // CHECK11-NEXT: store ptr null, ptr [[TMP31]], align 4
1765 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1766 // CHECK11-NEXT: store ptr null, ptr [[TMP32]], align 4
1767 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1768 // CHECK11-NEXT: store i64 2, ptr [[TMP33]], align 8
1769 // CHECK11-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1770 // CHECK11-NEXT: store i64 0, ptr [[TMP34]], align 8
1771 // CHECK11-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1772 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
1773 // CHECK11-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1774 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
1775 // CHECK11-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1776 // CHECK11-NEXT: store i32 0, ptr [[TMP37]], align 4
1777 // CHECK11-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.region_id, ptr [[KERNEL_ARGS]])
1778 // CHECK11-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
1779 // CHECK11-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1780 // CHECK11: omp_offload.failed:
1781 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106(i32 [[TMP2]], ptr [[VEC]], ptr [[S_ARR]], ptr [[TMP3]], i32 [[TMP5]]) #[[ATTR4:[0-9]+]]
1782 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1783 // CHECK11: omp_offload.cont:
1784 // CHECK11-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIiET_v()
1785 // CHECK11-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1786 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1787 // CHECK11-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1788 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1789 // CHECK11: arraydestroy.body:
1790 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP40]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1791 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1792 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1793 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1794 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
1795 // CHECK11: arraydestroy.done2:
1796 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1797 // CHECK11-NEXT: [[TMP41:%.*]] = load i32, ptr [[RETVAL]], align 4
1798 // CHECK11-NEXT: ret i32 [[TMP41]]
1801 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1802 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1803 // CHECK11-NEXT: entry:
1804 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1805 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1806 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1807 // CHECK11-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1808 // CHECK11-NEXT: ret void
1811 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1812 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1813 // CHECK11-NEXT: entry:
1814 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1815 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1816 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1817 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1818 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1819 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1820 // CHECK11-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
1821 // CHECK11-NEXT: ret void
1824 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106
1825 // CHECK11-SAME: (i32 noundef [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], i32 noundef [[SVAR:%.*]]) #[[ATTR3:[0-9]+]] {
1826 // CHECK11-NEXT: entry:
1827 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1828 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1829 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1830 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1831 // CHECK11-NEXT: [[SVAR_ADDR:%.*]] = alloca i32, align 4
1832 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1833 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1834 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1835 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1836 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1837 // CHECK11-NEXT: store i32 [[SVAR]], ptr [[SVAR_ADDR]], align 4
1838 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1839 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1840 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1841 // CHECK11-NEXT: store ptr [[TMP2]], ptr [[TMP]], align 4
1842 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
1843 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined, ptr [[TMP0]], ptr [[T_VAR_ADDR]], ptr [[TMP1]], ptr [[TMP3]], ptr [[SVAR_ADDR]])
1844 // CHECK11-NEXT: ret void
1847 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined
1848 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]]) #[[ATTR3]] {
1849 // CHECK11-NEXT: entry:
1850 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1851 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1852 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1853 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 4
1854 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1855 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1856 // CHECK11-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 4
1857 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1858 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1859 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1860 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1861 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1862 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1863 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1864 // CHECK11-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
1865 // CHECK11-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
1866 // CHECK11-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S], align 4
1867 // CHECK11-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1868 // CHECK11-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
1869 // CHECK11-NEXT: [[SVAR7:%.*]] = alloca i32, align 4
1870 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
1871 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1872 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1873 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1874 // CHECK11-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1875 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1876 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1877 // CHECK11-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 4
1878 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1879 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 4
1880 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1881 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1882 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 4
1883 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 4
1884 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1885 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
1886 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1887 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1888 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
1889 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1890 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1891 // CHECK11: arrayctor.loop:
1892 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1893 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1894 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i32 1
1895 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1896 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1897 // CHECK11: arrayctor.cont:
1898 // CHECK11-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 4
1899 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
1900 // CHECK11-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
1901 // CHECK11-NEXT: [[TMP6:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1902 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
1903 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP7]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1904 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1905 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP8]], 1
1906 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1907 // CHECK11: cond.true:
1908 // CHECK11-NEXT: br label [[COND_END:%.*]]
1909 // CHECK11: cond.false:
1910 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1911 // CHECK11-NEXT: br label [[COND_END]]
1912 // CHECK11: cond.end:
1913 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP9]], [[COND_FALSE]] ]
1914 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1915 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1916 // CHECK11-NEXT: store i32 [[TMP10]], ptr [[DOTOMP_IV]], align 4
1917 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1918 // CHECK11: omp.inner.for.cond:
1919 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1920 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1921 // CHECK11-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
1922 // CHECK11-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1923 // CHECK11: omp.inner.for.cond.cleanup:
1924 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1925 // CHECK11: omp.inner.for.body:
1926 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1927 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1928 // CHECK11-NEXT: [[TMP15:%.*]] = load ptr, ptr [[_TMP6]], align 4
1929 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 7, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined, i32 [[TMP13]], i32 [[TMP14]], ptr [[VEC3]], ptr [[T_VAR2]], ptr [[S_ARR4]], ptr [[TMP15]], ptr [[SVAR7]])
1930 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1931 // CHECK11: omp.inner.for.inc:
1932 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1933 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1934 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
1935 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1936 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
1937 // CHECK11: omp.inner.for.end:
1938 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1939 // CHECK11: omp.loop.exit:
1940 // CHECK11-NEXT: [[TMP18:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1941 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[TMP18]], align 4
1942 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP19]])
1943 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1944 // CHECK11-NEXT: [[TMP21:%.*]] = icmp ne i32 [[TMP20]], 0
1945 // CHECK11-NEXT: br i1 [[TMP21]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
1946 // CHECK11: .omp.lastprivate.then:
1947 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[T_VAR2]], align 4
1948 // CHECK11-NEXT: store i32 [[TMP22]], ptr [[TMP1]], align 4
1949 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i32 8, i1 false)
1950 // CHECK11-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP2]], i32 0, i32 0
1951 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN9]], i32 2
1952 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN9]], [[TMP23]]
1953 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE10:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1954 // CHECK11: omp.arraycpy.body:
1955 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1956 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN9]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1957 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 4, i1 false)
1958 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1959 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1960 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP23]]
1961 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE10]], label [[OMP_ARRAYCPY_BODY]]
1962 // CHECK11: omp.arraycpy.done10:
1963 // CHECK11-NEXT: [[TMP24:%.*]] = load ptr, ptr [[_TMP6]], align 4
1964 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP5]], ptr align 4 [[TMP24]], i32 4, i1 false)
1965 // CHECK11-NEXT: [[TMP25:%.*]] = load i32, ptr [[SVAR7]], align 4
1966 // CHECK11-NEXT: store i32 [[TMP25]], ptr [[TMP4]], align 4
1967 // CHECK11-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
1968 // CHECK11: .omp.lastprivate.done:
1969 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
1970 // CHECK11-NEXT: [[ARRAY_BEGIN11:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
1971 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN11]], i32 2
1972 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1973 // CHECK11: arraydestroy.body:
1974 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP26]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1975 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1976 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1977 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN11]]
1978 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE12:%.*]], label [[ARRAYDESTROY_BODY]]
1979 // CHECK11: arraydestroy.done12:
1980 // CHECK11-NEXT: ret void
1983 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined
1984 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[SVAR:%.*]]) #[[ATTR3]] {
1985 // CHECK11-NEXT: entry:
1986 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1987 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1988 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
1989 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
1990 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1991 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 4
1992 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1993 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1994 // CHECK11-NEXT: [[SVAR_ADDR:%.*]] = alloca ptr, align 4
1995 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1996 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1997 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
1998 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1999 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2000 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2001 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2002 // CHECK11-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
2003 // CHECK11-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
2004 // CHECK11-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S], align 4
2005 // CHECK11-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2006 // CHECK11-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
2007 // CHECK11-NEXT: [[SVAR7:%.*]] = alloca i32, align 4
2008 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
2009 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
2010 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
2011 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
2012 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
2013 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
2014 // CHECK11-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
2015 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
2016 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
2017 // CHECK11-NEXT: store ptr [[SVAR]], ptr [[SVAR_ADDR]], align 4
2018 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
2019 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 4
2020 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
2021 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
2022 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[SVAR_ADDR]], align 4
2023 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 4
2024 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2025 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2026 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
2027 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
2028 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_LB]], align 4
2029 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
2030 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2031 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2032 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
2033 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
2034 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2035 // CHECK11: arrayctor.loop:
2036 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2037 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2038 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i32 1
2039 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2040 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2041 // CHECK11: arrayctor.cont:
2042 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP]], align 4
2043 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
2044 // CHECK11-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
2045 // CHECK11-NEXT: [[TMP8:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2046 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP8]], align 4
2047 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP9]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2048 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2049 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP10]], 1
2050 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2051 // CHECK11: cond.true:
2052 // CHECK11-NEXT: br label [[COND_END:%.*]]
2053 // CHECK11: cond.false:
2054 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2055 // CHECK11-NEXT: br label [[COND_END]]
2056 // CHECK11: cond.end:
2057 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP11]], [[COND_FALSE]] ]
2058 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2059 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2060 // CHECK11-NEXT: store i32 [[TMP12]], ptr [[DOTOMP_IV]], align 4
2061 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2062 // CHECK11: omp.inner.for.cond:
2063 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2064 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2065 // CHECK11-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP13]], [[TMP14]]
2066 // CHECK11-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2067 // CHECK11: omp.inner.for.cond.cleanup:
2068 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2069 // CHECK11: omp.inner.for.body:
2070 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2071 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP15]], 1
2072 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2073 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2074 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[T_VAR2]], align 4
2075 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[I]], align 4
2076 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i32 0, i32 [[TMP17]]
2077 // CHECK11-NEXT: store i32 [[TMP16]], ptr [[ARRAYIDX]], align 4
2078 // CHECK11-NEXT: [[TMP18:%.*]] = load ptr, ptr [[_TMP6]], align 4
2079 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[I]], align 4
2080 // CHECK11-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 [[TMP19]]
2081 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX9]], ptr align 4 [[TMP18]], i32 4, i1 false)
2082 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2083 // CHECK11: omp.body.continue:
2084 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2085 // CHECK11: omp.inner.for.inc:
2086 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2087 // CHECK11-NEXT: [[ADD10:%.*]] = add nsw i32 [[TMP20]], 1
2088 // CHECK11-NEXT: store i32 [[ADD10]], ptr [[DOTOMP_IV]], align 4
2089 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
2090 // CHECK11: omp.inner.for.end:
2091 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2092 // CHECK11: omp.loop.exit:
2093 // CHECK11-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2094 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
2095 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
2096 // CHECK11-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
2097 // CHECK11-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
2098 // CHECK11-NEXT: br i1 [[TMP24]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
2099 // CHECK11: .omp.lastprivate.then:
2100 // CHECK11-NEXT: [[TMP25:%.*]] = load i32, ptr [[T_VAR2]], align 4
2101 // CHECK11-NEXT: store i32 [[TMP25]], ptr [[TMP1]], align 4
2102 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i32 8, i1 false)
2103 // CHECK11-NEXT: [[ARRAY_BEGIN11:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP2]], i32 0, i32 0
2104 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN11]], i32 2
2105 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN11]], [[TMP26]]
2106 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE12:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2107 // CHECK11: omp.arraycpy.body:
2108 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2109 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN11]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2110 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 4, i1 false)
2111 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2112 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2113 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP26]]
2114 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE12]], label [[OMP_ARRAYCPY_BODY]]
2115 // CHECK11: omp.arraycpy.done12:
2116 // CHECK11-NEXT: [[TMP27:%.*]] = load ptr, ptr [[_TMP6]], align 4
2117 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP7]], ptr align 4 [[TMP27]], i32 4, i1 false)
2118 // CHECK11-NEXT: [[TMP28:%.*]] = load i32, ptr [[SVAR7]], align 4
2119 // CHECK11-NEXT: store i32 [[TMP28]], ptr [[TMP4]], align 4
2120 // CHECK11-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
2121 // CHECK11: .omp.lastprivate.done:
2122 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
2123 // CHECK11-NEXT: [[ARRAY_BEGIN13:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
2124 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN13]], i32 2
2125 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2126 // CHECK11: arraydestroy.body:
2127 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP29]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2128 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2129 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2130 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN13]]
2131 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE14:%.*]], label [[ARRAYDESTROY_BODY]]
2132 // CHECK11: arraydestroy.done14:
2133 // CHECK11-NEXT: ret void
2136 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
2137 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2138 // CHECK11-NEXT: entry:
2139 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2140 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2141 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2142 // CHECK11-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
2143 // CHECK11-NEXT: ret void
2146 // CHECK11-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
2147 // CHECK11-SAME: () #[[ATTR1]] comdat {
2148 // CHECK11-NEXT: entry:
2149 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2150 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
2151 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
2152 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
2153 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
2154 // CHECK11-NEXT: [[VAR:%.*]] = alloca ptr, align 4
2155 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
2156 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
2157 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [4 x ptr], align 4
2158 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [4 x ptr], align 4
2159 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [4 x ptr], align 4
2160 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
2161 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
2162 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
2163 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
2164 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
2165 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[S_ARR]], i32 noundef 1)
2166 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[S_ARR]], i32 1
2167 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
2168 // CHECK11-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
2169 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 4
2170 // CHECK11-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 4
2171 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR]], align 4
2172 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[T_VAR_CASTED]], align 4
2173 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
2174 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
2175 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 4
2176 // CHECK11-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 4
2177 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2178 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[TMP6]], align 4
2179 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2180 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[TMP7]], align 4
2181 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
2182 // CHECK11-NEXT: store ptr null, ptr [[TMP8]], align 4
2183 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
2184 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP9]], align 4
2185 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
2186 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP10]], align 4
2187 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
2188 // CHECK11-NEXT: store ptr null, ptr [[TMP11]], align 4
2189 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
2190 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP12]], align 4
2191 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
2192 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP13]], align 4
2193 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
2194 // CHECK11-NEXT: store ptr null, ptr [[TMP14]], align 4
2195 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
2196 // CHECK11-NEXT: store ptr [[TMP4]], ptr [[TMP15]], align 4
2197 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
2198 // CHECK11-NEXT: store ptr [[TMP5]], ptr [[TMP16]], align 4
2199 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
2200 // CHECK11-NEXT: store ptr null, ptr [[TMP17]], align 4
2201 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2202 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2203 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
2204 // CHECK11-NEXT: store i32 3, ptr [[TMP20]], align 4
2205 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
2206 // CHECK11-NEXT: store i32 4, ptr [[TMP21]], align 4
2207 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
2208 // CHECK11-NEXT: store ptr [[TMP18]], ptr [[TMP22]], align 4
2209 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
2210 // CHECK11-NEXT: store ptr [[TMP19]], ptr [[TMP23]], align 4
2211 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
2212 // CHECK11-NEXT: store ptr @.offload_sizes.1, ptr [[TMP24]], align 4
2213 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
2214 // CHECK11-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP25]], align 4
2215 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
2216 // CHECK11-NEXT: store ptr null, ptr [[TMP26]], align 4
2217 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
2218 // CHECK11-NEXT: store ptr null, ptr [[TMP27]], align 4
2219 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
2220 // CHECK11-NEXT: store i64 2, ptr [[TMP28]], align 8
2221 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
2222 // CHECK11-NEXT: store i64 0, ptr [[TMP29]], align 8
2223 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
2224 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP30]], align 4
2225 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
2226 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP31]], align 4
2227 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
2228 // CHECK11-NEXT: store i32 0, ptr [[TMP32]], align 4
2229 // CHECK11-NEXT: [[TMP33:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.region_id, ptr [[KERNEL_ARGS]])
2230 // CHECK11-NEXT: [[TMP34:%.*]] = icmp ne i32 [[TMP33]], 0
2231 // CHECK11-NEXT: br i1 [[TMP34]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
2232 // CHECK11: omp_offload.failed:
2233 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49(i32 [[TMP2]], ptr [[VEC]], ptr [[S_ARR]], ptr [[TMP3]]) #[[ATTR4]]
2234 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
2235 // CHECK11: omp_offload.cont:
2236 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
2237 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
2238 // CHECK11-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
2239 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2240 // CHECK11: arraydestroy.body:
2241 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP35]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2242 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2243 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2244 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
2245 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
2246 // CHECK11: arraydestroy.done2:
2247 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
2248 // CHECK11-NEXT: [[TMP36:%.*]] = load i32, ptr [[RETVAL]], align 4
2249 // CHECK11-NEXT: ret i32 [[TMP36]]
2252 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
2253 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2254 // CHECK11-NEXT: entry:
2255 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2256 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2257 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2258 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
2259 // CHECK11-NEXT: store float 0.000000e+00, ptr [[F]], align 4
2260 // CHECK11-NEXT: ret void
2263 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
2264 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2265 // CHECK11-NEXT: entry:
2266 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2267 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
2268 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2269 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
2270 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2271 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
2272 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
2273 // CHECK11-NEXT: store float [[TMP0]], ptr [[F]], align 4
2274 // CHECK11-NEXT: ret void
2277 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
2278 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2279 // CHECK11-NEXT: entry:
2280 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2281 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2282 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2283 // CHECK11-NEXT: ret void
2286 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
2287 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2288 // CHECK11-NEXT: entry:
2289 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2290 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2291 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2292 // CHECK11-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
2293 // CHECK11-NEXT: ret void
2296 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
2297 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2298 // CHECK11-NEXT: entry:
2299 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2300 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2301 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2302 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2303 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2304 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2305 // CHECK11-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
2306 // CHECK11-NEXT: ret void
2309 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49
2310 // CHECK11-SAME: (i32 noundef [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
2311 // CHECK11-NEXT: entry:
2312 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
2313 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
2314 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
2315 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
2316 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
2317 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
2318 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
2319 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
2320 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
2321 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
2322 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
2323 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
2324 // CHECK11-NEXT: store ptr [[TMP2]], ptr [[TMP]], align 4
2325 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
2326 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined, ptr [[TMP0]], ptr [[T_VAR_ADDR]], ptr [[TMP1]], ptr [[TMP3]])
2327 // CHECK11-NEXT: ret void
2330 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined
2331 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
2332 // CHECK11-NEXT: entry:
2333 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
2334 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
2335 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
2336 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 4
2337 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
2338 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
2339 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
2340 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2341 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
2342 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2343 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2344 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2345 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2346 // CHECK11-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
2347 // CHECK11-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
2348 // CHECK11-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S.0], align 4
2349 // CHECK11-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
2350 // CHECK11-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
2351 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
2352 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
2353 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
2354 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
2355 // CHECK11-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
2356 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
2357 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
2358 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
2359 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 4
2360 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
2361 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
2362 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 4
2363 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2364 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_COMB_UB]], align 4
2365 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2366 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2367 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2368 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
2369 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2370 // CHECK11: arrayctor.loop:
2371 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2372 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2373 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i32 1
2374 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2375 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2376 // CHECK11: arrayctor.cont:
2377 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 4
2378 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
2379 // CHECK11-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
2380 // CHECK11-NEXT: [[TMP5:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2381 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
2382 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP6]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2383 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2384 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP7]], 1
2385 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2386 // CHECK11: cond.true:
2387 // CHECK11-NEXT: br label [[COND_END:%.*]]
2388 // CHECK11: cond.false:
2389 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2390 // CHECK11-NEXT: br label [[COND_END]]
2391 // CHECK11: cond.end:
2392 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP8]], [[COND_FALSE]] ]
2393 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2394 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2395 // CHECK11-NEXT: store i32 [[TMP9]], ptr [[DOTOMP_IV]], align 4
2396 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2397 // CHECK11: omp.inner.for.cond:
2398 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2399 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2400 // CHECK11-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP10]], [[TMP11]]
2401 // CHECK11-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2402 // CHECK11: omp.inner.for.cond.cleanup:
2403 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2404 // CHECK11: omp.inner.for.body:
2405 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2406 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2407 // CHECK11-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP6]], align 4
2408 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined.omp_outlined, i32 [[TMP12]], i32 [[TMP13]], ptr [[VEC3]], ptr [[T_VAR2]], ptr [[S_ARR4]], ptr [[TMP14]])
2409 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2410 // CHECK11: omp.inner.for.inc:
2411 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2412 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2413 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP15]], [[TMP16]]
2414 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2415 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
2416 // CHECK11: omp.inner.for.end:
2417 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2418 // CHECK11: omp.loop.exit:
2419 // CHECK11-NEXT: [[TMP17:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2420 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
2421 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP18]])
2422 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
2423 // CHECK11-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
2424 // CHECK11-NEXT: br i1 [[TMP20]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
2425 // CHECK11: .omp.lastprivate.then:
2426 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[T_VAR2]], align 4
2427 // CHECK11-NEXT: store i32 [[TMP21]], ptr [[TMP1]], align 4
2428 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i32 8, i1 false)
2429 // CHECK11-NEXT: [[ARRAY_BEGIN8:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[TMP2]], i32 0, i32 0
2430 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN8]], i32 2
2431 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN8]], [[TMP22]]
2432 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE9:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2433 // CHECK11: omp.arraycpy.body:
2434 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2435 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN8]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2436 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 4, i1 false)
2437 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2438 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2439 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP22]]
2440 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE9]], label [[OMP_ARRAYCPY_BODY]]
2441 // CHECK11: omp.arraycpy.done9:
2442 // CHECK11-NEXT: [[TMP23:%.*]] = load ptr, ptr [[_TMP6]], align 4
2443 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP4]], ptr align 4 [[TMP23]], i32 4, i1 false)
2444 // CHECK11-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
2445 // CHECK11: .omp.lastprivate.done:
2446 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
2447 // CHECK11-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2448 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN10]], i32 2
2449 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2450 // CHECK11: arraydestroy.body:
2451 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2452 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2453 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2454 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
2455 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
2456 // CHECK11: arraydestroy.done11:
2457 // CHECK11-NEXT: ret void
2460 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined.omp_outlined
2461 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
2462 // CHECK11-NEXT: entry:
2463 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
2464 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
2465 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
2466 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
2467 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
2468 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 4
2469 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
2470 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
2471 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
2472 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2473 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca i32, align 4
2474 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2475 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2476 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2477 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2478 // CHECK11-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
2479 // CHECK11-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
2480 // CHECK11-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S.0], align 4
2481 // CHECK11-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
2482 // CHECK11-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
2483 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
2484 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
2485 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
2486 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
2487 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
2488 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
2489 // CHECK11-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
2490 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
2491 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
2492 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
2493 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 4
2494 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
2495 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
2496 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 4
2497 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2498 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2499 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
2500 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
2501 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_LB]], align 4
2502 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_UB]], align 4
2503 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2504 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2505 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2506 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
2507 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2508 // CHECK11: arrayctor.loop:
2509 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2510 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2511 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i32 1
2512 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2513 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2514 // CHECK11: arrayctor.cont:
2515 // CHECK11-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 4
2516 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
2517 // CHECK11-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
2518 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2519 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2520 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP8]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2521 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2522 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 1
2523 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2524 // CHECK11: cond.true:
2525 // CHECK11-NEXT: br label [[COND_END:%.*]]
2526 // CHECK11: cond.false:
2527 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2528 // CHECK11-NEXT: br label [[COND_END]]
2529 // CHECK11: cond.end:
2530 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
2531 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2532 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2533 // CHECK11-NEXT: store i32 [[TMP11]], ptr [[DOTOMP_IV]], align 4
2534 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2535 // CHECK11: omp.inner.for.cond:
2536 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2537 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2538 // CHECK11-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
2539 // CHECK11-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2540 // CHECK11: omp.inner.for.cond.cleanup:
2541 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2542 // CHECK11: omp.inner.for.body:
2543 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2544 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
2545 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2546 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2547 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[T_VAR2]], align 4
2548 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[I]], align 4
2549 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i32 0, i32 [[TMP16]]
2550 // CHECK11-NEXT: store i32 [[TMP15]], ptr [[ARRAYIDX]], align 4
2551 // CHECK11-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP6]], align 4
2552 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[I]], align 4
2553 // CHECK11-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 [[TMP18]]
2554 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX8]], ptr align 4 [[TMP17]], i32 4, i1 false)
2555 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2556 // CHECK11: omp.body.continue:
2557 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2558 // CHECK11: omp.inner.for.inc:
2559 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2560 // CHECK11-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP19]], 1
2561 // CHECK11-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
2562 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
2563 // CHECK11: omp.inner.for.end:
2564 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2565 // CHECK11: omp.loop.exit:
2566 // CHECK11-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
2567 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
2568 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP21]])
2569 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
2570 // CHECK11-NEXT: [[TMP23:%.*]] = icmp ne i32 [[TMP22]], 0
2571 // CHECK11-NEXT: br i1 [[TMP23]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
2572 // CHECK11: .omp.lastprivate.then:
2573 // CHECK11-NEXT: [[TMP24:%.*]] = load i32, ptr [[T_VAR2]], align 4
2574 // CHECK11-NEXT: store i32 [[TMP24]], ptr [[TMP1]], align 4
2575 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP0]], ptr align 4 [[VEC3]], i32 8, i1 false)
2576 // CHECK11-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[TMP2]], i32 0, i32 0
2577 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN10]], i32 2
2578 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN10]], [[TMP25]]
2579 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE11:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2580 // CHECK11: omp.arraycpy.body:
2581 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[S_ARR4]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2582 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN10]], [[DOTOMP_LASTPRIVATE_THEN]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2583 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr align 4 [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 4, i1 false)
2584 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2585 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2586 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
2587 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE11]], label [[OMP_ARRAYCPY_BODY]]
2588 // CHECK11: omp.arraycpy.done11:
2589 // CHECK11-NEXT: [[TMP26:%.*]] = load ptr, ptr [[_TMP6]], align 4
2590 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP6]], ptr align 4 [[TMP26]], i32 4, i1 false)
2591 // CHECK11-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
2592 // CHECK11: .omp.lastprivate.done:
2593 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
2594 // CHECK11-NEXT: [[ARRAY_BEGIN12:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2595 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN12]], i32 2
2596 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2597 // CHECK11: arraydestroy.body:
2598 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP27]], [[DOTOMP_LASTPRIVATE_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2599 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2600 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2601 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN12]]
2602 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE13:%.*]], label [[ARRAYDESTROY_BODY]]
2603 // CHECK11: arraydestroy.done13:
2604 // CHECK11-NEXT: ret void
2607 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
2608 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2609 // CHECK11-NEXT: entry:
2610 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2611 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2612 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2613 // CHECK11-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
2614 // CHECK11-NEXT: ret void
2617 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
2618 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2619 // CHECK11-NEXT: entry:
2620 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2621 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2622 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2623 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2624 // CHECK11-NEXT: store i32 0, ptr [[F]], align 4
2625 // CHECK11-NEXT: ret void
2628 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
2629 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2630 // CHECK11-NEXT: entry:
2631 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2632 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2633 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2634 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2635 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2636 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2637 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2638 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
2639 // CHECK11-NEXT: ret void
2642 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
2643 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2644 // CHECK11-NEXT: entry:
2645 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2646 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2647 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2648 // CHECK11-NEXT: ret void