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