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 // Test target codegen - host bc file has to be created first.
3 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
4 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck --check-prefixes=CHECK-64 %s
5 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc
6 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefixes=CHECK-32 %s
7 // RUN: %clang_cc1 -verify -fopenmp -fexceptions -fcxx-exceptions -x c++ -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-x86-host.bc -o - | FileCheck --check-prefixes=CHECK-32-EX %s
8 // expected-no-diagnostics
15 #pragma omp target teams distribute parallel for simd if(a)
16 for (int i
= 0; i
< 10; ++i
)
18 #pragma omp target teams distribute parallel for simd schedule(static)
19 for (int i
= 0; i
< 10; ++i
)
21 #pragma omp target teams distribute parallel for simd schedule(static, 1)
22 for (int i
= 0; i
< 10; ++i
)
24 #pragma omp target teams distribute parallel for simd schedule(auto)
25 for (int i
= 0; i
< 10; ++i
)
27 #pragma omp target teams distribute parallel for simd schedule(runtime)
28 for (int i
= 0; i
< 10; ++i
)
30 #pragma omp target teams distribute parallel for simd schedule(dynamic)
31 for (int i
= 0; i
< 10; ++i
)
33 #pragma omp target teams distribute parallel for simd schedule(guided)
34 for (int i
= 0; i
< 10; ++i
)
37 #pragma omp target teams distribute parallel for lastprivate(a)
38 for (int i
= 0; i
< 10; ++i
)
40 #pragma omp target teams distribute parallel for schedule(static)
41 for (int i
= 0; i
< 10; ++i
)
43 #pragma omp target teams distribute parallel for schedule(static, 1)
44 for (int i
= 0; i
< 10; ++i
)
46 #pragma omp target teams distribute parallel for schedule(auto)
47 for (int i
= 0; i
< 10; ++i
)
49 #pragma omp target teams distribute parallel for schedule(runtime)
50 for (int i
= 0; i
< 10; ++i
)
52 #pragma omp target teams distribute parallel for schedule(dynamic)
53 for (int i
= 0; i
< 10; ++i
)
55 #pragma omp target teams distribute parallel for schedule(guided)
56 for (int i
= 0; i
< 10; ++i
)
58 #pragma omp target teams
61 #pragma omp distribute parallel for simd
62 for (int i
= 0; i
< 10; ++i
)
66 #pragma omp target teams
68 int b
[] = {2, 3, sizeof(int)};
69 #pragma omp distribute parallel for simd schedule(static)
70 for (int i
= 0; i
< 10; ++i
)
73 #pragma omp target teams
76 #pragma omp distribute parallel for simd schedule(static, 1)
77 for (int i
= 0; i
< 10; ++i
)
81 #pragma omp target teams
82 #pragma omp distribute parallel for simd schedule(auto)
83 for (int i
= 0; i
< 10; ++i
)
85 #pragma omp target teams
86 #pragma omp distribute parallel for simd schedule(runtime)
87 for (int i
= 0; i
< 10; ++i
)
89 #pragma omp target teams
90 #pragma omp distribute parallel for simd schedule(dynamic)
91 for (int i
= 0; i
< 10; ++i
)
93 #pragma omp target teams
94 #pragma omp distribute parallel for simd schedule(guided)
95 for (int i
= 0; i
< 10; ++i
)
97 #pragma omp target teams
98 #pragma omp distribute parallel for
99 for (int i
= 0; i
< 10; ++i
)
101 #pragma omp target teams
102 #pragma omp distribute parallel for schedule(static)
103 for (int i
= 0; i
< 10; ++i
)
105 #pragma omp target teams
106 #pragma omp distribute parallel for schedule(static, 1)
107 for (int i
= 0; i
< 10; ++i
)
109 #pragma omp target teams
110 #pragma omp distribute parallel for schedule(auto)
111 for (int i
= 0; i
< 10; ++i
)
113 #pragma omp target teams
114 #pragma omp distribute parallel for schedule(runtime)
115 for (int i
= 0; i
< 10; ++i
)
117 #pragma omp target teams
118 #pragma omp distribute parallel for schedule(dynamic)
119 for (int i
= 0; i
< 10; ++i
)
121 #pragma omp target teams
122 #pragma omp distribute parallel for schedule(guided)
123 for (int i
= 0; i
< 10; ++i
)
127 #pragma omp distribute parallel for
128 for (int i
= 0; i
< 10; ++i
)
132 #pragma omp distribute parallel for schedule(static)
133 for (int i
= 0; i
< 10; ++i
)
137 #pragma omp distribute parallel for schedule(static, 1)
138 for (int i
= 0; i
< 10; ++i
)
142 #pragma omp distribute parallel for schedule(auto)
143 for (int i
= 0; i
< 10; ++i
)
147 #pragma omp distribute parallel for schedule(runtime)
148 for (int i
= 0; i
< 10; ++i
)
152 #pragma omp distribute parallel for schedule(dynamic)
153 for (int i
= 0; i
< 10; ++i
)
157 #pragma omp distribute parallel for schedule(guided)
158 for (int i
= 0; i
< 10; ++i
)
160 #pragma omp target parallel for if(a)
161 for (int i
= 0; i
< 10; ++i
)
163 #pragma omp target parallel for schedule(static)
164 for (int i
= 0; i
< 10; ++i
)
166 #pragma omp target parallel for schedule(static, 1)
167 for (int i
= 0; i
< 10; ++i
)
169 #pragma omp target parallel for schedule(auto)
170 for (int i
= 0; i
< 10; ++i
)
172 #pragma omp target parallel for schedule(runtime)
173 for (int i
= 0; i
< 10; ++i
)
175 #pragma omp target parallel for schedule(dynamic)
176 for (int i
= 0; i
< 10; ++i
)
178 #pragma omp target parallel for schedule(guided)
179 for (int i
= 0; i
< 10; ++i
)
181 #pragma omp target parallel if(a)
183 for (int i
= 0; i
< 10; ++i
)
185 #pragma omp target parallel
186 #pragma omp for simd schedule(static)
187 for (int i
= 0; i
< 10; ++i
)
189 #pragma omp target parallel
190 #pragma omp for simd schedule(static, 1)
191 for (int i
= 0; i
< 10; ++i
)
193 #pragma omp target parallel
194 #pragma omp for simd schedule(auto)
195 for (int i
= 0; i
< 10; ++i
)
197 #pragma omp target parallel
198 #pragma omp for simd schedule(runtime)
199 for (int i
= 0; i
< 10; ++i
)
201 #pragma omp target parallel
202 #pragma omp for simd schedule(dynamic)
203 for (int i
= 0; i
< 10; ++i
)
205 #pragma omp target parallel
206 #pragma omp for simd schedule(guided)
207 for (int i
= 0; i
< 10; ++i
)
211 #pragma omp for simd ordered
212 for (int i
= 0; i
< 10; ++i
)
216 #pragma omp for simd schedule(static)
217 for (int i
= 0; i
< 10; ++i
)
221 #pragma omp for simd schedule(static, 1)
222 for (int i
= 0; i
< 10; ++i
)
226 #pragma omp for simd schedule(auto)
227 for (int i
= 0; i
< 10; ++i
)
231 #pragma omp for simd schedule(runtime)
232 for (int i
= 0; i
< 10; ++i
)
236 #pragma omp for simd schedule(dynamic)
237 for (int i
= 0; i
< 10; ++i
)
241 #pragma omp for simd schedule(guided)
242 for (int i
= 0; i
< 10; ++i
)
245 #pragma omp parallel for
246 for (int i
= 0; i
< 10; ++i
)
249 #pragma omp parallel for schedule(static)
250 for (int i
= 0; i
< 10; ++i
)
253 #pragma omp parallel for schedule(static, 1)
254 for (int i
= 0; i
< 10; ++i
)
257 #pragma omp parallel for schedule(auto)
258 for (int i
= 0; i
< 10; ++i
)
261 #pragma omp parallel for schedule(runtime)
262 for (int i
= 0; i
< 10; ++i
)
265 #pragma omp parallel for schedule(dynamic)
266 for (int i
= 0; i
< 10; ++i
)
269 #pragma omp parallel for schedule(guided)
270 for (int i
= 0; i
< 10; ++i
)
275 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15
276 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR0:[0-9]+]] {
277 // CHECK-64-NEXT: entry:
278 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
279 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
280 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
281 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
282 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
283 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
284 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
285 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_kernel_environment, ptr [[DYN_PTR]])
286 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
287 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
288 // CHECK-64: user_code.entry:
289 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
290 // CHECK-64-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
291 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
292 // CHECK-64-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL]] to i8
293 // CHECK-64-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1
294 // CHECK-64-NEXT: [[TMP3:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8
295 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
296 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
297 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i64 [[TMP3]]) #[[ATTR2:[0-9]+]]
298 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
299 // CHECK-64-NEXT: ret void
300 // CHECK-64: worker.exit:
301 // CHECK-64-NEXT: ret void
304 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined
305 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1:[0-9]+]] {
306 // CHECK-64-NEXT: entry:
307 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
308 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
309 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
310 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
311 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
312 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
313 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
314 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
315 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
316 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
317 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
318 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 8
319 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__CASTED15:%.*]] = alloca i64, align 8
320 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS17:%.*]] = alloca [3 x ptr], align 8
321 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
322 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
323 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
324 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
325 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
326 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
327 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
328 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
329 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
330 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
331 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
332 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
333 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
334 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
335 // CHECK-64: cond.true:
336 // CHECK-64-NEXT: br label [[COND_END:%.*]]
337 // CHECK-64: cond.false:
338 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
339 // CHECK-64-NEXT: br label [[COND_END]]
340 // CHECK-64: cond.end:
341 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
342 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
343 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
344 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
345 // CHECK-64-NEXT: [[TMP5:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
346 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP5]] to i1
347 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
348 // CHECK-64: omp_if.then:
349 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
350 // CHECK-64: omp.inner.for.cond:
351 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249:![0-9]+]]
352 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP6]], 10
353 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
354 // CHECK-64: omp.inner.for.body:
355 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
356 // CHECK-64-NEXT: [[TMP8:%.*]] = zext i32 [[TMP7]] to i64
357 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
358 // CHECK-64-NEXT: [[TMP10:%.*]] = zext i32 [[TMP9]] to i64
359 // CHECK-64-NEXT: [[TMP11:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
360 // CHECK-64-NEXT: [[TOBOOL2:%.*]] = trunc i8 [[TMP11]] to i1
361 // CHECK-64-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL2]] to i8
362 // CHECK-64-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1, !llvm.access.group [[ACC_GRP249]]
363 // CHECK-64-NEXT: [[TMP12:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8, !llvm.access.group [[ACC_GRP249]]
364 // CHECK-64-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
365 // CHECK-64-NEXT: [[TMP14:%.*]] = inttoptr i64 [[TMP8]] to ptr
366 // CHECK-64-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8, !llvm.access.group [[ACC_GRP249]]
367 // CHECK-64-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
368 // CHECK-64-NEXT: [[TMP16:%.*]] = inttoptr i64 [[TMP10]] to ptr
369 // CHECK-64-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 8, !llvm.access.group [[ACC_GRP249]]
370 // CHECK-64-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
371 // CHECK-64-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP12]] to ptr
372 // CHECK-64-NEXT: store ptr [[TMP18]], ptr [[TMP17]], align 8, !llvm.access.group [[ACC_GRP249]]
373 // CHECK-64-NEXT: [[TMP19:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
374 // CHECK-64-NEXT: [[TOBOOL3:%.*]] = trunc i8 [[TMP19]] to i1
375 // CHECK-64-NEXT: [[TMP20:%.*]] = zext i1 [[TOBOOL3]] to i32
376 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP20]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 3), !llvm.access.group [[ACC_GRP249]]
377 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
378 // CHECK-64: omp.inner.for.inc:
379 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
380 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
381 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]
382 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
383 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
384 // CHECK-64-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
385 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
386 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
387 // CHECK-64-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
388 // CHECK-64-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
389 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP25]], [[TMP26]]
390 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
391 // CHECK-64-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
392 // CHECK-64-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP27]], 9
393 // CHECK-64-NEXT: br i1 [[CMP6]], label [[COND_TRUE7:%.*]], label [[COND_FALSE8:%.*]]
394 // CHECK-64: cond.true7:
395 // CHECK-64-NEXT: br label [[COND_END9:%.*]]
396 // CHECK-64: cond.false8:
397 // CHECK-64-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
398 // CHECK-64-NEXT: br label [[COND_END9]]
399 // CHECK-64: cond.end9:
400 // CHECK-64-NEXT: [[COND10:%.*]] = phi i32 [ 9, [[COND_TRUE7]] ], [ [[TMP28]], [[COND_FALSE8]] ]
401 // CHECK-64-NEXT: store i32 [[COND10]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
402 // CHECK-64-NEXT: [[TMP29:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
403 // CHECK-64-NEXT: store i32 [[TMP29]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
404 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP250:![0-9]+]]
405 // CHECK-64: omp.inner.for.end:
406 // CHECK-64-NEXT: br label [[OMP_IF_END:%.*]]
407 // CHECK-64: omp_if.else:
408 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND11:%.*]]
409 // CHECK-64: omp.inner.for.cond11:
410 // CHECK-64-NEXT: [[TMP30:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
411 // CHECK-64-NEXT: [[CMP12:%.*]] = icmp slt i32 [[TMP30]], 10
412 // CHECK-64-NEXT: br i1 [[CMP12]], label [[OMP_INNER_FOR_BODY13:%.*]], label [[OMP_INNER_FOR_END28:%.*]]
413 // CHECK-64: omp.inner.for.body13:
414 // CHECK-64-NEXT: [[TMP31:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
415 // CHECK-64-NEXT: [[TMP32:%.*]] = zext i32 [[TMP31]] to i64
416 // CHECK-64-NEXT: [[TMP33:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
417 // CHECK-64-NEXT: [[TMP34:%.*]] = zext i32 [[TMP33]] to i64
418 // CHECK-64-NEXT: [[TMP35:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
419 // CHECK-64-NEXT: [[TOBOOL14:%.*]] = trunc i8 [[TMP35]] to i1
420 // CHECK-64-NEXT: [[FROMBOOL16:%.*]] = zext i1 [[TOBOOL14]] to i8
421 // CHECK-64-NEXT: store i8 [[FROMBOOL16]], ptr [[DOTCAPTURE_EXPR__CASTED15]], align 1
422 // CHECK-64-NEXT: [[TMP36:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED15]], align 8
423 // CHECK-64-NEXT: [[TMP37:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i64 0, i64 0
424 // CHECK-64-NEXT: [[TMP38:%.*]] = inttoptr i64 [[TMP32]] to ptr
425 // CHECK-64-NEXT: store ptr [[TMP38]], ptr [[TMP37]], align 8
426 // CHECK-64-NEXT: [[TMP39:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i64 0, i64 1
427 // CHECK-64-NEXT: [[TMP40:%.*]] = inttoptr i64 [[TMP34]] to ptr
428 // CHECK-64-NEXT: store ptr [[TMP40]], ptr [[TMP39]], align 8
429 // CHECK-64-NEXT: [[TMP41:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i64 0, i64 2
430 // CHECK-64-NEXT: [[TMP42:%.*]] = inttoptr i64 [[TMP36]] to ptr
431 // CHECK-64-NEXT: store ptr [[TMP42]], ptr [[TMP41]], align 8
432 // CHECK-64-NEXT: [[TMP43:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
433 // CHECK-64-NEXT: [[TOBOOL18:%.*]] = trunc i8 [[TMP43]] to i1
434 // CHECK-64-NEXT: [[TMP44:%.*]] = zext i1 [[TOBOOL18]] to i32
435 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP44]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1, ptr null, ptr [[CAPTURED_VARS_ADDRS17]], i64 3)
436 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC19:%.*]]
437 // CHECK-64: omp.inner.for.inc19:
438 // CHECK-64-NEXT: [[TMP45:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
439 // CHECK-64-NEXT: [[TMP46:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
440 // CHECK-64-NEXT: [[ADD20:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]
441 // CHECK-64-NEXT: store i32 [[ADD20]], ptr [[DOTOMP_IV]], align 4
442 // CHECK-64-NEXT: [[TMP47:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
443 // CHECK-64-NEXT: [[TMP48:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
444 // CHECK-64-NEXT: [[ADD21:%.*]] = add nsw i32 [[TMP47]], [[TMP48]]
445 // CHECK-64-NEXT: store i32 [[ADD21]], ptr [[DOTOMP_COMB_LB]], align 4
446 // CHECK-64-NEXT: [[TMP49:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
447 // CHECK-64-NEXT: [[TMP50:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
448 // CHECK-64-NEXT: [[ADD22:%.*]] = add nsw i32 [[TMP49]], [[TMP50]]
449 // CHECK-64-NEXT: store i32 [[ADD22]], ptr [[DOTOMP_COMB_UB]], align 4
450 // CHECK-64-NEXT: [[TMP51:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
451 // CHECK-64-NEXT: [[CMP23:%.*]] = icmp sgt i32 [[TMP51]], 9
452 // CHECK-64-NEXT: br i1 [[CMP23]], label [[COND_TRUE24:%.*]], label [[COND_FALSE25:%.*]]
453 // CHECK-64: cond.true24:
454 // CHECK-64-NEXT: br label [[COND_END26:%.*]]
455 // CHECK-64: cond.false25:
456 // CHECK-64-NEXT: [[TMP52:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
457 // CHECK-64-NEXT: br label [[COND_END26]]
458 // CHECK-64: cond.end26:
459 // CHECK-64-NEXT: [[COND27:%.*]] = phi i32 [ 9, [[COND_TRUE24]] ], [ [[TMP52]], [[COND_FALSE25]] ]
460 // CHECK-64-NEXT: store i32 [[COND27]], ptr [[DOTOMP_COMB_UB]], align 4
461 // CHECK-64-NEXT: [[TMP53:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
462 // CHECK-64-NEXT: store i32 [[TMP53]], ptr [[DOTOMP_IV]], align 4
463 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND11]], !llvm.loop [[LOOP253:![0-9]+]]
464 // CHECK-64: omp.inner.for.end28:
465 // CHECK-64-NEXT: br label [[OMP_IF_END]]
466 // CHECK-64: omp_if.end:
467 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
468 // CHECK-64: omp.loop.exit:
469 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
470 // CHECK-64-NEXT: [[TMP54:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
471 // CHECK-64-NEXT: [[TMP55:%.*]] = icmp ne i32 [[TMP54]], 0
472 // CHECK-64-NEXT: br i1 [[TMP55]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
473 // CHECK-64: .omp.final.then:
474 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
475 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
476 // CHECK-64: .omp.final.done:
477 // CHECK-64-NEXT: ret void
480 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined
481 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
482 // CHECK-64-NEXT: entry:
483 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
484 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
485 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
486 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
487 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
488 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
489 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
490 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
491 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
492 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
493 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
494 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
495 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
496 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
497 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
498 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
499 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
500 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
501 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
502 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
503 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
504 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
505 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
506 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
507 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
508 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
509 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
510 // CHECK-64-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
511 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
512 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
513 // CHECK-64: omp_if.then:
514 // CHECK-64-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
515 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
516 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3:[0-9]+]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
517 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
518 // CHECK-64-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
519 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
520 // CHECK-64: omp.inner.for.cond:
521 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255:![0-9]+]]
522 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP6]] to i64
523 // CHECK-64-NEXT: [[TMP7:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8, !llvm.access.group [[ACC_GRP255]]
524 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP7]]
525 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
526 // CHECK-64: omp.inner.for.body:
527 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
528 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
529 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
530 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP255]]
531 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
532 // CHECK-64: omp.body.continue:
533 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
534 // CHECK-64: omp.inner.for.inc:
535 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
536 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP255]]
537 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
538 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
539 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP256:![0-9]+]]
540 // CHECK-64: omp.inner.for.end:
541 // CHECK-64-NEXT: br label [[OMP_IF_END:%.*]]
542 // CHECK-64: omp_if.else:
543 // CHECK-64-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
544 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
545 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
546 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
547 // CHECK-64-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
548 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND4:%.*]]
549 // CHECK-64: omp.inner.for.cond4:
550 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
551 // CHECK-64-NEXT: [[CONV5:%.*]] = sext i32 [[TMP14]] to i64
552 // CHECK-64-NEXT: [[TMP15:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
553 // CHECK-64-NEXT: [[CMP6:%.*]] = icmp ule i64 [[CONV5]], [[TMP15]]
554 // CHECK-64-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY7:%.*]], label [[OMP_INNER_FOR_END13:%.*]]
555 // CHECK-64: omp.inner.for.body7:
556 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
557 // CHECK-64-NEXT: [[MUL8:%.*]] = mul nsw i32 [[TMP16]], 1
558 // CHECK-64-NEXT: [[ADD9:%.*]] = add nsw i32 0, [[MUL8]]
559 // CHECK-64-NEXT: store i32 [[ADD9]], ptr [[I]], align 4
560 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE10:%.*]]
561 // CHECK-64: omp.body.continue10:
562 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC11:%.*]]
563 // CHECK-64: omp.inner.for.inc11:
564 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
565 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
566 // CHECK-64-NEXT: [[ADD12:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
567 // CHECK-64-NEXT: store i32 [[ADD12]], ptr [[DOTOMP_IV]], align 4
568 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND4]], !llvm.loop [[LOOP258:![0-9]+]]
569 // CHECK-64: omp.inner.for.end13:
570 // CHECK-64-NEXT: br label [[OMP_IF_END]]
571 // CHECK-64: omp_if.end:
572 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
573 // CHECK-64: omp.loop.exit:
574 // CHECK-64-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
575 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
576 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
577 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
578 // CHECK-64-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
579 // CHECK-64-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
580 // CHECK-64: .omp.final.then:
581 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
582 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
583 // CHECK-64: .omp.final.done:
584 // CHECK-64-NEXT: ret void
587 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1
588 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
589 // CHECK-64-NEXT: entry:
590 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
591 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
592 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
593 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
594 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
595 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
596 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
597 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
598 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
599 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
600 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
601 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
602 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
603 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
604 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
605 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
606 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
607 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
608 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
609 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
610 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
611 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
612 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
613 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
614 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
615 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
616 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
617 // CHECK-64-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
618 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
619 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
620 // CHECK-64: omp_if.then:
621 // CHECK-64-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
622 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
623 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
624 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
625 // CHECK-64-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
626 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
627 // CHECK-64: omp.inner.for.cond:
628 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259:![0-9]+]]
629 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP6]] to i64
630 // CHECK-64-NEXT: [[TMP7:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8, !llvm.access.group [[ACC_GRP259]]
631 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP7]]
632 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
633 // CHECK-64: omp.inner.for.body:
634 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
635 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
636 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
637 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP259]]
638 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
639 // CHECK-64: omp.body.continue:
640 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
641 // CHECK-64: omp.inner.for.inc:
642 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
643 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP259]]
644 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
645 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
646 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP260:![0-9]+]]
647 // CHECK-64: omp.inner.for.end:
648 // CHECK-64-NEXT: br label [[OMP_IF_END:%.*]]
649 // CHECK-64: omp_if.else:
650 // CHECK-64-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
651 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
652 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
653 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
654 // CHECK-64-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
655 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND4:%.*]]
656 // CHECK-64: omp.inner.for.cond4:
657 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
658 // CHECK-64-NEXT: [[CONV5:%.*]] = sext i32 [[TMP14]] to i64
659 // CHECK-64-NEXT: [[TMP15:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
660 // CHECK-64-NEXT: [[CMP6:%.*]] = icmp ule i64 [[CONV5]], [[TMP15]]
661 // CHECK-64-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY7:%.*]], label [[OMP_INNER_FOR_END13:%.*]]
662 // CHECK-64: omp.inner.for.body7:
663 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
664 // CHECK-64-NEXT: [[MUL8:%.*]] = mul nsw i32 [[TMP16]], 1
665 // CHECK-64-NEXT: [[ADD9:%.*]] = add nsw i32 0, [[MUL8]]
666 // CHECK-64-NEXT: store i32 [[ADD9]], ptr [[I]], align 4
667 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE10:%.*]]
668 // CHECK-64: omp.body.continue10:
669 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC11:%.*]]
670 // CHECK-64: omp.inner.for.inc11:
671 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
672 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
673 // CHECK-64-NEXT: [[ADD12:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
674 // CHECK-64-NEXT: store i32 [[ADD12]], ptr [[DOTOMP_IV]], align 4
675 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND4]], !llvm.loop [[LOOP262:![0-9]+]]
676 // CHECK-64: omp.inner.for.end13:
677 // CHECK-64-NEXT: br label [[OMP_IF_END]]
678 // CHECK-64: omp_if.end:
679 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
680 // CHECK-64: omp.loop.exit:
681 // CHECK-64-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
682 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
683 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
684 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
685 // CHECK-64-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
686 // CHECK-64-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
687 // CHECK-64: .omp.final.then:
688 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
689 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
690 // CHECK-64: .omp.final.done:
691 // CHECK-64-NEXT: ret void
694 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18
695 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
696 // CHECK-64-NEXT: entry:
697 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
698 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
699 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
700 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
701 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_kernel_environment, ptr [[DYN_PTR]])
702 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
703 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
704 // CHECK-64: user_code.entry:
705 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
706 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
707 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
708 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
709 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
710 // CHECK-64-NEXT: ret void
711 // CHECK-64: worker.exit:
712 // CHECK-64-NEXT: ret void
715 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined
716 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
717 // CHECK-64-NEXT: entry:
718 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
719 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
720 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
721 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
722 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
723 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
724 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
725 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
726 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
727 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
728 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
729 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
730 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
731 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
732 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
733 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
734 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
735 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
736 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
737 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
738 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
739 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
740 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
741 // CHECK-64: cond.true:
742 // CHECK-64-NEXT: br label [[COND_END:%.*]]
743 // CHECK-64: cond.false:
744 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
745 // CHECK-64-NEXT: br label [[COND_END]]
746 // CHECK-64: cond.end:
747 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
748 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
749 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
750 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
751 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
752 // CHECK-64: omp.inner.for.cond:
753 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263:![0-9]+]]
754 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
755 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
756 // CHECK-64: omp.inner.for.body:
757 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
758 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
759 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
760 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
761 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
762 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
763 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP263]]
764 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
765 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
766 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP263]]
767 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP263]]
768 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
769 // CHECK-64: omp.inner.for.inc:
770 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
771 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
772 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
773 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
774 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
775 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
776 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
777 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
778 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
779 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
780 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
781 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
782 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
783 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
784 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
785 // CHECK-64: cond.true5:
786 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
787 // CHECK-64: cond.false6:
788 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
789 // CHECK-64-NEXT: br label [[COND_END7]]
790 // CHECK-64: cond.end7:
791 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
792 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
793 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
794 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
795 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP264:![0-9]+]]
796 // CHECK-64: omp.inner.for.end:
797 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
798 // CHECK-64: omp.loop.exit:
799 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
800 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
801 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
802 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
803 // CHECK-64: .omp.final.then:
804 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
805 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
806 // CHECK-64: .omp.final.done:
807 // CHECK-64-NEXT: ret void
810 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined
811 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
812 // CHECK-64-NEXT: entry:
813 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
814 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
815 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
816 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
817 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
818 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
819 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
820 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
821 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
822 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
823 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
824 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
825 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
826 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
827 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
828 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
829 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
830 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
831 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
832 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
833 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
834 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
835 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
836 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
837 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
838 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
839 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
840 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
841 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
842 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
843 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
844 // CHECK-64: cond.true:
845 // CHECK-64-NEXT: br label [[COND_END:%.*]]
846 // CHECK-64: cond.false:
847 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
848 // CHECK-64-NEXT: br label [[COND_END]]
849 // CHECK-64: cond.end:
850 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
851 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
852 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
853 // CHECK-64-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
854 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
855 // CHECK-64: omp.inner.for.cond:
856 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266:![0-9]+]]
857 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP266]]
858 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
859 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
860 // CHECK-64: omp.inner.for.body:
861 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
862 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
863 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
864 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP266]]
865 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
866 // CHECK-64: omp.body.continue:
867 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
868 // CHECK-64: omp.inner.for.inc:
869 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
870 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
871 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
872 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP267:![0-9]+]]
873 // CHECK-64: omp.inner.for.end:
874 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
875 // CHECK-64: omp.loop.exit:
876 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
877 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
878 // CHECK-64-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
879 // CHECK-64-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
880 // CHECK-64: .omp.final.then:
881 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
882 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
883 // CHECK-64: .omp.final.done:
884 // CHECK-64-NEXT: ret void
887 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21
888 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
889 // CHECK-64-NEXT: entry:
890 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
891 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
892 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
893 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
894 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_kernel_environment, ptr [[DYN_PTR]])
895 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
896 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
897 // CHECK-64: user_code.entry:
898 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
899 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
900 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
901 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
902 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
903 // CHECK-64-NEXT: ret void
904 // CHECK-64: worker.exit:
905 // CHECK-64-NEXT: ret void
908 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined
909 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
910 // CHECK-64-NEXT: entry:
911 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
912 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
913 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
914 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
915 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
916 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
917 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
918 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
919 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
920 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
921 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
922 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
923 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
924 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
925 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
926 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
927 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
928 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
929 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
930 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
931 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
932 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
933 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
934 // CHECK-64: cond.true:
935 // CHECK-64-NEXT: br label [[COND_END:%.*]]
936 // CHECK-64: cond.false:
937 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
938 // CHECK-64-NEXT: br label [[COND_END]]
939 // CHECK-64: cond.end:
940 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
941 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
942 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
943 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
944 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
945 // CHECK-64: omp.inner.for.cond:
946 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269:![0-9]+]]
947 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
948 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
949 // CHECK-64: omp.inner.for.body:
950 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
951 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
952 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
953 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
954 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
955 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
956 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP269]]
957 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
958 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
959 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP269]]
960 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP269]]
961 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
962 // CHECK-64: omp.inner.for.inc:
963 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
964 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
965 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
966 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
967 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
968 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
969 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
970 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
971 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
972 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
973 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
974 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
975 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
976 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
977 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
978 // CHECK-64: cond.true5:
979 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
980 // CHECK-64: cond.false6:
981 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
982 // CHECK-64-NEXT: br label [[COND_END7]]
983 // CHECK-64: cond.end7:
984 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
985 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
986 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
987 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
988 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP270:![0-9]+]]
989 // CHECK-64: omp.inner.for.end:
990 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
991 // CHECK-64: omp.loop.exit:
992 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
993 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
994 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
995 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
996 // CHECK-64: .omp.final.then:
997 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
998 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
999 // CHECK-64: .omp.final.done:
1000 // CHECK-64-NEXT: ret void
1003 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined
1004 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
1005 // CHECK-64-NEXT: entry:
1006 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1007 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1008 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1009 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1010 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1011 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1012 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1013 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1014 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1015 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1016 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1017 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1018 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1019 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1020 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1021 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1022 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1023 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1024 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1025 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1026 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1027 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1028 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1029 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1030 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1031 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1032 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1033 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1034 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1035 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1036 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1037 // CHECK-64: omp.inner.for.cond:
1038 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272:![0-9]+]]
1039 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
1040 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8, !llvm.access.group [[ACC_GRP272]]
1041 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
1042 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1043 // CHECK-64: omp.inner.for.body:
1044 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
1045 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
1046 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1047 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP272]]
1048 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1049 // CHECK-64: omp.body.continue:
1050 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1051 // CHECK-64: omp.inner.for.inc:
1052 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
1053 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP272]]
1054 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
1055 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
1056 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP273:![0-9]+]]
1057 // CHECK-64: omp.inner.for.end:
1058 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1059 // CHECK-64: omp.loop.exit:
1060 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
1061 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1062 // CHECK-64-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
1063 // CHECK-64-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1064 // CHECK-64: .omp.final.then:
1065 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1066 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1067 // CHECK-64: .omp.final.done:
1068 // CHECK-64-NEXT: ret void
1071 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24
1072 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
1073 // CHECK-64-NEXT: entry:
1074 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
1075 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
1076 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
1077 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
1078 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_kernel_environment, ptr [[DYN_PTR]])
1079 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
1080 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
1081 // CHECK-64: user_code.entry:
1082 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1083 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
1084 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
1085 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
1086 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
1087 // CHECK-64-NEXT: ret void
1088 // CHECK-64: worker.exit:
1089 // CHECK-64-NEXT: ret void
1092 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined
1093 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
1094 // CHECK-64-NEXT: entry:
1095 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1096 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1097 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1098 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1099 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1100 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1101 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1102 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1103 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1104 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
1105 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1106 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1107 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1108 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
1109 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1110 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1111 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
1112 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1113 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1114 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
1115 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1116 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
1117 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1118 // CHECK-64: cond.true:
1119 // CHECK-64-NEXT: br label [[COND_END:%.*]]
1120 // CHECK-64: cond.false:
1121 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1122 // CHECK-64-NEXT: br label [[COND_END]]
1123 // CHECK-64: cond.end:
1124 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1125 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1126 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1127 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1128 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1129 // CHECK-64: omp.inner.for.cond:
1130 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275:![0-9]+]]
1131 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
1132 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1133 // CHECK-64: omp.inner.for.body:
1134 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
1135 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
1136 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1137 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
1138 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
1139 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
1140 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP275]]
1141 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
1142 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
1143 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP275]]
1144 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP275]]
1145 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1146 // CHECK-64: omp.inner.for.inc:
1147 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
1148 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
1149 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
1150 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
1151 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
1152 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
1153 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
1154 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
1155 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1156 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
1157 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
1158 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1159 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1160 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
1161 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
1162 // CHECK-64: cond.true5:
1163 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
1164 // CHECK-64: cond.false6:
1165 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1166 // CHECK-64-NEXT: br label [[COND_END7]]
1167 // CHECK-64: cond.end7:
1168 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
1169 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
1170 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
1171 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
1172 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP276:![0-9]+]]
1173 // CHECK-64: omp.inner.for.end:
1174 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1175 // CHECK-64: omp.loop.exit:
1176 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
1177 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1178 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
1179 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1180 // CHECK-64: .omp.final.then:
1181 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1182 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1183 // CHECK-64: .omp.final.done:
1184 // CHECK-64-NEXT: ret void
1187 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined
1188 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
1189 // CHECK-64-NEXT: entry:
1190 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1191 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1192 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1193 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1194 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1195 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1196 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1197 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1198 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1199 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1200 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1201 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1202 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1203 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1204 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1205 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1206 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1207 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1208 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1209 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1210 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1211 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1212 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1213 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1214 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1215 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1216 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1217 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1218 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1219 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
1220 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
1221 // CHECK-64: omp.dispatch.cond:
1222 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
1223 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
1224 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
1225 // CHECK-64: omp.dispatch.body:
1226 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1227 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1228 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1229 // CHECK-64: omp.inner.for.cond:
1230 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278:![0-9]+]]
1231 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP278]]
1232 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1233 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1234 // CHECK-64: omp.inner.for.body:
1235 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
1236 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1237 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1238 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP278]]
1239 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1240 // CHECK-64: omp.body.continue:
1241 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1242 // CHECK-64: omp.inner.for.inc:
1243 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
1244 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
1245 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
1246 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP279:![0-9]+]]
1247 // CHECK-64: omp.inner.for.end:
1248 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
1249 // CHECK-64: omp.dispatch.inc:
1250 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
1251 // CHECK-64: omp.dispatch.end:
1252 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1253 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
1254 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1255 // CHECK-64: .omp.final.then:
1256 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1257 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1258 // CHECK-64: .omp.final.done:
1259 // CHECK-64-NEXT: ret void
1262 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27
1263 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
1264 // CHECK-64-NEXT: entry:
1265 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
1266 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
1267 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
1268 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
1269 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_kernel_environment, ptr [[DYN_PTR]])
1270 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
1271 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
1272 // CHECK-64: user_code.entry:
1273 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1274 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
1275 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
1276 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
1277 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
1278 // CHECK-64-NEXT: ret void
1279 // CHECK-64: worker.exit:
1280 // CHECK-64-NEXT: ret void
1283 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined
1284 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
1285 // CHECK-64-NEXT: entry:
1286 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1287 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1288 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1289 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1290 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1291 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1292 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1293 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1294 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1295 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
1296 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1297 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1298 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1299 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
1300 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1301 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1302 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
1303 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1304 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1305 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
1306 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1307 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
1308 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1309 // CHECK-64: cond.true:
1310 // CHECK-64-NEXT: br label [[COND_END:%.*]]
1311 // CHECK-64: cond.false:
1312 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1313 // CHECK-64-NEXT: br label [[COND_END]]
1314 // CHECK-64: cond.end:
1315 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1316 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1317 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1318 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1319 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1320 // CHECK-64: omp.inner.for.cond:
1321 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281:![0-9]+]]
1322 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
1323 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1324 // CHECK-64: omp.inner.for.body:
1325 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
1326 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
1327 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1328 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
1329 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
1330 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
1331 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP281]]
1332 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
1333 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
1334 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP281]]
1335 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP281]]
1336 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1337 // CHECK-64: omp.inner.for.inc:
1338 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
1339 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
1340 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
1341 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
1342 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
1343 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
1344 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
1345 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
1346 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1347 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
1348 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
1349 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1350 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1351 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
1352 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
1353 // CHECK-64: cond.true5:
1354 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
1355 // CHECK-64: cond.false6:
1356 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1357 // CHECK-64-NEXT: br label [[COND_END7]]
1358 // CHECK-64: cond.end7:
1359 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
1360 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
1361 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
1362 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
1363 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP282:![0-9]+]]
1364 // CHECK-64: omp.inner.for.end:
1365 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1366 // CHECK-64: omp.loop.exit:
1367 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
1368 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1369 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
1370 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1371 // CHECK-64: .omp.final.then:
1372 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1373 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1374 // CHECK-64: .omp.final.done:
1375 // CHECK-64-NEXT: ret void
1378 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined
1379 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
1380 // CHECK-64-NEXT: entry:
1381 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1382 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1383 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1384 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1385 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1386 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1387 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1388 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1389 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1390 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1391 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1392 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1393 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1394 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1395 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1396 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1397 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1398 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1399 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1400 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1401 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1402 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1403 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1404 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1405 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1406 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1407 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1408 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1409 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1410 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
1411 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
1412 // CHECK-64: omp.dispatch.cond:
1413 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
1414 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
1415 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
1416 // CHECK-64: omp.dispatch.body:
1417 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1418 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1419 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1420 // CHECK-64: omp.inner.for.cond:
1421 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284:![0-9]+]]
1422 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP284]]
1423 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1424 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1425 // CHECK-64: omp.inner.for.body:
1426 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
1427 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1428 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1429 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP284]]
1430 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1431 // CHECK-64: omp.body.continue:
1432 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1433 // CHECK-64: omp.inner.for.inc:
1434 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
1435 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
1436 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
1437 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP285:![0-9]+]]
1438 // CHECK-64: omp.inner.for.end:
1439 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
1440 // CHECK-64: omp.dispatch.inc:
1441 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
1442 // CHECK-64: omp.dispatch.end:
1443 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1444 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
1445 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1446 // CHECK-64: .omp.final.then:
1447 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1448 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1449 // CHECK-64: .omp.final.done:
1450 // CHECK-64-NEXT: ret void
1453 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30
1454 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
1455 // CHECK-64-NEXT: entry:
1456 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
1457 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
1458 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
1459 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
1460 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_kernel_environment, ptr [[DYN_PTR]])
1461 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
1462 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
1463 // CHECK-64: user_code.entry:
1464 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1465 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
1466 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
1467 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
1468 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
1469 // CHECK-64-NEXT: ret void
1470 // CHECK-64: worker.exit:
1471 // CHECK-64-NEXT: ret void
1474 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined
1475 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
1476 // CHECK-64-NEXT: entry:
1477 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1478 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1479 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1480 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1481 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1482 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1483 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1484 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1485 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1486 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
1487 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1488 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1489 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1490 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
1491 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1492 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1493 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
1494 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1495 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1496 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
1497 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1498 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
1499 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1500 // CHECK-64: cond.true:
1501 // CHECK-64-NEXT: br label [[COND_END:%.*]]
1502 // CHECK-64: cond.false:
1503 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1504 // CHECK-64-NEXT: br label [[COND_END]]
1505 // CHECK-64: cond.end:
1506 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1507 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1508 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1509 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1510 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1511 // CHECK-64: omp.inner.for.cond:
1512 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287:![0-9]+]]
1513 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
1514 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1515 // CHECK-64: omp.inner.for.body:
1516 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
1517 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
1518 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1519 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
1520 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
1521 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
1522 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP287]]
1523 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
1524 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
1525 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP287]]
1526 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP287]]
1527 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1528 // CHECK-64: omp.inner.for.inc:
1529 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
1530 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
1531 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
1532 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
1533 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
1534 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
1535 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
1536 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
1537 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1538 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
1539 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
1540 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1541 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1542 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
1543 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
1544 // CHECK-64: cond.true5:
1545 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
1546 // CHECK-64: cond.false6:
1547 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1548 // CHECK-64-NEXT: br label [[COND_END7]]
1549 // CHECK-64: cond.end7:
1550 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
1551 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
1552 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
1553 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
1554 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP288:![0-9]+]]
1555 // CHECK-64: omp.inner.for.end:
1556 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1557 // CHECK-64: omp.loop.exit:
1558 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
1559 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1560 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
1561 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1562 // CHECK-64: .omp.final.then:
1563 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1564 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1565 // CHECK-64: .omp.final.done:
1566 // CHECK-64-NEXT: ret void
1569 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined
1570 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
1571 // CHECK-64-NEXT: entry:
1572 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1573 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1574 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1575 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1576 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1577 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1578 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1579 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1580 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1581 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1582 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1583 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1584 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1585 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1586 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1587 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1588 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1589 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1590 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1591 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1592 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1593 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1594 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1595 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1596 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1597 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1598 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1599 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1600 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1601 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
1602 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
1603 // CHECK-64: omp.dispatch.cond:
1604 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
1605 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
1606 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
1607 // CHECK-64: omp.dispatch.body:
1608 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1609 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1610 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1611 // CHECK-64: omp.inner.for.cond:
1612 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290:![0-9]+]]
1613 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP290]]
1614 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1615 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1616 // CHECK-64: omp.inner.for.body:
1617 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
1618 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1619 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1620 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP290]]
1621 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1622 // CHECK-64: omp.body.continue:
1623 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1624 // CHECK-64: omp.inner.for.inc:
1625 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
1626 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
1627 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
1628 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP291:![0-9]+]]
1629 // CHECK-64: omp.inner.for.end:
1630 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
1631 // CHECK-64: omp.dispatch.inc:
1632 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
1633 // CHECK-64: omp.dispatch.end:
1634 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1635 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
1636 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1637 // CHECK-64: .omp.final.then:
1638 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1639 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1640 // CHECK-64: .omp.final.done:
1641 // CHECK-64-NEXT: ret void
1644 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33
1645 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
1646 // CHECK-64-NEXT: entry:
1647 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
1648 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
1649 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
1650 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
1651 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_kernel_environment, ptr [[DYN_PTR]])
1652 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
1653 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
1654 // CHECK-64: user_code.entry:
1655 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1656 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
1657 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
1658 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
1659 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
1660 // CHECK-64-NEXT: ret void
1661 // CHECK-64: worker.exit:
1662 // CHECK-64-NEXT: ret void
1665 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined
1666 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
1667 // CHECK-64-NEXT: entry:
1668 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1669 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1670 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1671 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1672 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1673 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1674 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1675 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1676 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1677 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
1678 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1679 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1680 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1681 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
1682 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1683 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1684 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
1685 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1686 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1687 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
1688 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1689 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
1690 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1691 // CHECK-64: cond.true:
1692 // CHECK-64-NEXT: br label [[COND_END:%.*]]
1693 // CHECK-64: cond.false:
1694 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1695 // CHECK-64-NEXT: br label [[COND_END]]
1696 // CHECK-64: cond.end:
1697 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1698 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1699 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1700 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1701 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1702 // CHECK-64: omp.inner.for.cond:
1703 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293:![0-9]+]]
1704 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
1705 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1706 // CHECK-64: omp.inner.for.body:
1707 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
1708 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
1709 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1710 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
1711 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
1712 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
1713 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP293]]
1714 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
1715 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
1716 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP293]]
1717 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP293]]
1718 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1719 // CHECK-64: omp.inner.for.inc:
1720 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
1721 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
1722 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
1723 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
1724 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
1725 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
1726 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
1727 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
1728 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1729 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
1730 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
1731 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1732 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1733 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
1734 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
1735 // CHECK-64: cond.true5:
1736 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
1737 // CHECK-64: cond.false6:
1738 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1739 // CHECK-64-NEXT: br label [[COND_END7]]
1740 // CHECK-64: cond.end7:
1741 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
1742 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
1743 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
1744 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
1745 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP294:![0-9]+]]
1746 // CHECK-64: omp.inner.for.end:
1747 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1748 // CHECK-64: omp.loop.exit:
1749 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
1750 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1751 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
1752 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1753 // CHECK-64: .omp.final.then:
1754 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1755 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1756 // CHECK-64: .omp.final.done:
1757 // CHECK-64-NEXT: ret void
1760 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined
1761 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
1762 // CHECK-64-NEXT: entry:
1763 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1764 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1765 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1766 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1767 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1768 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1769 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1770 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1771 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1772 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1773 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1774 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1775 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1776 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1777 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1778 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1779 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1780 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1781 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1782 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1783 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1784 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1785 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1786 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1787 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1788 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1789 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1790 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1791 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1792 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
1793 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
1794 // CHECK-64: omp.dispatch.cond:
1795 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
1796 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
1797 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
1798 // CHECK-64: omp.dispatch.body:
1799 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1800 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1801 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1802 // CHECK-64: omp.inner.for.cond:
1803 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296:![0-9]+]]
1804 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP296]]
1805 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1806 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1807 // CHECK-64: omp.inner.for.body:
1808 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
1809 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1810 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1811 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP296]]
1812 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1813 // CHECK-64: omp.body.continue:
1814 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1815 // CHECK-64: omp.inner.for.inc:
1816 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
1817 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
1818 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
1819 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP297:![0-9]+]]
1820 // CHECK-64: omp.inner.for.end:
1821 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
1822 // CHECK-64: omp.dispatch.inc:
1823 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
1824 // CHECK-64: omp.dispatch.end:
1825 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1826 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
1827 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1828 // CHECK-64: .omp.final.then:
1829 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
1830 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
1831 // CHECK-64: .omp.final.done:
1832 // CHECK-64-NEXT: ret void
1835 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37
1836 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i64 noundef [[A:%.*]]) #[[ATTR0]] {
1837 // CHECK-64-NEXT: entry:
1838 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
1839 // CHECK-64-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1840 // CHECK-64-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1841 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
1842 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
1843 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
1844 // CHECK-64-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1845 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_kernel_environment, ptr [[DYN_PTR]])
1846 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
1847 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
1848 // CHECK-64: user_code.entry:
1849 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1850 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[A_ADDR]], align 4
1851 // CHECK-64-NEXT: store i32 [[TMP2]], ptr [[A_CASTED]], align 4
1852 // CHECK-64-NEXT: [[TMP3:%.*]] = load i64, ptr [[A_CASTED]], align 8
1853 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
1854 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
1855 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i64 [[TMP3]]) #[[ATTR2]]
1856 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
1857 // CHECK-64-NEXT: ret void
1858 // CHECK-64: worker.exit:
1859 // CHECK-64-NEXT: ret void
1862 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined
1863 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[A:%.*]]) #[[ATTR1]] {
1864 // CHECK-64-NEXT: entry:
1865 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1866 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1867 // CHECK-64-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1868 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1869 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1870 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1871 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1872 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1873 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1874 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1875 // CHECK-64-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1876 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 8
1877 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1878 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1879 // CHECK-64-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1880 // CHECK-64-NEXT: [[A1:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i64 4)
1881 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1882 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
1883 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1884 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1885 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
1886 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1887 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1888 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
1889 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1890 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
1891 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1892 // CHECK-64: cond.true:
1893 // CHECK-64-NEXT: br label [[COND_END:%.*]]
1894 // CHECK-64: cond.false:
1895 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1896 // CHECK-64-NEXT: br label [[COND_END]]
1897 // CHECK-64: cond.end:
1898 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1899 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1900 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1901 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1902 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1903 // CHECK-64: omp.inner.for.cond:
1904 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1905 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp slt i32 [[TMP5]], 10
1906 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1907 // CHECK-64: omp.inner.for.body:
1908 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1909 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
1910 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1911 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
1912 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[A1]], align 4
1913 // CHECK-64-NEXT: store i32 [[TMP10]], ptr [[A_CASTED]], align 4
1914 // CHECK-64-NEXT: [[TMP11:%.*]] = load i64, ptr [[A_CASTED]], align 8
1915 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
1916 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP7]] to ptr
1917 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
1918 // CHECK-64-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
1919 // CHECK-64-NEXT: [[TMP15:%.*]] = inttoptr i64 [[TMP9]] to ptr
1920 // CHECK-64-NEXT: store ptr [[TMP15]], ptr [[TMP14]], align 8
1921 // CHECK-64-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 2
1922 // CHECK-64-NEXT: [[TMP17:%.*]] = inttoptr i64 [[TMP11]] to ptr
1923 // CHECK-64-NEXT: store ptr [[TMP17]], ptr [[TMP16]], align 8
1924 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 3)
1925 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1926 // CHECK-64: omp.inner.for.inc:
1927 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1928 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1929 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
1930 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1931 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1932 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1933 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP20]], [[TMP21]]
1934 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_LB]], align 4
1935 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1936 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1937 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP22]], [[TMP23]]
1938 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_UB]], align 4
1939 // CHECK-64-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1940 // CHECK-64-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP24]], 9
1941 // CHECK-64-NEXT: br i1 [[CMP5]], label [[COND_TRUE6:%.*]], label [[COND_FALSE7:%.*]]
1942 // CHECK-64: cond.true6:
1943 // CHECK-64-NEXT: br label [[COND_END8:%.*]]
1944 // CHECK-64: cond.false7:
1945 // CHECK-64-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1946 // CHECK-64-NEXT: br label [[COND_END8]]
1947 // CHECK-64: cond.end8:
1948 // CHECK-64-NEXT: [[COND9:%.*]] = phi i32 [ 9, [[COND_TRUE6]] ], [ [[TMP25]], [[COND_FALSE7]] ]
1949 // CHECK-64-NEXT: store i32 [[COND9]], ptr [[DOTOMP_COMB_UB]], align 4
1950 // CHECK-64-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1951 // CHECK-64-NEXT: store i32 [[TMP26]], ptr [[DOTOMP_IV]], align 4
1952 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
1953 // CHECK-64: omp.inner.for.end:
1954 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1955 // CHECK-64: omp.loop.exit:
1956 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
1957 // CHECK-64-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1958 // CHECK-64-NEXT: [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0
1959 // CHECK-64-NEXT: br i1 [[TMP28]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
1960 // CHECK-64: .omp.lastprivate.then:
1961 // CHECK-64-NEXT: [[TMP29:%.*]] = load i32, ptr [[A1]], align 4
1962 // CHECK-64-NEXT: store i32 [[TMP29]], ptr [[A_ADDR]], align 4
1963 // CHECK-64-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
1964 // CHECK-64: .omp.lastprivate.done:
1965 // CHECK-64-NEXT: call void @__kmpc_free_shared(ptr [[A1]], i64 4)
1966 // CHECK-64-NEXT: ret void
1969 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined
1970 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], i64 noundef [[A:%.*]]) #[[ATTR1]] {
1971 // CHECK-64-NEXT: entry:
1972 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1973 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1974 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1975 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1976 // CHECK-64-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1977 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1978 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
1979 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1980 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1981 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1982 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1983 // CHECK-64-NEXT: [[A2:%.*]] = alloca i32, align 4
1984 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
1985 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1986 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1987 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1988 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1989 // CHECK-64-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1990 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1991 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1992 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1993 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
1994 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1995 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
1996 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1997 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
1998 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1999 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2000 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2001 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2002 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2003 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2004 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2005 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2006 // CHECK-64: omp.inner.for.cond:
2007 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2008 // CHECK-64-NEXT: [[CONV3:%.*]] = sext i32 [[TMP5]] to i64
2009 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2010 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV3]], [[TMP6]]
2011 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2012 // CHECK-64: omp.inner.for.body:
2013 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2014 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
2015 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2016 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2017 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[I]], align 4
2018 // CHECK-64-NEXT: store i32 [[TMP8]], ptr [[A2]], align 4
2019 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2020 // CHECK-64: omp.body.continue:
2021 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2022 // CHECK-64: omp.inner.for.inc:
2023 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2024 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2025 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
2026 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_IV]], align 4
2027 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2028 // CHECK-64: omp.inner.for.end:
2029 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2030 // CHECK-64: omp.loop.exit:
2031 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
2032 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
2033 // CHECK-64-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
2034 // CHECK-64-NEXT: br i1 [[TMP12]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
2035 // CHECK-64: .omp.lastprivate.then:
2036 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[A2]], align 4
2037 // CHECK-64-NEXT: store i32 [[TMP13]], ptr [[A_ADDR]], align 4
2038 // CHECK-64-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
2039 // CHECK-64: .omp.lastprivate.done:
2040 // CHECK-64-NEXT: ret void
2043 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40
2044 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2045 // CHECK-64-NEXT: entry:
2046 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2047 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2048 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2049 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2050 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_kernel_environment, ptr [[DYN_PTR]])
2051 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2052 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2053 // CHECK-64: user_code.entry:
2054 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2055 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2056 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2057 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2058 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2059 // CHECK-64-NEXT: ret void
2060 // CHECK-64: worker.exit:
2061 // CHECK-64-NEXT: ret void
2064 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined
2065 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2066 // CHECK-64-NEXT: entry:
2067 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2068 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2069 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2070 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2071 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2072 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2073 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2074 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2075 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2076 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2077 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2078 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2079 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2080 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2081 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2082 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2083 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2084 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2085 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2086 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2087 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2088 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2089 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2090 // CHECK-64: cond.true:
2091 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2092 // CHECK-64: cond.false:
2093 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2094 // CHECK-64-NEXT: br label [[COND_END]]
2095 // CHECK-64: cond.end:
2096 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2097 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2098 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2099 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2100 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2101 // CHECK-64: omp.inner.for.cond:
2102 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2103 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2104 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2105 // CHECK-64: omp.inner.for.body:
2106 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2107 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2108 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2109 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2110 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2111 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2112 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2113 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2114 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2115 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2116 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2117 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2118 // CHECK-64: omp.inner.for.inc:
2119 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2120 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2121 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2122 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2123 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2124 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2125 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2126 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2127 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2128 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2129 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2130 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2131 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2132 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2133 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2134 // CHECK-64: cond.true5:
2135 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
2136 // CHECK-64: cond.false6:
2137 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2138 // CHECK-64-NEXT: br label [[COND_END7]]
2139 // CHECK-64: cond.end7:
2140 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2141 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2142 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2143 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2144 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2145 // CHECK-64: omp.inner.for.end:
2146 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2147 // CHECK-64: omp.loop.exit:
2148 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
2149 // CHECK-64-NEXT: ret void
2152 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined
2153 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
2154 // CHECK-64-NEXT: entry:
2155 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2156 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2157 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2158 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2159 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2160 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2161 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2162 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2163 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2164 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2165 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2166 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2167 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2168 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2169 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2170 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2171 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2172 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2173 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
2174 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2175 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
2176 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2177 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2178 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2179 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2180 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2181 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2182 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2183 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2184 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
2185 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2186 // CHECK-64: cond.true:
2187 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2188 // CHECK-64: cond.false:
2189 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2190 // CHECK-64-NEXT: br label [[COND_END]]
2191 // CHECK-64: cond.end:
2192 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
2193 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2194 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2195 // CHECK-64-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
2196 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2197 // CHECK-64: omp.inner.for.cond:
2198 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2199 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2200 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
2201 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2202 // CHECK-64: omp.inner.for.body:
2203 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2204 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
2205 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2206 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2207 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2208 // CHECK-64: omp.body.continue:
2209 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2210 // CHECK-64: omp.inner.for.inc:
2211 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2212 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
2213 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
2214 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2215 // CHECK-64: omp.inner.for.end:
2216 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2217 // CHECK-64: omp.loop.exit:
2218 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
2219 // CHECK-64-NEXT: ret void
2222 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43
2223 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2224 // CHECK-64-NEXT: entry:
2225 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2226 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2227 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2228 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2229 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_kernel_environment, ptr [[DYN_PTR]])
2230 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2231 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2232 // CHECK-64: user_code.entry:
2233 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2234 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2235 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2236 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2237 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2238 // CHECK-64-NEXT: ret void
2239 // CHECK-64: worker.exit:
2240 // CHECK-64-NEXT: ret void
2243 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined
2244 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2245 // CHECK-64-NEXT: entry:
2246 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2247 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2248 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2249 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2250 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2251 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2252 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2253 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2254 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2255 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2256 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2257 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2258 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2259 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2260 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2261 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2262 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2263 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2264 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2265 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2266 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2267 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2268 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2269 // CHECK-64: cond.true:
2270 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2271 // CHECK-64: cond.false:
2272 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2273 // CHECK-64-NEXT: br label [[COND_END]]
2274 // CHECK-64: cond.end:
2275 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2276 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2277 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2278 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2279 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2280 // CHECK-64: omp.inner.for.cond:
2281 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2282 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2283 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2284 // CHECK-64: omp.inner.for.body:
2285 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2286 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2287 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2288 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2289 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2290 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2291 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2292 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2293 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2294 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2295 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2296 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2297 // CHECK-64: omp.inner.for.inc:
2298 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2299 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2300 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2301 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2302 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2303 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2304 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2305 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2306 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2307 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2308 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2309 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2310 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2311 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2312 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2313 // CHECK-64: cond.true5:
2314 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
2315 // CHECK-64: cond.false6:
2316 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2317 // CHECK-64-NEXT: br label [[COND_END7]]
2318 // CHECK-64: cond.end7:
2319 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2320 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2321 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2322 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2323 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2324 // CHECK-64: omp.inner.for.end:
2325 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2326 // CHECK-64: omp.loop.exit:
2327 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
2328 // CHECK-64-NEXT: ret void
2331 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined
2332 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
2333 // CHECK-64-NEXT: entry:
2334 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2335 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2336 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2337 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2338 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2339 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2340 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2341 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2342 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2343 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2344 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2345 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2346 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2347 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2348 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2349 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2350 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2351 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2352 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
2353 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2354 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
2355 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2356 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2357 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2358 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2359 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2360 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2361 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2362 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2363 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2364 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2365 // CHECK-64: omp.inner.for.cond:
2366 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2367 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
2368 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2369 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
2370 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2371 // CHECK-64: omp.inner.for.body:
2372 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2373 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
2374 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2375 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2376 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2377 // CHECK-64: omp.body.continue:
2378 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2379 // CHECK-64: omp.inner.for.inc:
2380 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2381 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2382 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
2383 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
2384 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2385 // CHECK-64: omp.inner.for.end:
2386 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2387 // CHECK-64: omp.loop.exit:
2388 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
2389 // CHECK-64-NEXT: ret void
2392 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46
2393 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2394 // CHECK-64-NEXT: entry:
2395 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2396 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2397 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2398 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2399 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_kernel_environment, ptr [[DYN_PTR]])
2400 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2401 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2402 // CHECK-64: user_code.entry:
2403 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2404 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2405 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2406 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2407 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2408 // CHECK-64-NEXT: ret void
2409 // CHECK-64: worker.exit:
2410 // CHECK-64-NEXT: ret void
2413 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined
2414 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2415 // CHECK-64-NEXT: entry:
2416 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2417 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2418 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2419 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2420 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2421 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2422 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2423 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2424 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2425 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2426 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2427 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2428 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2429 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2430 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2431 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2432 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2433 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2434 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2435 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2436 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2437 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2438 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2439 // CHECK-64: cond.true:
2440 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2441 // CHECK-64: cond.false:
2442 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2443 // CHECK-64-NEXT: br label [[COND_END]]
2444 // CHECK-64: cond.end:
2445 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2446 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2447 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2448 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2449 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2450 // CHECK-64: omp.inner.for.cond:
2451 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2452 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2453 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2454 // CHECK-64: omp.inner.for.body:
2455 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2456 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2457 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2458 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2459 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2460 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2461 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2462 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2463 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2464 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2465 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2466 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2467 // CHECK-64: omp.inner.for.inc:
2468 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2469 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2470 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2471 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2472 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2473 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2474 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2475 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2476 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2477 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2478 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2479 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2480 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2481 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2482 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2483 // CHECK-64: cond.true5:
2484 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
2485 // CHECK-64: cond.false6:
2486 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2487 // CHECK-64-NEXT: br label [[COND_END7]]
2488 // CHECK-64: cond.end7:
2489 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2490 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2491 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2492 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2493 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2494 // CHECK-64: omp.inner.for.end:
2495 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2496 // CHECK-64: omp.loop.exit:
2497 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
2498 // CHECK-64-NEXT: ret void
2501 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined
2502 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
2503 // CHECK-64-NEXT: entry:
2504 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2505 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2506 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2507 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2508 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2509 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2510 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2511 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2512 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2513 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2514 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2515 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2516 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2517 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2518 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2519 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2520 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2521 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2522 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
2523 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2524 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
2525 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2526 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2527 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2528 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2529 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2530 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2531 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2532 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
2533 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
2534 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
2535 // CHECK-64: omp.dispatch.cond:
2536 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
2537 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
2538 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
2539 // CHECK-64: omp.dispatch.body:
2540 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2541 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2542 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2543 // CHECK-64: omp.inner.for.cond:
2544 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299:![0-9]+]]
2545 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP299]]
2546 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2547 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2548 // CHECK-64: omp.inner.for.body:
2549 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
2550 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2551 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2552 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP299]]
2553 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2554 // CHECK-64: omp.body.continue:
2555 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2556 // CHECK-64: omp.inner.for.inc:
2557 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
2558 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
2559 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
2560 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP300:![0-9]+]]
2561 // CHECK-64: omp.inner.for.end:
2562 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
2563 // CHECK-64: omp.dispatch.inc:
2564 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
2565 // CHECK-64: omp.dispatch.end:
2566 // CHECK-64-NEXT: ret void
2569 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49
2570 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2571 // CHECK-64-NEXT: entry:
2572 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2573 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2574 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2575 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2576 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_kernel_environment, ptr [[DYN_PTR]])
2577 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2578 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2579 // CHECK-64: user_code.entry:
2580 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2581 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2582 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2583 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2584 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2585 // CHECK-64-NEXT: ret void
2586 // CHECK-64: worker.exit:
2587 // CHECK-64-NEXT: ret void
2590 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined
2591 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2592 // CHECK-64-NEXT: entry:
2593 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2594 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2595 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2596 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2597 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2598 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2599 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2600 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2601 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2602 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2603 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2604 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2605 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2606 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2607 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2608 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2609 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2610 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2611 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2612 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2613 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2614 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2615 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2616 // CHECK-64: cond.true:
2617 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2618 // CHECK-64: cond.false:
2619 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2620 // CHECK-64-NEXT: br label [[COND_END]]
2621 // CHECK-64: cond.end:
2622 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2623 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2624 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2625 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2626 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2627 // CHECK-64: omp.inner.for.cond:
2628 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2629 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2630 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2631 // CHECK-64: omp.inner.for.body:
2632 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2633 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2634 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2635 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2636 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2637 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2638 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2639 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2640 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2641 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2642 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2643 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2644 // CHECK-64: omp.inner.for.inc:
2645 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2646 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2647 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2648 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2649 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2650 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2651 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2652 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2653 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2654 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2655 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2656 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2657 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2658 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2659 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2660 // CHECK-64: cond.true5:
2661 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
2662 // CHECK-64: cond.false6:
2663 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2664 // CHECK-64-NEXT: br label [[COND_END7]]
2665 // CHECK-64: cond.end7:
2666 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2667 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2668 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2669 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2670 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2671 // CHECK-64: omp.inner.for.end:
2672 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2673 // CHECK-64: omp.loop.exit:
2674 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
2675 // CHECK-64-NEXT: ret void
2678 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined
2679 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
2680 // CHECK-64-NEXT: entry:
2681 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2682 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2683 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2684 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2685 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2686 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2687 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2688 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2689 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2690 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2691 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2692 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2693 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2694 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2695 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2696 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2697 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2698 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2699 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
2700 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2701 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
2702 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2703 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2704 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2705 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2706 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2707 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2708 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2709 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
2710 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
2711 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
2712 // CHECK-64: omp.dispatch.cond:
2713 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
2714 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
2715 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
2716 // CHECK-64: omp.dispatch.body:
2717 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2718 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2719 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2720 // CHECK-64: omp.inner.for.cond:
2721 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302:![0-9]+]]
2722 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP302]]
2723 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2724 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2725 // CHECK-64: omp.inner.for.body:
2726 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
2727 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2728 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2729 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP302]]
2730 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2731 // CHECK-64: omp.body.continue:
2732 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2733 // CHECK-64: omp.inner.for.inc:
2734 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
2735 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
2736 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
2737 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP303:![0-9]+]]
2738 // CHECK-64: omp.inner.for.end:
2739 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
2740 // CHECK-64: omp.dispatch.inc:
2741 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
2742 // CHECK-64: omp.dispatch.end:
2743 // CHECK-64-NEXT: ret void
2746 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52
2747 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2748 // CHECK-64-NEXT: entry:
2749 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2750 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2751 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2752 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2753 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_kernel_environment, ptr [[DYN_PTR]])
2754 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2755 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2756 // CHECK-64: user_code.entry:
2757 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2758 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2759 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2760 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2761 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2762 // CHECK-64-NEXT: ret void
2763 // CHECK-64: worker.exit:
2764 // CHECK-64-NEXT: ret void
2767 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined
2768 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2769 // CHECK-64-NEXT: entry:
2770 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2771 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2772 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2773 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2774 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2775 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2776 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2777 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2778 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2779 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2780 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2781 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2782 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2783 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2784 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2785 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2786 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2787 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2788 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2789 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2790 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2791 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2792 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2793 // CHECK-64: cond.true:
2794 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2795 // CHECK-64: cond.false:
2796 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2797 // CHECK-64-NEXT: br label [[COND_END]]
2798 // CHECK-64: cond.end:
2799 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2800 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2801 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2802 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2803 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2804 // CHECK-64: omp.inner.for.cond:
2805 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2806 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2807 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2808 // CHECK-64: omp.inner.for.body:
2809 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2810 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2811 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2812 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2813 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2814 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2815 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2816 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2817 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2818 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2819 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2820 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2821 // CHECK-64: omp.inner.for.inc:
2822 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2823 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2824 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2825 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2826 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2827 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2828 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2829 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2830 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2831 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2832 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2833 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2834 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2835 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2836 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2837 // CHECK-64: cond.true5:
2838 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
2839 // CHECK-64: cond.false6:
2840 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2841 // CHECK-64-NEXT: br label [[COND_END7]]
2842 // CHECK-64: cond.end7:
2843 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2844 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2845 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2846 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2847 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
2848 // CHECK-64: omp.inner.for.end:
2849 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2850 // CHECK-64: omp.loop.exit:
2851 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
2852 // CHECK-64-NEXT: ret void
2855 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined
2856 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
2857 // CHECK-64-NEXT: entry:
2858 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2859 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2860 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2861 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2862 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2863 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2864 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2865 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2866 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2867 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2868 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2869 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2870 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2871 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2872 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2873 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2874 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2875 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2876 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
2877 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2878 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
2879 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2880 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2881 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2882 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2883 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2884 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2885 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2886 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
2887 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
2888 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
2889 // CHECK-64: omp.dispatch.cond:
2890 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
2891 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
2892 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
2893 // CHECK-64: omp.dispatch.body:
2894 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2895 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2896 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2897 // CHECK-64: omp.inner.for.cond:
2898 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305:![0-9]+]]
2899 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP305]]
2900 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2901 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2902 // CHECK-64: omp.inner.for.body:
2903 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
2904 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2905 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2906 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP305]]
2907 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2908 // CHECK-64: omp.body.continue:
2909 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2910 // CHECK-64: omp.inner.for.inc:
2911 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
2912 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
2913 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
2914 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP306:![0-9]+]]
2915 // CHECK-64: omp.inner.for.end:
2916 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
2917 // CHECK-64: omp.dispatch.inc:
2918 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
2919 // CHECK-64: omp.dispatch.end:
2920 // CHECK-64-NEXT: ret void
2923 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55
2924 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
2925 // CHECK-64-NEXT: entry:
2926 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
2927 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
2928 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
2929 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
2930 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_kernel_environment, ptr [[DYN_PTR]])
2931 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
2932 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
2933 // CHECK-64: user_code.entry:
2934 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2935 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
2936 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
2937 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
2938 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
2939 // CHECK-64-NEXT: ret void
2940 // CHECK-64: worker.exit:
2941 // CHECK-64-NEXT: ret void
2944 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined
2945 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
2946 // CHECK-64-NEXT: entry:
2947 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2948 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2949 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2950 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
2951 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2952 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2953 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2954 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2955 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
2956 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
2957 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2958 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2959 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2960 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2961 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2962 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2963 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
2964 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2965 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2966 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
2967 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2968 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
2969 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2970 // CHECK-64: cond.true:
2971 // CHECK-64-NEXT: br label [[COND_END:%.*]]
2972 // CHECK-64: cond.false:
2973 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2974 // CHECK-64-NEXT: br label [[COND_END]]
2975 // CHECK-64: cond.end:
2976 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
2977 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2978 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2979 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
2980 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2981 // CHECK-64: omp.inner.for.cond:
2982 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2983 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
2984 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2985 // CHECK-64: omp.inner.for.body:
2986 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2987 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
2988 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2989 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2990 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
2991 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
2992 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
2993 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
2994 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
2995 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2996 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
2997 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2998 // CHECK-64: omp.inner.for.inc:
2999 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3000 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3001 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
3002 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
3003 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3004 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3005 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
3006 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
3007 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3008 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3009 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3010 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
3011 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3012 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
3013 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
3014 // CHECK-64: cond.true5:
3015 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
3016 // CHECK-64: cond.false6:
3017 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3018 // CHECK-64-NEXT: br label [[COND_END7]]
3019 // CHECK-64: cond.end7:
3020 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
3021 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
3022 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3023 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
3024 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
3025 // CHECK-64: omp.inner.for.end:
3026 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3027 // CHECK-64: omp.loop.exit:
3028 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3029 // CHECK-64-NEXT: ret void
3032 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined
3033 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3034 // CHECK-64-NEXT: entry:
3035 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3036 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3037 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3038 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3039 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3040 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3041 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3042 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3043 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3044 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3045 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3046 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3047 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3048 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3049 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3050 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3051 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3052 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3053 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3054 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3055 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3056 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
3057 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
3058 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3059 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3060 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3061 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3062 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3063 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
3064 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
3065 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
3066 // CHECK-64: omp.dispatch.cond:
3067 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
3068 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
3069 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
3070 // CHECK-64: omp.dispatch.body:
3071 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3072 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
3073 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3074 // CHECK-64: omp.inner.for.cond:
3075 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308:![0-9]+]]
3076 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP308]]
3077 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
3078 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3079 // CHECK-64: omp.inner.for.body:
3080 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
3081 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
3082 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3083 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP308]]
3084 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3085 // CHECK-64: omp.body.continue:
3086 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3087 // CHECK-64: omp.inner.for.inc:
3088 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
3089 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
3090 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
3091 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP309:![0-9]+]]
3092 // CHECK-64: omp.inner.for.end:
3093 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
3094 // CHECK-64: omp.dispatch.inc:
3095 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
3096 // CHECK-64: omp.dispatch.end:
3097 // CHECK-64-NEXT: ret void
3100 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58
3101 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
3102 // CHECK-64-NEXT: entry:
3103 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
3104 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3105 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
3106 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
3107 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_kernel_environment, ptr [[DYN_PTR]])
3108 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
3109 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
3110 // CHECK-64: user_code.entry:
3111 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
3112 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3113 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
3114 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
3115 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
3116 // CHECK-64-NEXT: ret void
3117 // CHECK-64: worker.exit:
3118 // CHECK-64-NEXT: ret void
3121 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined
3122 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
3123 // CHECK-64-NEXT: entry:
3124 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3125 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3126 // CHECK-64-NEXT: [[B:%.*]] = alloca i32, align 4
3127 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3128 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3129 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3130 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3131 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3132 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3133 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3134 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
3135 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3136 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3137 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3138 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
3139 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3140 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3141 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
3142 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3143 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
3144 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
3145 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3146 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
3147 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3148 // CHECK-64: cond.true:
3149 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3150 // CHECK-64: cond.false:
3151 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3152 // CHECK-64-NEXT: br label [[COND_END]]
3153 // CHECK-64: cond.end:
3154 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
3155 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3156 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3157 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3158 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3159 // CHECK-64: omp.inner.for.cond:
3160 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311:![0-9]+]]
3161 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
3162 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3163 // CHECK-64: omp.inner.for.body:
3164 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
3165 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
3166 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3167 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
3168 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
3169 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
3170 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP311]]
3171 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
3172 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
3173 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP311]]
3174 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP311]]
3175 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3176 // CHECK-64: omp.inner.for.inc:
3177 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
3178 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
3179 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
3180 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
3181 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
3182 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
3183 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
3184 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
3185 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3186 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
3187 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3188 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3189 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3190 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
3191 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
3192 // CHECK-64: cond.true5:
3193 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
3194 // CHECK-64: cond.false6:
3195 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3196 // CHECK-64-NEXT: br label [[COND_END7]]
3197 // CHECK-64: cond.end7:
3198 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
3199 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
3200 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
3201 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
3202 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP312:![0-9]+]]
3203 // CHECK-64: omp.inner.for.end:
3204 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3205 // CHECK-64: omp.loop.exit:
3206 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3207 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3208 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
3209 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3210 // CHECK-64: .omp.final.then:
3211 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3212 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3213 // CHECK-64: .omp.final.done:
3214 // CHECK-64-NEXT: ret void
3217 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined
3218 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3219 // CHECK-64-NEXT: entry:
3220 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3221 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3222 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3223 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3224 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3225 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3226 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3227 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3228 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3229 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3230 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3231 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3232 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3233 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3234 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3235 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3236 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3237 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3238 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3239 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3240 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3241 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
3242 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
3243 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3244 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3245 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3246 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
3247 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3248 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3249 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3250 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3251 // CHECK-64: omp.inner.for.cond:
3252 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314:![0-9]+]]
3253 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
3254 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8, !llvm.access.group [[ACC_GRP314]]
3255 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
3256 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3257 // CHECK-64: omp.inner.for.body:
3258 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
3259 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
3260 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3261 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP314]]
3262 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3263 // CHECK-64: omp.body.continue:
3264 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3265 // CHECK-64: omp.inner.for.inc:
3266 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
3267 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP314]]
3268 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
3269 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
3270 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP315:![0-9]+]]
3271 // CHECK-64: omp.inner.for.end:
3272 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3273 // CHECK-64: omp.loop.exit:
3274 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
3275 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3276 // CHECK-64-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
3277 // CHECK-64-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3278 // CHECK-64: .omp.final.then:
3279 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3280 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3281 // CHECK-64: .omp.final.done:
3282 // CHECK-64-NEXT: ret void
3285 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66
3286 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
3287 // CHECK-64-NEXT: entry:
3288 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
3289 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3290 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
3291 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
3292 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_kernel_environment, ptr [[DYN_PTR]])
3293 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
3294 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
3295 // CHECK-64: user_code.entry:
3296 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
3297 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3298 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
3299 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
3300 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
3301 // CHECK-64-NEXT: ret void
3302 // CHECK-64: worker.exit:
3303 // CHECK-64-NEXT: ret void
3306 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined
3307 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
3308 // CHECK-64-NEXT: entry:
3309 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3310 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3311 // CHECK-64-NEXT: [[B:%.*]] = alloca [3 x i32], align 4
3312 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3313 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3314 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3315 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3316 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3317 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3318 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3319 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
3320 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3321 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3322 // CHECK-64-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[B]], ptr align 4 @"__const.<captured>.b", i64 12, i1 false)
3323 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3324 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
3325 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3326 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3327 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
3328 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3329 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
3330 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
3331 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3332 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
3333 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3334 // CHECK-64: cond.true:
3335 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3336 // CHECK-64: cond.false:
3337 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3338 // CHECK-64-NEXT: br label [[COND_END]]
3339 // CHECK-64: cond.end:
3340 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
3341 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3342 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3343 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3344 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3345 // CHECK-64: omp.inner.for.cond:
3346 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317:![0-9]+]]
3347 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
3348 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3349 // CHECK-64: omp.inner.for.body:
3350 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
3351 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
3352 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3353 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
3354 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
3355 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
3356 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP317]]
3357 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
3358 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
3359 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP317]]
3360 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP317]]
3361 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3362 // CHECK-64: omp.inner.for.inc:
3363 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
3364 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
3365 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
3366 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
3367 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
3368 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
3369 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
3370 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
3371 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3372 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
3373 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3374 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3375 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3376 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
3377 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
3378 // CHECK-64: cond.true5:
3379 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
3380 // CHECK-64: cond.false6:
3381 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3382 // CHECK-64-NEXT: br label [[COND_END7]]
3383 // CHECK-64: cond.end7:
3384 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
3385 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
3386 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
3387 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
3388 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP318:![0-9]+]]
3389 // CHECK-64: omp.inner.for.end:
3390 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3391 // CHECK-64: omp.loop.exit:
3392 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3393 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3394 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
3395 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3396 // CHECK-64: .omp.final.then:
3397 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3398 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3399 // CHECK-64: .omp.final.done:
3400 // CHECK-64-NEXT: ret void
3403 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined
3404 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3405 // CHECK-64-NEXT: entry:
3406 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3407 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3408 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3409 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3410 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3411 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3412 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3413 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3414 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3415 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3416 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3417 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3418 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3419 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3420 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3421 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3422 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3423 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3424 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3425 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3426 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3427 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
3428 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
3429 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3430 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3431 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3432 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
3433 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3434 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3435 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
3436 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3437 // CHECK-64: cond.true:
3438 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3439 // CHECK-64: cond.false:
3440 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3441 // CHECK-64-NEXT: br label [[COND_END]]
3442 // CHECK-64: cond.end:
3443 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
3444 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
3445 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3446 // CHECK-64-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
3447 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3448 // CHECK-64: omp.inner.for.cond:
3449 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320:![0-9]+]]
3450 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP320]]
3451 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
3452 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3453 // CHECK-64: omp.inner.for.body:
3454 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
3455 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
3456 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3457 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP320]]
3458 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3459 // CHECK-64: omp.body.continue:
3460 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3461 // CHECK-64: omp.inner.for.inc:
3462 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
3463 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
3464 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
3465 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP321:![0-9]+]]
3466 // CHECK-64: omp.inner.for.end:
3467 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3468 // CHECK-64: omp.loop.exit:
3469 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
3470 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3471 // CHECK-64-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
3472 // CHECK-64-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3473 // CHECK-64: .omp.final.then:
3474 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3475 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3476 // CHECK-64: .omp.final.done:
3477 // CHECK-64-NEXT: ret void
3480 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73
3481 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
3482 // CHECK-64-NEXT: entry:
3483 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
3484 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3485 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
3486 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
3487 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_kernel_environment, ptr [[DYN_PTR]])
3488 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
3489 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
3490 // CHECK-64: user_code.entry:
3491 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
3492 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3493 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
3494 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
3495 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
3496 // CHECK-64-NEXT: ret void
3497 // CHECK-64: worker.exit:
3498 // CHECK-64-NEXT: ret void
3501 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined
3502 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
3503 // CHECK-64-NEXT: entry:
3504 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3505 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3506 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3507 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3508 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3509 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3510 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3511 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3512 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3513 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
3514 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3515 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3516 // CHECK-64-NEXT: [[C:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i64 8)
3517 // CHECK-64-NEXT: [[B:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i64 4)
3518 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3519 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
3520 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3521 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3522 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3523 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
3524 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3525 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3526 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
3527 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3528 // CHECK-64: cond.true:
3529 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3530 // CHECK-64: cond.false:
3531 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3532 // CHECK-64-NEXT: br label [[COND_END]]
3533 // CHECK-64: cond.end:
3534 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
3535 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3536 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3537 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3538 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3539 // CHECK-64: omp.inner.for.cond:
3540 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323:![0-9]+]]
3541 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
3542 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
3543 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3544 // CHECK-64: omp.inner.for.body:
3545 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP323]]
3546 // CHECK-64-NEXT: [[TMP8:%.*]] = zext i32 [[TMP7]] to i64
3547 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
3548 // CHECK-64-NEXT: [[TMP10:%.*]] = zext i32 [[TMP9]] to i64
3549 // CHECK-64-NEXT: [[TMP11:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
3550 // CHECK-64-NEXT: [[TMP12:%.*]] = inttoptr i64 [[TMP8]] to ptr
3551 // CHECK-64-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 8, !llvm.access.group [[ACC_GRP323]]
3552 // CHECK-64-NEXT: [[TMP13:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
3553 // CHECK-64-NEXT: [[TMP14:%.*]] = inttoptr i64 [[TMP10]] to ptr
3554 // CHECK-64-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8, !llvm.access.group [[ACC_GRP323]]
3555 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP323]]
3556 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3557 // CHECK-64: omp.inner.for.inc:
3558 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
3559 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP323]]
3560 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP15]], [[TMP16]]
3561 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
3562 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP324:![0-9]+]]
3563 // CHECK-64: omp.inner.for.end:
3564 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3565 // CHECK-64: omp.loop.exit:
3566 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3567 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3568 // CHECK-64-NEXT: [[TMP18:%.*]] = icmp ne i32 [[TMP17]], 0
3569 // CHECK-64-NEXT: br i1 [[TMP18]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3570 // CHECK-64: .omp.final.then:
3571 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3572 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3573 // CHECK-64: .omp.final.done:
3574 // CHECK-64-NEXT: store ptr [[B]], ptr [[C]], align 8
3575 // CHECK-64-NEXT: call void @__kmpc_free_shared(ptr [[B]], i64 4)
3576 // CHECK-64-NEXT: call void @__kmpc_free_shared(ptr [[C]], i64 8)
3577 // CHECK-64-NEXT: ret void
3580 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined
3581 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3582 // CHECK-64-NEXT: entry:
3583 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3584 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3585 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3586 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3587 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3588 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3589 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3590 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3591 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3592 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3593 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3594 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3595 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3596 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3597 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3598 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3599 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3600 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3601 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3602 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3603 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3604 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
3605 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
3606 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3607 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3608 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3609 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
3610 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3611 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3612 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3613 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3614 // CHECK-64: omp.inner.for.cond:
3615 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326:![0-9]+]]
3616 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
3617 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8, !llvm.access.group [[ACC_GRP326]]
3618 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
3619 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3620 // CHECK-64: omp.inner.for.body:
3621 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
3622 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
3623 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3624 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP326]]
3625 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3626 // CHECK-64: omp.body.continue:
3627 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3628 // CHECK-64: omp.inner.for.inc:
3629 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
3630 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP326]]
3631 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
3632 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
3633 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP327:![0-9]+]]
3634 // CHECK-64: omp.inner.for.end:
3635 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3636 // CHECK-64: omp.loop.exit:
3637 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
3638 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3639 // CHECK-64-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
3640 // CHECK-64-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3641 // CHECK-64: .omp.final.then:
3642 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3643 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3644 // CHECK-64: .omp.final.done:
3645 // CHECK-64-NEXT: ret void
3648 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper
3649 // CHECK-64-SAME: (i16 noundef zeroext [[TMP0:%.*]], i32 noundef [[TMP1:%.*]]) #[[ATTR7:[0-9]+]] {
3650 // CHECK-64-NEXT: entry:
3651 // CHECK-64-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
3652 // CHECK-64-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
3653 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3654 // CHECK-64-NEXT: [[GLOBAL_ARGS:%.*]] = alloca ptr, align 8
3655 // CHECK-64-NEXT: store i16 [[TMP0]], ptr [[DOTADDR]], align 2
3656 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTADDR1]], align 4
3657 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3658 // CHECK-64-NEXT: call void @__kmpc_get_shared_variables(ptr [[GLOBAL_ARGS]])
3659 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[GLOBAL_ARGS]], align 8
3660 // CHECK-64-NEXT: [[TMP3:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i64 0
3661 // CHECK-64-NEXT: [[TMP4:%.*]] = load i64, ptr [[TMP3]], align 8
3662 // CHECK-64-NEXT: [[TMP5:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i64 1
3663 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[TMP5]], align 8
3664 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined(ptr [[DOTADDR1]], ptr [[DOTZERO_ADDR]], i64 [[TMP4]], i64 [[TMP6]]) #[[ATTR2]]
3665 // CHECK-64-NEXT: ret void
3668 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81
3669 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
3670 // CHECK-64-NEXT: entry:
3671 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
3672 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3673 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
3674 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
3675 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_kernel_environment, ptr [[DYN_PTR]])
3676 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
3677 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
3678 // CHECK-64: user_code.entry:
3679 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
3680 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3681 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
3682 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
3683 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
3684 // CHECK-64-NEXT: ret void
3685 // CHECK-64: worker.exit:
3686 // CHECK-64-NEXT: ret void
3689 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined
3690 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
3691 // CHECK-64-NEXT: entry:
3692 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3693 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3694 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3695 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3696 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3697 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3698 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3699 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3700 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3701 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
3702 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3703 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3704 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3705 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
3706 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3707 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3708 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
3709 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3710 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
3711 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
3712 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3713 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
3714 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3715 // CHECK-64: cond.true:
3716 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3717 // CHECK-64: cond.false:
3718 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3719 // CHECK-64-NEXT: br label [[COND_END]]
3720 // CHECK-64: cond.end:
3721 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
3722 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3723 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3724 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3725 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3726 // CHECK-64: omp.inner.for.cond:
3727 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329:![0-9]+]]
3728 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
3729 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3730 // CHECK-64: omp.inner.for.body:
3731 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
3732 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
3733 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3734 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
3735 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
3736 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
3737 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP329]]
3738 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
3739 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
3740 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP329]]
3741 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP329]]
3742 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3743 // CHECK-64: omp.inner.for.inc:
3744 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
3745 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
3746 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
3747 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
3748 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
3749 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
3750 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
3751 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
3752 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3753 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
3754 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3755 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3756 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3757 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
3758 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
3759 // CHECK-64: cond.true5:
3760 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
3761 // CHECK-64: cond.false6:
3762 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3763 // CHECK-64-NEXT: br label [[COND_END7]]
3764 // CHECK-64: cond.end7:
3765 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
3766 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
3767 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
3768 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
3769 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP330:![0-9]+]]
3770 // CHECK-64: omp.inner.for.end:
3771 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3772 // CHECK-64: omp.loop.exit:
3773 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3774 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3775 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
3776 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3777 // CHECK-64: .omp.final.then:
3778 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3779 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3780 // CHECK-64: .omp.final.done:
3781 // CHECK-64-NEXT: ret void
3784 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined
3785 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3786 // CHECK-64-NEXT: entry:
3787 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3788 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3789 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3790 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3791 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3792 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3793 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3794 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3795 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3796 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3797 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3798 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3799 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3800 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3801 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3802 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3803 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3804 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3805 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3806 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3807 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3808 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
3809 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
3810 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3811 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3812 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3813 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3814 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3815 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
3816 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
3817 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
3818 // CHECK-64: omp.dispatch.cond:
3819 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
3820 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
3821 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
3822 // CHECK-64: omp.dispatch.body:
3823 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3824 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
3825 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3826 // CHECK-64: omp.inner.for.cond:
3827 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332:![0-9]+]]
3828 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP332]]
3829 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
3830 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3831 // CHECK-64: omp.inner.for.body:
3832 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
3833 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
3834 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3835 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP332]]
3836 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3837 // CHECK-64: omp.body.continue:
3838 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3839 // CHECK-64: omp.inner.for.inc:
3840 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
3841 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
3842 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
3843 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP333:![0-9]+]]
3844 // CHECK-64: omp.inner.for.end:
3845 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
3846 // CHECK-64: omp.dispatch.inc:
3847 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
3848 // CHECK-64: omp.dispatch.end:
3849 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3850 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
3851 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3852 // CHECK-64: .omp.final.then:
3853 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3854 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3855 // CHECK-64: .omp.final.done:
3856 // CHECK-64-NEXT: ret void
3859 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85
3860 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
3861 // CHECK-64-NEXT: entry:
3862 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
3863 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
3864 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
3865 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
3866 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_kernel_environment, ptr [[DYN_PTR]])
3867 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
3868 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
3869 // CHECK-64: user_code.entry:
3870 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
3871 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
3872 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
3873 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
3874 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
3875 // CHECK-64-NEXT: ret void
3876 // CHECK-64: worker.exit:
3877 // CHECK-64-NEXT: ret void
3880 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined
3881 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
3882 // CHECK-64-NEXT: entry:
3883 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3884 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3885 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3886 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3887 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3888 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3889 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3890 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3891 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3892 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
3893 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3894 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3895 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3896 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
3897 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3898 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3899 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
3900 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3901 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
3902 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
3903 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3904 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
3905 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3906 // CHECK-64: cond.true:
3907 // CHECK-64-NEXT: br label [[COND_END:%.*]]
3908 // CHECK-64: cond.false:
3909 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3910 // CHECK-64-NEXT: br label [[COND_END]]
3911 // CHECK-64: cond.end:
3912 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
3913 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3914 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3915 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
3916 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3917 // CHECK-64: omp.inner.for.cond:
3918 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335:![0-9]+]]
3919 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
3920 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3921 // CHECK-64: omp.inner.for.body:
3922 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
3923 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
3924 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3925 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
3926 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
3927 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
3928 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP335]]
3929 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
3930 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
3931 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP335]]
3932 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP335]]
3933 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3934 // CHECK-64: omp.inner.for.inc:
3935 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
3936 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
3937 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
3938 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
3939 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
3940 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
3941 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
3942 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
3943 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3944 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
3945 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3946 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3947 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3948 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
3949 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
3950 // CHECK-64: cond.true5:
3951 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
3952 // CHECK-64: cond.false6:
3953 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3954 // CHECK-64-NEXT: br label [[COND_END7]]
3955 // CHECK-64: cond.end7:
3956 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
3957 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
3958 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
3959 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
3960 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP336:![0-9]+]]
3961 // CHECK-64: omp.inner.for.end:
3962 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3963 // CHECK-64: omp.loop.exit:
3964 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
3965 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
3966 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
3967 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
3968 // CHECK-64: .omp.final.then:
3969 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
3970 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
3971 // CHECK-64: .omp.final.done:
3972 // CHECK-64-NEXT: ret void
3975 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined
3976 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
3977 // CHECK-64-NEXT: entry:
3978 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3979 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3980 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
3981 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
3982 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3983 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
3984 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3985 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3986 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3987 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3988 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
3989 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3990 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3991 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3992 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3993 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3994 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
3995 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
3996 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
3997 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
3998 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
3999 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4000 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4001 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4002 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4003 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4004 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4005 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4006 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
4007 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
4008 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
4009 // CHECK-64: omp.dispatch.cond:
4010 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
4011 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
4012 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
4013 // CHECK-64: omp.dispatch.body:
4014 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4015 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4016 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4017 // CHECK-64: omp.inner.for.cond:
4018 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338:![0-9]+]]
4019 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP338]]
4020 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4021 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4022 // CHECK-64: omp.inner.for.body:
4023 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
4024 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4025 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4026 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP338]]
4027 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4028 // CHECK-64: omp.body.continue:
4029 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4030 // CHECK-64: omp.inner.for.inc:
4031 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
4032 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
4033 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
4034 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP339:![0-9]+]]
4035 // CHECK-64: omp.inner.for.end:
4036 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
4037 // CHECK-64: omp.dispatch.inc:
4038 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
4039 // CHECK-64: omp.dispatch.end:
4040 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
4041 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
4042 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
4043 // CHECK-64: .omp.final.then:
4044 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
4045 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
4046 // CHECK-64: .omp.final.done:
4047 // CHECK-64-NEXT: ret void
4050 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89
4051 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4052 // CHECK-64-NEXT: entry:
4053 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4054 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4055 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4056 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4057 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_kernel_environment, ptr [[DYN_PTR]])
4058 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4059 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4060 // CHECK-64: user_code.entry:
4061 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4062 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4063 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4064 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4065 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4066 // CHECK-64-NEXT: ret void
4067 // CHECK-64: worker.exit:
4068 // CHECK-64-NEXT: ret void
4071 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined
4072 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4073 // CHECK-64-NEXT: entry:
4074 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4075 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4076 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4077 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4078 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4079 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4080 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4081 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4082 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4083 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4084 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4085 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4086 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4087 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4088 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4089 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4090 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4091 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4092 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4093 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4094 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4095 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4096 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4097 // CHECK-64: cond.true:
4098 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4099 // CHECK-64: cond.false:
4100 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4101 // CHECK-64-NEXT: br label [[COND_END]]
4102 // CHECK-64: cond.end:
4103 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
4104 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4105 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4106 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4107 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4108 // CHECK-64: omp.inner.for.cond:
4109 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341:![0-9]+]]
4110 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
4111 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4112 // CHECK-64: omp.inner.for.body:
4113 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
4114 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
4115 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4116 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
4117 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
4118 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
4119 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP341]]
4120 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
4121 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
4122 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP341]]
4123 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP341]]
4124 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4125 // CHECK-64: omp.inner.for.inc:
4126 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
4127 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
4128 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4129 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
4130 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
4131 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
4132 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4133 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
4134 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4135 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
4136 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
4137 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4138 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4139 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
4140 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4141 // CHECK-64: cond.true5:
4142 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
4143 // CHECK-64: cond.false6:
4144 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4145 // CHECK-64-NEXT: br label [[COND_END7]]
4146 // CHECK-64: cond.end7:
4147 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
4148 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
4149 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
4150 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
4151 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP342:![0-9]+]]
4152 // CHECK-64: omp.inner.for.end:
4153 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4154 // CHECK-64: omp.loop.exit:
4155 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
4156 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
4157 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
4158 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
4159 // CHECK-64: .omp.final.then:
4160 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
4161 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
4162 // CHECK-64: .omp.final.done:
4163 // CHECK-64-NEXT: ret void
4166 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined
4167 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
4168 // CHECK-64-NEXT: entry:
4169 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4170 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4171 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
4172 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
4173 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4174 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4175 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4176 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4177 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4178 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4179 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4180 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4181 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4182 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4183 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4184 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4185 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4186 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4187 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
4188 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4189 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
4190 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4191 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4192 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4193 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4194 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4195 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4196 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4197 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
4198 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
4199 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
4200 // CHECK-64: omp.dispatch.cond:
4201 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
4202 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
4203 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
4204 // CHECK-64: omp.dispatch.body:
4205 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4206 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4207 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4208 // CHECK-64: omp.inner.for.cond:
4209 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344:![0-9]+]]
4210 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP344]]
4211 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4212 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4213 // CHECK-64: omp.inner.for.body:
4214 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
4215 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4216 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4217 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP344]]
4218 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4219 // CHECK-64: omp.body.continue:
4220 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4221 // CHECK-64: omp.inner.for.inc:
4222 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
4223 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
4224 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
4225 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP345:![0-9]+]]
4226 // CHECK-64: omp.inner.for.end:
4227 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
4228 // CHECK-64: omp.dispatch.inc:
4229 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
4230 // CHECK-64: omp.dispatch.end:
4231 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
4232 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
4233 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
4234 // CHECK-64: .omp.final.then:
4235 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
4236 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
4237 // CHECK-64: .omp.final.done:
4238 // CHECK-64-NEXT: ret void
4241 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93
4242 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4243 // CHECK-64-NEXT: entry:
4244 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4245 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4246 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4247 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4248 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_kernel_environment, ptr [[DYN_PTR]])
4249 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4250 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4251 // CHECK-64: user_code.entry:
4252 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4253 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4254 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4255 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4256 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4257 // CHECK-64-NEXT: ret void
4258 // CHECK-64: worker.exit:
4259 // CHECK-64-NEXT: ret void
4262 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined
4263 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4264 // CHECK-64-NEXT: entry:
4265 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4266 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4267 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4268 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4269 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4270 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4271 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4272 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4273 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4274 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4275 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4276 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4277 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4278 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4279 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4280 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4281 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4282 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4283 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4284 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4285 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4286 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4287 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4288 // CHECK-64: cond.true:
4289 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4290 // CHECK-64: cond.false:
4291 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4292 // CHECK-64-NEXT: br label [[COND_END]]
4293 // CHECK-64: cond.end:
4294 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
4295 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4296 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4297 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4298 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4299 // CHECK-64: omp.inner.for.cond:
4300 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347:![0-9]+]]
4301 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
4302 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4303 // CHECK-64: omp.inner.for.body:
4304 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
4305 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
4306 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4307 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
4308 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
4309 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
4310 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP347]]
4311 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
4312 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
4313 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP347]]
4314 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2), !llvm.access.group [[ACC_GRP347]]
4315 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4316 // CHECK-64: omp.inner.for.inc:
4317 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
4318 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
4319 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4320 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
4321 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
4322 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
4323 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4324 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
4325 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4326 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
4327 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
4328 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4329 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4330 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
4331 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4332 // CHECK-64: cond.true5:
4333 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
4334 // CHECK-64: cond.false6:
4335 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4336 // CHECK-64-NEXT: br label [[COND_END7]]
4337 // CHECK-64: cond.end7:
4338 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
4339 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
4340 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
4341 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
4342 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP348:![0-9]+]]
4343 // CHECK-64: omp.inner.for.end:
4344 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4345 // CHECK-64: omp.loop.exit:
4346 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
4347 // CHECK-64-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
4348 // CHECK-64-NEXT: [[TMP24:%.*]] = icmp ne i32 [[TMP23]], 0
4349 // CHECK-64-NEXT: br i1 [[TMP24]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
4350 // CHECK-64: .omp.final.then:
4351 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
4352 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
4353 // CHECK-64: .omp.final.done:
4354 // CHECK-64-NEXT: ret void
4357 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined
4358 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
4359 // CHECK-64-NEXT: entry:
4360 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4361 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4362 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
4363 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
4364 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4365 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4366 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4367 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4368 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4369 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4370 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4371 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4372 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4373 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4374 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4375 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4376 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4377 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4378 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
4379 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4380 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
4381 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4382 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4383 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4384 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4385 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4386 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4387 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4388 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
4389 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
4390 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
4391 // CHECK-64: omp.dispatch.cond:
4392 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
4393 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
4394 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
4395 // CHECK-64: omp.dispatch.body:
4396 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4397 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4398 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4399 // CHECK-64: omp.inner.for.cond:
4400 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350:![0-9]+]]
4401 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP350]]
4402 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4403 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4404 // CHECK-64: omp.inner.for.body:
4405 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
4406 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4407 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4408 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP350]]
4409 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4410 // CHECK-64: omp.body.continue:
4411 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4412 // CHECK-64: omp.inner.for.inc:
4413 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
4414 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
4415 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
4416 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP351:![0-9]+]]
4417 // CHECK-64: omp.inner.for.end:
4418 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
4419 // CHECK-64: omp.dispatch.inc:
4420 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
4421 // CHECK-64: omp.dispatch.end:
4422 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
4423 // CHECK-64-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
4424 // CHECK-64-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
4425 // CHECK-64: .omp.final.then:
4426 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
4427 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
4428 // CHECK-64: .omp.final.done:
4429 // CHECK-64-NEXT: ret void
4432 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97
4433 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4434 // CHECK-64-NEXT: entry:
4435 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4436 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4437 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4438 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4439 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_kernel_environment, ptr [[DYN_PTR]])
4440 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4441 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4442 // CHECK-64: user_code.entry:
4443 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4444 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4445 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4446 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4447 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4448 // CHECK-64-NEXT: ret void
4449 // CHECK-64: worker.exit:
4450 // CHECK-64-NEXT: ret void
4453 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined
4454 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4455 // CHECK-64-NEXT: entry:
4456 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4457 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4458 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4459 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4460 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4461 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4462 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4463 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4464 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4465 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4466 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4467 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4468 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4469 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4470 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4471 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4472 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4473 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4474 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4475 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4476 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4477 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4478 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4479 // CHECK-64: cond.true:
4480 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4481 // CHECK-64: cond.false:
4482 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4483 // CHECK-64-NEXT: br label [[COND_END]]
4484 // CHECK-64: cond.end:
4485 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
4486 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4487 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4488 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4489 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4490 // CHECK-64: omp.inner.for.cond:
4491 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4492 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
4493 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4494 // CHECK-64: omp.inner.for.body:
4495 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4496 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
4497 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4498 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
4499 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
4500 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
4501 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
4502 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
4503 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
4504 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
4505 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
4506 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4507 // CHECK-64: omp.inner.for.inc:
4508 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4509 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4510 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4511 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4512 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4513 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4514 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4515 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
4516 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4517 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4518 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
4519 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
4520 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4521 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
4522 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4523 // CHECK-64: cond.true5:
4524 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
4525 // CHECK-64: cond.false6:
4526 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4527 // CHECK-64-NEXT: br label [[COND_END7]]
4528 // CHECK-64: cond.end7:
4529 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
4530 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
4531 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4532 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
4533 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4534 // CHECK-64: omp.inner.for.end:
4535 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4536 // CHECK-64: omp.loop.exit:
4537 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
4538 // CHECK-64-NEXT: ret void
4541 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined
4542 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
4543 // CHECK-64-NEXT: entry:
4544 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4545 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4546 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
4547 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
4548 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4549 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4550 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4551 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4552 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4553 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4554 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4555 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4556 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4557 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4558 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4559 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4560 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4561 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4562 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
4563 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4564 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
4565 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4566 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4567 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4568 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4569 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4570 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
4571 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
4572 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4573 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4574 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4575 // CHECK-64: omp.inner.for.cond:
4576 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4577 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
4578 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4579 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
4580 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4581 // CHECK-64: omp.inner.for.body:
4582 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4583 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
4584 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4585 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4586 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4587 // CHECK-64: omp.body.continue:
4588 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4589 // CHECK-64: omp.inner.for.inc:
4590 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4591 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4592 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
4593 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
4594 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4595 // CHECK-64: omp.inner.for.end:
4596 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4597 // CHECK-64: omp.loop.exit:
4598 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
4599 // CHECK-64-NEXT: ret void
4602 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101
4603 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4604 // CHECK-64-NEXT: entry:
4605 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4606 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4607 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4608 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4609 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_kernel_environment, ptr [[DYN_PTR]])
4610 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4611 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4612 // CHECK-64: user_code.entry:
4613 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4614 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4615 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4616 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4617 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4618 // CHECK-64-NEXT: ret void
4619 // CHECK-64: worker.exit:
4620 // CHECK-64-NEXT: ret void
4623 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined
4624 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4625 // CHECK-64-NEXT: entry:
4626 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4627 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4628 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4629 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4630 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4631 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4632 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4633 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4634 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4635 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4636 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4637 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4638 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4639 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4640 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4641 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4642 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4643 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4644 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4645 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4646 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4647 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4648 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4649 // CHECK-64: cond.true:
4650 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4651 // CHECK-64: cond.false:
4652 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4653 // CHECK-64-NEXT: br label [[COND_END]]
4654 // CHECK-64: cond.end:
4655 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
4656 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4657 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4658 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4659 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4660 // CHECK-64: omp.inner.for.cond:
4661 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4662 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
4663 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4664 // CHECK-64: omp.inner.for.body:
4665 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4666 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
4667 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4668 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
4669 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
4670 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
4671 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
4672 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
4673 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
4674 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
4675 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
4676 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4677 // CHECK-64: omp.inner.for.inc:
4678 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4679 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4680 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4681 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4682 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4683 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4684 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4685 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
4686 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4687 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4688 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
4689 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
4690 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4691 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
4692 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4693 // CHECK-64: cond.true5:
4694 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
4695 // CHECK-64: cond.false6:
4696 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4697 // CHECK-64-NEXT: br label [[COND_END7]]
4698 // CHECK-64: cond.end7:
4699 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
4700 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
4701 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4702 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
4703 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4704 // CHECK-64: omp.inner.for.end:
4705 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4706 // CHECK-64: omp.loop.exit:
4707 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
4708 // CHECK-64-NEXT: ret void
4711 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined
4712 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
4713 // CHECK-64-NEXT: entry:
4714 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4715 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4716 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
4717 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
4718 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4719 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4720 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4721 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4722 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4723 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4724 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4725 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4726 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4727 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4728 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4729 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4730 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4731 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4732 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
4733 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4734 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
4735 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4736 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4737 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4738 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4739 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4740 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
4741 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
4742 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4743 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
4744 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4745 // CHECK-64: cond.true:
4746 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4747 // CHECK-64: cond.false:
4748 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4749 // CHECK-64-NEXT: br label [[COND_END]]
4750 // CHECK-64: cond.end:
4751 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
4752 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
4753 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4754 // CHECK-64-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
4755 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4756 // CHECK-64: omp.inner.for.cond:
4757 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4758 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4759 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
4760 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4761 // CHECK-64: omp.inner.for.body:
4762 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4763 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
4764 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4765 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4766 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4767 // CHECK-64: omp.body.continue:
4768 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4769 // CHECK-64: omp.inner.for.inc:
4770 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4771 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
4772 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
4773 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4774 // CHECK-64: omp.inner.for.end:
4775 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4776 // CHECK-64: omp.loop.exit:
4777 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
4778 // CHECK-64-NEXT: ret void
4781 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105
4782 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4783 // CHECK-64-NEXT: entry:
4784 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4785 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4786 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4787 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4788 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_kernel_environment, ptr [[DYN_PTR]])
4789 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4790 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4791 // CHECK-64: user_code.entry:
4792 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4793 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4794 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4795 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4796 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4797 // CHECK-64-NEXT: ret void
4798 // CHECK-64: worker.exit:
4799 // CHECK-64-NEXT: ret void
4802 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined
4803 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4804 // CHECK-64-NEXT: entry:
4805 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4806 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4807 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4808 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4809 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4810 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4811 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4812 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4813 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4814 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4815 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4816 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4817 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4818 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4819 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4820 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4821 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4822 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4823 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4824 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4825 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4826 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4827 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4828 // CHECK-64: cond.true:
4829 // CHECK-64-NEXT: br label [[COND_END:%.*]]
4830 // CHECK-64: cond.false:
4831 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4832 // CHECK-64-NEXT: br label [[COND_END]]
4833 // CHECK-64: cond.end:
4834 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
4835 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4836 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4837 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4838 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4839 // CHECK-64: omp.inner.for.cond:
4840 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4841 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
4842 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4843 // CHECK-64: omp.inner.for.body:
4844 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4845 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
4846 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4847 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
4848 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
4849 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
4850 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
4851 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
4852 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
4853 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
4854 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
4855 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4856 // CHECK-64: omp.inner.for.inc:
4857 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4858 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4859 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4860 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4861 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4862 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4863 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4864 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
4865 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4866 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4867 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
4868 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
4869 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4870 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
4871 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4872 // CHECK-64: cond.true5:
4873 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
4874 // CHECK-64: cond.false6:
4875 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4876 // CHECK-64-NEXT: br label [[COND_END7]]
4877 // CHECK-64: cond.end7:
4878 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
4879 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
4880 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4881 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
4882 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4883 // CHECK-64: omp.inner.for.end:
4884 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4885 // CHECK-64: omp.loop.exit:
4886 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
4887 // CHECK-64-NEXT: ret void
4890 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined
4891 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
4892 // CHECK-64-NEXT: entry:
4893 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4894 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4895 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
4896 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
4897 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4898 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4899 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4900 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4901 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4902 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4903 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4904 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4905 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4906 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4907 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4908 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4909 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4910 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
4911 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
4912 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4913 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
4914 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
4915 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
4916 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4917 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4918 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4919 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
4920 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
4921 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4922 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
4923 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4924 // CHECK-64: omp.inner.for.cond:
4925 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4926 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
4927 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
4928 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
4929 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4930 // CHECK-64: omp.inner.for.body:
4931 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4932 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
4933 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4934 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4935 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4936 // CHECK-64: omp.body.continue:
4937 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4938 // CHECK-64: omp.inner.for.inc:
4939 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4940 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4941 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
4942 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
4943 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
4944 // CHECK-64: omp.inner.for.end:
4945 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4946 // CHECK-64: omp.loop.exit:
4947 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
4948 // CHECK-64-NEXT: ret void
4951 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109
4952 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
4953 // CHECK-64-NEXT: entry:
4954 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
4955 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
4956 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
4957 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
4958 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_kernel_environment, ptr [[DYN_PTR]])
4959 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
4960 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
4961 // CHECK-64: user_code.entry:
4962 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
4963 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
4964 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
4965 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
4966 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
4967 // CHECK-64-NEXT: ret void
4968 // CHECK-64: worker.exit:
4969 // CHECK-64-NEXT: ret void
4972 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined
4973 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
4974 // CHECK-64-NEXT: entry:
4975 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
4976 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
4977 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4978 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
4979 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4980 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4981 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4982 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4983 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
4984 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
4985 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
4986 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
4987 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4988 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4989 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4990 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4991 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
4992 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
4993 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
4994 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
4995 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4996 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
4997 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4998 // CHECK-64: cond.true:
4999 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5000 // CHECK-64: cond.false:
5001 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5002 // CHECK-64-NEXT: br label [[COND_END]]
5003 // CHECK-64: cond.end:
5004 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5005 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5006 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5007 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5008 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5009 // CHECK-64: omp.inner.for.cond:
5010 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5011 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5012 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5013 // CHECK-64: omp.inner.for.body:
5014 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5015 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5016 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5017 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5018 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5019 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5020 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5021 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5022 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5023 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5024 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5025 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5026 // CHECK-64: omp.inner.for.inc:
5027 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5028 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5029 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5030 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5031 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5032 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5033 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5034 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5035 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5036 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5037 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5038 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5039 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5040 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5041 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5042 // CHECK-64: cond.true5:
5043 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5044 // CHECK-64: cond.false6:
5045 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5046 // CHECK-64-NEXT: br label [[COND_END7]]
5047 // CHECK-64: cond.end7:
5048 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5049 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5050 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5051 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5052 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5053 // CHECK-64: omp.inner.for.end:
5054 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5055 // CHECK-64: omp.loop.exit:
5056 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5057 // CHECK-64-NEXT: ret void
5060 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined
5061 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5062 // CHECK-64-NEXT: entry:
5063 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5064 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5065 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5066 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5067 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5068 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5069 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5070 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5071 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5072 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5073 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5074 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5075 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5076 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5077 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5078 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5079 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5080 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5081 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5082 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5083 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5084 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5085 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5086 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5087 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5088 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5089 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5090 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5091 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
5092 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
5093 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
5094 // CHECK-64: omp.dispatch.cond:
5095 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
5096 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
5097 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
5098 // CHECK-64: omp.dispatch.body:
5099 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5100 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
5101 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5102 // CHECK-64: omp.inner.for.cond:
5103 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353:![0-9]+]]
5104 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP353]]
5105 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
5106 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5107 // CHECK-64: omp.inner.for.body:
5108 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
5109 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
5110 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5111 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP353]]
5112 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5113 // CHECK-64: omp.body.continue:
5114 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5115 // CHECK-64: omp.inner.for.inc:
5116 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
5117 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
5118 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
5119 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP354:![0-9]+]]
5120 // CHECK-64: omp.inner.for.end:
5121 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
5122 // CHECK-64: omp.dispatch.inc:
5123 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
5124 // CHECK-64: omp.dispatch.end:
5125 // CHECK-64-NEXT: ret void
5128 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113
5129 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
5130 // CHECK-64-NEXT: entry:
5131 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
5132 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
5133 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
5134 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
5135 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_kernel_environment, ptr [[DYN_PTR]])
5136 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
5137 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
5138 // CHECK-64: user_code.entry:
5139 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
5140 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
5141 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
5142 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
5143 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
5144 // CHECK-64-NEXT: ret void
5145 // CHECK-64: worker.exit:
5146 // CHECK-64-NEXT: ret void
5149 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined
5150 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
5151 // CHECK-64-NEXT: entry:
5152 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5153 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5154 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5155 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5156 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
5157 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
5158 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5159 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5160 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5161 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
5162 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5163 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5164 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
5165 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
5166 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5167 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5168 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
5169 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5170 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
5171 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
5172 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5173 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
5174 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5175 // CHECK-64: cond.true:
5176 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5177 // CHECK-64: cond.false:
5178 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5179 // CHECK-64-NEXT: br label [[COND_END]]
5180 // CHECK-64: cond.end:
5181 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5182 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5183 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5184 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5185 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5186 // CHECK-64: omp.inner.for.cond:
5187 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5188 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5189 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5190 // CHECK-64: omp.inner.for.body:
5191 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5192 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5193 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5194 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5195 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5196 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5197 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5198 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5199 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5200 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5201 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5202 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5203 // CHECK-64: omp.inner.for.inc:
5204 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5205 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5206 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5207 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5208 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5209 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5210 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5211 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5212 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5213 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5214 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5215 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5216 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5217 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5218 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5219 // CHECK-64: cond.true5:
5220 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5221 // CHECK-64: cond.false6:
5222 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5223 // CHECK-64-NEXT: br label [[COND_END7]]
5224 // CHECK-64: cond.end7:
5225 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5226 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5227 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5228 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5229 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5230 // CHECK-64: omp.inner.for.end:
5231 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5232 // CHECK-64: omp.loop.exit:
5233 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5234 // CHECK-64-NEXT: ret void
5237 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined
5238 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5239 // CHECK-64-NEXT: entry:
5240 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5241 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5242 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5243 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5244 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5245 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5246 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5247 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5248 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5249 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5250 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5251 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5252 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5253 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5254 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5255 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5256 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5257 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5258 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5259 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5260 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5261 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5262 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5263 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5264 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5265 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5266 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5267 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5268 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
5269 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
5270 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
5271 // CHECK-64: omp.dispatch.cond:
5272 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
5273 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
5274 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
5275 // CHECK-64: omp.dispatch.body:
5276 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5277 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
5278 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5279 // CHECK-64: omp.inner.for.cond:
5280 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356:![0-9]+]]
5281 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP356]]
5282 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
5283 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5284 // CHECK-64: omp.inner.for.body:
5285 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
5286 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
5287 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5288 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP356]]
5289 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5290 // CHECK-64: omp.body.continue:
5291 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5292 // CHECK-64: omp.inner.for.inc:
5293 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
5294 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
5295 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
5296 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP357:![0-9]+]]
5297 // CHECK-64: omp.inner.for.end:
5298 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
5299 // CHECK-64: omp.dispatch.inc:
5300 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
5301 // CHECK-64: omp.dispatch.end:
5302 // CHECK-64-NEXT: ret void
5305 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117
5306 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
5307 // CHECK-64-NEXT: entry:
5308 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
5309 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
5310 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
5311 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
5312 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_kernel_environment, ptr [[DYN_PTR]])
5313 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
5314 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
5315 // CHECK-64: user_code.entry:
5316 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
5317 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
5318 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
5319 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
5320 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
5321 // CHECK-64-NEXT: ret void
5322 // CHECK-64: worker.exit:
5323 // CHECK-64-NEXT: ret void
5326 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined
5327 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
5328 // CHECK-64-NEXT: entry:
5329 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5330 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5331 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5332 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5333 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
5334 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
5335 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5336 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5337 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5338 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
5339 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5340 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5341 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
5342 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
5343 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5344 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5345 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
5346 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5347 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
5348 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
5349 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5350 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
5351 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5352 // CHECK-64: cond.true:
5353 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5354 // CHECK-64: cond.false:
5355 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5356 // CHECK-64-NEXT: br label [[COND_END]]
5357 // CHECK-64: cond.end:
5358 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5359 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5360 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5361 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5362 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5363 // CHECK-64: omp.inner.for.cond:
5364 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5365 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5366 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5367 // CHECK-64: omp.inner.for.body:
5368 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5369 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5370 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5371 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5372 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5373 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5374 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5375 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5376 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5377 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5378 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5379 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5380 // CHECK-64: omp.inner.for.inc:
5381 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5382 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5383 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5384 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5385 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5386 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5387 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5388 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5389 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5390 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5391 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5392 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5393 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5394 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5395 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5396 // CHECK-64: cond.true5:
5397 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5398 // CHECK-64: cond.false6:
5399 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5400 // CHECK-64-NEXT: br label [[COND_END7]]
5401 // CHECK-64: cond.end7:
5402 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5403 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5404 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5405 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5406 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5407 // CHECK-64: omp.inner.for.end:
5408 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5409 // CHECK-64: omp.loop.exit:
5410 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5411 // CHECK-64-NEXT: ret void
5414 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined
5415 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5416 // CHECK-64-NEXT: entry:
5417 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5418 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5419 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5420 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5421 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5422 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5423 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5424 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5425 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5426 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5427 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5428 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5429 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5430 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5431 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5432 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5433 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5434 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5435 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5436 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5437 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5438 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5439 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5440 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5441 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5442 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5443 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5444 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5445 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
5446 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
5447 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
5448 // CHECK-64: omp.dispatch.cond:
5449 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
5450 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
5451 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
5452 // CHECK-64: omp.dispatch.body:
5453 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5454 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
5455 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5456 // CHECK-64: omp.inner.for.cond:
5457 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359:![0-9]+]]
5458 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP359]]
5459 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
5460 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5461 // CHECK-64: omp.inner.for.body:
5462 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
5463 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
5464 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5465 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP359]]
5466 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5467 // CHECK-64: omp.body.continue:
5468 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5469 // CHECK-64: omp.inner.for.inc:
5470 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
5471 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
5472 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
5473 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP360:![0-9]+]]
5474 // CHECK-64: omp.inner.for.end:
5475 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
5476 // CHECK-64: omp.dispatch.inc:
5477 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
5478 // CHECK-64: omp.dispatch.end:
5479 // CHECK-64-NEXT: ret void
5482 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121
5483 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
5484 // CHECK-64-NEXT: entry:
5485 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
5486 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
5487 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
5488 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
5489 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_kernel_environment, ptr [[DYN_PTR]])
5490 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
5491 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
5492 // CHECK-64: user_code.entry:
5493 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
5494 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
5495 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
5496 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
5497 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
5498 // CHECK-64-NEXT: ret void
5499 // CHECK-64: worker.exit:
5500 // CHECK-64-NEXT: ret void
5503 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined
5504 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
5505 // CHECK-64-NEXT: entry:
5506 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5507 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5508 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5509 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5510 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
5511 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
5512 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5513 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5514 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5515 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
5516 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5517 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5518 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
5519 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
5520 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5521 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5522 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
5523 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5524 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
5525 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
5526 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5527 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
5528 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5529 // CHECK-64: cond.true:
5530 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5531 // CHECK-64: cond.false:
5532 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5533 // CHECK-64-NEXT: br label [[COND_END]]
5534 // CHECK-64: cond.end:
5535 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5536 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5537 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5538 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5539 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5540 // CHECK-64: omp.inner.for.cond:
5541 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5542 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5543 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5544 // CHECK-64: omp.inner.for.body:
5545 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5546 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5547 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5548 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5549 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5550 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5551 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5552 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5553 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5554 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5555 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5556 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5557 // CHECK-64: omp.inner.for.inc:
5558 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5559 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5560 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5561 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5562 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5563 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5564 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5565 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5566 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5567 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5568 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5569 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5570 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5571 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5572 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5573 // CHECK-64: cond.true5:
5574 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5575 // CHECK-64: cond.false6:
5576 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5577 // CHECK-64-NEXT: br label [[COND_END7]]
5578 // CHECK-64: cond.end7:
5579 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5580 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5581 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5582 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5583 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5584 // CHECK-64: omp.inner.for.end:
5585 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5586 // CHECK-64: omp.loop.exit:
5587 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5588 // CHECK-64-NEXT: ret void
5591 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined
5592 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5593 // CHECK-64-NEXT: entry:
5594 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5595 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5596 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5597 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5598 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5599 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5600 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5601 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5602 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5603 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5604 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5605 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5606 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5607 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5608 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5609 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5610 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5611 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5612 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5613 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5614 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5615 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5616 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5617 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5618 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5619 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5620 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5621 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5622 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
5623 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
5624 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
5625 // CHECK-64: omp.dispatch.cond:
5626 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
5627 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
5628 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
5629 // CHECK-64: omp.dispatch.body:
5630 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5631 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
5632 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5633 // CHECK-64: omp.inner.for.cond:
5634 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362:![0-9]+]]
5635 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP362]]
5636 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
5637 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5638 // CHECK-64: omp.inner.for.body:
5639 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
5640 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
5641 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5642 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP362]]
5643 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5644 // CHECK-64: omp.body.continue:
5645 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5646 // CHECK-64: omp.inner.for.inc:
5647 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
5648 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
5649 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
5650 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP363:![0-9]+]]
5651 // CHECK-64: omp.inner.for.end:
5652 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
5653 // CHECK-64: omp.dispatch.inc:
5654 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
5655 // CHECK-64: omp.dispatch.end:
5656 // CHECK-64-NEXT: ret void
5659 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125
5660 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
5661 // CHECK-64-NEXT: entry:
5662 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
5663 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
5664 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
5665 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
5666 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_kernel_environment, ptr [[DYN_PTR]])
5667 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
5668 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
5669 // CHECK-64: user_code.entry:
5670 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
5671 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
5672 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
5673 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
5674 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
5675 // CHECK-64-NEXT: ret void
5676 // CHECK-64: worker.exit:
5677 // CHECK-64-NEXT: ret void
5680 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined
5681 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
5682 // CHECK-64-NEXT: entry:
5683 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5684 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5685 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5686 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5687 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
5688 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
5689 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5690 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5691 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5692 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
5693 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5694 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5695 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
5696 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
5697 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5698 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5699 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
5700 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5701 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
5702 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
5703 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5704 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
5705 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5706 // CHECK-64: cond.true:
5707 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5708 // CHECK-64: cond.false:
5709 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5710 // CHECK-64-NEXT: br label [[COND_END]]
5711 // CHECK-64: cond.end:
5712 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5713 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5714 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5715 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5716 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5717 // CHECK-64: omp.inner.for.cond:
5718 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5719 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5720 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5721 // CHECK-64: omp.inner.for.body:
5722 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5723 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5724 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5725 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5726 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5727 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5728 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5729 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5730 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5731 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5732 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5733 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5734 // CHECK-64: omp.inner.for.inc:
5735 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5736 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5737 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5738 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5739 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5740 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5741 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5742 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5743 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5744 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5745 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5746 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5747 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5748 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5749 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5750 // CHECK-64: cond.true5:
5751 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5752 // CHECK-64: cond.false6:
5753 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5754 // CHECK-64-NEXT: br label [[COND_END7]]
5755 // CHECK-64: cond.end7:
5756 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5757 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5758 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5759 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5760 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5761 // CHECK-64: omp.inner.for.end:
5762 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5763 // CHECK-64: omp.loop.exit:
5764 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5765 // CHECK-64-NEXT: ret void
5768 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined
5769 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5770 // CHECK-64-NEXT: entry:
5771 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5772 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5773 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5774 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5775 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5776 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5777 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5778 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5779 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5780 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5781 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5782 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5783 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5784 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5785 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5786 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5787 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5788 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5789 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5790 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5791 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5792 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5793 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5794 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5795 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5796 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5797 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
5798 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
5799 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5800 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5801 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5802 // CHECK-64: omp.inner.for.cond:
5803 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5804 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
5805 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5806 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
5807 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5808 // CHECK-64: omp.inner.for.body:
5809 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5810 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
5811 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5812 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
5813 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5814 // CHECK-64: omp.body.continue:
5815 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5816 // CHECK-64: omp.inner.for.inc:
5817 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5818 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5819 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
5820 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
5821 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5822 // CHECK-64: omp.inner.for.end:
5823 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5824 // CHECK-64: omp.loop.exit:
5825 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
5826 // CHECK-64-NEXT: ret void
5829 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130
5830 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
5831 // CHECK-64-NEXT: entry:
5832 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
5833 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
5834 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
5835 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
5836 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_kernel_environment, ptr [[DYN_PTR]])
5837 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
5838 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
5839 // CHECK-64: user_code.entry:
5840 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
5841 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
5842 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
5843 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
5844 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
5845 // CHECK-64-NEXT: ret void
5846 // CHECK-64: worker.exit:
5847 // CHECK-64-NEXT: ret void
5850 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined
5851 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
5852 // CHECK-64-NEXT: entry:
5853 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5854 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5855 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5856 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5857 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
5858 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
5859 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5860 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5861 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5862 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
5863 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5864 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5865 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
5866 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
5867 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5868 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5869 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
5870 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5871 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
5872 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
5873 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5874 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
5875 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5876 // CHECK-64: cond.true:
5877 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5878 // CHECK-64: cond.false:
5879 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5880 // CHECK-64-NEXT: br label [[COND_END]]
5881 // CHECK-64: cond.end:
5882 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
5883 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
5884 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5885 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
5886 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5887 // CHECK-64: omp.inner.for.cond:
5888 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5889 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
5890 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5891 // CHECK-64: omp.inner.for.body:
5892 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5893 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
5894 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5895 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
5896 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
5897 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
5898 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
5899 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
5900 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
5901 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
5902 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
5903 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5904 // CHECK-64: omp.inner.for.inc:
5905 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5906 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5907 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
5908 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
5909 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5910 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5911 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
5912 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
5913 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5914 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
5915 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
5916 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
5917 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5918 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
5919 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
5920 // CHECK-64: cond.true5:
5921 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
5922 // CHECK-64: cond.false6:
5923 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
5924 // CHECK-64-NEXT: br label [[COND_END7]]
5925 // CHECK-64: cond.end7:
5926 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
5927 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
5928 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
5929 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
5930 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
5931 // CHECK-64: omp.inner.for.end:
5932 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
5933 // CHECK-64: omp.loop.exit:
5934 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
5935 // CHECK-64-NEXT: ret void
5938 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined
5939 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
5940 // CHECK-64-NEXT: entry:
5941 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
5942 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
5943 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
5944 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
5945 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
5946 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
5947 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
5948 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
5949 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
5950 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
5951 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
5952 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
5953 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
5954 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5955 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5956 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
5957 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
5958 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
5959 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
5960 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
5961 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
5962 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
5963 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
5964 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
5965 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
5966 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
5967 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
5968 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
5969 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5970 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
5971 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
5972 // CHECK-64: cond.true:
5973 // CHECK-64-NEXT: br label [[COND_END:%.*]]
5974 // CHECK-64: cond.false:
5975 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5976 // CHECK-64-NEXT: br label [[COND_END]]
5977 // CHECK-64: cond.end:
5978 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
5979 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
5980 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
5981 // CHECK-64-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
5982 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
5983 // CHECK-64: omp.inner.for.cond:
5984 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5985 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
5986 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
5987 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
5988 // CHECK-64: omp.inner.for.body:
5989 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5990 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
5991 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
5992 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
5993 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
5994 // CHECK-64: omp.body.continue:
5995 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
5996 // CHECK-64: omp.inner.for.inc:
5997 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
5998 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
5999 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
6000 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6001 // CHECK-64: omp.inner.for.end:
6002 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6003 // CHECK-64: omp.loop.exit:
6004 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
6005 // CHECK-64-NEXT: ret void
6008 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135
6009 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
6010 // CHECK-64-NEXT: entry:
6011 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6012 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
6013 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
6014 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6015 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_kernel_environment, ptr [[DYN_PTR]])
6016 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6017 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6018 // CHECK-64: user_code.entry:
6019 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6020 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
6021 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
6022 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
6023 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6024 // CHECK-64-NEXT: ret void
6025 // CHECK-64: worker.exit:
6026 // CHECK-64-NEXT: ret void
6029 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined
6030 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6031 // CHECK-64-NEXT: entry:
6032 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6033 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6034 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6035 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6036 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
6037 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
6038 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6039 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6040 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6041 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
6042 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6043 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6044 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
6045 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
6046 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6047 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6048 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
6049 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6050 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6051 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
6052 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6053 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6054 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6055 // CHECK-64: cond.true:
6056 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6057 // CHECK-64: cond.false:
6058 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6059 // CHECK-64-NEXT: br label [[COND_END]]
6060 // CHECK-64: cond.end:
6061 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6062 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
6063 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6064 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6065 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6066 // CHECK-64: omp.inner.for.cond:
6067 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6068 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
6069 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6070 // CHECK-64: omp.inner.for.body:
6071 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6072 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
6073 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6074 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
6075 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
6076 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
6077 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
6078 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
6079 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
6080 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
6081 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
6082 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6083 // CHECK-64: omp.inner.for.inc:
6084 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6085 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6086 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
6087 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
6088 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6089 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6090 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
6091 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
6092 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6093 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6094 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
6095 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
6096 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6097 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
6098 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
6099 // CHECK-64: cond.true5:
6100 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
6101 // CHECK-64: cond.false6:
6102 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6103 // CHECK-64-NEXT: br label [[COND_END7]]
6104 // CHECK-64: cond.end7:
6105 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
6106 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
6107 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6108 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
6109 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6110 // CHECK-64: omp.inner.for.end:
6111 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6112 // CHECK-64: omp.loop.exit:
6113 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
6114 // CHECK-64-NEXT: ret void
6117 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined
6118 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
6119 // CHECK-64-NEXT: entry:
6120 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6121 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6122 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
6123 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
6124 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6125 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6126 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6127 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6128 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6129 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6130 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6131 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6132 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6133 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6134 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6135 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6136 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6137 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6138 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
6139 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6140 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
6141 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
6142 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
6143 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6144 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6145 // CHECK-64-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6146 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
6147 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
6148 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6149 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6150 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6151 // CHECK-64: omp.inner.for.cond:
6152 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6153 // CHECK-64-NEXT: [[CONV2:%.*]] = sext i32 [[TMP5]] to i64
6154 // CHECK-64-NEXT: [[TMP6:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6155 // CHECK-64-NEXT: [[CMP:%.*]] = icmp ule i64 [[CONV2]], [[TMP6]]
6156 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6157 // CHECK-64: omp.inner.for.body:
6158 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6159 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
6160 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6161 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
6162 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6163 // CHECK-64: omp.body.continue:
6164 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6165 // CHECK-64: omp.inner.for.inc:
6166 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6167 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6168 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
6169 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
6170 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6171 // CHECK-64: omp.inner.for.end:
6172 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6173 // CHECK-64: omp.loop.exit:
6174 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
6175 // CHECK-64-NEXT: ret void
6178 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140
6179 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
6180 // CHECK-64-NEXT: entry:
6181 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6182 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
6183 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
6184 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6185 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_kernel_environment, ptr [[DYN_PTR]])
6186 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6187 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6188 // CHECK-64: user_code.entry:
6189 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6190 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
6191 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
6192 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
6193 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6194 // CHECK-64-NEXT: ret void
6195 // CHECK-64: worker.exit:
6196 // CHECK-64-NEXT: ret void
6199 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined
6200 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6201 // CHECK-64-NEXT: entry:
6202 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6203 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6204 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6205 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6206 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
6207 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
6208 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6209 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6210 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6211 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
6212 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6213 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6214 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
6215 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
6216 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6217 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6218 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
6219 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6220 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6221 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
6222 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6223 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6224 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6225 // CHECK-64: cond.true:
6226 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6227 // CHECK-64: cond.false:
6228 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6229 // CHECK-64-NEXT: br label [[COND_END]]
6230 // CHECK-64: cond.end:
6231 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6232 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
6233 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6234 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6235 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6236 // CHECK-64: omp.inner.for.cond:
6237 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6238 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
6239 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6240 // CHECK-64: omp.inner.for.body:
6241 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6242 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
6243 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6244 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
6245 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
6246 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
6247 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
6248 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
6249 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
6250 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
6251 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
6252 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6253 // CHECK-64: omp.inner.for.inc:
6254 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6255 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6256 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
6257 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
6258 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6259 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6260 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
6261 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
6262 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6263 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6264 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
6265 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
6266 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6267 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
6268 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
6269 // CHECK-64: cond.true5:
6270 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
6271 // CHECK-64: cond.false6:
6272 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6273 // CHECK-64-NEXT: br label [[COND_END7]]
6274 // CHECK-64: cond.end7:
6275 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
6276 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
6277 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6278 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
6279 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6280 // CHECK-64: omp.inner.for.end:
6281 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6282 // CHECK-64: omp.loop.exit:
6283 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
6284 // CHECK-64-NEXT: ret void
6287 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined
6288 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
6289 // CHECK-64-NEXT: entry:
6290 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6291 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6292 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
6293 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
6294 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6295 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6296 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6297 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6298 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6299 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6300 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6301 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6302 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6303 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6304 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6305 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6306 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6307 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6308 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
6309 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6310 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
6311 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
6312 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
6313 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6314 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6315 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6316 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6317 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6318 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
6319 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
6320 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
6321 // CHECK-64: omp.dispatch.cond:
6322 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
6323 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
6324 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
6325 // CHECK-64: omp.dispatch.body:
6326 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6327 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
6328 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6329 // CHECK-64: omp.inner.for.cond:
6330 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365:![0-9]+]]
6331 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP365]]
6332 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
6333 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6334 // CHECK-64: omp.inner.for.body:
6335 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
6336 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
6337 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6338 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP365]]
6339 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6340 // CHECK-64: omp.body.continue:
6341 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6342 // CHECK-64: omp.inner.for.inc:
6343 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
6344 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
6345 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
6346 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP366:![0-9]+]]
6347 // CHECK-64: omp.inner.for.end:
6348 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
6349 // CHECK-64: omp.dispatch.inc:
6350 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
6351 // CHECK-64: omp.dispatch.end:
6352 // CHECK-64-NEXT: ret void
6355 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145
6356 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
6357 // CHECK-64-NEXT: entry:
6358 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6359 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
6360 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
6361 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6362 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_kernel_environment, ptr [[DYN_PTR]])
6363 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6364 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6365 // CHECK-64: user_code.entry:
6366 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6367 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
6368 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
6369 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
6370 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6371 // CHECK-64-NEXT: ret void
6372 // CHECK-64: worker.exit:
6373 // CHECK-64-NEXT: ret void
6376 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined
6377 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6378 // CHECK-64-NEXT: entry:
6379 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6380 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6381 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6382 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6383 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
6384 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
6385 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6386 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6387 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6388 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
6389 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6390 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6391 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
6392 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
6393 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6394 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6395 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
6396 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6397 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6398 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
6399 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6400 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6401 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6402 // CHECK-64: cond.true:
6403 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6404 // CHECK-64: cond.false:
6405 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6406 // CHECK-64-NEXT: br label [[COND_END]]
6407 // CHECK-64: cond.end:
6408 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6409 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
6410 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6411 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6412 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6413 // CHECK-64: omp.inner.for.cond:
6414 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6415 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
6416 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6417 // CHECK-64: omp.inner.for.body:
6418 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6419 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
6420 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6421 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
6422 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
6423 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
6424 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
6425 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
6426 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
6427 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
6428 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
6429 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6430 // CHECK-64: omp.inner.for.inc:
6431 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6432 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6433 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
6434 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
6435 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6436 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6437 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
6438 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
6439 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6440 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6441 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
6442 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
6443 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6444 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
6445 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
6446 // CHECK-64: cond.true5:
6447 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
6448 // CHECK-64: cond.false6:
6449 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6450 // CHECK-64-NEXT: br label [[COND_END7]]
6451 // CHECK-64: cond.end7:
6452 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
6453 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
6454 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6455 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
6456 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6457 // CHECK-64: omp.inner.for.end:
6458 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6459 // CHECK-64: omp.loop.exit:
6460 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
6461 // CHECK-64-NEXT: ret void
6464 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined
6465 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
6466 // CHECK-64-NEXT: entry:
6467 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6468 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6469 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
6470 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
6471 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6472 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6473 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6474 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6475 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6476 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6477 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6478 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6479 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6480 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6481 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6482 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6483 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6484 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6485 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
6486 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6487 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
6488 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
6489 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
6490 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6491 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6492 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6493 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6494 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6495 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
6496 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
6497 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
6498 // CHECK-64: omp.dispatch.cond:
6499 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
6500 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
6501 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
6502 // CHECK-64: omp.dispatch.body:
6503 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6504 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
6505 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6506 // CHECK-64: omp.inner.for.cond:
6507 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368:![0-9]+]]
6508 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP368]]
6509 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
6510 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6511 // CHECK-64: omp.inner.for.body:
6512 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
6513 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
6514 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6515 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP368]]
6516 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6517 // CHECK-64: omp.body.continue:
6518 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6519 // CHECK-64: omp.inner.for.inc:
6520 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
6521 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
6522 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
6523 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP369:![0-9]+]]
6524 // CHECK-64: omp.inner.for.end:
6525 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
6526 // CHECK-64: omp.dispatch.inc:
6527 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
6528 // CHECK-64: omp.dispatch.end:
6529 // CHECK-64-NEXT: ret void
6532 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150
6533 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
6534 // CHECK-64-NEXT: entry:
6535 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6536 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
6537 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
6538 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6539 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_kernel_environment, ptr [[DYN_PTR]])
6540 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6541 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6542 // CHECK-64: user_code.entry:
6543 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6544 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
6545 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
6546 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
6547 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6548 // CHECK-64-NEXT: ret void
6549 // CHECK-64: worker.exit:
6550 // CHECK-64-NEXT: ret void
6553 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined
6554 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6555 // CHECK-64-NEXT: entry:
6556 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6557 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6558 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6559 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6560 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
6561 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
6562 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6563 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6564 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6565 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
6566 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6567 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6568 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
6569 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
6570 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6571 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6572 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
6573 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6574 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6575 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
6576 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6577 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6578 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6579 // CHECK-64: cond.true:
6580 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6581 // CHECK-64: cond.false:
6582 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6583 // CHECK-64-NEXT: br label [[COND_END]]
6584 // CHECK-64: cond.end:
6585 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6586 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
6587 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6588 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6589 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6590 // CHECK-64: omp.inner.for.cond:
6591 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6592 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
6593 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6594 // CHECK-64: omp.inner.for.body:
6595 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6596 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
6597 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6598 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
6599 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
6600 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
6601 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
6602 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
6603 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
6604 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
6605 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
6606 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6607 // CHECK-64: omp.inner.for.inc:
6608 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6609 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6610 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
6611 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
6612 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6613 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6614 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
6615 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
6616 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6617 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6618 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
6619 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
6620 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6621 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
6622 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
6623 // CHECK-64: cond.true5:
6624 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
6625 // CHECK-64: cond.false6:
6626 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6627 // CHECK-64-NEXT: br label [[COND_END7]]
6628 // CHECK-64: cond.end7:
6629 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
6630 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
6631 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6632 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
6633 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6634 // CHECK-64: omp.inner.for.end:
6635 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6636 // CHECK-64: omp.loop.exit:
6637 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
6638 // CHECK-64-NEXT: ret void
6641 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined
6642 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
6643 // CHECK-64-NEXT: entry:
6644 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6645 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6646 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
6647 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
6648 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6649 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6650 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6651 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6652 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6653 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6654 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6655 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6656 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6657 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6658 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6659 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6660 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6661 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6662 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
6663 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6664 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
6665 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
6666 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
6667 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6668 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6669 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6670 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6671 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6672 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
6673 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
6674 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
6675 // CHECK-64: omp.dispatch.cond:
6676 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
6677 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
6678 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
6679 // CHECK-64: omp.dispatch.body:
6680 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6681 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
6682 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6683 // CHECK-64: omp.inner.for.cond:
6684 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371:![0-9]+]]
6685 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP371]]
6686 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
6687 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6688 // CHECK-64: omp.inner.for.body:
6689 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
6690 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
6691 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6692 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP371]]
6693 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6694 // CHECK-64: omp.body.continue:
6695 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6696 // CHECK-64: omp.inner.for.inc:
6697 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
6698 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
6699 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
6700 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP372:![0-9]+]]
6701 // CHECK-64: omp.inner.for.end:
6702 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
6703 // CHECK-64: omp.dispatch.inc:
6704 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
6705 // CHECK-64: omp.dispatch.end:
6706 // CHECK-64-NEXT: ret void
6709 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155
6710 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
6711 // CHECK-64-NEXT: entry:
6712 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6713 // CHECK-64-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
6714 // CHECK-64-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
6715 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6716 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_kernel_environment, ptr [[DYN_PTR]])
6717 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6718 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6719 // CHECK-64: user_code.entry:
6720 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6721 // CHECK-64-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
6722 // CHECK-64-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
6723 // CHECK-64-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
6724 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6725 // CHECK-64-NEXT: ret void
6726 // CHECK-64: worker.exit:
6727 // CHECK-64-NEXT: ret void
6730 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined
6731 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6732 // CHECK-64-NEXT: entry:
6733 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6734 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6735 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6736 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6737 // CHECK-64-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
6738 // CHECK-64-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
6739 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6740 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6741 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6742 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 8
6743 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6744 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6745 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
6746 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
6747 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6748 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6749 // CHECK-64-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
6750 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6751 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6752 // CHECK-64-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
6753 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6754 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6755 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6756 // CHECK-64: cond.true:
6757 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6758 // CHECK-64: cond.false:
6759 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6760 // CHECK-64-NEXT: br label [[COND_END]]
6761 // CHECK-64: cond.end:
6762 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6763 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
6764 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6765 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6766 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6767 // CHECK-64: omp.inner.for.cond:
6768 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6769 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
6770 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6771 // CHECK-64: omp.inner.for.body:
6772 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6773 // CHECK-64-NEXT: [[TMP7:%.*]] = zext i32 [[TMP6]] to i64
6774 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6775 // CHECK-64-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
6776 // CHECK-64-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 0
6777 // CHECK-64-NEXT: [[TMP11:%.*]] = inttoptr i64 [[TMP7]] to ptr
6778 // CHECK-64-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8
6779 // CHECK-64-NEXT: [[TMP12:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i64 0, i64 1
6780 // CHECK-64-NEXT: [[TMP13:%.*]] = inttoptr i64 [[TMP9]] to ptr
6781 // CHECK-64-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
6782 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 2)
6783 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6784 // CHECK-64: omp.inner.for.inc:
6785 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6786 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6787 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
6788 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
6789 // CHECK-64-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6790 // CHECK-64-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6791 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
6792 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
6793 // CHECK-64-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6794 // CHECK-64-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6795 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
6796 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
6797 // CHECK-64-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6798 // CHECK-64-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
6799 // CHECK-64-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
6800 // CHECK-64: cond.true5:
6801 // CHECK-64-NEXT: br label [[COND_END7:%.*]]
6802 // CHECK-64: cond.false6:
6803 // CHECK-64-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
6804 // CHECK-64-NEXT: br label [[COND_END7]]
6805 // CHECK-64: cond.end7:
6806 // CHECK-64-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
6807 // CHECK-64-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
6808 // CHECK-64-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
6809 // CHECK-64-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
6810 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6811 // CHECK-64: omp.inner.for.end:
6812 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
6813 // CHECK-64: omp.loop.exit:
6814 // CHECK-64-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
6815 // CHECK-64-NEXT: ret void
6818 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined
6819 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
6820 // CHECK-64-NEXT: entry:
6821 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6822 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6823 // CHECK-64-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
6824 // CHECK-64-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
6825 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6826 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6827 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6828 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6829 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6830 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6831 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6832 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6833 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6834 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6835 // CHECK-64-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6836 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6837 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6838 // CHECK-64-NEXT: [[TMP0:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
6839 // CHECK-64-NEXT: [[CONV:%.*]] = trunc i64 [[TMP0]] to i32
6840 // CHECK-64-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
6841 // CHECK-64-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP1]] to i32
6842 // CHECK-64-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
6843 // CHECK-64-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
6844 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6845 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6846 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6847 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6848 // CHECK-64-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6849 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
6850 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
6851 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
6852 // CHECK-64: omp.dispatch.cond:
6853 // CHECK-64-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
6854 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
6855 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
6856 // CHECK-64: omp.dispatch.body:
6857 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6858 // CHECK-64-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
6859 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6860 // CHECK-64: omp.inner.for.cond:
6861 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374:![0-9]+]]
6862 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP374]]
6863 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
6864 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6865 // CHECK-64: omp.inner.for.body:
6866 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
6867 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
6868 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6869 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP374]]
6870 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6871 // CHECK-64: omp.body.continue:
6872 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6873 // CHECK-64: omp.inner.for.inc:
6874 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
6875 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], 1
6876 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
6877 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP375:![0-9]+]]
6878 // CHECK-64: omp.inner.for.end:
6879 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
6880 // CHECK-64: omp.dispatch.inc:
6881 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
6882 // CHECK-64: omp.dispatch.end:
6883 // CHECK-64-NEXT: ret void
6886 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160
6887 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8:[0-9]+]] {
6888 // CHECK-64-NEXT: entry:
6889 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6890 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
6891 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
6892 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6893 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
6894 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_kernel_environment, ptr [[DYN_PTR]])
6895 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6896 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6897 // CHECK-64: user_code.entry:
6898 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6899 // CHECK-64-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
6900 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
6901 // CHECK-64-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
6902 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
6903 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6904 // CHECK-64-NEXT: ret void
6905 // CHECK-64: worker.exit:
6906 // CHECK-64-NEXT: ret void
6909 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined
6910 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
6911 // CHECK-64-NEXT: entry:
6912 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
6913 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
6914 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
6915 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
6916 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
6917 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
6918 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
6919 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
6920 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
6921 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
6922 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
6923 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
6924 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
6925 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
6926 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
6927 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
6928 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
6929 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
6930 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
6931 // CHECK-64: omp.dispatch.cond:
6932 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6933 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
6934 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
6935 // CHECK-64: cond.true:
6936 // CHECK-64-NEXT: br label [[COND_END:%.*]]
6937 // CHECK-64: cond.false:
6938 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6939 // CHECK-64-NEXT: br label [[COND_END]]
6940 // CHECK-64: cond.end:
6941 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
6942 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
6943 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6944 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
6945 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6946 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6947 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
6948 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
6949 // CHECK-64: omp.dispatch.body:
6950 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
6951 // CHECK-64: omp.inner.for.cond:
6952 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6953 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6954 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
6955 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
6956 // CHECK-64: omp.inner.for.body:
6957 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6958 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
6959 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
6960 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
6961 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
6962 // CHECK-64: omp.body.continue:
6963 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
6964 // CHECK-64: omp.inner.for.inc:
6965 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
6966 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
6967 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
6968 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
6969 // CHECK-64: omp.inner.for.end:
6970 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
6971 // CHECK-64: omp.dispatch.inc:
6972 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
6973 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6974 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
6975 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
6976 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
6977 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
6978 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
6979 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
6980 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
6981 // CHECK-64: omp.dispatch.end:
6982 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
6983 // CHECK-64-NEXT: ret void
6986 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163
6987 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
6988 // CHECK-64-NEXT: entry:
6989 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
6990 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
6991 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
6992 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_kernel_environment, ptr [[DYN_PTR]])
6993 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
6994 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
6995 // CHECK-64: user_code.entry:
6996 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
6997 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
6998 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
6999 // CHECK-64-NEXT: ret void
7000 // CHECK-64: worker.exit:
7001 // CHECK-64-NEXT: ret void
7004 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined
7005 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7006 // CHECK-64-NEXT: entry:
7007 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7008 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7009 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7010 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7011 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7012 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7013 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7014 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7015 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7016 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7017 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7018 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7019 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7020 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7021 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7022 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7023 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7024 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
7025 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7026 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
7027 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
7028 // CHECK-64: cond.true:
7029 // CHECK-64-NEXT: br label [[COND_END:%.*]]
7030 // CHECK-64: cond.false:
7031 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7032 // CHECK-64-NEXT: br label [[COND_END]]
7033 // CHECK-64: cond.end:
7034 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
7035 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
7036 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7037 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
7038 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7039 // CHECK-64: omp.inner.for.cond:
7040 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7041 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7042 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
7043 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7044 // CHECK-64: omp.inner.for.body:
7045 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7046 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
7047 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7048 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
7049 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7050 // CHECK-64: omp.body.continue:
7051 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7052 // CHECK-64: omp.inner.for.inc:
7053 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7054 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
7055 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
7056 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
7057 // CHECK-64: omp.inner.for.end:
7058 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
7059 // CHECK-64: omp.loop.exit:
7060 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
7061 // CHECK-64-NEXT: ret void
7064 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166
7065 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7066 // CHECK-64-NEXT: entry:
7067 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7068 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7069 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7070 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_kernel_environment, ptr [[DYN_PTR]])
7071 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7072 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7073 // CHECK-64: user_code.entry:
7074 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7075 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7076 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7077 // CHECK-64-NEXT: ret void
7078 // CHECK-64: worker.exit:
7079 // CHECK-64-NEXT: ret void
7082 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined
7083 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7084 // CHECK-64-NEXT: entry:
7085 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7086 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7087 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7088 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7089 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7090 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7091 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7092 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7093 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7094 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7095 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7096 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7097 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7098 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7099 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7100 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7101 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7102 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
7103 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7104 // CHECK-64: omp.dispatch.cond:
7105 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7106 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
7107 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
7108 // CHECK-64: cond.true:
7109 // CHECK-64-NEXT: br label [[COND_END:%.*]]
7110 // CHECK-64: cond.false:
7111 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7112 // CHECK-64-NEXT: br label [[COND_END]]
7113 // CHECK-64: cond.end:
7114 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
7115 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
7116 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7117 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
7118 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7119 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7120 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
7121 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7122 // CHECK-64: omp.dispatch.body:
7123 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7124 // CHECK-64: omp.inner.for.cond:
7125 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7126 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7127 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
7128 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7129 // CHECK-64: omp.inner.for.body:
7130 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7131 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
7132 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7133 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
7134 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7135 // CHECK-64: omp.body.continue:
7136 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7137 // CHECK-64: omp.inner.for.inc:
7138 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7139 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
7140 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
7141 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
7142 // CHECK-64: omp.inner.for.end:
7143 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7144 // CHECK-64: omp.dispatch.inc:
7145 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7146 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7147 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
7148 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
7149 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7150 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7151 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
7152 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
7153 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7154 // CHECK-64: omp.dispatch.end:
7155 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
7156 // CHECK-64-NEXT: ret void
7159 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169
7160 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7161 // CHECK-64-NEXT: entry:
7162 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7163 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7164 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7165 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_kernel_environment, ptr [[DYN_PTR]])
7166 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7167 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7168 // CHECK-64: user_code.entry:
7169 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7170 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7171 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7172 // CHECK-64-NEXT: ret void
7173 // CHECK-64: worker.exit:
7174 // CHECK-64-NEXT: ret void
7177 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined
7178 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7179 // CHECK-64-NEXT: entry:
7180 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7181 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7182 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7183 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7184 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7185 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7186 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7187 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7188 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7189 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7190 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7191 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7192 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7193 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7194 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7195 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7196 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7197 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
7198 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7199 // CHECK-64: omp.dispatch.cond:
7200 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7201 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7202 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7203 // CHECK-64: omp.dispatch.body:
7204 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7205 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7206 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7207 // CHECK-64: omp.inner.for.cond:
7208 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377:![0-9]+]]
7209 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP377]]
7210 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7211 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7212 // CHECK-64: omp.inner.for.body:
7213 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
7214 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7215 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7216 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP377]]
7217 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7218 // CHECK-64: omp.body.continue:
7219 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7220 // CHECK-64: omp.inner.for.inc:
7221 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
7222 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7223 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
7224 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP378:![0-9]+]]
7225 // CHECK-64: omp.inner.for.end:
7226 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7227 // CHECK-64: omp.dispatch.inc:
7228 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7229 // CHECK-64: omp.dispatch.end:
7230 // CHECK-64-NEXT: ret void
7233 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172
7234 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7235 // CHECK-64-NEXT: entry:
7236 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7237 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7238 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7239 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_kernel_environment, ptr [[DYN_PTR]])
7240 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7241 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7242 // CHECK-64: user_code.entry:
7243 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7244 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7245 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7246 // CHECK-64-NEXT: ret void
7247 // CHECK-64: worker.exit:
7248 // CHECK-64-NEXT: ret void
7251 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined
7252 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7253 // CHECK-64-NEXT: entry:
7254 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7255 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7256 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7257 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7258 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7259 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7260 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7261 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7262 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7263 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7264 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7265 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7266 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7267 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7268 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7269 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7270 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7271 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
7272 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7273 // CHECK-64: omp.dispatch.cond:
7274 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7275 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7276 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7277 // CHECK-64: omp.dispatch.body:
7278 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7279 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7280 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7281 // CHECK-64: omp.inner.for.cond:
7282 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380:![0-9]+]]
7283 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP380]]
7284 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7285 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7286 // CHECK-64: omp.inner.for.body:
7287 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
7288 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7289 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7290 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP380]]
7291 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7292 // CHECK-64: omp.body.continue:
7293 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7294 // CHECK-64: omp.inner.for.inc:
7295 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
7296 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7297 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
7298 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP381:![0-9]+]]
7299 // CHECK-64: omp.inner.for.end:
7300 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7301 // CHECK-64: omp.dispatch.inc:
7302 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7303 // CHECK-64: omp.dispatch.end:
7304 // CHECK-64-NEXT: ret void
7307 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175
7308 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7309 // CHECK-64-NEXT: entry:
7310 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7311 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7312 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7313 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_kernel_environment, ptr [[DYN_PTR]])
7314 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7315 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7316 // CHECK-64: user_code.entry:
7317 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7318 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7319 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7320 // CHECK-64-NEXT: ret void
7321 // CHECK-64: worker.exit:
7322 // CHECK-64-NEXT: ret void
7325 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined
7326 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7327 // CHECK-64-NEXT: entry:
7328 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7329 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7330 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7331 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7332 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7333 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7334 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7335 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7336 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7337 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7338 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7339 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7340 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7341 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7342 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7343 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7344 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7345 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
7346 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7347 // CHECK-64: omp.dispatch.cond:
7348 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7349 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7350 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7351 // CHECK-64: omp.dispatch.body:
7352 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7353 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7354 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7355 // CHECK-64: omp.inner.for.cond:
7356 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383:![0-9]+]]
7357 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP383]]
7358 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7359 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7360 // CHECK-64: omp.inner.for.body:
7361 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
7362 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7363 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7364 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP383]]
7365 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7366 // CHECK-64: omp.body.continue:
7367 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7368 // CHECK-64: omp.inner.for.inc:
7369 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
7370 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7371 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
7372 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP384:![0-9]+]]
7373 // CHECK-64: omp.inner.for.end:
7374 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7375 // CHECK-64: omp.dispatch.inc:
7376 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7377 // CHECK-64: omp.dispatch.end:
7378 // CHECK-64-NEXT: ret void
7381 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178
7382 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7383 // CHECK-64-NEXT: entry:
7384 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7385 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7386 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7387 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_kernel_environment, ptr [[DYN_PTR]])
7388 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7389 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7390 // CHECK-64: user_code.entry:
7391 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7392 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7393 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7394 // CHECK-64-NEXT: ret void
7395 // CHECK-64: worker.exit:
7396 // CHECK-64-NEXT: ret void
7399 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined
7400 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7401 // CHECK-64-NEXT: entry:
7402 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7403 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7404 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7405 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7406 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7407 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7408 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7409 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7410 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7411 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7412 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7413 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7414 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7415 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7416 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7417 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7418 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7419 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
7420 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7421 // CHECK-64: omp.dispatch.cond:
7422 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7423 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7424 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7425 // CHECK-64: omp.dispatch.body:
7426 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7427 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7428 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7429 // CHECK-64: omp.inner.for.cond:
7430 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386:![0-9]+]]
7431 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP386]]
7432 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7433 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7434 // CHECK-64: omp.inner.for.body:
7435 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
7436 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7437 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7438 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP386]]
7439 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7440 // CHECK-64: omp.body.continue:
7441 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7442 // CHECK-64: omp.inner.for.inc:
7443 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
7444 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7445 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
7446 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP387:![0-9]+]]
7447 // CHECK-64: omp.inner.for.end:
7448 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7449 // CHECK-64: omp.dispatch.inc:
7450 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7451 // CHECK-64: omp.dispatch.end:
7452 // CHECK-64-NEXT: ret void
7455 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181
7456 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8]] {
7457 // CHECK-64-NEXT: entry:
7458 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7459 // CHECK-64-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
7460 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7461 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7462 // CHECK-64-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
7463 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_kernel_environment, ptr [[DYN_PTR]])
7464 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7465 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7466 // CHECK-64: user_code.entry:
7467 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7468 // CHECK-64-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
7469 // CHECK-64-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
7470 // CHECK-64-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
7471 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7472 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7473 // CHECK-64-NEXT: ret void
7474 // CHECK-64: worker.exit:
7475 // CHECK-64-NEXT: ret void
7478 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined
7479 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7480 // CHECK-64-NEXT: entry:
7481 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7482 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7483 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7484 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7485 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7486 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7487 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7488 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7489 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7490 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7491 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7492 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7493 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7494 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7495 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7496 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7497 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7498 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
7499 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7500 // CHECK-64: omp.dispatch.cond:
7501 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7502 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
7503 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
7504 // CHECK-64: cond.true:
7505 // CHECK-64-NEXT: br label [[COND_END:%.*]]
7506 // CHECK-64: cond.false:
7507 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7508 // CHECK-64-NEXT: br label [[COND_END]]
7509 // CHECK-64: cond.end:
7510 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
7511 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
7512 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7513 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
7514 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7515 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7516 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
7517 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7518 // CHECK-64: omp.dispatch.body:
7519 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7520 // CHECK-64: omp.inner.for.cond:
7521 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389:![0-9]+]]
7522 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP389]]
7523 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
7524 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7525 // CHECK-64: omp.inner.for.body:
7526 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
7527 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
7528 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7529 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP389]]
7530 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7531 // CHECK-64: omp.body.continue:
7532 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7533 // CHECK-64: omp.inner.for.inc:
7534 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
7535 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
7536 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
7537 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP390:![0-9]+]]
7538 // CHECK-64: omp.inner.for.end:
7539 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7540 // CHECK-64: omp.dispatch.inc:
7541 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7542 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7543 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
7544 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
7545 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7546 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7547 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
7548 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
7549 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7550 // CHECK-64: omp.dispatch.end:
7551 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
7552 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7553 // CHECK-64-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
7554 // CHECK-64-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7555 // CHECK-64: .omp.final.then:
7556 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7557 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7558 // CHECK-64: .omp.final.done:
7559 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4:[0-9]+]], i32 [[TMP1]])
7560 // CHECK-64-NEXT: ret void
7563 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185
7564 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7565 // CHECK-64-NEXT: entry:
7566 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7567 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7568 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7569 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_kernel_environment, ptr [[DYN_PTR]])
7570 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7571 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7572 // CHECK-64: user_code.entry:
7573 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7574 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7575 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7576 // CHECK-64-NEXT: ret void
7577 // CHECK-64: worker.exit:
7578 // CHECK-64-NEXT: ret void
7581 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined
7582 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7583 // CHECK-64-NEXT: entry:
7584 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7585 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7586 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7587 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7588 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7589 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7590 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7591 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7592 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7593 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7594 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7595 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7596 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7597 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7598 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7599 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7600 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7601 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
7602 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7603 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
7604 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
7605 // CHECK-64: cond.true:
7606 // CHECK-64-NEXT: br label [[COND_END:%.*]]
7607 // CHECK-64: cond.false:
7608 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7609 // CHECK-64-NEXT: br label [[COND_END]]
7610 // CHECK-64: cond.end:
7611 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
7612 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
7613 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7614 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
7615 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7616 // CHECK-64: omp.inner.for.cond:
7617 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392:![0-9]+]]
7618 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP392]]
7619 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
7620 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7621 // CHECK-64: omp.inner.for.body:
7622 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
7623 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
7624 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7625 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP392]]
7626 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7627 // CHECK-64: omp.body.continue:
7628 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7629 // CHECK-64: omp.inner.for.inc:
7630 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
7631 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
7632 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
7633 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP393:![0-9]+]]
7634 // CHECK-64: omp.inner.for.end:
7635 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
7636 // CHECK-64: omp.loop.exit:
7637 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
7638 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7639 // CHECK-64-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
7640 // CHECK-64-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7641 // CHECK-64: .omp.final.then:
7642 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7643 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7644 // CHECK-64: .omp.final.done:
7645 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
7646 // CHECK-64-NEXT: ret void
7649 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189
7650 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7651 // CHECK-64-NEXT: entry:
7652 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7653 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7654 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7655 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_kernel_environment, ptr [[DYN_PTR]])
7656 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7657 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7658 // CHECK-64: user_code.entry:
7659 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7660 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7661 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7662 // CHECK-64-NEXT: ret void
7663 // CHECK-64: worker.exit:
7664 // CHECK-64-NEXT: ret void
7667 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined
7668 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7669 // CHECK-64-NEXT: entry:
7670 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7671 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7672 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7673 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7674 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7675 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7676 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7677 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7678 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7679 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7680 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7681 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7682 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7683 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7684 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7685 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7686 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7687 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
7688 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7689 // CHECK-64: omp.dispatch.cond:
7690 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7691 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
7692 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
7693 // CHECK-64: cond.true:
7694 // CHECK-64-NEXT: br label [[COND_END:%.*]]
7695 // CHECK-64: cond.false:
7696 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7697 // CHECK-64-NEXT: br label [[COND_END]]
7698 // CHECK-64: cond.end:
7699 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
7700 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
7701 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7702 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
7703 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
7704 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7705 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
7706 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7707 // CHECK-64: omp.dispatch.body:
7708 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7709 // CHECK-64: omp.inner.for.cond:
7710 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395:![0-9]+]]
7711 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP395]]
7712 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
7713 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7714 // CHECK-64: omp.inner.for.body:
7715 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
7716 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
7717 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7718 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP395]]
7719 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7720 // CHECK-64: omp.body.continue:
7721 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7722 // CHECK-64: omp.inner.for.inc:
7723 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
7724 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
7725 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
7726 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP396:![0-9]+]]
7727 // CHECK-64: omp.inner.for.end:
7728 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7729 // CHECK-64: omp.dispatch.inc:
7730 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7731 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7732 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
7733 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
7734 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
7735 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
7736 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
7737 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
7738 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7739 // CHECK-64: omp.dispatch.end:
7740 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
7741 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7742 // CHECK-64-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
7743 // CHECK-64-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7744 // CHECK-64: .omp.final.then:
7745 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7746 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7747 // CHECK-64: .omp.final.done:
7748 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
7749 // CHECK-64-NEXT: ret void
7752 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193
7753 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7754 // CHECK-64-NEXT: entry:
7755 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7756 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7757 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7758 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_kernel_environment, ptr [[DYN_PTR]])
7759 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7760 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7761 // CHECK-64: user_code.entry:
7762 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7763 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7764 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7765 // CHECK-64-NEXT: ret void
7766 // CHECK-64: worker.exit:
7767 // CHECK-64-NEXT: ret void
7770 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined
7771 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7772 // CHECK-64-NEXT: entry:
7773 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7774 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7775 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7776 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7777 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7778 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7779 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7780 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7781 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7782 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7783 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7784 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7785 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7786 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7787 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7788 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7789 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7790 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
7791 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7792 // CHECK-64: omp.dispatch.cond:
7793 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7794 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7795 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7796 // CHECK-64: omp.dispatch.body:
7797 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7798 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7799 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7800 // CHECK-64: omp.inner.for.cond:
7801 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398:![0-9]+]]
7802 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP398]]
7803 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7804 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7805 // CHECK-64: omp.inner.for.body:
7806 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
7807 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7808 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7809 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP398]]
7810 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7811 // CHECK-64: omp.body.continue:
7812 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7813 // CHECK-64: omp.inner.for.inc:
7814 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
7815 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7816 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
7817 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP399:![0-9]+]]
7818 // CHECK-64: omp.inner.for.end:
7819 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7820 // CHECK-64: omp.dispatch.inc:
7821 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7822 // CHECK-64: omp.dispatch.end:
7823 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7824 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
7825 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7826 // CHECK-64: .omp.final.then:
7827 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7828 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7829 // CHECK-64: .omp.final.done:
7830 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
7831 // CHECK-64-NEXT: ret void
7834 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197
7835 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7836 // CHECK-64-NEXT: entry:
7837 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7838 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7839 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7840 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_kernel_environment, ptr [[DYN_PTR]])
7841 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7842 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7843 // CHECK-64: user_code.entry:
7844 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7845 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7846 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7847 // CHECK-64-NEXT: ret void
7848 // CHECK-64: worker.exit:
7849 // CHECK-64-NEXT: ret void
7852 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined
7853 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7854 // CHECK-64-NEXT: entry:
7855 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7856 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7857 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7858 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7859 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7860 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7861 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7862 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7863 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7864 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7865 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7866 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7867 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7868 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7869 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7870 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7871 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7872 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
7873 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7874 // CHECK-64: omp.dispatch.cond:
7875 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7876 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7877 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7878 // CHECK-64: omp.dispatch.body:
7879 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7880 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7881 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7882 // CHECK-64: omp.inner.for.cond:
7883 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401:![0-9]+]]
7884 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP401]]
7885 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7886 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7887 // CHECK-64: omp.inner.for.body:
7888 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
7889 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7890 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7891 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP401]]
7892 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7893 // CHECK-64: omp.body.continue:
7894 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7895 // CHECK-64: omp.inner.for.inc:
7896 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
7897 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7898 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
7899 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP402:![0-9]+]]
7900 // CHECK-64: omp.inner.for.end:
7901 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7902 // CHECK-64: omp.dispatch.inc:
7903 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7904 // CHECK-64: omp.dispatch.end:
7905 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7906 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
7907 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7908 // CHECK-64: .omp.final.then:
7909 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7910 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7911 // CHECK-64: .omp.final.done:
7912 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
7913 // CHECK-64-NEXT: ret void
7916 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201
7917 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
7918 // CHECK-64-NEXT: entry:
7919 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
7920 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
7921 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
7922 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_kernel_environment, ptr [[DYN_PTR]])
7923 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
7924 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
7925 // CHECK-64: user_code.entry:
7926 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
7927 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
7928 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
7929 // CHECK-64-NEXT: ret void
7930 // CHECK-64: worker.exit:
7931 // CHECK-64-NEXT: ret void
7934 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined
7935 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
7936 // CHECK-64-NEXT: entry:
7937 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
7938 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
7939 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
7940 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
7941 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
7942 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
7943 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
7944 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
7945 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
7946 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
7947 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
7948 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
7949 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
7950 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
7951 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
7952 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
7953 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
7954 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
7955 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
7956 // CHECK-64: omp.dispatch.cond:
7957 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
7958 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
7959 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
7960 // CHECK-64: omp.dispatch.body:
7961 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
7962 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
7963 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
7964 // CHECK-64: omp.inner.for.cond:
7965 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404:![0-9]+]]
7966 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP404]]
7967 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
7968 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
7969 // CHECK-64: omp.inner.for.body:
7970 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
7971 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
7972 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
7973 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP404]]
7974 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
7975 // CHECK-64: omp.body.continue:
7976 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
7977 // CHECK-64: omp.inner.for.inc:
7978 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
7979 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
7980 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
7981 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP405:![0-9]+]]
7982 // CHECK-64: omp.inner.for.end:
7983 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
7984 // CHECK-64: omp.dispatch.inc:
7985 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
7986 // CHECK-64: omp.dispatch.end:
7987 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
7988 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
7989 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
7990 // CHECK-64: .omp.final.then:
7991 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
7992 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
7993 // CHECK-64: .omp.final.done:
7994 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
7995 // CHECK-64-NEXT: ret void
7998 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205
7999 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
8000 // CHECK-64-NEXT: entry:
8001 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8002 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8003 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8004 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_kernel_environment, ptr [[DYN_PTR]])
8005 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8006 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8007 // CHECK-64: user_code.entry:
8008 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8009 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8010 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8011 // CHECK-64-NEXT: ret void
8012 // CHECK-64: worker.exit:
8013 // CHECK-64-NEXT: ret void
8016 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined
8017 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8018 // CHECK-64-NEXT: entry:
8019 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8020 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8021 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8022 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8023 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8024 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8025 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8026 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8027 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8028 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8029 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8030 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8031 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8032 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8033 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8034 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8035 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8036 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
8037 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8038 // CHECK-64: omp.dispatch.cond:
8039 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8040 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8041 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8042 // CHECK-64: omp.dispatch.body:
8043 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8044 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8045 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8046 // CHECK-64: omp.inner.for.cond:
8047 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407:![0-9]+]]
8048 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP407]]
8049 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8050 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8051 // CHECK-64: omp.inner.for.body:
8052 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
8053 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8054 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8055 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP407]]
8056 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8057 // CHECK-64: omp.body.continue:
8058 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8059 // CHECK-64: omp.inner.for.inc:
8060 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
8061 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8062 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
8063 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP408:![0-9]+]]
8064 // CHECK-64: omp.inner.for.end:
8065 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8066 // CHECK-64: omp.dispatch.inc:
8067 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8068 // CHECK-64: omp.dispatch.end:
8069 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8070 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8071 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8072 // CHECK-64: .omp.final.then:
8073 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8074 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8075 // CHECK-64: .omp.final.done:
8076 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8077 // CHECK-64-NEXT: ret void
8080 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209
8081 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10:[0-9]+]] {
8082 // CHECK-64-NEXT: entry:
8083 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8084 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8085 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8086 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_kernel_environment, ptr [[DYN_PTR]])
8087 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8088 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8089 // CHECK-64: user_code.entry:
8090 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8091 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8092 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8093 // CHECK-64-NEXT: ret void
8094 // CHECK-64: worker.exit:
8095 // CHECK-64-NEXT: ret void
8098 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined
8099 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8100 // CHECK-64-NEXT: entry:
8101 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8102 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8103 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8104 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8105 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8106 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8107 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8108 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8109 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8110 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8111 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8112 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8113 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8114 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8115 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8116 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8117 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8118 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 65, i32 0, i32 9, i32 1, i32 1)
8119 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8120 // CHECK-64: omp.dispatch.cond:
8121 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8122 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8123 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8124 // CHECK-64: omp.dispatch.body:
8125 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8126 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8127 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8128 // CHECK-64: omp.inner.for.cond:
8129 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410:![0-9]+]]
8130 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP410]]
8131 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8132 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8133 // CHECK-64: omp.inner.for.body:
8134 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
8135 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8136 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8137 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP410]]
8138 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8139 // CHECK-64: omp.body.continue:
8140 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8141 // CHECK-64: omp.inner.for.inc:
8142 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
8143 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8144 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
8145 // CHECK-64-NEXT: call void @__kmpc_dispatch_fini_4(ptr @[[GLOB1]], i32 [[TMP1]]), !llvm.access.group [[ACC_GRP410]]
8146 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP411:![0-9]+]]
8147 // CHECK-64: omp.inner.for.end:
8148 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8149 // CHECK-64: omp.dispatch.inc:
8150 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8151 // CHECK-64: omp.dispatch.end:
8152 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8153 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8154 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8155 // CHECK-64: .omp.final.then:
8156 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8157 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8158 // CHECK-64: .omp.final.done:
8159 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8160 // CHECK-64-NEXT: ret void
8163 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214
8164 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8165 // CHECK-64-NEXT: entry:
8166 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8167 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8168 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8169 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_kernel_environment, ptr [[DYN_PTR]])
8170 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8171 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8172 // CHECK-64: user_code.entry:
8173 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8174 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8175 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8176 // CHECK-64-NEXT: ret void
8177 // CHECK-64: worker.exit:
8178 // CHECK-64-NEXT: ret void
8181 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined
8182 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8183 // CHECK-64-NEXT: entry:
8184 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8185 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8186 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8187 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8188 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8189 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8190 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8191 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8192 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8193 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8194 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8195 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8196 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8197 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8198 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8199 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8200 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8201 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
8202 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8203 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
8204 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
8205 // CHECK-64: cond.true:
8206 // CHECK-64-NEXT: br label [[COND_END:%.*]]
8207 // CHECK-64: cond.false:
8208 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8209 // CHECK-64-NEXT: br label [[COND_END]]
8210 // CHECK-64: cond.end:
8211 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
8212 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
8213 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8214 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
8215 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8216 // CHECK-64: omp.inner.for.cond:
8217 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413:![0-9]+]]
8218 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP413]]
8219 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
8220 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8221 // CHECK-64: omp.inner.for.body:
8222 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
8223 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
8224 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8225 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP413]]
8226 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8227 // CHECK-64: omp.body.continue:
8228 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8229 // CHECK-64: omp.inner.for.inc:
8230 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
8231 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
8232 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
8233 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP414:![0-9]+]]
8234 // CHECK-64: omp.inner.for.end:
8235 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
8236 // CHECK-64: omp.loop.exit:
8237 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
8238 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8239 // CHECK-64-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
8240 // CHECK-64-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8241 // CHECK-64: .omp.final.then:
8242 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8243 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8244 // CHECK-64: .omp.final.done:
8245 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8246 // CHECK-64-NEXT: ret void
8249 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219
8250 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8251 // CHECK-64-NEXT: entry:
8252 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8253 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8254 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8255 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_kernel_environment, ptr [[DYN_PTR]])
8256 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8257 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8258 // CHECK-64: user_code.entry:
8259 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8260 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8261 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8262 // CHECK-64-NEXT: ret void
8263 // CHECK-64: worker.exit:
8264 // CHECK-64-NEXT: ret void
8267 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined
8268 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8269 // CHECK-64-NEXT: entry:
8270 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8271 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8272 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8273 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8274 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8275 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8276 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8277 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8278 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8279 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8280 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8281 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8282 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8283 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8284 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8285 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8286 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8287 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
8288 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8289 // CHECK-64: omp.dispatch.cond:
8290 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8291 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
8292 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
8293 // CHECK-64: cond.true:
8294 // CHECK-64-NEXT: br label [[COND_END:%.*]]
8295 // CHECK-64: cond.false:
8296 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8297 // CHECK-64-NEXT: br label [[COND_END]]
8298 // CHECK-64: cond.end:
8299 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
8300 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
8301 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8302 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
8303 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8304 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8305 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
8306 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8307 // CHECK-64: omp.dispatch.body:
8308 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8309 // CHECK-64: omp.inner.for.cond:
8310 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416:![0-9]+]]
8311 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP416]]
8312 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
8313 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8314 // CHECK-64: omp.inner.for.body:
8315 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
8316 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
8317 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8318 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP416]]
8319 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8320 // CHECK-64: omp.body.continue:
8321 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8322 // CHECK-64: omp.inner.for.inc:
8323 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
8324 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
8325 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
8326 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP417:![0-9]+]]
8327 // CHECK-64: omp.inner.for.end:
8328 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8329 // CHECK-64: omp.dispatch.inc:
8330 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8331 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8332 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
8333 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
8334 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8335 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8336 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
8337 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
8338 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8339 // CHECK-64: omp.dispatch.end:
8340 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
8341 // CHECK-64-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8342 // CHECK-64-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
8343 // CHECK-64-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8344 // CHECK-64: .omp.final.then:
8345 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8346 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8347 // CHECK-64: .omp.final.done:
8348 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8349 // CHECK-64-NEXT: ret void
8352 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224
8353 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8354 // CHECK-64-NEXT: entry:
8355 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8356 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8357 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8358 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_kernel_environment, ptr [[DYN_PTR]])
8359 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8360 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8361 // CHECK-64: user_code.entry:
8362 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8363 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8364 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8365 // CHECK-64-NEXT: ret void
8366 // CHECK-64: worker.exit:
8367 // CHECK-64-NEXT: ret void
8370 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined
8371 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8372 // CHECK-64-NEXT: entry:
8373 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8374 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8375 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8376 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8377 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8378 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8379 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8380 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8381 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8382 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8383 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8384 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8385 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8386 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8387 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8388 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8389 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8390 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
8391 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8392 // CHECK-64: omp.dispatch.cond:
8393 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8394 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8395 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8396 // CHECK-64: omp.dispatch.body:
8397 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8398 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8399 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8400 // CHECK-64: omp.inner.for.cond:
8401 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419:![0-9]+]]
8402 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP419]]
8403 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8404 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8405 // CHECK-64: omp.inner.for.body:
8406 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
8407 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8408 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8409 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP419]]
8410 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8411 // CHECK-64: omp.body.continue:
8412 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8413 // CHECK-64: omp.inner.for.inc:
8414 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
8415 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8416 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
8417 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP420:![0-9]+]]
8418 // CHECK-64: omp.inner.for.end:
8419 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8420 // CHECK-64: omp.dispatch.inc:
8421 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8422 // CHECK-64: omp.dispatch.end:
8423 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8424 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8425 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8426 // CHECK-64: .omp.final.then:
8427 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8428 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8429 // CHECK-64: .omp.final.done:
8430 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8431 // CHECK-64-NEXT: ret void
8434 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229
8435 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8436 // CHECK-64-NEXT: entry:
8437 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8438 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8439 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8440 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_kernel_environment, ptr [[DYN_PTR]])
8441 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8442 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8443 // CHECK-64: user_code.entry:
8444 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8445 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8446 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8447 // CHECK-64-NEXT: ret void
8448 // CHECK-64: worker.exit:
8449 // CHECK-64-NEXT: ret void
8452 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined
8453 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8454 // CHECK-64-NEXT: entry:
8455 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8456 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8457 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8458 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8459 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8460 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8461 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8462 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8463 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8464 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8465 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8466 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8467 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8468 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8469 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8470 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8471 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8472 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
8473 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8474 // CHECK-64: omp.dispatch.cond:
8475 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8476 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8477 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8478 // CHECK-64: omp.dispatch.body:
8479 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8480 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8481 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8482 // CHECK-64: omp.inner.for.cond:
8483 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422:![0-9]+]]
8484 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP422]]
8485 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8486 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8487 // CHECK-64: omp.inner.for.body:
8488 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
8489 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8490 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8491 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP422]]
8492 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8493 // CHECK-64: omp.body.continue:
8494 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8495 // CHECK-64: omp.inner.for.inc:
8496 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
8497 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8498 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
8499 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP423:![0-9]+]]
8500 // CHECK-64: omp.inner.for.end:
8501 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8502 // CHECK-64: omp.dispatch.inc:
8503 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8504 // CHECK-64: omp.dispatch.end:
8505 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8506 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8507 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8508 // CHECK-64: .omp.final.then:
8509 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8510 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8511 // CHECK-64: .omp.final.done:
8512 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8513 // CHECK-64-NEXT: ret void
8516 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234
8517 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8518 // CHECK-64-NEXT: entry:
8519 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8520 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8521 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8522 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_kernel_environment, ptr [[DYN_PTR]])
8523 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8524 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8525 // CHECK-64: user_code.entry:
8526 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8527 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8528 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8529 // CHECK-64-NEXT: ret void
8530 // CHECK-64: worker.exit:
8531 // CHECK-64-NEXT: ret void
8534 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined
8535 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8536 // CHECK-64-NEXT: entry:
8537 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8538 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8539 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8540 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8541 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8542 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8543 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8544 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8545 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8546 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8547 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8548 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8549 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8550 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8551 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8552 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8553 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8554 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
8555 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8556 // CHECK-64: omp.dispatch.cond:
8557 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8558 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8559 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8560 // CHECK-64: omp.dispatch.body:
8561 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8562 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8563 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8564 // CHECK-64: omp.inner.for.cond:
8565 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425:![0-9]+]]
8566 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP425]]
8567 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8568 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8569 // CHECK-64: omp.inner.for.body:
8570 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
8571 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8572 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8573 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP425]]
8574 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8575 // CHECK-64: omp.body.continue:
8576 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8577 // CHECK-64: omp.inner.for.inc:
8578 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
8579 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8580 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
8581 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP426:![0-9]+]]
8582 // CHECK-64: omp.inner.for.end:
8583 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8584 // CHECK-64: omp.dispatch.inc:
8585 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8586 // CHECK-64: omp.dispatch.end:
8587 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8588 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8589 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8590 // CHECK-64: .omp.final.then:
8591 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8592 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8593 // CHECK-64: .omp.final.done:
8594 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8595 // CHECK-64-NEXT: ret void
8598 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239
8599 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
8600 // CHECK-64-NEXT: entry:
8601 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8602 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8603 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8604 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_kernel_environment, ptr [[DYN_PTR]])
8605 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8606 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8607 // CHECK-64: user_code.entry:
8608 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8609 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8610 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8611 // CHECK-64-NEXT: ret void
8612 // CHECK-64: worker.exit:
8613 // CHECK-64-NEXT: ret void
8616 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined
8617 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8618 // CHECK-64-NEXT: entry:
8619 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8620 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8621 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8622 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8623 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8624 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8625 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8626 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8627 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8628 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8629 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8630 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8631 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8632 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8633 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8634 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8635 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8636 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
8637 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8638 // CHECK-64: omp.dispatch.cond:
8639 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8640 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8641 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8642 // CHECK-64: omp.dispatch.body:
8643 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8644 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8645 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8646 // CHECK-64: omp.inner.for.cond:
8647 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428:![0-9]+]]
8648 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP428]]
8649 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
8650 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8651 // CHECK-64: omp.inner.for.body:
8652 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
8653 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
8654 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8655 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP428]]
8656 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8657 // CHECK-64: omp.body.continue:
8658 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8659 // CHECK-64: omp.inner.for.inc:
8660 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
8661 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
8662 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
8663 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP429:![0-9]+]]
8664 // CHECK-64: omp.inner.for.end:
8665 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8666 // CHECK-64: omp.dispatch.inc:
8667 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8668 // CHECK-64: omp.dispatch.end:
8669 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
8670 // CHECK-64-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
8671 // CHECK-64-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
8672 // CHECK-64: .omp.final.then:
8673 // CHECK-64-NEXT: store i32 10, ptr [[I]], align 4
8674 // CHECK-64-NEXT: br label [[DOTOMP_FINAL_DONE]]
8675 // CHECK-64: .omp.final.done:
8676 // CHECK-64-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
8677 // CHECK-64-NEXT: ret void
8680 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244
8681 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
8682 // CHECK-64-NEXT: entry:
8683 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8684 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8685 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8686 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_kernel_environment, ptr [[DYN_PTR]])
8687 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8688 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8689 // CHECK-64: user_code.entry:
8690 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8691 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8692 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8693 // CHECK-64-NEXT: ret void
8694 // CHECK-64: worker.exit:
8695 // CHECK-64-NEXT: ret void
8698 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined
8699 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8700 // CHECK-64-NEXT: entry:
8701 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8702 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8703 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8704 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8705 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8706 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8707 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8708 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8709 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8710 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8711 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8712 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8713 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8714 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8715 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8716 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8717 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8718 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
8719 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8720 // CHECK-64: omp.dispatch.cond:
8721 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8722 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
8723 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
8724 // CHECK-64: cond.true:
8725 // CHECK-64-NEXT: br label [[COND_END:%.*]]
8726 // CHECK-64: cond.false:
8727 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8728 // CHECK-64-NEXT: br label [[COND_END]]
8729 // CHECK-64: cond.end:
8730 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
8731 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
8732 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8733 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
8734 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8735 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8736 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
8737 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8738 // CHECK-64: omp.dispatch.body:
8739 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8740 // CHECK-64: omp.inner.for.cond:
8741 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8742 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8743 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
8744 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8745 // CHECK-64: omp.inner.for.body:
8746 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8747 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
8748 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8749 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
8750 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8751 // CHECK-64: omp.body.continue:
8752 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8753 // CHECK-64: omp.inner.for.inc:
8754 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8755 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
8756 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
8757 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
8758 // CHECK-64: omp.inner.for.end:
8759 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8760 // CHECK-64: omp.dispatch.inc:
8761 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8762 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8763 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
8764 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
8765 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8766 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8767 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
8768 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
8769 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8770 // CHECK-64: omp.dispatch.end:
8771 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
8772 // CHECK-64-NEXT: ret void
8775 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248
8776 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
8777 // CHECK-64-NEXT: entry:
8778 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8779 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8780 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8781 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_kernel_environment, ptr [[DYN_PTR]])
8782 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8783 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8784 // CHECK-64: user_code.entry:
8785 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8786 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8787 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8788 // CHECK-64-NEXT: ret void
8789 // CHECK-64: worker.exit:
8790 // CHECK-64-NEXT: ret void
8793 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined
8794 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8795 // CHECK-64-NEXT: entry:
8796 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8797 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8798 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8799 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8800 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8801 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8802 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8803 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8804 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8805 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8806 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8807 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8808 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8809 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8810 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8811 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8812 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8813 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
8814 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8815 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
8816 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
8817 // CHECK-64: cond.true:
8818 // CHECK-64-NEXT: br label [[COND_END:%.*]]
8819 // CHECK-64: cond.false:
8820 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8821 // CHECK-64-NEXT: br label [[COND_END]]
8822 // CHECK-64: cond.end:
8823 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
8824 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
8825 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8826 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
8827 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8828 // CHECK-64: omp.inner.for.cond:
8829 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8830 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8831 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
8832 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8833 // CHECK-64: omp.inner.for.body:
8834 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8835 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
8836 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8837 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
8838 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8839 // CHECK-64: omp.body.continue:
8840 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8841 // CHECK-64: omp.inner.for.inc:
8842 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8843 // CHECK-64-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
8844 // CHECK-64-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
8845 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
8846 // CHECK-64: omp.inner.for.end:
8847 // CHECK-64-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
8848 // CHECK-64: omp.loop.exit:
8849 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
8850 // CHECK-64-NEXT: ret void
8853 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252
8854 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
8855 // CHECK-64-NEXT: entry:
8856 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8857 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8858 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8859 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_kernel_environment, ptr [[DYN_PTR]])
8860 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8861 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8862 // CHECK-64: user_code.entry:
8863 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8864 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8865 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8866 // CHECK-64-NEXT: ret void
8867 // CHECK-64: worker.exit:
8868 // CHECK-64-NEXT: ret void
8871 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined
8872 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8873 // CHECK-64-NEXT: entry:
8874 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8875 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8876 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8877 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8878 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8879 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8880 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8881 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8882 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8883 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8884 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8885 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8886 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8887 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8888 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8889 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8890 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8891 // CHECK-64-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
8892 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8893 // CHECK-64: omp.dispatch.cond:
8894 // CHECK-64-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8895 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
8896 // CHECK-64-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
8897 // CHECK-64: cond.true:
8898 // CHECK-64-NEXT: br label [[COND_END:%.*]]
8899 // CHECK-64: cond.false:
8900 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8901 // CHECK-64-NEXT: br label [[COND_END]]
8902 // CHECK-64: cond.end:
8903 // CHECK-64-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
8904 // CHECK-64-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
8905 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8906 // CHECK-64-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
8907 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8908 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8909 // CHECK-64-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
8910 // CHECK-64-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8911 // CHECK-64: omp.dispatch.body:
8912 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8913 // CHECK-64: omp.inner.for.cond:
8914 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8915 // CHECK-64-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8916 // CHECK-64-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
8917 // CHECK-64-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
8918 // CHECK-64: omp.inner.for.body:
8919 // CHECK-64-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8920 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
8921 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
8922 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4
8923 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
8924 // CHECK-64: omp.body.continue:
8925 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
8926 // CHECK-64: omp.inner.for.inc:
8927 // CHECK-64-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
8928 // CHECK-64-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
8929 // CHECK-64-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
8930 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]]
8931 // CHECK-64: omp.inner.for.end:
8932 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
8933 // CHECK-64: omp.dispatch.inc:
8934 // CHECK-64-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8935 // CHECK-64-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8936 // CHECK-64-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
8937 // CHECK-64-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
8938 // CHECK-64-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
8939 // CHECK-64-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
8940 // CHECK-64-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
8941 // CHECK-64-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
8942 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
8943 // CHECK-64: omp.dispatch.end:
8944 // CHECK-64-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
8945 // CHECK-64-NEXT: ret void
8948 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256
8949 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
8950 // CHECK-64-NEXT: entry:
8951 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
8952 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
8953 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
8954 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_kernel_environment, ptr [[DYN_PTR]])
8955 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
8956 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
8957 // CHECK-64: user_code.entry:
8958 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
8959 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
8960 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
8961 // CHECK-64-NEXT: ret void
8962 // CHECK-64: worker.exit:
8963 // CHECK-64-NEXT: ret void
8966 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined
8967 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
8968 // CHECK-64-NEXT: entry:
8969 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
8970 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
8971 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
8972 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
8973 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
8974 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
8975 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
8976 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
8977 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
8978 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
8979 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
8980 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
8981 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
8982 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
8983 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
8984 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
8985 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
8986 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
8987 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
8988 // CHECK-64: omp.dispatch.cond:
8989 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
8990 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
8991 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
8992 // CHECK-64: omp.dispatch.body:
8993 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
8994 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
8995 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
8996 // CHECK-64: omp.inner.for.cond:
8997 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431:![0-9]+]]
8998 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP431]]
8999 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
9000 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9001 // CHECK-64: omp.inner.for.body:
9002 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
9003 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
9004 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9005 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP431]]
9006 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9007 // CHECK-64: omp.body.continue:
9008 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9009 // CHECK-64: omp.inner.for.inc:
9010 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
9011 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
9012 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
9013 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP432:![0-9]+]]
9014 // CHECK-64: omp.inner.for.end:
9015 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
9016 // CHECK-64: omp.dispatch.inc:
9017 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
9018 // CHECK-64: omp.dispatch.end:
9019 // CHECK-64-NEXT: ret void
9022 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260
9023 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
9024 // CHECK-64-NEXT: entry:
9025 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
9026 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
9027 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
9028 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_kernel_environment, ptr [[DYN_PTR]])
9029 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9030 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9031 // CHECK-64: user_code.entry:
9032 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
9033 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
9034 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
9035 // CHECK-64-NEXT: ret void
9036 // CHECK-64: worker.exit:
9037 // CHECK-64-NEXT: ret void
9040 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined
9041 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
9042 // CHECK-64-NEXT: entry:
9043 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
9044 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
9045 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9046 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
9047 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9048 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9049 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9050 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9051 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
9052 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
9053 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
9054 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9055 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9056 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9057 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9058 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
9059 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9060 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
9061 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
9062 // CHECK-64: omp.dispatch.cond:
9063 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
9064 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
9065 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
9066 // CHECK-64: omp.dispatch.body:
9067 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9068 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
9069 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9070 // CHECK-64: omp.inner.for.cond:
9071 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434:![0-9]+]]
9072 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP434]]
9073 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
9074 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9075 // CHECK-64: omp.inner.for.body:
9076 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
9077 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
9078 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9079 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP434]]
9080 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9081 // CHECK-64: omp.body.continue:
9082 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9083 // CHECK-64: omp.inner.for.inc:
9084 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
9085 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
9086 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
9087 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP435:![0-9]+]]
9088 // CHECK-64: omp.inner.for.end:
9089 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
9090 // CHECK-64: omp.dispatch.inc:
9091 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
9092 // CHECK-64: omp.dispatch.end:
9093 // CHECK-64-NEXT: ret void
9096 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264
9097 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
9098 // CHECK-64-NEXT: entry:
9099 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
9100 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
9101 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
9102 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_kernel_environment, ptr [[DYN_PTR]])
9103 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9104 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9105 // CHECK-64: user_code.entry:
9106 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
9107 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
9108 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
9109 // CHECK-64-NEXT: ret void
9110 // CHECK-64: worker.exit:
9111 // CHECK-64-NEXT: ret void
9114 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined
9115 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
9116 // CHECK-64-NEXT: entry:
9117 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
9118 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
9119 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9120 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
9121 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9122 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9123 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9124 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9125 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
9126 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
9127 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
9128 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9129 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9130 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9131 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9132 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
9133 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9134 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
9135 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
9136 // CHECK-64: omp.dispatch.cond:
9137 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
9138 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
9139 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
9140 // CHECK-64: omp.dispatch.body:
9141 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9142 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
9143 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9144 // CHECK-64: omp.inner.for.cond:
9145 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437:![0-9]+]]
9146 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP437]]
9147 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
9148 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9149 // CHECK-64: omp.inner.for.body:
9150 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
9151 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
9152 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9153 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP437]]
9154 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9155 // CHECK-64: omp.body.continue:
9156 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9157 // CHECK-64: omp.inner.for.inc:
9158 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
9159 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
9160 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
9161 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP438:![0-9]+]]
9162 // CHECK-64: omp.inner.for.end:
9163 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
9164 // CHECK-64: omp.dispatch.inc:
9165 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
9166 // CHECK-64: omp.dispatch.end:
9167 // CHECK-64-NEXT: ret void
9170 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268
9171 // CHECK-64-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
9172 // CHECK-64-NEXT: entry:
9173 // CHECK-64-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 8
9174 // CHECK-64-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 8
9175 // CHECK-64-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 8
9176 // CHECK-64-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_kernel_environment, ptr [[DYN_PTR]])
9177 // CHECK-64-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9178 // CHECK-64-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9179 // CHECK-64: user_code.entry:
9180 // CHECK-64-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
9181 // CHECK-64-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i64 0)
9182 // CHECK-64-NEXT: call void @__kmpc_target_deinit()
9183 // CHECK-64-NEXT: ret void
9184 // CHECK-64: worker.exit:
9185 // CHECK-64-NEXT: ret void
9188 // CHECK-64-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined
9189 // CHECK-64-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
9190 // CHECK-64-NEXT: entry:
9191 // CHECK-64-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
9192 // CHECK-64-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
9193 // CHECK-64-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9194 // CHECK-64-NEXT: [[TMP:%.*]] = alloca i32, align 4
9195 // CHECK-64-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9196 // CHECK-64-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9197 // CHECK-64-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9198 // CHECK-64-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9199 // CHECK-64-NEXT: [[I:%.*]] = alloca i32, align 4
9200 // CHECK-64-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
9201 // CHECK-64-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
9202 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9203 // CHECK-64-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9204 // CHECK-64-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9205 // CHECK-64-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9206 // CHECK-64-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
9207 // CHECK-64-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9208 // CHECK-64-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
9209 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
9210 // CHECK-64: omp.dispatch.cond:
9211 // CHECK-64-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
9212 // CHECK-64-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
9213 // CHECK-64-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
9214 // CHECK-64: omp.dispatch.body:
9215 // CHECK-64-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9216 // CHECK-64-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
9217 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9218 // CHECK-64: omp.inner.for.cond:
9219 // CHECK-64-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440:![0-9]+]]
9220 // CHECK-64-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP440]]
9221 // CHECK-64-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
9222 // CHECK-64-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9223 // CHECK-64: omp.inner.for.body:
9224 // CHECK-64-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
9225 // CHECK-64-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
9226 // CHECK-64-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9227 // CHECK-64-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP440]]
9228 // CHECK-64-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9229 // CHECK-64: omp.body.continue:
9230 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9231 // CHECK-64: omp.inner.for.inc:
9232 // CHECK-64-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
9233 // CHECK-64-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
9234 // CHECK-64-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
9235 // CHECK-64-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP441:![0-9]+]]
9236 // CHECK-64: omp.inner.for.end:
9237 // CHECK-64-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
9238 // CHECK-64: omp.dispatch.inc:
9239 // CHECK-64-NEXT: br label [[OMP_DISPATCH_COND]]
9240 // CHECK-64: omp.dispatch.end:
9241 // CHECK-64-NEXT: ret void
9244 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15
9245 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR0:[0-9]+]] {
9246 // CHECK-32-NEXT: entry:
9247 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
9248 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
9249 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
9250 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
9251 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
9252 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
9253 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
9254 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_kernel_environment, ptr [[DYN_PTR]])
9255 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9256 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9257 // CHECK-32: user_code.entry:
9258 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
9259 // CHECK-32-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9260 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
9261 // CHECK-32-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL]] to i8
9262 // CHECK-32-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1
9263 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
9264 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
9265 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
9266 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR2:[0-9]+]]
9267 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
9268 // CHECK-32-NEXT: ret void
9269 // CHECK-32: worker.exit:
9270 // CHECK-32-NEXT: ret void
9273 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined
9274 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1:[0-9]+]] {
9275 // CHECK-32-NEXT: entry:
9276 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9277 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9278 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
9279 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9280 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9281 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
9282 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
9283 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9284 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9285 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9286 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
9287 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 4
9288 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__CASTED15:%.*]] = alloca i32, align 4
9289 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS17:%.*]] = alloca [3 x ptr], align 4
9290 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9291 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9292 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
9293 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
9294 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
9295 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9296 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9297 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
9298 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9299 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9300 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
9301 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9302 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
9303 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
9304 // CHECK-32: cond.true:
9305 // CHECK-32-NEXT: br label [[COND_END:%.*]]
9306 // CHECK-32: cond.false:
9307 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9308 // CHECK-32-NEXT: br label [[COND_END]]
9309 // CHECK-32: cond.end:
9310 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
9311 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
9312 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9313 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
9314 // CHECK-32-NEXT: [[TMP5:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9315 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP5]] to i1
9316 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
9317 // CHECK-32: omp_if.then:
9318 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9319 // CHECK-32: omp.inner.for.cond:
9320 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249:![0-9]+]]
9321 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP6]], 10
9322 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9323 // CHECK-32: omp.inner.for.body:
9324 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
9325 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9326 // CHECK-32-NEXT: [[TMP9:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
9327 // CHECK-32-NEXT: [[TOBOOL2:%.*]] = trunc i8 [[TMP9]] to i1
9328 // CHECK-32-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL2]] to i8
9329 // CHECK-32-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1, !llvm.access.group [[ACC_GRP249]]
9330 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4, !llvm.access.group [[ACC_GRP249]]
9331 // CHECK-32-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
9332 // CHECK-32-NEXT: [[TMP12:%.*]] = inttoptr i32 [[TMP7]] to ptr
9333 // CHECK-32-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 4, !llvm.access.group [[ACC_GRP249]]
9334 // CHECK-32-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
9335 // CHECK-32-NEXT: [[TMP14:%.*]] = inttoptr i32 [[TMP8]] to ptr
9336 // CHECK-32-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 4, !llvm.access.group [[ACC_GRP249]]
9337 // CHECK-32-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
9338 // CHECK-32-NEXT: [[TMP16:%.*]] = inttoptr i32 [[TMP10]] to ptr
9339 // CHECK-32-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 4, !llvm.access.group [[ACC_GRP249]]
9340 // CHECK-32-NEXT: [[TMP17:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
9341 // CHECK-32-NEXT: [[TOBOOL3:%.*]] = trunc i8 [[TMP17]] to i1
9342 // CHECK-32-NEXT: [[TMP18:%.*]] = zext i1 [[TOBOOL3]] to i32
9343 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP18]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 3), !llvm.access.group [[ACC_GRP249]]
9344 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9345 // CHECK-32: omp.inner.for.inc:
9346 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
9347 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
9348 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP19]], [[TMP20]]
9349 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
9350 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
9351 // CHECK-32-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
9352 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]
9353 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
9354 // CHECK-32-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9355 // CHECK-32-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
9356 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
9357 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9358 // CHECK-32-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9359 // CHECK-32-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP25]], 9
9360 // CHECK-32-NEXT: br i1 [[CMP6]], label [[COND_TRUE7:%.*]], label [[COND_FALSE8:%.*]]
9361 // CHECK-32: cond.true7:
9362 // CHECK-32-NEXT: br label [[COND_END9:%.*]]
9363 // CHECK-32: cond.false8:
9364 // CHECK-32-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9365 // CHECK-32-NEXT: br label [[COND_END9]]
9366 // CHECK-32: cond.end9:
9367 // CHECK-32-NEXT: [[COND10:%.*]] = phi i32 [ 9, [[COND_TRUE7]] ], [ [[TMP26]], [[COND_FALSE8]] ]
9368 // CHECK-32-NEXT: store i32 [[COND10]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
9369 // CHECK-32-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
9370 // CHECK-32-NEXT: store i32 [[TMP27]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
9371 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP250:![0-9]+]]
9372 // CHECK-32: omp.inner.for.end:
9373 // CHECK-32-NEXT: br label [[OMP_IF_END:%.*]]
9374 // CHECK-32: omp_if.else:
9375 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND11:%.*]]
9376 // CHECK-32: omp.inner.for.cond11:
9377 // CHECK-32-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9378 // CHECK-32-NEXT: [[CMP12:%.*]] = icmp slt i32 [[TMP28]], 10
9379 // CHECK-32-NEXT: br i1 [[CMP12]], label [[OMP_INNER_FOR_BODY13:%.*]], label [[OMP_INNER_FOR_END28:%.*]]
9380 // CHECK-32: omp.inner.for.body13:
9381 // CHECK-32-NEXT: [[TMP29:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9382 // CHECK-32-NEXT: [[TMP30:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9383 // CHECK-32-NEXT: [[TMP31:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9384 // CHECK-32-NEXT: [[TOBOOL14:%.*]] = trunc i8 [[TMP31]] to i1
9385 // CHECK-32-NEXT: [[FROMBOOL16:%.*]] = zext i1 [[TOBOOL14]] to i8
9386 // CHECK-32-NEXT: store i8 [[FROMBOOL16]], ptr [[DOTCAPTURE_EXPR__CASTED15]], align 1
9387 // CHECK-32-NEXT: [[TMP32:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED15]], align 4
9388 // CHECK-32-NEXT: [[TMP33:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 0
9389 // CHECK-32-NEXT: [[TMP34:%.*]] = inttoptr i32 [[TMP29]] to ptr
9390 // CHECK-32-NEXT: store ptr [[TMP34]], ptr [[TMP33]], align 4
9391 // CHECK-32-NEXT: [[TMP35:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 1
9392 // CHECK-32-NEXT: [[TMP36:%.*]] = inttoptr i32 [[TMP30]] to ptr
9393 // CHECK-32-NEXT: store ptr [[TMP36]], ptr [[TMP35]], align 4
9394 // CHECK-32-NEXT: [[TMP37:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 2
9395 // CHECK-32-NEXT: [[TMP38:%.*]] = inttoptr i32 [[TMP32]] to ptr
9396 // CHECK-32-NEXT: store ptr [[TMP38]], ptr [[TMP37]], align 4
9397 // CHECK-32-NEXT: [[TMP39:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9398 // CHECK-32-NEXT: [[TOBOOL18:%.*]] = trunc i8 [[TMP39]] to i1
9399 // CHECK-32-NEXT: [[TMP40:%.*]] = zext i1 [[TOBOOL18]] to i32
9400 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP40]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1, ptr null, ptr [[CAPTURED_VARS_ADDRS17]], i32 3)
9401 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC19:%.*]]
9402 // CHECK-32: omp.inner.for.inc19:
9403 // CHECK-32-NEXT: [[TMP41:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9404 // CHECK-32-NEXT: [[TMP42:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
9405 // CHECK-32-NEXT: [[ADD20:%.*]] = add nsw i32 [[TMP41]], [[TMP42]]
9406 // CHECK-32-NEXT: store i32 [[ADD20]], ptr [[DOTOMP_IV]], align 4
9407 // CHECK-32-NEXT: [[TMP43:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9408 // CHECK-32-NEXT: [[TMP44:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
9409 // CHECK-32-NEXT: [[ADD21:%.*]] = add nsw i32 [[TMP43]], [[TMP44]]
9410 // CHECK-32-NEXT: store i32 [[ADD21]], ptr [[DOTOMP_COMB_LB]], align 4
9411 // CHECK-32-NEXT: [[TMP45:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9412 // CHECK-32-NEXT: [[TMP46:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
9413 // CHECK-32-NEXT: [[ADD22:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]
9414 // CHECK-32-NEXT: store i32 [[ADD22]], ptr [[DOTOMP_COMB_UB]], align 4
9415 // CHECK-32-NEXT: [[TMP47:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9416 // CHECK-32-NEXT: [[CMP23:%.*]] = icmp sgt i32 [[TMP47]], 9
9417 // CHECK-32-NEXT: br i1 [[CMP23]], label [[COND_TRUE24:%.*]], label [[COND_FALSE25:%.*]]
9418 // CHECK-32: cond.true24:
9419 // CHECK-32-NEXT: br label [[COND_END26:%.*]]
9420 // CHECK-32: cond.false25:
9421 // CHECK-32-NEXT: [[TMP48:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9422 // CHECK-32-NEXT: br label [[COND_END26]]
9423 // CHECK-32: cond.end26:
9424 // CHECK-32-NEXT: [[COND27:%.*]] = phi i32 [ 9, [[COND_TRUE24]] ], [ [[TMP48]], [[COND_FALSE25]] ]
9425 // CHECK-32-NEXT: store i32 [[COND27]], ptr [[DOTOMP_COMB_UB]], align 4
9426 // CHECK-32-NEXT: [[TMP49:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9427 // CHECK-32-NEXT: store i32 [[TMP49]], ptr [[DOTOMP_IV]], align 4
9428 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND11]], !llvm.loop [[LOOP253:![0-9]+]]
9429 // CHECK-32: omp.inner.for.end28:
9430 // CHECK-32-NEXT: br label [[OMP_IF_END]]
9431 // CHECK-32: omp_if.end:
9432 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9433 // CHECK-32: omp.loop.exit:
9434 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
9435 // CHECK-32-NEXT: [[TMP50:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9436 // CHECK-32-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
9437 // CHECK-32-NEXT: br i1 [[TMP51]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9438 // CHECK-32: .omp.final.then:
9439 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9440 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9441 // CHECK-32: .omp.final.done:
9442 // CHECK-32-NEXT: ret void
9445 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined
9446 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
9447 // CHECK-32-NEXT: entry:
9448 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9449 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9450 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
9451 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
9452 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
9453 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9454 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9455 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9456 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9457 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9458 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9459 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9460 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9461 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9462 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9463 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9464 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
9465 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9466 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9467 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9468 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9469 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
9470 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
9471 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9472 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9473 // CHECK-32-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9474 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
9475 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
9476 // CHECK-32: omp_if.then:
9477 // CHECK-32-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9478 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
9479 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3:[0-9]+]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9480 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9481 // CHECK-32-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
9482 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9483 // CHECK-32: omp.inner.for.cond:
9484 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255:![0-9]+]]
9485 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP255]]
9486 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP6]], [[TMP7]]
9487 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9488 // CHECK-32: omp.inner.for.body:
9489 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
9490 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
9491 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9492 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP255]]
9493 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9494 // CHECK-32: omp.body.continue:
9495 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9496 // CHECK-32: omp.inner.for.inc:
9497 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
9498 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP255]]
9499 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
9500 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
9501 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP256:![0-9]+]]
9502 // CHECK-32: omp.inner.for.end:
9503 // CHECK-32-NEXT: br label [[OMP_IF_END:%.*]]
9504 // CHECK-32: omp_if.else:
9505 // CHECK-32-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9506 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
9507 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9508 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9509 // CHECK-32-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
9510 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND2:%.*]]
9511 // CHECK-32: omp.inner.for.cond2:
9512 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9513 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9514 // CHECK-32-NEXT: [[CMP3:%.*]] = icmp ule i32 [[TMP14]], [[TMP15]]
9515 // CHECK-32-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY4:%.*]], label [[OMP_INNER_FOR_END10:%.*]]
9516 // CHECK-32: omp.inner.for.body4:
9517 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9518 // CHECK-32-NEXT: [[MUL5:%.*]] = mul nsw i32 [[TMP16]], 1
9519 // CHECK-32-NEXT: [[ADD6:%.*]] = add nsw i32 0, [[MUL5]]
9520 // CHECK-32-NEXT: store i32 [[ADD6]], ptr [[I]], align 4
9521 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE7:%.*]]
9522 // CHECK-32: omp.body.continue7:
9523 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC8:%.*]]
9524 // CHECK-32: omp.inner.for.inc8:
9525 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9526 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
9527 // CHECK-32-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
9528 // CHECK-32-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
9529 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND2]], !llvm.loop [[LOOP258:![0-9]+]]
9530 // CHECK-32: omp.inner.for.end10:
9531 // CHECK-32-NEXT: br label [[OMP_IF_END]]
9532 // CHECK-32: omp_if.end:
9533 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9534 // CHECK-32: omp.loop.exit:
9535 // CHECK-32-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9536 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
9537 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
9538 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9539 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
9540 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9541 // CHECK-32: .omp.final.then:
9542 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9543 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9544 // CHECK-32: .omp.final.done:
9545 // CHECK-32-NEXT: ret void
9548 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1
9549 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
9550 // CHECK-32-NEXT: entry:
9551 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9552 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9553 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
9554 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
9555 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
9556 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9557 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9558 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9559 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9560 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9561 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9562 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9563 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9564 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9565 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9566 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9567 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
9568 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9569 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9570 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9571 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9572 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
9573 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
9574 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9575 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9576 // CHECK-32-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
9577 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
9578 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
9579 // CHECK-32: omp_if.then:
9580 // CHECK-32-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9581 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
9582 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9583 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9584 // CHECK-32-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
9585 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9586 // CHECK-32: omp.inner.for.cond:
9587 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259:![0-9]+]]
9588 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP259]]
9589 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP6]], [[TMP7]]
9590 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9591 // CHECK-32: omp.inner.for.body:
9592 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
9593 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
9594 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9595 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP259]]
9596 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9597 // CHECK-32: omp.body.continue:
9598 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9599 // CHECK-32: omp.inner.for.inc:
9600 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
9601 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP259]]
9602 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
9603 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
9604 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP260:![0-9]+]]
9605 // CHECK-32: omp.inner.for.end:
9606 // CHECK-32-NEXT: br label [[OMP_IF_END:%.*]]
9607 // CHECK-32: omp_if.else:
9608 // CHECK-32-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9609 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
9610 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9611 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9612 // CHECK-32-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
9613 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND2:%.*]]
9614 // CHECK-32: omp.inner.for.cond2:
9615 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9616 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9617 // CHECK-32-NEXT: [[CMP3:%.*]] = icmp ule i32 [[TMP14]], [[TMP15]]
9618 // CHECK-32-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY4:%.*]], label [[OMP_INNER_FOR_END10:%.*]]
9619 // CHECK-32: omp.inner.for.body4:
9620 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9621 // CHECK-32-NEXT: [[MUL5:%.*]] = mul nsw i32 [[TMP16]], 1
9622 // CHECK-32-NEXT: [[ADD6:%.*]] = add nsw i32 0, [[MUL5]]
9623 // CHECK-32-NEXT: store i32 [[ADD6]], ptr [[I]], align 4
9624 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE7:%.*]]
9625 // CHECK-32: omp.body.continue7:
9626 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC8:%.*]]
9627 // CHECK-32: omp.inner.for.inc8:
9628 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
9629 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
9630 // CHECK-32-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
9631 // CHECK-32-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
9632 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND2]], !llvm.loop [[LOOP262:![0-9]+]]
9633 // CHECK-32: omp.inner.for.end10:
9634 // CHECK-32-NEXT: br label [[OMP_IF_END]]
9635 // CHECK-32: omp_if.end:
9636 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9637 // CHECK-32: omp.loop.exit:
9638 // CHECK-32-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9639 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
9640 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
9641 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9642 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
9643 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9644 // CHECK-32: .omp.final.then:
9645 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9646 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9647 // CHECK-32: .omp.final.done:
9648 // CHECK-32-NEXT: ret void
9651 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18
9652 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
9653 // CHECK-32-NEXT: entry:
9654 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
9655 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
9656 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
9657 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
9658 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_kernel_environment, ptr [[DYN_PTR]])
9659 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9660 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9661 // CHECK-32: user_code.entry:
9662 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
9663 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
9664 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
9665 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
9666 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
9667 // CHECK-32-NEXT: ret void
9668 // CHECK-32: worker.exit:
9669 // CHECK-32-NEXT: ret void
9672 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined
9673 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
9674 // CHECK-32-NEXT: entry:
9675 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9676 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9677 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9678 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9679 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
9680 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
9681 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9682 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9683 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9684 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
9685 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9686 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9687 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
9688 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
9689 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9690 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9691 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
9692 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9693 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9694 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
9695 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9696 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
9697 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
9698 // CHECK-32: cond.true:
9699 // CHECK-32-NEXT: br label [[COND_END:%.*]]
9700 // CHECK-32: cond.false:
9701 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9702 // CHECK-32-NEXT: br label [[COND_END]]
9703 // CHECK-32: cond.end:
9704 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
9705 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
9706 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9707 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
9708 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9709 // CHECK-32: omp.inner.for.cond:
9710 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263:![0-9]+]]
9711 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
9712 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9713 // CHECK-32: omp.inner.for.body:
9714 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
9715 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9716 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
9717 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
9718 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP263]]
9719 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
9720 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
9721 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP263]]
9722 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP263]]
9723 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9724 // CHECK-32: omp.inner.for.inc:
9725 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
9726 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
9727 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
9728 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
9729 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
9730 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
9731 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
9732 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
9733 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9734 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
9735 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
9736 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9737 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9738 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
9739 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
9740 // CHECK-32: cond.true5:
9741 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
9742 // CHECK-32: cond.false6:
9743 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9744 // CHECK-32-NEXT: br label [[COND_END7]]
9745 // CHECK-32: cond.end7:
9746 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
9747 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
9748 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
9749 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
9750 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP264:![0-9]+]]
9751 // CHECK-32: omp.inner.for.end:
9752 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9753 // CHECK-32: omp.loop.exit:
9754 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
9755 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9756 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
9757 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9758 // CHECK-32: .omp.final.then:
9759 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9760 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9761 // CHECK-32: .omp.final.done:
9762 // CHECK-32-NEXT: ret void
9765 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined
9766 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
9767 // CHECK-32-NEXT: entry:
9768 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9769 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9770 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
9771 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
9772 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9773 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9774 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9775 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9776 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9777 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9778 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9779 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9780 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9781 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9782 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9783 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9784 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9785 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9786 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9787 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
9788 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
9789 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9790 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9791 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9792 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
9793 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9794 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
9795 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
9796 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
9797 // CHECK-32: cond.true:
9798 // CHECK-32-NEXT: br label [[COND_END:%.*]]
9799 // CHECK-32: cond.false:
9800 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
9801 // CHECK-32-NEXT: br label [[COND_END]]
9802 // CHECK-32: cond.end:
9803 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
9804 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
9805 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9806 // CHECK-32-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
9807 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9808 // CHECK-32: omp.inner.for.cond:
9809 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266:![0-9]+]]
9810 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP266]]
9811 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
9812 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9813 // CHECK-32: omp.inner.for.body:
9814 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
9815 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
9816 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9817 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP266]]
9818 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9819 // CHECK-32: omp.body.continue:
9820 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9821 // CHECK-32: omp.inner.for.inc:
9822 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
9823 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
9824 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
9825 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP267:![0-9]+]]
9826 // CHECK-32: omp.inner.for.end:
9827 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9828 // CHECK-32: omp.loop.exit:
9829 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
9830 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9831 // CHECK-32-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
9832 // CHECK-32-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9833 // CHECK-32: .omp.final.then:
9834 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9835 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9836 // CHECK-32: .omp.final.done:
9837 // CHECK-32-NEXT: ret void
9840 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21
9841 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
9842 // CHECK-32-NEXT: entry:
9843 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
9844 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
9845 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
9846 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
9847 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_kernel_environment, ptr [[DYN_PTR]])
9848 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
9849 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
9850 // CHECK-32: user_code.entry:
9851 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
9852 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
9853 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
9854 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
9855 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
9856 // CHECK-32-NEXT: ret void
9857 // CHECK-32: worker.exit:
9858 // CHECK-32-NEXT: ret void
9861 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined
9862 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
9863 // CHECK-32-NEXT: entry:
9864 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9865 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9866 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9867 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9868 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
9869 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
9870 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9871 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9872 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9873 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
9874 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9875 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9876 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
9877 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
9878 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9879 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9880 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
9881 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9882 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
9883 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
9884 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9885 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
9886 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
9887 // CHECK-32: cond.true:
9888 // CHECK-32-NEXT: br label [[COND_END:%.*]]
9889 // CHECK-32: cond.false:
9890 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
9891 // CHECK-32-NEXT: br label [[COND_END]]
9892 // CHECK-32: cond.end:
9893 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
9894 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
9895 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
9896 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
9897 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9898 // CHECK-32: omp.inner.for.cond:
9899 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269:![0-9]+]]
9900 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
9901 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9902 // CHECK-32: omp.inner.for.body:
9903 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
9904 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9905 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
9906 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
9907 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP269]]
9908 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
9909 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
9910 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP269]]
9911 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP269]]
9912 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9913 // CHECK-32: omp.inner.for.inc:
9914 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
9915 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
9916 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
9917 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
9918 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
9919 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
9920 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
9921 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
9922 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9923 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
9924 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
9925 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9926 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9927 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
9928 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
9929 // CHECK-32: cond.true5:
9930 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
9931 // CHECK-32: cond.false6:
9932 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9933 // CHECK-32-NEXT: br label [[COND_END7]]
9934 // CHECK-32: cond.end7:
9935 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
9936 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
9937 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
9938 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
9939 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP270:![0-9]+]]
9940 // CHECK-32: omp.inner.for.end:
9941 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
9942 // CHECK-32: omp.loop.exit:
9943 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
9944 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
9945 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
9946 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
9947 // CHECK-32: .omp.final.then:
9948 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
9949 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
9950 // CHECK-32: .omp.final.done:
9951 // CHECK-32-NEXT: ret void
9954 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined
9955 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
9956 // CHECK-32-NEXT: entry:
9957 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
9958 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
9959 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
9960 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
9961 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
9962 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
9963 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
9964 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
9965 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
9966 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
9967 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
9968 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
9969 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
9970 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9971 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9972 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
9973 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
9974 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
9975 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
9976 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
9977 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
9978 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
9979 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
9980 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
9981 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
9982 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
9983 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
9984 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
9985 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
9986 // CHECK-32: omp.inner.for.cond:
9987 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272:![0-9]+]]
9988 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP272]]
9989 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
9990 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
9991 // CHECK-32: omp.inner.for.body:
9992 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
9993 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
9994 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
9995 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP272]]
9996 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
9997 // CHECK-32: omp.body.continue:
9998 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
9999 // CHECK-32: omp.inner.for.inc:
10000 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
10001 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP272]]
10002 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
10003 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
10004 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP273:![0-9]+]]
10005 // CHECK-32: omp.inner.for.end:
10006 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10007 // CHECK-32: omp.loop.exit:
10008 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
10009 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10010 // CHECK-32-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
10011 // CHECK-32-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10012 // CHECK-32: .omp.final.then:
10013 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10014 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10015 // CHECK-32: .omp.final.done:
10016 // CHECK-32-NEXT: ret void
10019 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24
10020 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
10021 // CHECK-32-NEXT: entry:
10022 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10023 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10024 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10025 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10026 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_kernel_environment, ptr [[DYN_PTR]])
10027 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10028 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10029 // CHECK-32: user_code.entry:
10030 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10031 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10032 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10033 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
10034 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10035 // CHECK-32-NEXT: ret void
10036 // CHECK-32: worker.exit:
10037 // CHECK-32-NEXT: ret void
10040 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined
10041 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
10042 // CHECK-32-NEXT: entry:
10043 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10044 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10045 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10046 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10047 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10048 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
10049 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10050 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10051 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10052 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
10053 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10054 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10055 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
10056 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
10057 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10058 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10059 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
10060 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10061 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
10062 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
10063 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10064 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
10065 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
10066 // CHECK-32: cond.true:
10067 // CHECK-32-NEXT: br label [[COND_END:%.*]]
10068 // CHECK-32: cond.false:
10069 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10070 // CHECK-32-NEXT: br label [[COND_END]]
10071 // CHECK-32: cond.end:
10072 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
10073 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
10074 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10075 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10076 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10077 // CHECK-32: omp.inner.for.cond:
10078 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275:![0-9]+]]
10079 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
10080 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10081 // CHECK-32: omp.inner.for.body:
10082 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
10083 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10084 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
10085 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
10086 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP275]]
10087 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
10088 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
10089 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP275]]
10090 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP275]]
10091 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10092 // CHECK-32: omp.inner.for.inc:
10093 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
10094 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
10095 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
10096 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
10097 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
10098 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
10099 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
10100 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
10101 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10102 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
10103 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
10104 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10105 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10106 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
10107 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
10108 // CHECK-32: cond.true5:
10109 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
10110 // CHECK-32: cond.false6:
10111 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10112 // CHECK-32-NEXT: br label [[COND_END7]]
10113 // CHECK-32: cond.end7:
10114 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
10115 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
10116 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
10117 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
10118 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP276:![0-9]+]]
10119 // CHECK-32: omp.inner.for.end:
10120 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10121 // CHECK-32: omp.loop.exit:
10122 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
10123 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10124 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
10125 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10126 // CHECK-32: .omp.final.then:
10127 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10128 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10129 // CHECK-32: .omp.final.done:
10130 // CHECK-32-NEXT: ret void
10133 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined
10134 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
10135 // CHECK-32-NEXT: entry:
10136 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10137 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10138 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
10139 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
10140 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10141 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10142 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
10143 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
10144 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10145 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10146 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10147 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10148 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10149 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10150 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10151 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
10152 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
10153 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10154 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10155 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
10156 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
10157 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10158 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10159 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10160 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
10161 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10162 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
10163 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
10164 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
10165 // CHECK-32: omp.dispatch.cond:
10166 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
10167 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
10168 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
10169 // CHECK-32: omp.dispatch.body:
10170 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10171 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
10172 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10173 // CHECK-32: omp.inner.for.cond:
10174 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278:![0-9]+]]
10175 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP278]]
10176 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
10177 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10178 // CHECK-32: omp.inner.for.body:
10179 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
10180 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
10181 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
10182 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP278]]
10183 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
10184 // CHECK-32: omp.body.continue:
10185 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10186 // CHECK-32: omp.inner.for.inc:
10187 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
10188 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
10189 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
10190 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP279:![0-9]+]]
10191 // CHECK-32: omp.inner.for.end:
10192 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
10193 // CHECK-32: omp.dispatch.inc:
10194 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
10195 // CHECK-32: omp.dispatch.end:
10196 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10197 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
10198 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10199 // CHECK-32: .omp.final.then:
10200 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10201 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10202 // CHECK-32: .omp.final.done:
10203 // CHECK-32-NEXT: ret void
10206 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27
10207 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
10208 // CHECK-32-NEXT: entry:
10209 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10210 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10211 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10212 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10213 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_kernel_environment, ptr [[DYN_PTR]])
10214 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10215 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10216 // CHECK-32: user_code.entry:
10217 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10218 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10219 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10220 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
10221 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10222 // CHECK-32-NEXT: ret void
10223 // CHECK-32: worker.exit:
10224 // CHECK-32-NEXT: ret void
10227 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined
10228 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
10229 // CHECK-32-NEXT: entry:
10230 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10231 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10232 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10233 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10234 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10235 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
10236 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10237 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10238 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10239 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
10240 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10241 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10242 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
10243 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
10244 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10245 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10246 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
10247 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10248 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
10249 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
10250 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10251 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
10252 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
10253 // CHECK-32: cond.true:
10254 // CHECK-32-NEXT: br label [[COND_END:%.*]]
10255 // CHECK-32: cond.false:
10256 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10257 // CHECK-32-NEXT: br label [[COND_END]]
10258 // CHECK-32: cond.end:
10259 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
10260 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
10261 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10262 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10263 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10264 // CHECK-32: omp.inner.for.cond:
10265 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281:![0-9]+]]
10266 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
10267 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10268 // CHECK-32: omp.inner.for.body:
10269 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
10270 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10271 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
10272 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
10273 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP281]]
10274 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
10275 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
10276 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP281]]
10277 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP281]]
10278 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10279 // CHECK-32: omp.inner.for.inc:
10280 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
10281 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
10282 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
10283 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
10284 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
10285 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
10286 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
10287 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
10288 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10289 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
10290 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
10291 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10292 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10293 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
10294 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
10295 // CHECK-32: cond.true5:
10296 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
10297 // CHECK-32: cond.false6:
10298 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10299 // CHECK-32-NEXT: br label [[COND_END7]]
10300 // CHECK-32: cond.end7:
10301 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
10302 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
10303 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
10304 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
10305 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP282:![0-9]+]]
10306 // CHECK-32: omp.inner.for.end:
10307 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10308 // CHECK-32: omp.loop.exit:
10309 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
10310 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10311 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
10312 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10313 // CHECK-32: .omp.final.then:
10314 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10315 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10316 // CHECK-32: .omp.final.done:
10317 // CHECK-32-NEXT: ret void
10320 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined
10321 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
10322 // CHECK-32-NEXT: entry:
10323 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10324 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10325 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
10326 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
10327 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10328 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10329 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
10330 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
10331 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10332 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10333 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10334 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10335 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10336 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10337 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10338 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
10339 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
10340 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10341 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10342 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
10343 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
10344 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10345 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10346 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10347 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
10348 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10349 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
10350 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
10351 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
10352 // CHECK-32: omp.dispatch.cond:
10353 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
10354 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
10355 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
10356 // CHECK-32: omp.dispatch.body:
10357 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10358 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
10359 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10360 // CHECK-32: omp.inner.for.cond:
10361 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284:![0-9]+]]
10362 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP284]]
10363 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
10364 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10365 // CHECK-32: omp.inner.for.body:
10366 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
10367 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
10368 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
10369 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP284]]
10370 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
10371 // CHECK-32: omp.body.continue:
10372 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10373 // CHECK-32: omp.inner.for.inc:
10374 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
10375 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
10376 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
10377 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP285:![0-9]+]]
10378 // CHECK-32: omp.inner.for.end:
10379 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
10380 // CHECK-32: omp.dispatch.inc:
10381 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
10382 // CHECK-32: omp.dispatch.end:
10383 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10384 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
10385 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10386 // CHECK-32: .omp.final.then:
10387 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10388 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10389 // CHECK-32: .omp.final.done:
10390 // CHECK-32-NEXT: ret void
10393 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30
10394 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
10395 // CHECK-32-NEXT: entry:
10396 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10397 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10398 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10399 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10400 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_kernel_environment, ptr [[DYN_PTR]])
10401 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10402 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10403 // CHECK-32: user_code.entry:
10404 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10405 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10406 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10407 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
10408 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10409 // CHECK-32-NEXT: ret void
10410 // CHECK-32: worker.exit:
10411 // CHECK-32-NEXT: ret void
10414 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined
10415 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
10416 // CHECK-32-NEXT: entry:
10417 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10418 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10419 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10420 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10421 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10422 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
10423 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10424 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10425 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10426 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
10427 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10428 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10429 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
10430 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
10431 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10432 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10433 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
10434 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10435 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
10436 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
10437 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10438 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
10439 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
10440 // CHECK-32: cond.true:
10441 // CHECK-32-NEXT: br label [[COND_END:%.*]]
10442 // CHECK-32: cond.false:
10443 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10444 // CHECK-32-NEXT: br label [[COND_END]]
10445 // CHECK-32: cond.end:
10446 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
10447 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
10448 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10449 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10450 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10451 // CHECK-32: omp.inner.for.cond:
10452 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287:![0-9]+]]
10453 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
10454 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10455 // CHECK-32: omp.inner.for.body:
10456 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
10457 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10458 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
10459 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
10460 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP287]]
10461 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
10462 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
10463 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP287]]
10464 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP287]]
10465 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10466 // CHECK-32: omp.inner.for.inc:
10467 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
10468 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
10469 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
10470 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
10471 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
10472 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
10473 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
10474 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
10475 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10476 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
10477 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
10478 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10479 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10480 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
10481 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
10482 // CHECK-32: cond.true5:
10483 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
10484 // CHECK-32: cond.false6:
10485 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10486 // CHECK-32-NEXT: br label [[COND_END7]]
10487 // CHECK-32: cond.end7:
10488 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
10489 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
10490 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
10491 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
10492 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP288:![0-9]+]]
10493 // CHECK-32: omp.inner.for.end:
10494 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10495 // CHECK-32: omp.loop.exit:
10496 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
10497 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10498 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
10499 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10500 // CHECK-32: .omp.final.then:
10501 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10502 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10503 // CHECK-32: .omp.final.done:
10504 // CHECK-32-NEXT: ret void
10507 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined
10508 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
10509 // CHECK-32-NEXT: entry:
10510 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10511 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10512 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
10513 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
10514 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10515 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10516 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
10517 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
10518 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10519 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10520 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10521 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10522 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10523 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10524 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10525 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
10526 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
10527 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10528 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10529 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
10530 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
10531 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10532 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10533 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10534 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
10535 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10536 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
10537 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
10538 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
10539 // CHECK-32: omp.dispatch.cond:
10540 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
10541 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
10542 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
10543 // CHECK-32: omp.dispatch.body:
10544 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10545 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
10546 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10547 // CHECK-32: omp.inner.for.cond:
10548 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290:![0-9]+]]
10549 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP290]]
10550 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
10551 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10552 // CHECK-32: omp.inner.for.body:
10553 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
10554 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
10555 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
10556 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP290]]
10557 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
10558 // CHECK-32: omp.body.continue:
10559 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10560 // CHECK-32: omp.inner.for.inc:
10561 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
10562 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
10563 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
10564 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP291:![0-9]+]]
10565 // CHECK-32: omp.inner.for.end:
10566 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
10567 // CHECK-32: omp.dispatch.inc:
10568 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
10569 // CHECK-32: omp.dispatch.end:
10570 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10571 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
10572 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10573 // CHECK-32: .omp.final.then:
10574 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10575 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10576 // CHECK-32: .omp.final.done:
10577 // CHECK-32-NEXT: ret void
10580 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33
10581 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
10582 // CHECK-32-NEXT: entry:
10583 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10584 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10585 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10586 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10587 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_kernel_environment, ptr [[DYN_PTR]])
10588 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10589 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10590 // CHECK-32: user_code.entry:
10591 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10592 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10593 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10594 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
10595 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10596 // CHECK-32-NEXT: ret void
10597 // CHECK-32: worker.exit:
10598 // CHECK-32-NEXT: ret void
10601 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined
10602 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
10603 // CHECK-32-NEXT: entry:
10604 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10605 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10606 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10607 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10608 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10609 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
10610 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10611 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10612 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10613 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
10614 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10615 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10616 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
10617 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
10618 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10619 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10620 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
10621 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10622 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
10623 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
10624 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10625 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
10626 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
10627 // CHECK-32: cond.true:
10628 // CHECK-32-NEXT: br label [[COND_END:%.*]]
10629 // CHECK-32: cond.false:
10630 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10631 // CHECK-32-NEXT: br label [[COND_END]]
10632 // CHECK-32: cond.end:
10633 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
10634 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
10635 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10636 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10637 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10638 // CHECK-32: omp.inner.for.cond:
10639 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293:![0-9]+]]
10640 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
10641 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10642 // CHECK-32: omp.inner.for.body:
10643 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
10644 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10645 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
10646 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
10647 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP293]]
10648 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
10649 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
10650 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP293]]
10651 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP293]]
10652 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10653 // CHECK-32: omp.inner.for.inc:
10654 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
10655 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
10656 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
10657 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
10658 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
10659 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
10660 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
10661 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
10662 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10663 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
10664 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
10665 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10666 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10667 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
10668 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
10669 // CHECK-32: cond.true5:
10670 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
10671 // CHECK-32: cond.false6:
10672 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10673 // CHECK-32-NEXT: br label [[COND_END7]]
10674 // CHECK-32: cond.end7:
10675 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
10676 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
10677 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
10678 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
10679 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP294:![0-9]+]]
10680 // CHECK-32: omp.inner.for.end:
10681 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10682 // CHECK-32: omp.loop.exit:
10683 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
10684 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10685 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
10686 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10687 // CHECK-32: .omp.final.then:
10688 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10689 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10690 // CHECK-32: .omp.final.done:
10691 // CHECK-32-NEXT: ret void
10694 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined
10695 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
10696 // CHECK-32-NEXT: entry:
10697 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10698 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10699 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
10700 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
10701 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10702 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10703 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
10704 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
10705 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10706 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10707 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10708 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10709 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10710 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10711 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10712 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
10713 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
10714 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10715 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10716 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
10717 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
10718 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10719 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10720 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10721 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
10722 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10723 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
10724 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
10725 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
10726 // CHECK-32: omp.dispatch.cond:
10727 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
10728 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
10729 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
10730 // CHECK-32: omp.dispatch.body:
10731 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10732 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
10733 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10734 // CHECK-32: omp.inner.for.cond:
10735 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296:![0-9]+]]
10736 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP296]]
10737 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
10738 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10739 // CHECK-32: omp.inner.for.body:
10740 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
10741 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
10742 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
10743 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP296]]
10744 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
10745 // CHECK-32: omp.body.continue:
10746 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10747 // CHECK-32: omp.inner.for.inc:
10748 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
10749 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
10750 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
10751 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP297:![0-9]+]]
10752 // CHECK-32: omp.inner.for.end:
10753 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
10754 // CHECK-32: omp.dispatch.inc:
10755 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
10756 // CHECK-32: omp.dispatch.end:
10757 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10758 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
10759 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
10760 // CHECK-32: .omp.final.then:
10761 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
10762 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
10763 // CHECK-32: .omp.final.done:
10764 // CHECK-32-NEXT: ret void
10767 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37
10768 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[A:%.*]]) #[[ATTR0]] {
10769 // CHECK-32-NEXT: entry:
10770 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10771 // CHECK-32-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
10772 // CHECK-32-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
10773 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10774 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10775 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10776 // CHECK-32-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
10777 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_kernel_environment, ptr [[DYN_PTR]])
10778 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10779 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10780 // CHECK-32: user_code.entry:
10781 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10782 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[A_ADDR]], align 4
10783 // CHECK-32-NEXT: store i32 [[TMP2]], ptr [[A_CASTED]], align 4
10784 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[A_CASTED]], align 4
10785 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10786 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10787 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR2]]
10788 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10789 // CHECK-32-NEXT: ret void
10790 // CHECK-32: worker.exit:
10791 // CHECK-32-NEXT: ret void
10794 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined
10795 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[A:%.*]]) #[[ATTR1]] {
10796 // CHECK-32-NEXT: entry:
10797 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10798 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10799 // CHECK-32-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
10800 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10801 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10802 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10803 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
10804 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10805 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10806 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10807 // CHECK-32-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
10808 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 4
10809 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10810 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10811 // CHECK-32-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
10812 // CHECK-32-NEXT: [[A1:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
10813 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
10814 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
10815 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10816 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10817 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
10818 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10819 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
10820 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
10821 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10822 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
10823 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
10824 // CHECK-32: cond.true:
10825 // CHECK-32-NEXT: br label [[COND_END:%.*]]
10826 // CHECK-32: cond.false:
10827 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10828 // CHECK-32-NEXT: br label [[COND_END]]
10829 // CHECK-32: cond.end:
10830 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
10831 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
10832 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10833 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10834 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10835 // CHECK-32: omp.inner.for.cond:
10836 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
10837 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp slt i32 [[TMP5]], 10
10838 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10839 // CHECK-32: omp.inner.for.body:
10840 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10841 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10842 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[A1]], align 4
10843 // CHECK-32-NEXT: store i32 [[TMP8]], ptr [[A_CASTED]], align 4
10844 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[A_CASTED]], align 4
10845 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
10846 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP6]] to ptr
10847 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
10848 // CHECK-32-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
10849 // CHECK-32-NEXT: [[TMP13:%.*]] = inttoptr i32 [[TMP7]] to ptr
10850 // CHECK-32-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 4
10851 // CHECK-32-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
10852 // CHECK-32-NEXT: [[TMP15:%.*]] = inttoptr i32 [[TMP9]] to ptr
10853 // CHECK-32-NEXT: store ptr [[TMP15]], ptr [[TMP14]], align 4
10854 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 3)
10855 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10856 // CHECK-32: omp.inner.for.inc:
10857 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
10858 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
10859 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
10860 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
10861 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10862 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
10863 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
10864 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_LB]], align 4
10865 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10866 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
10867 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP20]], [[TMP21]]
10868 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_UB]], align 4
10869 // CHECK-32-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10870 // CHECK-32-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP22]], 9
10871 // CHECK-32-NEXT: br i1 [[CMP5]], label [[COND_TRUE6:%.*]], label [[COND_FALSE7:%.*]]
10872 // CHECK-32: cond.true6:
10873 // CHECK-32-NEXT: br label [[COND_END8:%.*]]
10874 // CHECK-32: cond.false7:
10875 // CHECK-32-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
10876 // CHECK-32-NEXT: br label [[COND_END8]]
10877 // CHECK-32: cond.end8:
10878 // CHECK-32-NEXT: [[COND9:%.*]] = phi i32 [ 9, [[COND_TRUE6]] ], [ [[TMP23]], [[COND_FALSE7]] ]
10879 // CHECK-32-NEXT: store i32 [[COND9]], ptr [[DOTOMP_COMB_UB]], align 4
10880 // CHECK-32-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
10881 // CHECK-32-NEXT: store i32 [[TMP24]], ptr [[DOTOMP_IV]], align 4
10882 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
10883 // CHECK-32: omp.inner.for.end:
10884 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10885 // CHECK-32: omp.loop.exit:
10886 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
10887 // CHECK-32-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10888 // CHECK-32-NEXT: [[TMP26:%.*]] = icmp ne i32 [[TMP25]], 0
10889 // CHECK-32-NEXT: br i1 [[TMP26]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
10890 // CHECK-32: .omp.lastprivate.then:
10891 // CHECK-32-NEXT: [[TMP27:%.*]] = load i32, ptr [[A1]], align 4
10892 // CHECK-32-NEXT: store i32 [[TMP27]], ptr [[A_ADDR]], align 4
10893 // CHECK-32-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
10894 // CHECK-32: .omp.lastprivate.done:
10895 // CHECK-32-NEXT: call void @__kmpc_free_shared(ptr [[A1]], i32 4)
10896 // CHECK-32-NEXT: ret void
10899 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined
10900 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[A:%.*]]) #[[ATTR1]] {
10901 // CHECK-32-NEXT: entry:
10902 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10903 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10904 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
10905 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
10906 // CHECK-32-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
10907 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10908 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10909 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
10910 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
10911 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
10912 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
10913 // CHECK-32-NEXT: [[A1:%.*]] = alloca i32, align 4
10914 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
10915 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
10916 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
10917 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10918 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10919 // CHECK-32-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
10920 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
10921 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
10922 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
10923 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10924 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
10925 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
10926 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
10927 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
10928 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
10929 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
10930 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
10931 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
10932 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
10933 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
10934 // CHECK-32: omp.inner.for.cond:
10935 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
10936 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
10937 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
10938 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
10939 // CHECK-32: omp.inner.for.body:
10940 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
10941 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
10942 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
10943 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
10944 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[I]], align 4
10945 // CHECK-32-NEXT: store i32 [[TMP8]], ptr [[A1]], align 4
10946 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
10947 // CHECK-32: omp.body.continue:
10948 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
10949 // CHECK-32: omp.inner.for.inc:
10950 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
10951 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
10952 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
10953 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
10954 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
10955 // CHECK-32: omp.inner.for.end:
10956 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
10957 // CHECK-32: omp.loop.exit:
10958 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
10959 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
10960 // CHECK-32-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
10961 // CHECK-32-NEXT: br i1 [[TMP12]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
10962 // CHECK-32: .omp.lastprivate.then:
10963 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[A1]], align 4
10964 // CHECK-32-NEXT: store i32 [[TMP13]], ptr [[A_ADDR]], align 4
10965 // CHECK-32-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
10966 // CHECK-32: .omp.lastprivate.done:
10967 // CHECK-32-NEXT: ret void
10970 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40
10971 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
10972 // CHECK-32-NEXT: entry:
10973 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
10974 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
10975 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
10976 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
10977 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_kernel_environment, ptr [[DYN_PTR]])
10978 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
10979 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
10980 // CHECK-32: user_code.entry:
10981 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
10982 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
10983 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
10984 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
10985 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
10986 // CHECK-32-NEXT: ret void
10987 // CHECK-32: worker.exit:
10988 // CHECK-32-NEXT: ret void
10991 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined
10992 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
10993 // CHECK-32-NEXT: entry:
10994 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
10995 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
10996 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
10997 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
10998 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
10999 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11000 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11001 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11002 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11003 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11004 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11005 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11006 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11007 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11008 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11009 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11010 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11011 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11012 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11013 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11014 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11015 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11016 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11017 // CHECK-32: cond.true:
11018 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11019 // CHECK-32: cond.false:
11020 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11021 // CHECK-32-NEXT: br label [[COND_END]]
11022 // CHECK-32: cond.end:
11023 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11024 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11025 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11026 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11027 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11028 // CHECK-32: omp.inner.for.cond:
11029 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11030 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11031 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11032 // CHECK-32: omp.inner.for.body:
11033 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11034 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11035 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11036 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11037 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11038 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11039 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11040 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11041 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11042 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11043 // CHECK-32: omp.inner.for.inc:
11044 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11045 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11046 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11047 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11048 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11049 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11050 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11051 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11052 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11053 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11054 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11055 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11056 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11057 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11058 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11059 // CHECK-32: cond.true5:
11060 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11061 // CHECK-32: cond.false6:
11062 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11063 // CHECK-32-NEXT: br label [[COND_END7]]
11064 // CHECK-32: cond.end7:
11065 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11066 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11067 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11068 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11069 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11070 // CHECK-32: omp.inner.for.end:
11071 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11072 // CHECK-32: omp.loop.exit:
11073 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11074 // CHECK-32-NEXT: ret void
11077 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined
11078 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11079 // CHECK-32-NEXT: entry:
11080 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11081 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11082 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11083 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11084 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11085 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11086 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11087 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11088 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11089 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11090 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11091 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11092 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11093 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11094 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11095 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11096 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11097 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11098 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11099 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11100 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11101 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11102 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11103 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11104 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
11105 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
11106 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11107 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
11108 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11109 // CHECK-32: cond.true:
11110 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11111 // CHECK-32: cond.false:
11112 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11113 // CHECK-32-NEXT: br label [[COND_END]]
11114 // CHECK-32: cond.end:
11115 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
11116 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
11117 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11118 // CHECK-32-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
11119 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11120 // CHECK-32: omp.inner.for.cond:
11121 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11122 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11123 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
11124 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11125 // CHECK-32: omp.inner.for.body:
11126 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11127 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
11128 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11129 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
11130 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11131 // CHECK-32: omp.body.continue:
11132 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11133 // CHECK-32: omp.inner.for.inc:
11134 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11135 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
11136 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
11137 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11138 // CHECK-32: omp.inner.for.end:
11139 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11140 // CHECK-32: omp.loop.exit:
11141 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
11142 // CHECK-32-NEXT: ret void
11145 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43
11146 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
11147 // CHECK-32-NEXT: entry:
11148 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
11149 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
11150 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
11151 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
11152 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_kernel_environment, ptr [[DYN_PTR]])
11153 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
11154 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
11155 // CHECK-32: user_code.entry:
11156 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
11157 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
11158 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
11159 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
11160 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
11161 // CHECK-32-NEXT: ret void
11162 // CHECK-32: worker.exit:
11163 // CHECK-32-NEXT: ret void
11166 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined
11167 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
11168 // CHECK-32-NEXT: entry:
11169 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11170 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11171 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11172 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11173 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
11174 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11175 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11176 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11177 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11178 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11179 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11180 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11181 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11182 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11183 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11184 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11185 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11186 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11187 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11188 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11189 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11190 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11191 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11192 // CHECK-32: cond.true:
11193 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11194 // CHECK-32: cond.false:
11195 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11196 // CHECK-32-NEXT: br label [[COND_END]]
11197 // CHECK-32: cond.end:
11198 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11199 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11200 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11201 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11202 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11203 // CHECK-32: omp.inner.for.cond:
11204 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11205 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11206 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11207 // CHECK-32: omp.inner.for.body:
11208 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11209 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11210 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11211 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11212 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11213 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11214 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11215 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11216 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11217 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11218 // CHECK-32: omp.inner.for.inc:
11219 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11220 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11221 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11222 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11223 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11224 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11225 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11226 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11227 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11228 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11229 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11230 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11231 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11232 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11233 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11234 // CHECK-32: cond.true5:
11235 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11236 // CHECK-32: cond.false6:
11237 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11238 // CHECK-32-NEXT: br label [[COND_END7]]
11239 // CHECK-32: cond.end7:
11240 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11241 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11242 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11243 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11244 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11245 // CHECK-32: omp.inner.for.end:
11246 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11247 // CHECK-32: omp.loop.exit:
11248 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11249 // CHECK-32-NEXT: ret void
11252 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined
11253 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11254 // CHECK-32-NEXT: entry:
11255 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11256 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11257 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11258 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11259 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11260 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11261 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11262 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11263 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11264 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11265 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11266 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11267 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11268 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11269 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11270 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11271 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11272 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11273 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11274 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11275 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11276 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11277 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11278 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11279 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
11280 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
11281 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11282 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11283 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11284 // CHECK-32: omp.inner.for.cond:
11285 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11286 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11287 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
11288 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11289 // CHECK-32: omp.inner.for.body:
11290 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11291 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
11292 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11293 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
11294 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11295 // CHECK-32: omp.body.continue:
11296 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11297 // CHECK-32: omp.inner.for.inc:
11298 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11299 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11300 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
11301 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
11302 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11303 // CHECK-32: omp.inner.for.end:
11304 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11305 // CHECK-32: omp.loop.exit:
11306 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
11307 // CHECK-32-NEXT: ret void
11310 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46
11311 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
11312 // CHECK-32-NEXT: entry:
11313 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
11314 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
11315 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
11316 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
11317 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_kernel_environment, ptr [[DYN_PTR]])
11318 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
11319 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
11320 // CHECK-32: user_code.entry:
11321 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
11322 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
11323 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
11324 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
11325 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
11326 // CHECK-32-NEXT: ret void
11327 // CHECK-32: worker.exit:
11328 // CHECK-32-NEXT: ret void
11331 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined
11332 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
11333 // CHECK-32-NEXT: entry:
11334 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11335 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11336 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11337 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11338 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
11339 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11340 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11341 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11342 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11343 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11344 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11345 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11346 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11347 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11348 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11349 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11350 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11351 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11352 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11353 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11354 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11355 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11356 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11357 // CHECK-32: cond.true:
11358 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11359 // CHECK-32: cond.false:
11360 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11361 // CHECK-32-NEXT: br label [[COND_END]]
11362 // CHECK-32: cond.end:
11363 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11364 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11365 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11366 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11367 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11368 // CHECK-32: omp.inner.for.cond:
11369 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11370 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11371 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11372 // CHECK-32: omp.inner.for.body:
11373 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11374 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11375 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11376 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11377 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11378 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11379 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11380 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11381 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11382 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11383 // CHECK-32: omp.inner.for.inc:
11384 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11385 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11386 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11387 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11388 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11389 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11390 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11391 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11392 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11393 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11394 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11395 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11396 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11397 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11398 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11399 // CHECK-32: cond.true5:
11400 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11401 // CHECK-32: cond.false6:
11402 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11403 // CHECK-32-NEXT: br label [[COND_END7]]
11404 // CHECK-32: cond.end7:
11405 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11406 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11407 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11408 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11409 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11410 // CHECK-32: omp.inner.for.end:
11411 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11412 // CHECK-32: omp.loop.exit:
11413 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11414 // CHECK-32-NEXT: ret void
11417 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined
11418 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11419 // CHECK-32-NEXT: entry:
11420 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11421 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11422 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11423 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11424 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11425 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11426 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11427 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11428 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11429 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11430 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11431 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11432 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11433 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11434 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11435 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11436 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11437 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11438 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11439 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11440 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11441 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11442 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11443 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11444 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11445 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11446 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
11447 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
11448 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
11449 // CHECK-32: omp.dispatch.cond:
11450 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
11451 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
11452 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
11453 // CHECK-32: omp.dispatch.body:
11454 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11455 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
11456 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11457 // CHECK-32: omp.inner.for.cond:
11458 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299:![0-9]+]]
11459 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP299]]
11460 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
11461 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11462 // CHECK-32: omp.inner.for.body:
11463 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
11464 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
11465 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11466 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP299]]
11467 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11468 // CHECK-32: omp.body.continue:
11469 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11470 // CHECK-32: omp.inner.for.inc:
11471 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
11472 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
11473 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
11474 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP300:![0-9]+]]
11475 // CHECK-32: omp.inner.for.end:
11476 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
11477 // CHECK-32: omp.dispatch.inc:
11478 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
11479 // CHECK-32: omp.dispatch.end:
11480 // CHECK-32-NEXT: ret void
11483 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49
11484 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
11485 // CHECK-32-NEXT: entry:
11486 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
11487 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
11488 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
11489 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
11490 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_kernel_environment, ptr [[DYN_PTR]])
11491 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
11492 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
11493 // CHECK-32: user_code.entry:
11494 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
11495 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
11496 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
11497 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
11498 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
11499 // CHECK-32-NEXT: ret void
11500 // CHECK-32: worker.exit:
11501 // CHECK-32-NEXT: ret void
11504 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined
11505 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
11506 // CHECK-32-NEXT: entry:
11507 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11508 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11509 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11510 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11511 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
11512 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11513 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11514 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11515 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11516 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11517 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11518 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11519 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11520 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11521 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11522 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11523 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11524 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11525 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11526 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11527 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11528 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11529 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11530 // CHECK-32: cond.true:
11531 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11532 // CHECK-32: cond.false:
11533 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11534 // CHECK-32-NEXT: br label [[COND_END]]
11535 // CHECK-32: cond.end:
11536 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11537 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11538 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11539 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11540 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11541 // CHECK-32: omp.inner.for.cond:
11542 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11543 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11544 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11545 // CHECK-32: omp.inner.for.body:
11546 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11547 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11548 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11549 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11550 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11551 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11552 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11553 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11554 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11555 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11556 // CHECK-32: omp.inner.for.inc:
11557 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11558 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11559 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11560 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11561 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11562 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11563 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11564 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11565 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11566 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11567 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11568 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11569 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11570 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11571 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11572 // CHECK-32: cond.true5:
11573 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11574 // CHECK-32: cond.false6:
11575 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11576 // CHECK-32-NEXT: br label [[COND_END7]]
11577 // CHECK-32: cond.end7:
11578 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11579 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11580 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11581 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11582 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11583 // CHECK-32: omp.inner.for.end:
11584 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11585 // CHECK-32: omp.loop.exit:
11586 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11587 // CHECK-32-NEXT: ret void
11590 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined
11591 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11592 // CHECK-32-NEXT: entry:
11593 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11594 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11595 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11596 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11597 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11598 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11599 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11600 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11601 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11602 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11603 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11604 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11605 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11606 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11607 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11608 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11609 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11610 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11611 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11612 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11613 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11614 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11615 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11616 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11617 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11618 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11619 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
11620 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
11621 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
11622 // CHECK-32: omp.dispatch.cond:
11623 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
11624 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
11625 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
11626 // CHECK-32: omp.dispatch.body:
11627 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11628 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
11629 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11630 // CHECK-32: omp.inner.for.cond:
11631 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302:![0-9]+]]
11632 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP302]]
11633 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
11634 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11635 // CHECK-32: omp.inner.for.body:
11636 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
11637 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
11638 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11639 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP302]]
11640 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11641 // CHECK-32: omp.body.continue:
11642 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11643 // CHECK-32: omp.inner.for.inc:
11644 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
11645 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
11646 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
11647 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP303:![0-9]+]]
11648 // CHECK-32: omp.inner.for.end:
11649 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
11650 // CHECK-32: omp.dispatch.inc:
11651 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
11652 // CHECK-32: omp.dispatch.end:
11653 // CHECK-32-NEXT: ret void
11656 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52
11657 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
11658 // CHECK-32-NEXT: entry:
11659 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
11660 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
11661 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
11662 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
11663 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_kernel_environment, ptr [[DYN_PTR]])
11664 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
11665 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
11666 // CHECK-32: user_code.entry:
11667 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
11668 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
11669 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
11670 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
11671 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
11672 // CHECK-32-NEXT: ret void
11673 // CHECK-32: worker.exit:
11674 // CHECK-32-NEXT: ret void
11677 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined
11678 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
11679 // CHECK-32-NEXT: entry:
11680 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11681 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11682 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11683 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11684 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
11685 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11686 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11687 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11688 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11689 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11690 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11691 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11692 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11693 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11694 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11695 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11696 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11697 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11698 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11699 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11700 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11701 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11702 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11703 // CHECK-32: cond.true:
11704 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11705 // CHECK-32: cond.false:
11706 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11707 // CHECK-32-NEXT: br label [[COND_END]]
11708 // CHECK-32: cond.end:
11709 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11710 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11711 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11712 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11713 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11714 // CHECK-32: omp.inner.for.cond:
11715 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11716 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11717 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11718 // CHECK-32: omp.inner.for.body:
11719 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11720 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11721 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11722 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11723 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11724 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11725 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11726 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11727 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11728 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11729 // CHECK-32: omp.inner.for.inc:
11730 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11731 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11732 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11733 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11734 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11735 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11736 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11737 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11738 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11739 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11740 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11741 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11742 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11743 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11744 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11745 // CHECK-32: cond.true5:
11746 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11747 // CHECK-32: cond.false6:
11748 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11749 // CHECK-32-NEXT: br label [[COND_END7]]
11750 // CHECK-32: cond.end7:
11751 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11752 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11753 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11754 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11755 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11756 // CHECK-32: omp.inner.for.end:
11757 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11758 // CHECK-32: omp.loop.exit:
11759 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11760 // CHECK-32-NEXT: ret void
11763 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined
11764 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11765 // CHECK-32-NEXT: entry:
11766 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11767 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11768 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11769 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11770 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11771 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11772 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11773 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11774 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11775 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11776 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11777 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11778 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11779 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11780 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11781 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11782 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11783 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11784 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11785 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11786 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11787 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11788 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11789 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11790 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11791 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11792 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
11793 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
11794 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
11795 // CHECK-32: omp.dispatch.cond:
11796 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
11797 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
11798 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
11799 // CHECK-32: omp.dispatch.body:
11800 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11801 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
11802 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11803 // CHECK-32: omp.inner.for.cond:
11804 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305:![0-9]+]]
11805 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP305]]
11806 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
11807 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11808 // CHECK-32: omp.inner.for.body:
11809 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
11810 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
11811 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11812 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP305]]
11813 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11814 // CHECK-32: omp.body.continue:
11815 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11816 // CHECK-32: omp.inner.for.inc:
11817 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
11818 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
11819 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
11820 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP306:![0-9]+]]
11821 // CHECK-32: omp.inner.for.end:
11822 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
11823 // CHECK-32: omp.dispatch.inc:
11824 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
11825 // CHECK-32: omp.dispatch.end:
11826 // CHECK-32-NEXT: ret void
11829 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55
11830 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
11831 // CHECK-32-NEXT: entry:
11832 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
11833 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
11834 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
11835 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
11836 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_kernel_environment, ptr [[DYN_PTR]])
11837 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
11838 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
11839 // CHECK-32: user_code.entry:
11840 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
11841 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
11842 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
11843 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
11844 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
11845 // CHECK-32-NEXT: ret void
11846 // CHECK-32: worker.exit:
11847 // CHECK-32-NEXT: ret void
11850 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined
11851 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
11852 // CHECK-32-NEXT: entry:
11853 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11854 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11855 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11856 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11857 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
11858 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
11859 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11860 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11861 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11862 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
11863 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11864 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11865 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
11866 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
11867 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11868 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11869 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
11870 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11871 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
11872 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
11873 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11874 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
11875 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
11876 // CHECK-32: cond.true:
11877 // CHECK-32-NEXT: br label [[COND_END:%.*]]
11878 // CHECK-32: cond.false:
11879 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11880 // CHECK-32-NEXT: br label [[COND_END]]
11881 // CHECK-32: cond.end:
11882 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
11883 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
11884 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11885 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
11886 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11887 // CHECK-32: omp.inner.for.cond:
11888 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11889 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
11890 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11891 // CHECK-32: omp.inner.for.body:
11892 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11893 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11894 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
11895 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
11896 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
11897 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
11898 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
11899 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
11900 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
11901 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11902 // CHECK-32: omp.inner.for.inc:
11903 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
11904 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11905 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
11906 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
11907 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11908 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11909 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
11910 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
11911 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11912 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
11913 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
11914 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
11915 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11916 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
11917 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
11918 // CHECK-32: cond.true5:
11919 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
11920 // CHECK-32: cond.false6:
11921 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
11922 // CHECK-32-NEXT: br label [[COND_END7]]
11923 // CHECK-32: cond.end7:
11924 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
11925 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
11926 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
11927 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
11928 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
11929 // CHECK-32: omp.inner.for.end:
11930 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
11931 // CHECK-32: omp.loop.exit:
11932 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
11933 // CHECK-32-NEXT: ret void
11936 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined
11937 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
11938 // CHECK-32-NEXT: entry:
11939 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
11940 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
11941 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
11942 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
11943 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
11944 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
11945 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
11946 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
11947 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
11948 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
11949 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
11950 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
11951 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
11952 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11953 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11954 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
11955 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
11956 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
11957 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
11958 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
11959 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
11960 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
11961 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
11962 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11963 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
11964 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
11965 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
11966 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
11967 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
11968 // CHECK-32: omp.dispatch.cond:
11969 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
11970 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
11971 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
11972 // CHECK-32: omp.dispatch.body:
11973 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
11974 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
11975 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
11976 // CHECK-32: omp.inner.for.cond:
11977 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308:![0-9]+]]
11978 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP308]]
11979 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
11980 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
11981 // CHECK-32: omp.inner.for.body:
11982 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
11983 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
11984 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
11985 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP308]]
11986 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
11987 // CHECK-32: omp.body.continue:
11988 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
11989 // CHECK-32: omp.inner.for.inc:
11990 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
11991 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
11992 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
11993 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP309:![0-9]+]]
11994 // CHECK-32: omp.inner.for.end:
11995 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
11996 // CHECK-32: omp.dispatch.inc:
11997 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
11998 // CHECK-32: omp.dispatch.end:
11999 // CHECK-32-NEXT: ret void
12002 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58
12003 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12004 // CHECK-32-NEXT: entry:
12005 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12006 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12007 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12008 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12009 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_kernel_environment, ptr [[DYN_PTR]])
12010 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12011 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12012 // CHECK-32: user_code.entry:
12013 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12014 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12015 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12016 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12017 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12018 // CHECK-32-NEXT: ret void
12019 // CHECK-32: worker.exit:
12020 // CHECK-32-NEXT: ret void
12023 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined
12024 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12025 // CHECK-32-NEXT: entry:
12026 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12027 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12028 // CHECK-32-NEXT: [[B:%.*]] = alloca i32, align 4
12029 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12030 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12031 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12032 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12033 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12034 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12035 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12036 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12037 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12038 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12039 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12040 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12041 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12042 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12043 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
12044 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12045 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12046 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
12047 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12048 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12049 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12050 // CHECK-32: cond.true:
12051 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12052 // CHECK-32: cond.false:
12053 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12054 // CHECK-32-NEXT: br label [[COND_END]]
12055 // CHECK-32: cond.end:
12056 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12057 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12058 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12059 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12060 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12061 // CHECK-32: omp.inner.for.cond:
12062 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311:![0-9]+]]
12063 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
12064 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12065 // CHECK-32: omp.inner.for.body:
12066 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
12067 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12068 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12069 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
12070 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP311]]
12071 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12072 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
12073 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP311]]
12074 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP311]]
12075 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12076 // CHECK-32: omp.inner.for.inc:
12077 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
12078 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
12079 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
12080 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
12081 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
12082 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
12083 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
12084 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
12085 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12086 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
12087 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
12088 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12089 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12090 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
12091 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
12092 // CHECK-32: cond.true5:
12093 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
12094 // CHECK-32: cond.false6:
12095 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12096 // CHECK-32-NEXT: br label [[COND_END7]]
12097 // CHECK-32: cond.end7:
12098 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
12099 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
12100 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
12101 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
12102 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP312:![0-9]+]]
12103 // CHECK-32: omp.inner.for.end:
12104 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12105 // CHECK-32: omp.loop.exit:
12106 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
12107 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12108 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
12109 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12110 // CHECK-32: .omp.final.then:
12111 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12112 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12113 // CHECK-32: .omp.final.done:
12114 // CHECK-32-NEXT: ret void
12117 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined
12118 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
12119 // CHECK-32-NEXT: entry:
12120 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12121 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12122 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
12123 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
12124 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12125 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12126 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
12127 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
12128 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12129 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12130 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12131 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12132 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12133 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12134 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12135 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
12136 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
12137 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12138 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12139 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
12140 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
12141 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12142 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12143 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12144 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
12145 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
12146 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12147 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12148 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12149 // CHECK-32: omp.inner.for.cond:
12150 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314:![0-9]+]]
12151 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP314]]
12152 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
12153 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12154 // CHECK-32: omp.inner.for.body:
12155 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
12156 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
12157 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
12158 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP314]]
12159 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
12160 // CHECK-32: omp.body.continue:
12161 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12162 // CHECK-32: omp.inner.for.inc:
12163 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
12164 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP314]]
12165 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
12166 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
12167 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP315:![0-9]+]]
12168 // CHECK-32: omp.inner.for.end:
12169 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12170 // CHECK-32: omp.loop.exit:
12171 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
12172 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12173 // CHECK-32-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
12174 // CHECK-32-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12175 // CHECK-32: .omp.final.then:
12176 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12177 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12178 // CHECK-32: .omp.final.done:
12179 // CHECK-32-NEXT: ret void
12182 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66
12183 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12184 // CHECK-32-NEXT: entry:
12185 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12186 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12187 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12188 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12189 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_kernel_environment, ptr [[DYN_PTR]])
12190 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12191 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12192 // CHECK-32: user_code.entry:
12193 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12194 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12195 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12196 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12197 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12198 // CHECK-32-NEXT: ret void
12199 // CHECK-32: worker.exit:
12200 // CHECK-32-NEXT: ret void
12203 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined
12204 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12205 // CHECK-32-NEXT: entry:
12206 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12207 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12208 // CHECK-32-NEXT: [[B:%.*]] = alloca [3 x i32], align 4
12209 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12210 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12211 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12212 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12213 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12214 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12215 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12216 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12217 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12218 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12219 // CHECK-32-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[B]], ptr align 4 @"__const.<captured>.b", i32 12, i1 false)
12220 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12221 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12222 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12223 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12224 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
12225 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12226 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12227 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
12228 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12229 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12230 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12231 // CHECK-32: cond.true:
12232 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12233 // CHECK-32: cond.false:
12234 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12235 // CHECK-32-NEXT: br label [[COND_END]]
12236 // CHECK-32: cond.end:
12237 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12238 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12239 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12240 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12241 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12242 // CHECK-32: omp.inner.for.cond:
12243 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317:![0-9]+]]
12244 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
12245 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12246 // CHECK-32: omp.inner.for.body:
12247 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
12248 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12249 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12250 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
12251 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP317]]
12252 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12253 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
12254 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP317]]
12255 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP317]]
12256 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12257 // CHECK-32: omp.inner.for.inc:
12258 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
12259 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
12260 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
12261 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
12262 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
12263 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
12264 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
12265 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
12266 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12267 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
12268 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
12269 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12270 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12271 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
12272 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
12273 // CHECK-32: cond.true5:
12274 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
12275 // CHECK-32: cond.false6:
12276 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12277 // CHECK-32-NEXT: br label [[COND_END7]]
12278 // CHECK-32: cond.end7:
12279 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
12280 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
12281 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
12282 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
12283 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP318:![0-9]+]]
12284 // CHECK-32: omp.inner.for.end:
12285 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12286 // CHECK-32: omp.loop.exit:
12287 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
12288 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12289 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
12290 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12291 // CHECK-32: .omp.final.then:
12292 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12293 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12294 // CHECK-32: .omp.final.done:
12295 // CHECK-32-NEXT: ret void
12298 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined
12299 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
12300 // CHECK-32-NEXT: entry:
12301 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12302 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12303 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
12304 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
12305 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12306 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12307 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
12308 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
12309 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12310 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12311 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12312 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12313 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12314 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12315 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12316 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
12317 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
12318 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12319 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12320 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
12321 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
12322 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12323 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12324 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12325 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
12326 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
12327 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
12328 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
12329 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12330 // CHECK-32: cond.true:
12331 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12332 // CHECK-32: cond.false:
12333 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
12334 // CHECK-32-NEXT: br label [[COND_END]]
12335 // CHECK-32: cond.end:
12336 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
12337 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
12338 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12339 // CHECK-32-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
12340 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12341 // CHECK-32: omp.inner.for.cond:
12342 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320:![0-9]+]]
12343 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP320]]
12344 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
12345 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12346 // CHECK-32: omp.inner.for.body:
12347 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
12348 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
12349 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
12350 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP320]]
12351 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
12352 // CHECK-32: omp.body.continue:
12353 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12354 // CHECK-32: omp.inner.for.inc:
12355 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
12356 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
12357 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
12358 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP321:![0-9]+]]
12359 // CHECK-32: omp.inner.for.end:
12360 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12361 // CHECK-32: omp.loop.exit:
12362 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
12363 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12364 // CHECK-32-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
12365 // CHECK-32-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12366 // CHECK-32: .omp.final.then:
12367 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12368 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12369 // CHECK-32: .omp.final.done:
12370 // CHECK-32-NEXT: ret void
12373 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73
12374 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12375 // CHECK-32-NEXT: entry:
12376 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12377 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12378 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12379 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12380 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_kernel_environment, ptr [[DYN_PTR]])
12381 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12382 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12383 // CHECK-32: user_code.entry:
12384 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12385 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12386 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12387 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12388 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12389 // CHECK-32-NEXT: ret void
12390 // CHECK-32: worker.exit:
12391 // CHECK-32-NEXT: ret void
12394 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined
12395 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12396 // CHECK-32-NEXT: entry:
12397 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12398 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12399 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12400 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12401 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12402 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12403 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12404 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12405 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12406 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12407 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12408 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12409 // CHECK-32-NEXT: [[C:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
12410 // CHECK-32-NEXT: [[B:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
12411 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12412 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12413 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12414 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12415 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12416 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12417 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
12418 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12419 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12420 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12421 // CHECK-32: cond.true:
12422 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12423 // CHECK-32: cond.false:
12424 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12425 // CHECK-32-NEXT: br label [[COND_END]]
12426 // CHECK-32: cond.end:
12427 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12428 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12429 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12430 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12431 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12432 // CHECK-32: omp.inner.for.cond:
12433 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323:![0-9]+]]
12434 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
12435 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
12436 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12437 // CHECK-32: omp.inner.for.body:
12438 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP323]]
12439 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
12440 // CHECK-32-NEXT: [[TMP9:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12441 // CHECK-32-NEXT: [[TMP10:%.*]] = inttoptr i32 [[TMP7]] to ptr
12442 // CHECK-32-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 4, !llvm.access.group [[ACC_GRP323]]
12443 // CHECK-32-NEXT: [[TMP11:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12444 // CHECK-32-NEXT: [[TMP12:%.*]] = inttoptr i32 [[TMP8]] to ptr
12445 // CHECK-32-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 4, !llvm.access.group [[ACC_GRP323]]
12446 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP323]]
12447 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12448 // CHECK-32: omp.inner.for.inc:
12449 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
12450 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP323]]
12451 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
12452 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
12453 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP324:![0-9]+]]
12454 // CHECK-32: omp.inner.for.end:
12455 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12456 // CHECK-32: omp.loop.exit:
12457 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
12458 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12459 // CHECK-32-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
12460 // CHECK-32-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12461 // CHECK-32: .omp.final.then:
12462 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12463 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12464 // CHECK-32: .omp.final.done:
12465 // CHECK-32-NEXT: store ptr [[B]], ptr [[C]], align 4
12466 // CHECK-32-NEXT: call void @__kmpc_free_shared(ptr [[B]], i32 4)
12467 // CHECK-32-NEXT: call void @__kmpc_free_shared(ptr [[C]], i32 4)
12468 // CHECK-32-NEXT: ret void
12471 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined
12472 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
12473 // CHECK-32-NEXT: entry:
12474 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12475 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12476 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
12477 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
12478 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12479 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12480 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
12481 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
12482 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12483 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12484 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12485 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12486 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12487 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12488 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12489 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
12490 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
12491 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12492 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12493 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
12494 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
12495 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12496 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12497 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12498 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
12499 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
12500 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12501 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12502 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12503 // CHECK-32: omp.inner.for.cond:
12504 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326:![0-9]+]]
12505 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP326]]
12506 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
12507 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12508 // CHECK-32: omp.inner.for.body:
12509 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
12510 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
12511 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
12512 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP326]]
12513 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
12514 // CHECK-32: omp.body.continue:
12515 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12516 // CHECK-32: omp.inner.for.inc:
12517 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
12518 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP326]]
12519 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
12520 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
12521 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP327:![0-9]+]]
12522 // CHECK-32: omp.inner.for.end:
12523 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12524 // CHECK-32: omp.loop.exit:
12525 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
12526 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12527 // CHECK-32-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
12528 // CHECK-32-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12529 // CHECK-32: .omp.final.then:
12530 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12531 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12532 // CHECK-32: .omp.final.done:
12533 // CHECK-32-NEXT: ret void
12536 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper
12537 // CHECK-32-SAME: (i16 noundef zeroext [[TMP0:%.*]], i32 noundef [[TMP1:%.*]]) #[[ATTR7:[0-9]+]] {
12538 // CHECK-32-NEXT: entry:
12539 // CHECK-32-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
12540 // CHECK-32-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
12541 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12542 // CHECK-32-NEXT: [[GLOBAL_ARGS:%.*]] = alloca ptr, align 4
12543 // CHECK-32-NEXT: store i16 [[TMP0]], ptr [[DOTADDR]], align 2
12544 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTADDR1]], align 4
12545 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12546 // CHECK-32-NEXT: call void @__kmpc_get_shared_variables(ptr [[GLOBAL_ARGS]])
12547 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[GLOBAL_ARGS]], align 4
12548 // CHECK-32-NEXT: [[TMP3:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i32 0
12549 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
12550 // CHECK-32-NEXT: [[TMP5:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i32 1
12551 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
12552 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined(ptr [[DOTADDR1]], ptr [[DOTZERO_ADDR]], i32 [[TMP4]], i32 [[TMP6]]) #[[ATTR2]]
12553 // CHECK-32-NEXT: ret void
12556 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81
12557 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12558 // CHECK-32-NEXT: entry:
12559 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12560 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12561 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12562 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12563 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_kernel_environment, ptr [[DYN_PTR]])
12564 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12565 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12566 // CHECK-32: user_code.entry:
12567 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12568 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12569 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12570 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12571 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12572 // CHECK-32-NEXT: ret void
12573 // CHECK-32: worker.exit:
12574 // CHECK-32-NEXT: ret void
12577 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined
12578 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12579 // CHECK-32-NEXT: entry:
12580 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12581 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12582 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12583 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12584 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12585 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12586 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12587 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12588 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12589 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12590 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12591 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12592 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12593 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12594 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12595 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12596 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
12597 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12598 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12599 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
12600 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12601 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12602 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12603 // CHECK-32: cond.true:
12604 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12605 // CHECK-32: cond.false:
12606 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12607 // CHECK-32-NEXT: br label [[COND_END]]
12608 // CHECK-32: cond.end:
12609 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12610 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12611 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12612 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12613 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12614 // CHECK-32: omp.inner.for.cond:
12615 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329:![0-9]+]]
12616 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
12617 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12618 // CHECK-32: omp.inner.for.body:
12619 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
12620 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12621 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12622 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
12623 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP329]]
12624 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12625 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
12626 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP329]]
12627 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP329]]
12628 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12629 // CHECK-32: omp.inner.for.inc:
12630 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
12631 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
12632 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
12633 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
12634 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
12635 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
12636 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
12637 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
12638 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12639 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
12640 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
12641 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12642 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12643 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
12644 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
12645 // CHECK-32: cond.true5:
12646 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
12647 // CHECK-32: cond.false6:
12648 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12649 // CHECK-32-NEXT: br label [[COND_END7]]
12650 // CHECK-32: cond.end7:
12651 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
12652 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
12653 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
12654 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
12655 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP330:![0-9]+]]
12656 // CHECK-32: omp.inner.for.end:
12657 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12658 // CHECK-32: omp.loop.exit:
12659 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
12660 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12661 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
12662 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12663 // CHECK-32: .omp.final.then:
12664 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12665 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12666 // CHECK-32: .omp.final.done:
12667 // CHECK-32-NEXT: ret void
12670 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined
12671 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
12672 // CHECK-32-NEXT: entry:
12673 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12674 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12675 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
12676 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
12677 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12678 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12679 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
12680 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
12681 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12682 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12683 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12684 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12685 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12686 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12687 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12688 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
12689 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
12690 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12691 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12692 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
12693 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
12694 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12695 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12696 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12697 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
12698 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12699 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
12700 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
12701 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
12702 // CHECK-32: omp.dispatch.cond:
12703 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
12704 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
12705 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
12706 // CHECK-32: omp.dispatch.body:
12707 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12708 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
12709 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12710 // CHECK-32: omp.inner.for.cond:
12711 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332:![0-9]+]]
12712 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP332]]
12713 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
12714 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12715 // CHECK-32: omp.inner.for.body:
12716 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
12717 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
12718 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
12719 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP332]]
12720 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
12721 // CHECK-32: omp.body.continue:
12722 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12723 // CHECK-32: omp.inner.for.inc:
12724 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
12725 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
12726 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
12727 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP333:![0-9]+]]
12728 // CHECK-32: omp.inner.for.end:
12729 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
12730 // CHECK-32: omp.dispatch.inc:
12731 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
12732 // CHECK-32: omp.dispatch.end:
12733 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12734 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
12735 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12736 // CHECK-32: .omp.final.then:
12737 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12738 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12739 // CHECK-32: .omp.final.done:
12740 // CHECK-32-NEXT: ret void
12743 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85
12744 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12745 // CHECK-32-NEXT: entry:
12746 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12747 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12748 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12749 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12750 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_kernel_environment, ptr [[DYN_PTR]])
12751 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12752 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12753 // CHECK-32: user_code.entry:
12754 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12755 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12756 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12757 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12758 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12759 // CHECK-32-NEXT: ret void
12760 // CHECK-32: worker.exit:
12761 // CHECK-32-NEXT: ret void
12764 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined
12765 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12766 // CHECK-32-NEXT: entry:
12767 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12768 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12769 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12770 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12771 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12772 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12773 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12774 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12775 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12776 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12777 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12778 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12779 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12780 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12781 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12782 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12783 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
12784 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12785 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12786 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
12787 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12788 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12789 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12790 // CHECK-32: cond.true:
12791 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12792 // CHECK-32: cond.false:
12793 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12794 // CHECK-32-NEXT: br label [[COND_END]]
12795 // CHECK-32: cond.end:
12796 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12797 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12798 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12799 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12800 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12801 // CHECK-32: omp.inner.for.cond:
12802 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335:![0-9]+]]
12803 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
12804 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12805 // CHECK-32: omp.inner.for.body:
12806 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
12807 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12808 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12809 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
12810 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP335]]
12811 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12812 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
12813 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP335]]
12814 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP335]]
12815 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12816 // CHECK-32: omp.inner.for.inc:
12817 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
12818 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
12819 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
12820 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
12821 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
12822 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
12823 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
12824 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
12825 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12826 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
12827 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
12828 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12829 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12830 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
12831 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
12832 // CHECK-32: cond.true5:
12833 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
12834 // CHECK-32: cond.false6:
12835 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12836 // CHECK-32-NEXT: br label [[COND_END7]]
12837 // CHECK-32: cond.end7:
12838 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
12839 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
12840 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
12841 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
12842 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP336:![0-9]+]]
12843 // CHECK-32: omp.inner.for.end:
12844 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
12845 // CHECK-32: omp.loop.exit:
12846 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
12847 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12848 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
12849 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12850 // CHECK-32: .omp.final.then:
12851 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12852 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12853 // CHECK-32: .omp.final.done:
12854 // CHECK-32-NEXT: ret void
12857 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined
12858 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
12859 // CHECK-32-NEXT: entry:
12860 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12861 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12862 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
12863 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
12864 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12865 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12866 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
12867 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
12868 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12869 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12870 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12871 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12872 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12873 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12874 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12875 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
12876 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
12877 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
12878 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
12879 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
12880 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
12881 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12882 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12883 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12884 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
12885 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12886 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
12887 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
12888 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
12889 // CHECK-32: omp.dispatch.cond:
12890 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
12891 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
12892 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
12893 // CHECK-32: omp.dispatch.body:
12894 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
12895 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
12896 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12897 // CHECK-32: omp.inner.for.cond:
12898 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338:![0-9]+]]
12899 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP338]]
12900 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
12901 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12902 // CHECK-32: omp.inner.for.body:
12903 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
12904 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
12905 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
12906 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP338]]
12907 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
12908 // CHECK-32: omp.body.continue:
12909 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
12910 // CHECK-32: omp.inner.for.inc:
12911 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
12912 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
12913 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
12914 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP339:![0-9]+]]
12915 // CHECK-32: omp.inner.for.end:
12916 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
12917 // CHECK-32: omp.dispatch.inc:
12918 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
12919 // CHECK-32: omp.dispatch.end:
12920 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
12921 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
12922 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
12923 // CHECK-32: .omp.final.then:
12924 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
12925 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
12926 // CHECK-32: .omp.final.done:
12927 // CHECK-32-NEXT: ret void
12930 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89
12931 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
12932 // CHECK-32-NEXT: entry:
12933 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
12934 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
12935 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
12936 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
12937 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_kernel_environment, ptr [[DYN_PTR]])
12938 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
12939 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
12940 // CHECK-32: user_code.entry:
12941 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
12942 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
12943 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
12944 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
12945 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
12946 // CHECK-32-NEXT: ret void
12947 // CHECK-32: worker.exit:
12948 // CHECK-32-NEXT: ret void
12951 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined
12952 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
12953 // CHECK-32-NEXT: entry:
12954 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
12955 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
12956 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
12957 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
12958 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
12959 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
12960 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
12961 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
12962 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
12963 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
12964 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
12965 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
12966 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
12967 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
12968 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
12969 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
12970 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
12971 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
12972 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
12973 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
12974 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12975 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
12976 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
12977 // CHECK-32: cond.true:
12978 // CHECK-32-NEXT: br label [[COND_END:%.*]]
12979 // CHECK-32: cond.false:
12980 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
12981 // CHECK-32-NEXT: br label [[COND_END]]
12982 // CHECK-32: cond.end:
12983 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
12984 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
12985 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
12986 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
12987 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
12988 // CHECK-32: omp.inner.for.cond:
12989 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341:![0-9]+]]
12990 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
12991 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
12992 // CHECK-32: omp.inner.for.body:
12993 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
12994 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
12995 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
12996 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
12997 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP341]]
12998 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
12999 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13000 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP341]]
13001 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP341]]
13002 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13003 // CHECK-32: omp.inner.for.inc:
13004 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
13005 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
13006 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13007 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
13008 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
13009 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
13010 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13011 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
13012 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
13013 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
13014 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13015 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
13016 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
13017 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13018 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13019 // CHECK-32: cond.true5:
13020 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13021 // CHECK-32: cond.false6:
13022 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
13023 // CHECK-32-NEXT: br label [[COND_END7]]
13024 // CHECK-32: cond.end7:
13025 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13026 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
13027 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
13028 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
13029 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP342:![0-9]+]]
13030 // CHECK-32: omp.inner.for.end:
13031 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13032 // CHECK-32: omp.loop.exit:
13033 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13034 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
13035 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
13036 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
13037 // CHECK-32: .omp.final.then:
13038 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
13039 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
13040 // CHECK-32: .omp.final.done:
13041 // CHECK-32-NEXT: ret void
13044 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined
13045 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13046 // CHECK-32-NEXT: entry:
13047 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13048 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13049 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13050 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13051 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13052 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13053 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13054 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13055 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13056 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13057 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13058 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13059 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13060 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13061 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13062 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13063 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13064 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13065 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13066 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13067 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13068 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13069 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13070 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13071 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13072 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13073 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
13074 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
13075 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
13076 // CHECK-32: omp.dispatch.cond:
13077 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
13078 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
13079 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
13080 // CHECK-32: omp.dispatch.body:
13081 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13082 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
13083 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13084 // CHECK-32: omp.inner.for.cond:
13085 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344:![0-9]+]]
13086 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP344]]
13087 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
13088 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13089 // CHECK-32: omp.inner.for.body:
13090 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
13091 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
13092 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13093 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP344]]
13094 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13095 // CHECK-32: omp.body.continue:
13096 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13097 // CHECK-32: omp.inner.for.inc:
13098 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
13099 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
13100 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
13101 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP345:![0-9]+]]
13102 // CHECK-32: omp.inner.for.end:
13103 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
13104 // CHECK-32: omp.dispatch.inc:
13105 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
13106 // CHECK-32: omp.dispatch.end:
13107 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
13108 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
13109 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
13110 // CHECK-32: .omp.final.then:
13111 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
13112 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
13113 // CHECK-32: .omp.final.done:
13114 // CHECK-32-NEXT: ret void
13117 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93
13118 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13119 // CHECK-32-NEXT: entry:
13120 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13121 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13122 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13123 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13124 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_kernel_environment, ptr [[DYN_PTR]])
13125 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13126 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13127 // CHECK-32: user_code.entry:
13128 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13129 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13130 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13131 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13132 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13133 // CHECK-32-NEXT: ret void
13134 // CHECK-32: worker.exit:
13135 // CHECK-32-NEXT: ret void
13138 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined
13139 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
13140 // CHECK-32-NEXT: entry:
13141 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13142 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13143 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13144 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13145 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
13146 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
13147 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13148 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13149 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13150 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
13151 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13152 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13153 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
13154 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
13155 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13156 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13157 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
13158 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13159 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
13160 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
13161 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13162 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
13163 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13164 // CHECK-32: cond.true:
13165 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13166 // CHECK-32: cond.false:
13167 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13168 // CHECK-32-NEXT: br label [[COND_END]]
13169 // CHECK-32: cond.end:
13170 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
13171 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
13172 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13173 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13174 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13175 // CHECK-32: omp.inner.for.cond:
13176 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347:![0-9]+]]
13177 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
13178 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13179 // CHECK-32: omp.inner.for.body:
13180 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
13181 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13182 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
13183 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
13184 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP347]]
13185 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
13186 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13187 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP347]]
13188 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP347]]
13189 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13190 // CHECK-32: omp.inner.for.inc:
13191 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
13192 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
13193 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13194 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
13195 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
13196 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
13197 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13198 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
13199 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13200 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
13201 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13202 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13203 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13204 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13205 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13206 // CHECK-32: cond.true5:
13207 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13208 // CHECK-32: cond.false6:
13209 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13210 // CHECK-32-NEXT: br label [[COND_END7]]
13211 // CHECK-32: cond.end7:
13212 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13213 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
13214 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
13215 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
13216 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP348:![0-9]+]]
13217 // CHECK-32: omp.inner.for.end:
13218 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13219 // CHECK-32: omp.loop.exit:
13220 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13221 // CHECK-32-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
13222 // CHECK-32-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
13223 // CHECK-32-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
13224 // CHECK-32: .omp.final.then:
13225 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
13226 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
13227 // CHECK-32: .omp.final.done:
13228 // CHECK-32-NEXT: ret void
13231 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined
13232 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13233 // CHECK-32-NEXT: entry:
13234 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13235 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13236 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13237 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13238 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13239 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13240 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13241 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13242 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13243 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13244 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13245 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13246 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13247 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13248 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13249 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13250 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13251 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13252 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13253 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13254 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13255 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13256 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13257 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13258 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13259 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13260 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
13261 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
13262 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
13263 // CHECK-32: omp.dispatch.cond:
13264 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
13265 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
13266 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
13267 // CHECK-32: omp.dispatch.body:
13268 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13269 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
13270 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13271 // CHECK-32: omp.inner.for.cond:
13272 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350:![0-9]+]]
13273 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP350]]
13274 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
13275 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13276 // CHECK-32: omp.inner.for.body:
13277 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
13278 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
13279 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13280 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP350]]
13281 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13282 // CHECK-32: omp.body.continue:
13283 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13284 // CHECK-32: omp.inner.for.inc:
13285 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
13286 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
13287 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
13288 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP351:![0-9]+]]
13289 // CHECK-32: omp.inner.for.end:
13290 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
13291 // CHECK-32: omp.dispatch.inc:
13292 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
13293 // CHECK-32: omp.dispatch.end:
13294 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
13295 // CHECK-32-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
13296 // CHECK-32-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
13297 // CHECK-32: .omp.final.then:
13298 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
13299 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
13300 // CHECK-32: .omp.final.done:
13301 // CHECK-32-NEXT: ret void
13304 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97
13305 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13306 // CHECK-32-NEXT: entry:
13307 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13308 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13309 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13310 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13311 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_kernel_environment, ptr [[DYN_PTR]])
13312 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13313 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13314 // CHECK-32: user_code.entry:
13315 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13316 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13317 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13318 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13319 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13320 // CHECK-32-NEXT: ret void
13321 // CHECK-32: worker.exit:
13322 // CHECK-32-NEXT: ret void
13325 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined
13326 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
13327 // CHECK-32-NEXT: entry:
13328 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13329 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13330 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13331 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13332 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
13333 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
13334 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13335 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13336 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13337 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
13338 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13339 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13340 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
13341 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
13342 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13343 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13344 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
13345 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13346 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
13347 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
13348 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13349 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
13350 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13351 // CHECK-32: cond.true:
13352 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13353 // CHECK-32: cond.false:
13354 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13355 // CHECK-32-NEXT: br label [[COND_END]]
13356 // CHECK-32: cond.end:
13357 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
13358 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
13359 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13360 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13361 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13362 // CHECK-32: omp.inner.for.cond:
13363 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13364 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
13365 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13366 // CHECK-32: omp.inner.for.body:
13367 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13368 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13369 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
13370 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
13371 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
13372 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
13373 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13374 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
13375 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
13376 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13377 // CHECK-32: omp.inner.for.inc:
13378 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13379 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13380 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13381 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
13382 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13383 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13384 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13385 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
13386 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13387 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13388 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13389 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
13390 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13391 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13392 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13393 // CHECK-32: cond.true5:
13394 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13395 // CHECK-32: cond.false6:
13396 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13397 // CHECK-32-NEXT: br label [[COND_END7]]
13398 // CHECK-32: cond.end7:
13399 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13400 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
13401 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13402 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
13403 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13404 // CHECK-32: omp.inner.for.end:
13405 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13406 // CHECK-32: omp.loop.exit:
13407 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13408 // CHECK-32-NEXT: ret void
13411 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined
13412 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13413 // CHECK-32-NEXT: entry:
13414 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13415 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13416 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13417 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13418 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13419 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13420 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13421 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13422 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13423 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13424 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13425 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13426 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13427 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13428 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13429 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13430 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13431 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13432 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13433 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13434 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13435 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13436 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13437 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13438 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
13439 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
13440 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13441 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13442 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13443 // CHECK-32: omp.inner.for.cond:
13444 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13445 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13446 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
13447 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13448 // CHECK-32: omp.inner.for.body:
13449 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13450 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
13451 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13452 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
13453 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13454 // CHECK-32: omp.body.continue:
13455 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13456 // CHECK-32: omp.inner.for.inc:
13457 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13458 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13459 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
13460 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
13461 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13462 // CHECK-32: omp.inner.for.end:
13463 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13464 // CHECK-32: omp.loop.exit:
13465 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
13466 // CHECK-32-NEXT: ret void
13469 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101
13470 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13471 // CHECK-32-NEXT: entry:
13472 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13473 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13474 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13475 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13476 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_kernel_environment, ptr [[DYN_PTR]])
13477 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13478 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13479 // CHECK-32: user_code.entry:
13480 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13481 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13482 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13483 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13484 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13485 // CHECK-32-NEXT: ret void
13486 // CHECK-32: worker.exit:
13487 // CHECK-32-NEXT: ret void
13490 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined
13491 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
13492 // CHECK-32-NEXT: entry:
13493 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13494 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13495 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13496 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13497 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
13498 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
13499 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13500 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13501 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13502 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
13503 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13504 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13505 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
13506 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
13507 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13508 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13509 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
13510 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13511 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
13512 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
13513 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13514 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
13515 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13516 // CHECK-32: cond.true:
13517 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13518 // CHECK-32: cond.false:
13519 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13520 // CHECK-32-NEXT: br label [[COND_END]]
13521 // CHECK-32: cond.end:
13522 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
13523 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
13524 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13525 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13526 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13527 // CHECK-32: omp.inner.for.cond:
13528 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13529 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
13530 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13531 // CHECK-32: omp.inner.for.body:
13532 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13533 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13534 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
13535 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
13536 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
13537 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
13538 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13539 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
13540 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
13541 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13542 // CHECK-32: omp.inner.for.inc:
13543 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13544 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13545 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13546 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
13547 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13548 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13549 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13550 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
13551 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13552 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13553 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13554 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
13555 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13556 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13557 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13558 // CHECK-32: cond.true5:
13559 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13560 // CHECK-32: cond.false6:
13561 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13562 // CHECK-32-NEXT: br label [[COND_END7]]
13563 // CHECK-32: cond.end7:
13564 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13565 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
13566 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13567 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
13568 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13569 // CHECK-32: omp.inner.for.end:
13570 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13571 // CHECK-32: omp.loop.exit:
13572 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13573 // CHECK-32-NEXT: ret void
13576 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined
13577 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13578 // CHECK-32-NEXT: entry:
13579 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13580 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13581 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13582 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13583 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13584 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13585 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13586 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13587 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13588 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13589 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13590 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13591 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13592 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13593 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13594 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13595 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13596 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13597 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13598 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13599 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13600 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13601 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13602 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13603 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
13604 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
13605 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13606 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
13607 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13608 // CHECK-32: cond.true:
13609 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13610 // CHECK-32: cond.false:
13611 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13612 // CHECK-32-NEXT: br label [[COND_END]]
13613 // CHECK-32: cond.end:
13614 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
13615 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
13616 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13617 // CHECK-32-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
13618 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13619 // CHECK-32: omp.inner.for.cond:
13620 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13621 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13622 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
13623 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13624 // CHECK-32: omp.inner.for.body:
13625 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13626 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
13627 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13628 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
13629 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13630 // CHECK-32: omp.body.continue:
13631 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13632 // CHECK-32: omp.inner.for.inc:
13633 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13634 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
13635 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
13636 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13637 // CHECK-32: omp.inner.for.end:
13638 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13639 // CHECK-32: omp.loop.exit:
13640 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
13641 // CHECK-32-NEXT: ret void
13644 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105
13645 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13646 // CHECK-32-NEXT: entry:
13647 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13648 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13649 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13650 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13651 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_kernel_environment, ptr [[DYN_PTR]])
13652 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13653 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13654 // CHECK-32: user_code.entry:
13655 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13656 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13657 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13658 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13659 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13660 // CHECK-32-NEXT: ret void
13661 // CHECK-32: worker.exit:
13662 // CHECK-32-NEXT: ret void
13665 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined
13666 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
13667 // CHECK-32-NEXT: entry:
13668 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13669 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13670 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13671 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13672 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
13673 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
13674 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13675 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13676 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13677 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
13678 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13679 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13680 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
13681 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
13682 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13683 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13684 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
13685 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13686 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
13687 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
13688 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13689 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
13690 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13691 // CHECK-32: cond.true:
13692 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13693 // CHECK-32: cond.false:
13694 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13695 // CHECK-32-NEXT: br label [[COND_END]]
13696 // CHECK-32: cond.end:
13697 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
13698 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
13699 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13700 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13701 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13702 // CHECK-32: omp.inner.for.cond:
13703 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13704 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
13705 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13706 // CHECK-32: omp.inner.for.body:
13707 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13708 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13709 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
13710 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
13711 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
13712 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
13713 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13714 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
13715 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
13716 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13717 // CHECK-32: omp.inner.for.inc:
13718 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13719 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13720 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13721 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
13722 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13723 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13724 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13725 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
13726 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13727 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13728 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13729 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
13730 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13731 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13732 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13733 // CHECK-32: cond.true5:
13734 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13735 // CHECK-32: cond.false6:
13736 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13737 // CHECK-32-NEXT: br label [[COND_END7]]
13738 // CHECK-32: cond.end7:
13739 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13740 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
13741 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13742 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
13743 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13744 // CHECK-32: omp.inner.for.end:
13745 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13746 // CHECK-32: omp.loop.exit:
13747 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13748 // CHECK-32-NEXT: ret void
13751 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined
13752 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13753 // CHECK-32-NEXT: entry:
13754 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13755 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13756 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13757 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13758 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13759 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13760 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13761 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13762 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13763 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13764 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13765 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13766 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13767 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13768 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13769 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13770 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13771 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13772 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13773 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13774 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13775 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13776 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13777 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13778 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
13779 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
13780 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13781 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13782 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13783 // CHECK-32: omp.inner.for.cond:
13784 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13785 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13786 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
13787 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13788 // CHECK-32: omp.inner.for.body:
13789 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13790 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
13791 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13792 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
13793 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13794 // CHECK-32: omp.body.continue:
13795 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13796 // CHECK-32: omp.inner.for.inc:
13797 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13798 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13799 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
13800 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
13801 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13802 // CHECK-32: omp.inner.for.end:
13803 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13804 // CHECK-32: omp.loop.exit:
13805 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
13806 // CHECK-32-NEXT: ret void
13809 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109
13810 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13811 // CHECK-32-NEXT: entry:
13812 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13813 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13814 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13815 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13816 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_kernel_environment, ptr [[DYN_PTR]])
13817 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13818 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13819 // CHECK-32: user_code.entry:
13820 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13821 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13822 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13823 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13824 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13825 // CHECK-32-NEXT: ret void
13826 // CHECK-32: worker.exit:
13827 // CHECK-32-NEXT: ret void
13830 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined
13831 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
13832 // CHECK-32-NEXT: entry:
13833 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13834 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13835 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13836 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13837 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
13838 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
13839 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13840 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13841 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13842 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
13843 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13844 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13845 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
13846 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
13847 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13848 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13849 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
13850 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13851 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
13852 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
13853 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13854 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
13855 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
13856 // CHECK-32: cond.true:
13857 // CHECK-32-NEXT: br label [[COND_END:%.*]]
13858 // CHECK-32: cond.false:
13859 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13860 // CHECK-32-NEXT: br label [[COND_END]]
13861 // CHECK-32: cond.end:
13862 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
13863 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
13864 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13865 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
13866 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13867 // CHECK-32: omp.inner.for.cond:
13868 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13869 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
13870 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13871 // CHECK-32: omp.inner.for.body:
13872 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13873 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13874 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
13875 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
13876 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
13877 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
13878 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
13879 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
13880 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
13881 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13882 // CHECK-32: omp.inner.for.inc:
13883 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
13884 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13885 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
13886 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
13887 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13888 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13889 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
13890 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
13891 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13892 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
13893 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
13894 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
13895 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13896 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
13897 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
13898 // CHECK-32: cond.true5:
13899 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
13900 // CHECK-32: cond.false6:
13901 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
13902 // CHECK-32-NEXT: br label [[COND_END7]]
13903 // CHECK-32: cond.end7:
13904 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
13905 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
13906 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
13907 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
13908 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
13909 // CHECK-32: omp.inner.for.end:
13910 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
13911 // CHECK-32: omp.loop.exit:
13912 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
13913 // CHECK-32-NEXT: ret void
13916 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined
13917 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
13918 // CHECK-32-NEXT: entry:
13919 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
13920 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
13921 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
13922 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
13923 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
13924 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
13925 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
13926 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
13927 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
13928 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
13929 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
13930 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
13931 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
13932 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13933 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13934 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
13935 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
13936 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
13937 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
13938 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
13939 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
13940 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
13941 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
13942 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13943 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
13944 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
13945 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
13946 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
13947 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
13948 // CHECK-32: omp.dispatch.cond:
13949 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
13950 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
13951 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
13952 // CHECK-32: omp.dispatch.body:
13953 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
13954 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
13955 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
13956 // CHECK-32: omp.inner.for.cond:
13957 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353:![0-9]+]]
13958 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP353]]
13959 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
13960 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
13961 // CHECK-32: omp.inner.for.body:
13962 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
13963 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
13964 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
13965 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP353]]
13966 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
13967 // CHECK-32: omp.body.continue:
13968 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
13969 // CHECK-32: omp.inner.for.inc:
13970 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
13971 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
13972 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
13973 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP354:![0-9]+]]
13974 // CHECK-32: omp.inner.for.end:
13975 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
13976 // CHECK-32: omp.dispatch.inc:
13977 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
13978 // CHECK-32: omp.dispatch.end:
13979 // CHECK-32-NEXT: ret void
13982 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113
13983 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
13984 // CHECK-32-NEXT: entry:
13985 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
13986 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
13987 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
13988 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
13989 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_kernel_environment, ptr [[DYN_PTR]])
13990 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
13991 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
13992 // CHECK-32: user_code.entry:
13993 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
13994 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
13995 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
13996 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
13997 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
13998 // CHECK-32-NEXT: ret void
13999 // CHECK-32: worker.exit:
14000 // CHECK-32-NEXT: ret void
14003 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined
14004 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14005 // CHECK-32-NEXT: entry:
14006 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14007 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14008 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14009 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14010 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14011 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14012 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14013 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14014 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14015 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14016 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14017 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14018 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14019 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14020 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14021 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14022 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14023 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14024 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14025 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14026 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14027 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14028 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14029 // CHECK-32: cond.true:
14030 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14031 // CHECK-32: cond.false:
14032 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14033 // CHECK-32-NEXT: br label [[COND_END]]
14034 // CHECK-32: cond.end:
14035 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14036 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14037 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14038 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14039 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14040 // CHECK-32: omp.inner.for.cond:
14041 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14042 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14043 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14044 // CHECK-32: omp.inner.for.body:
14045 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14046 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14047 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14048 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14049 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14050 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14051 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14052 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14053 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14054 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14055 // CHECK-32: omp.inner.for.inc:
14056 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14057 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14058 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14059 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14060 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14061 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14062 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14063 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14064 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14065 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14066 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14067 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14068 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14069 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14070 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14071 // CHECK-32: cond.true5:
14072 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14073 // CHECK-32: cond.false6:
14074 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14075 // CHECK-32-NEXT: br label [[COND_END7]]
14076 // CHECK-32: cond.end7:
14077 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14078 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14079 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14080 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14081 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14082 // CHECK-32: omp.inner.for.end:
14083 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14084 // CHECK-32: omp.loop.exit:
14085 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14086 // CHECK-32-NEXT: ret void
14089 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined
14090 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14091 // CHECK-32-NEXT: entry:
14092 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14093 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14094 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14095 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14096 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14097 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14098 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14099 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14100 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14101 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14102 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14103 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14104 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14105 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14106 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14107 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14108 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14109 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14110 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14111 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14112 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14113 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14114 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14115 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14116 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14117 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14118 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
14119 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
14120 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
14121 // CHECK-32: omp.dispatch.cond:
14122 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
14123 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
14124 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
14125 // CHECK-32: omp.dispatch.body:
14126 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14127 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
14128 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14129 // CHECK-32: omp.inner.for.cond:
14130 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356:![0-9]+]]
14131 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP356]]
14132 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
14133 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14134 // CHECK-32: omp.inner.for.body:
14135 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
14136 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
14137 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14138 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP356]]
14139 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14140 // CHECK-32: omp.body.continue:
14141 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14142 // CHECK-32: omp.inner.for.inc:
14143 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
14144 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
14145 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
14146 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP357:![0-9]+]]
14147 // CHECK-32: omp.inner.for.end:
14148 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
14149 // CHECK-32: omp.dispatch.inc:
14150 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
14151 // CHECK-32: omp.dispatch.end:
14152 // CHECK-32-NEXT: ret void
14155 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117
14156 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
14157 // CHECK-32-NEXT: entry:
14158 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
14159 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
14160 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
14161 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
14162 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_kernel_environment, ptr [[DYN_PTR]])
14163 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
14164 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
14165 // CHECK-32: user_code.entry:
14166 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
14167 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
14168 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
14169 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
14170 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
14171 // CHECK-32-NEXT: ret void
14172 // CHECK-32: worker.exit:
14173 // CHECK-32-NEXT: ret void
14176 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined
14177 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14178 // CHECK-32-NEXT: entry:
14179 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14180 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14181 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14182 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14183 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14184 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14185 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14186 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14187 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14188 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14189 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14190 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14191 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14192 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14193 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14194 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14195 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14196 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14197 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14198 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14199 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14200 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14201 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14202 // CHECK-32: cond.true:
14203 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14204 // CHECK-32: cond.false:
14205 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14206 // CHECK-32-NEXT: br label [[COND_END]]
14207 // CHECK-32: cond.end:
14208 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14209 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14210 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14211 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14212 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14213 // CHECK-32: omp.inner.for.cond:
14214 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14215 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14216 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14217 // CHECK-32: omp.inner.for.body:
14218 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14219 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14220 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14221 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14222 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14223 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14224 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14225 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14226 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14227 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14228 // CHECK-32: omp.inner.for.inc:
14229 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14230 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14231 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14232 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14233 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14234 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14235 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14236 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14237 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14238 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14239 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14240 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14241 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14242 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14243 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14244 // CHECK-32: cond.true5:
14245 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14246 // CHECK-32: cond.false6:
14247 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14248 // CHECK-32-NEXT: br label [[COND_END7]]
14249 // CHECK-32: cond.end7:
14250 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14251 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14252 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14253 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14254 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14255 // CHECK-32: omp.inner.for.end:
14256 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14257 // CHECK-32: omp.loop.exit:
14258 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14259 // CHECK-32-NEXT: ret void
14262 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined
14263 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14264 // CHECK-32-NEXT: entry:
14265 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14266 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14267 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14268 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14269 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14270 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14271 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14272 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14273 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14274 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14275 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14276 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14277 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14278 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14279 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14280 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14281 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14282 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14283 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14284 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14285 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14286 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14287 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14288 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14289 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14290 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14291 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
14292 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
14293 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
14294 // CHECK-32: omp.dispatch.cond:
14295 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
14296 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
14297 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
14298 // CHECK-32: omp.dispatch.body:
14299 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14300 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
14301 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14302 // CHECK-32: omp.inner.for.cond:
14303 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359:![0-9]+]]
14304 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP359]]
14305 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
14306 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14307 // CHECK-32: omp.inner.for.body:
14308 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
14309 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
14310 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14311 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP359]]
14312 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14313 // CHECK-32: omp.body.continue:
14314 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14315 // CHECK-32: omp.inner.for.inc:
14316 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
14317 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
14318 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
14319 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP360:![0-9]+]]
14320 // CHECK-32: omp.inner.for.end:
14321 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
14322 // CHECK-32: omp.dispatch.inc:
14323 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
14324 // CHECK-32: omp.dispatch.end:
14325 // CHECK-32-NEXT: ret void
14328 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121
14329 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
14330 // CHECK-32-NEXT: entry:
14331 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
14332 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
14333 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
14334 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
14335 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_kernel_environment, ptr [[DYN_PTR]])
14336 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
14337 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
14338 // CHECK-32: user_code.entry:
14339 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
14340 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
14341 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
14342 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
14343 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
14344 // CHECK-32-NEXT: ret void
14345 // CHECK-32: worker.exit:
14346 // CHECK-32-NEXT: ret void
14349 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined
14350 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14351 // CHECK-32-NEXT: entry:
14352 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14353 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14354 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14355 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14356 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14357 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14358 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14359 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14360 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14361 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14362 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14363 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14364 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14365 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14366 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14367 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14368 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14369 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14370 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14371 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14372 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14373 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14374 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14375 // CHECK-32: cond.true:
14376 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14377 // CHECK-32: cond.false:
14378 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14379 // CHECK-32-NEXT: br label [[COND_END]]
14380 // CHECK-32: cond.end:
14381 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14382 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14383 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14384 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14385 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14386 // CHECK-32: omp.inner.for.cond:
14387 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14388 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14389 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14390 // CHECK-32: omp.inner.for.body:
14391 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14392 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14393 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14394 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14395 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14396 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14397 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14398 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14399 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14400 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14401 // CHECK-32: omp.inner.for.inc:
14402 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14403 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14404 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14405 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14406 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14407 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14408 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14409 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14410 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14411 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14412 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14413 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14414 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14415 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14416 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14417 // CHECK-32: cond.true5:
14418 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14419 // CHECK-32: cond.false6:
14420 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14421 // CHECK-32-NEXT: br label [[COND_END7]]
14422 // CHECK-32: cond.end7:
14423 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14424 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14425 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14426 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14427 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14428 // CHECK-32: omp.inner.for.end:
14429 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14430 // CHECK-32: omp.loop.exit:
14431 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14432 // CHECK-32-NEXT: ret void
14435 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined
14436 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14437 // CHECK-32-NEXT: entry:
14438 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14439 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14440 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14441 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14442 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14443 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14444 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14445 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14446 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14447 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14448 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14449 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14450 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14451 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14452 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14453 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14454 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14455 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14456 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14457 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14458 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14459 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14460 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14461 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14462 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14463 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14464 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
14465 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
14466 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
14467 // CHECK-32: omp.dispatch.cond:
14468 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
14469 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
14470 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
14471 // CHECK-32: omp.dispatch.body:
14472 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14473 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
14474 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14475 // CHECK-32: omp.inner.for.cond:
14476 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362:![0-9]+]]
14477 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP362]]
14478 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
14479 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14480 // CHECK-32: omp.inner.for.body:
14481 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
14482 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
14483 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14484 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP362]]
14485 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14486 // CHECK-32: omp.body.continue:
14487 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14488 // CHECK-32: omp.inner.for.inc:
14489 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
14490 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
14491 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
14492 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP363:![0-9]+]]
14493 // CHECK-32: omp.inner.for.end:
14494 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
14495 // CHECK-32: omp.dispatch.inc:
14496 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
14497 // CHECK-32: omp.dispatch.end:
14498 // CHECK-32-NEXT: ret void
14501 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125
14502 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
14503 // CHECK-32-NEXT: entry:
14504 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
14505 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
14506 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
14507 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
14508 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_kernel_environment, ptr [[DYN_PTR]])
14509 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
14510 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
14511 // CHECK-32: user_code.entry:
14512 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
14513 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
14514 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
14515 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
14516 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
14517 // CHECK-32-NEXT: ret void
14518 // CHECK-32: worker.exit:
14519 // CHECK-32-NEXT: ret void
14522 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined
14523 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14524 // CHECK-32-NEXT: entry:
14525 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14526 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14527 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14528 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14529 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14530 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14531 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14532 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14533 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14534 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14535 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14536 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14537 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14538 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14539 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14540 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14541 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14542 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14543 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14544 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14545 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14546 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14547 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14548 // CHECK-32: cond.true:
14549 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14550 // CHECK-32: cond.false:
14551 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14552 // CHECK-32-NEXT: br label [[COND_END]]
14553 // CHECK-32: cond.end:
14554 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14555 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14556 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14557 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14558 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14559 // CHECK-32: omp.inner.for.cond:
14560 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14561 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14562 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14563 // CHECK-32: omp.inner.for.body:
14564 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14565 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14566 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14567 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14568 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14569 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14570 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14571 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14572 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14573 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14574 // CHECK-32: omp.inner.for.inc:
14575 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14576 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14577 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14578 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14579 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14580 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14581 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14582 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14583 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14584 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14585 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14586 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14587 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14588 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14589 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14590 // CHECK-32: cond.true5:
14591 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14592 // CHECK-32: cond.false6:
14593 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14594 // CHECK-32-NEXT: br label [[COND_END7]]
14595 // CHECK-32: cond.end7:
14596 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14597 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14598 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14599 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14600 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14601 // CHECK-32: omp.inner.for.end:
14602 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14603 // CHECK-32: omp.loop.exit:
14604 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14605 // CHECK-32-NEXT: ret void
14608 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined
14609 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14610 // CHECK-32-NEXT: entry:
14611 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14612 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14613 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14614 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14615 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14616 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14617 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14618 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14619 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14620 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14621 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14622 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14623 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14624 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14625 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14626 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14627 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14628 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14629 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14630 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14631 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14632 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14633 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14634 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14635 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
14636 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
14637 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14638 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14639 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14640 // CHECK-32: omp.inner.for.cond:
14641 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14642 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14643 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
14644 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14645 // CHECK-32: omp.inner.for.body:
14646 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14647 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
14648 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14649 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
14650 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14651 // CHECK-32: omp.body.continue:
14652 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14653 // CHECK-32: omp.inner.for.inc:
14654 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14655 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14656 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
14657 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
14658 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14659 // CHECK-32: omp.inner.for.end:
14660 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14661 // CHECK-32: omp.loop.exit:
14662 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
14663 // CHECK-32-NEXT: ret void
14666 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130
14667 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
14668 // CHECK-32-NEXT: entry:
14669 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
14670 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
14671 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
14672 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
14673 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_kernel_environment, ptr [[DYN_PTR]])
14674 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
14675 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
14676 // CHECK-32: user_code.entry:
14677 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
14678 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
14679 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
14680 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
14681 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
14682 // CHECK-32-NEXT: ret void
14683 // CHECK-32: worker.exit:
14684 // CHECK-32-NEXT: ret void
14687 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined
14688 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14689 // CHECK-32-NEXT: entry:
14690 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14691 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14692 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14693 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14694 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14695 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14696 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14697 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14698 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14699 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14700 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14701 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14702 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14703 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14704 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14705 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14706 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14707 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14708 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14709 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14710 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14711 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14712 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14713 // CHECK-32: cond.true:
14714 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14715 // CHECK-32: cond.false:
14716 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14717 // CHECK-32-NEXT: br label [[COND_END]]
14718 // CHECK-32: cond.end:
14719 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14720 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14721 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14722 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14723 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14724 // CHECK-32: omp.inner.for.cond:
14725 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14726 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14727 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14728 // CHECK-32: omp.inner.for.body:
14729 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14730 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14731 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14732 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14733 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14734 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14735 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14736 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14737 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14738 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14739 // CHECK-32: omp.inner.for.inc:
14740 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14741 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14742 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14743 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14744 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14745 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14746 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14747 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14748 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14749 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14750 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14751 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14752 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14753 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14754 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14755 // CHECK-32: cond.true5:
14756 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14757 // CHECK-32: cond.false6:
14758 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14759 // CHECK-32-NEXT: br label [[COND_END7]]
14760 // CHECK-32: cond.end7:
14761 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14762 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14763 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14764 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14765 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14766 // CHECK-32: omp.inner.for.end:
14767 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14768 // CHECK-32: omp.loop.exit:
14769 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14770 // CHECK-32-NEXT: ret void
14773 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined
14774 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14775 // CHECK-32-NEXT: entry:
14776 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14777 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14778 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14779 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14780 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14781 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14782 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14783 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14784 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14785 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14786 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14787 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14788 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14789 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14790 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14791 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14792 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14793 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14794 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14795 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14796 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14797 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14798 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14799 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14800 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
14801 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
14802 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14803 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
14804 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14805 // CHECK-32: cond.true:
14806 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14807 // CHECK-32: cond.false:
14808 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14809 // CHECK-32-NEXT: br label [[COND_END]]
14810 // CHECK-32: cond.end:
14811 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
14812 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
14813 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14814 // CHECK-32-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
14815 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14816 // CHECK-32: omp.inner.for.cond:
14817 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14818 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
14819 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
14820 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14821 // CHECK-32: omp.inner.for.body:
14822 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14823 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
14824 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14825 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
14826 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14827 // CHECK-32: omp.body.continue:
14828 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14829 // CHECK-32: omp.inner.for.inc:
14830 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14831 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
14832 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
14833 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14834 // CHECK-32: omp.inner.for.end:
14835 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14836 // CHECK-32: omp.loop.exit:
14837 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
14838 // CHECK-32-NEXT: ret void
14841 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135
14842 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
14843 // CHECK-32-NEXT: entry:
14844 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
14845 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
14846 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
14847 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
14848 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_kernel_environment, ptr [[DYN_PTR]])
14849 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
14850 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
14851 // CHECK-32: user_code.entry:
14852 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
14853 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
14854 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
14855 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
14856 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
14857 // CHECK-32-NEXT: ret void
14858 // CHECK-32: worker.exit:
14859 // CHECK-32-NEXT: ret void
14862 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined
14863 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
14864 // CHECK-32-NEXT: entry:
14865 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14866 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14867 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14868 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14869 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
14870 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
14871 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14872 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14873 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14874 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
14875 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14876 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14877 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
14878 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
14879 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14880 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14881 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
14882 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14883 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
14884 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
14885 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14886 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
14887 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
14888 // CHECK-32: cond.true:
14889 // CHECK-32-NEXT: br label [[COND_END:%.*]]
14890 // CHECK-32: cond.false:
14891 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14892 // CHECK-32-NEXT: br label [[COND_END]]
14893 // CHECK-32: cond.end:
14894 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
14895 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
14896 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14897 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14898 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14899 // CHECK-32: omp.inner.for.cond:
14900 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14901 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
14902 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14903 // CHECK-32: omp.inner.for.body:
14904 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14905 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14906 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
14907 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
14908 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
14909 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
14910 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
14911 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
14912 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
14913 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14914 // CHECK-32: omp.inner.for.inc:
14915 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14916 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14917 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
14918 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
14919 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14920 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14921 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
14922 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
14923 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14924 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14925 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
14926 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
14927 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14928 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
14929 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
14930 // CHECK-32: cond.true5:
14931 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
14932 // CHECK-32: cond.false6:
14933 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
14934 // CHECK-32-NEXT: br label [[COND_END7]]
14935 // CHECK-32: cond.end7:
14936 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
14937 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
14938 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
14939 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
14940 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14941 // CHECK-32: omp.inner.for.end:
14942 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
14943 // CHECK-32: omp.loop.exit:
14944 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
14945 // CHECK-32-NEXT: ret void
14948 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined
14949 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
14950 // CHECK-32-NEXT: entry:
14951 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
14952 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
14953 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
14954 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
14955 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
14956 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
14957 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
14958 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
14959 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
14960 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
14961 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
14962 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
14963 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
14964 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14965 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14966 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
14967 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
14968 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
14969 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14970 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
14971 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
14972 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
14973 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
14974 // CHECK-32-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
14975 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
14976 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
14977 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
14978 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
14979 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
14980 // CHECK-32: omp.inner.for.cond:
14981 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14982 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
14983 // CHECK-32-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
14984 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
14985 // CHECK-32: omp.inner.for.body:
14986 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14987 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
14988 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
14989 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
14990 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
14991 // CHECK-32: omp.body.continue:
14992 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
14993 // CHECK-32: omp.inner.for.inc:
14994 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
14995 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
14996 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
14997 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
14998 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
14999 // CHECK-32: omp.inner.for.end:
15000 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15001 // CHECK-32: omp.loop.exit:
15002 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
15003 // CHECK-32-NEXT: ret void
15006 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140
15007 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
15008 // CHECK-32-NEXT: entry:
15009 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15010 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
15011 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
15012 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15013 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_kernel_environment, ptr [[DYN_PTR]])
15014 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15015 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15016 // CHECK-32: user_code.entry:
15017 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15018 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
15019 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
15020 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
15021 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15022 // CHECK-32-NEXT: ret void
15023 // CHECK-32: worker.exit:
15024 // CHECK-32-NEXT: ret void
15027 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined
15028 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15029 // CHECK-32-NEXT: entry:
15030 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15031 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15032 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15033 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15034 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
15035 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
15036 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15037 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15038 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15039 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
15040 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15041 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15042 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
15043 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
15044 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15045 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15046 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
15047 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15048 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15049 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
15050 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15051 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15052 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15053 // CHECK-32: cond.true:
15054 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15055 // CHECK-32: cond.false:
15056 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15057 // CHECK-32-NEXT: br label [[COND_END]]
15058 // CHECK-32: cond.end:
15059 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15060 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
15061 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15062 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15063 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15064 // CHECK-32: omp.inner.for.cond:
15065 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15066 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
15067 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15068 // CHECK-32: omp.inner.for.body:
15069 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15070 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15071 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
15072 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
15073 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
15074 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
15075 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
15076 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
15077 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
15078 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15079 // CHECK-32: omp.inner.for.inc:
15080 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15081 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15082 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
15083 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
15084 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15085 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15086 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
15087 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
15088 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15089 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15090 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
15091 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
15092 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15093 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
15094 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
15095 // CHECK-32: cond.true5:
15096 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
15097 // CHECK-32: cond.false6:
15098 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15099 // CHECK-32-NEXT: br label [[COND_END7]]
15100 // CHECK-32: cond.end7:
15101 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
15102 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
15103 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15104 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
15105 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15106 // CHECK-32: omp.inner.for.end:
15107 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15108 // CHECK-32: omp.loop.exit:
15109 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
15110 // CHECK-32-NEXT: ret void
15113 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined
15114 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
15115 // CHECK-32-NEXT: entry:
15116 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15117 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15118 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
15119 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
15120 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15121 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15122 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15123 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15124 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15125 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15126 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15127 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15128 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15129 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15130 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15131 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15132 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15133 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15134 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15135 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
15136 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
15137 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15138 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15139 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15140 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15141 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15142 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
15143 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
15144 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15145 // CHECK-32: omp.dispatch.cond:
15146 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
15147 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
15148 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15149 // CHECK-32: omp.dispatch.body:
15150 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15151 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
15152 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15153 // CHECK-32: omp.inner.for.cond:
15154 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365:![0-9]+]]
15155 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP365]]
15156 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
15157 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15158 // CHECK-32: omp.inner.for.body:
15159 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
15160 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
15161 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15162 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP365]]
15163 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15164 // CHECK-32: omp.body.continue:
15165 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15166 // CHECK-32: omp.inner.for.inc:
15167 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
15168 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
15169 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
15170 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP366:![0-9]+]]
15171 // CHECK-32: omp.inner.for.end:
15172 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15173 // CHECK-32: omp.dispatch.inc:
15174 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15175 // CHECK-32: omp.dispatch.end:
15176 // CHECK-32-NEXT: ret void
15179 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145
15180 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
15181 // CHECK-32-NEXT: entry:
15182 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15183 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
15184 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
15185 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15186 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_kernel_environment, ptr [[DYN_PTR]])
15187 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15188 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15189 // CHECK-32: user_code.entry:
15190 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15191 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
15192 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
15193 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
15194 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15195 // CHECK-32-NEXT: ret void
15196 // CHECK-32: worker.exit:
15197 // CHECK-32-NEXT: ret void
15200 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined
15201 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15202 // CHECK-32-NEXT: entry:
15203 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15204 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15205 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15206 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15207 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
15208 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
15209 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15210 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15211 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15212 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
15213 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15214 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15215 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
15216 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
15217 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15218 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15219 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
15220 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15221 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15222 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
15223 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15224 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15225 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15226 // CHECK-32: cond.true:
15227 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15228 // CHECK-32: cond.false:
15229 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15230 // CHECK-32-NEXT: br label [[COND_END]]
15231 // CHECK-32: cond.end:
15232 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15233 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
15234 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15235 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15236 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15237 // CHECK-32: omp.inner.for.cond:
15238 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15239 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
15240 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15241 // CHECK-32: omp.inner.for.body:
15242 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15243 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15244 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
15245 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
15246 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
15247 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
15248 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
15249 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
15250 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
15251 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15252 // CHECK-32: omp.inner.for.inc:
15253 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15254 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15255 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
15256 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
15257 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15258 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15259 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
15260 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
15261 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15262 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15263 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
15264 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
15265 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15266 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
15267 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
15268 // CHECK-32: cond.true5:
15269 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
15270 // CHECK-32: cond.false6:
15271 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15272 // CHECK-32-NEXT: br label [[COND_END7]]
15273 // CHECK-32: cond.end7:
15274 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
15275 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
15276 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15277 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
15278 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15279 // CHECK-32: omp.inner.for.end:
15280 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15281 // CHECK-32: omp.loop.exit:
15282 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
15283 // CHECK-32-NEXT: ret void
15286 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined
15287 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
15288 // CHECK-32-NEXT: entry:
15289 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15290 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15291 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
15292 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
15293 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15294 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15295 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15296 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15297 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15298 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15299 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15300 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15301 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15302 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15303 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15304 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15305 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15306 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15307 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15308 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
15309 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
15310 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15311 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15312 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15313 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15314 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15315 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
15316 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
15317 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15318 // CHECK-32: omp.dispatch.cond:
15319 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
15320 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
15321 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15322 // CHECK-32: omp.dispatch.body:
15323 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15324 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
15325 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15326 // CHECK-32: omp.inner.for.cond:
15327 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368:![0-9]+]]
15328 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP368]]
15329 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
15330 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15331 // CHECK-32: omp.inner.for.body:
15332 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
15333 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
15334 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15335 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP368]]
15336 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15337 // CHECK-32: omp.body.continue:
15338 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15339 // CHECK-32: omp.inner.for.inc:
15340 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
15341 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
15342 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
15343 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP369:![0-9]+]]
15344 // CHECK-32: omp.inner.for.end:
15345 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15346 // CHECK-32: omp.dispatch.inc:
15347 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15348 // CHECK-32: omp.dispatch.end:
15349 // CHECK-32-NEXT: ret void
15352 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150
15353 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
15354 // CHECK-32-NEXT: entry:
15355 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15356 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
15357 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
15358 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15359 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_kernel_environment, ptr [[DYN_PTR]])
15360 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15361 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15362 // CHECK-32: user_code.entry:
15363 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15364 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
15365 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
15366 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
15367 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15368 // CHECK-32-NEXT: ret void
15369 // CHECK-32: worker.exit:
15370 // CHECK-32-NEXT: ret void
15373 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined
15374 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15375 // CHECK-32-NEXT: entry:
15376 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15377 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15378 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15379 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15380 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
15381 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
15382 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15383 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15384 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15385 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
15386 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15387 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15388 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
15389 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
15390 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15391 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15392 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
15393 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15394 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15395 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
15396 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15397 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15398 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15399 // CHECK-32: cond.true:
15400 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15401 // CHECK-32: cond.false:
15402 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15403 // CHECK-32-NEXT: br label [[COND_END]]
15404 // CHECK-32: cond.end:
15405 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15406 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
15407 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15408 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15409 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15410 // CHECK-32: omp.inner.for.cond:
15411 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15412 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
15413 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15414 // CHECK-32: omp.inner.for.body:
15415 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15416 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15417 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
15418 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
15419 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
15420 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
15421 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
15422 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
15423 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
15424 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15425 // CHECK-32: omp.inner.for.inc:
15426 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15427 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15428 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
15429 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
15430 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15431 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15432 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
15433 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
15434 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15435 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15436 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
15437 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
15438 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15439 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
15440 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
15441 // CHECK-32: cond.true5:
15442 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
15443 // CHECK-32: cond.false6:
15444 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15445 // CHECK-32-NEXT: br label [[COND_END7]]
15446 // CHECK-32: cond.end7:
15447 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
15448 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
15449 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15450 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
15451 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15452 // CHECK-32: omp.inner.for.end:
15453 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15454 // CHECK-32: omp.loop.exit:
15455 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
15456 // CHECK-32-NEXT: ret void
15459 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined
15460 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
15461 // CHECK-32-NEXT: entry:
15462 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15463 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15464 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
15465 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
15466 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15467 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15468 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15469 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15470 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15471 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15472 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15473 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15474 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15475 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15476 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15477 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15478 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15479 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15480 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15481 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
15482 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
15483 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15484 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15485 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15486 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15487 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15488 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
15489 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
15490 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15491 // CHECK-32: omp.dispatch.cond:
15492 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
15493 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
15494 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15495 // CHECK-32: omp.dispatch.body:
15496 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15497 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
15498 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15499 // CHECK-32: omp.inner.for.cond:
15500 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371:![0-9]+]]
15501 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP371]]
15502 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
15503 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15504 // CHECK-32: omp.inner.for.body:
15505 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
15506 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
15507 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15508 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP371]]
15509 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15510 // CHECK-32: omp.body.continue:
15511 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15512 // CHECK-32: omp.inner.for.inc:
15513 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
15514 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
15515 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
15516 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP372:![0-9]+]]
15517 // CHECK-32: omp.inner.for.end:
15518 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15519 // CHECK-32: omp.dispatch.inc:
15520 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15521 // CHECK-32: omp.dispatch.end:
15522 // CHECK-32-NEXT: ret void
15525 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155
15526 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
15527 // CHECK-32-NEXT: entry:
15528 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15529 // CHECK-32-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
15530 // CHECK-32-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
15531 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15532 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_kernel_environment, ptr [[DYN_PTR]])
15533 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15534 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15535 // CHECK-32: user_code.entry:
15536 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15537 // CHECK-32-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
15538 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
15539 // CHECK-32-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
15540 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15541 // CHECK-32-NEXT: ret void
15542 // CHECK-32: worker.exit:
15543 // CHECK-32-NEXT: ret void
15546 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined
15547 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15548 // CHECK-32-NEXT: entry:
15549 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15550 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15551 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15552 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15553 // CHECK-32-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
15554 // CHECK-32-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
15555 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15556 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15557 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15558 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
15559 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15560 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15561 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
15562 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
15563 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15564 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15565 // CHECK-32-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
15566 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15567 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15568 // CHECK-32-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
15569 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15570 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15571 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15572 // CHECK-32: cond.true:
15573 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15574 // CHECK-32: cond.false:
15575 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15576 // CHECK-32-NEXT: br label [[COND_END]]
15577 // CHECK-32: cond.end:
15578 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15579 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
15580 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15581 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15582 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15583 // CHECK-32: omp.inner.for.cond:
15584 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15585 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
15586 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15587 // CHECK-32: omp.inner.for.body:
15588 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15589 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15590 // CHECK-32-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
15591 // CHECK-32-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
15592 // CHECK-32-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
15593 // CHECK-32-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
15594 // CHECK-32-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
15595 // CHECK-32-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
15596 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
15597 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15598 // CHECK-32: omp.inner.for.inc:
15599 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15600 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15601 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
15602 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
15603 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15604 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15605 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
15606 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
15607 // CHECK-32-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15608 // CHECK-32-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15609 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
15610 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
15611 // CHECK-32-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15612 // CHECK-32-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
15613 // CHECK-32-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
15614 // CHECK-32: cond.true5:
15615 // CHECK-32-NEXT: br label [[COND_END7:%.*]]
15616 // CHECK-32: cond.false6:
15617 // CHECK-32-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
15618 // CHECK-32-NEXT: br label [[COND_END7]]
15619 // CHECK-32: cond.end7:
15620 // CHECK-32-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
15621 // CHECK-32-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
15622 // CHECK-32-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
15623 // CHECK-32-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
15624 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15625 // CHECK-32: omp.inner.for.end:
15626 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15627 // CHECK-32: omp.loop.exit:
15628 // CHECK-32-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
15629 // CHECK-32-NEXT: ret void
15632 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined
15633 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
15634 // CHECK-32-NEXT: entry:
15635 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15636 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15637 // CHECK-32-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
15638 // CHECK-32-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
15639 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15640 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15641 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15642 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15643 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15644 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15645 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15646 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15647 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15648 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15649 // CHECK-32-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15650 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15651 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15652 // CHECK-32-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
15653 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
15654 // CHECK-32-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
15655 // CHECK-32-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
15656 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15657 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15658 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15659 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15660 // CHECK-32-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15661 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
15662 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
15663 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15664 // CHECK-32: omp.dispatch.cond:
15665 // CHECK-32-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
15666 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
15667 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15668 // CHECK-32: omp.dispatch.body:
15669 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15670 // CHECK-32-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
15671 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15672 // CHECK-32: omp.inner.for.cond:
15673 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374:![0-9]+]]
15674 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP374]]
15675 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
15676 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15677 // CHECK-32: omp.inner.for.body:
15678 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
15679 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
15680 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15681 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP374]]
15682 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15683 // CHECK-32: omp.body.continue:
15684 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15685 // CHECK-32: omp.inner.for.inc:
15686 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
15687 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
15688 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
15689 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP375:![0-9]+]]
15690 // CHECK-32: omp.inner.for.end:
15691 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15692 // CHECK-32: omp.dispatch.inc:
15693 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15694 // CHECK-32: omp.dispatch.end:
15695 // CHECK-32-NEXT: ret void
15698 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160
15699 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8:[0-9]+]] {
15700 // CHECK-32-NEXT: entry:
15701 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15702 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
15703 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
15704 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15705 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
15706 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_kernel_environment, ptr [[DYN_PTR]])
15707 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15708 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15709 // CHECK-32: user_code.entry:
15710 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15711 // CHECK-32-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
15712 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
15713 // CHECK-32-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
15714 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
15715 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15716 // CHECK-32-NEXT: ret void
15717 // CHECK-32: worker.exit:
15718 // CHECK-32-NEXT: ret void
15721 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined
15722 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15723 // CHECK-32-NEXT: entry:
15724 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15725 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15726 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15727 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15728 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15729 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15730 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15731 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15732 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15733 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15734 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15735 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15736 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15737 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15738 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15739 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15740 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15741 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
15742 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15743 // CHECK-32: omp.dispatch.cond:
15744 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15745 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15746 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15747 // CHECK-32: cond.true:
15748 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15749 // CHECK-32: cond.false:
15750 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15751 // CHECK-32-NEXT: br label [[COND_END]]
15752 // CHECK-32: cond.end:
15753 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15754 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
15755 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15756 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15757 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15758 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15759 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
15760 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15761 // CHECK-32: omp.dispatch.body:
15762 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15763 // CHECK-32: omp.inner.for.cond:
15764 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15765 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15766 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
15767 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15768 // CHECK-32: omp.inner.for.body:
15769 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15770 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
15771 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15772 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
15773 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15774 // CHECK-32: omp.body.continue:
15775 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15776 // CHECK-32: omp.inner.for.inc:
15777 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15778 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
15779 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
15780 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15781 // CHECK-32: omp.inner.for.end:
15782 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15783 // CHECK-32: omp.dispatch.inc:
15784 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15785 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15786 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
15787 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
15788 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15789 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15790 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
15791 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
15792 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15793 // CHECK-32: omp.dispatch.end:
15794 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
15795 // CHECK-32-NEXT: ret void
15798 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163
15799 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
15800 // CHECK-32-NEXT: entry:
15801 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15802 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
15803 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15804 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_kernel_environment, ptr [[DYN_PTR]])
15805 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15806 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15807 // CHECK-32: user_code.entry:
15808 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15809 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
15810 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15811 // CHECK-32-NEXT: ret void
15812 // CHECK-32: worker.exit:
15813 // CHECK-32-NEXT: ret void
15816 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined
15817 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15818 // CHECK-32-NEXT: entry:
15819 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15820 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15821 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15822 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15823 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15824 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15825 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15826 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15827 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15828 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15829 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15830 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15831 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15832 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15833 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15834 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15835 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15836 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
15837 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15838 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15839 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15840 // CHECK-32: cond.true:
15841 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15842 // CHECK-32: cond.false:
15843 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15844 // CHECK-32-NEXT: br label [[COND_END]]
15845 // CHECK-32: cond.end:
15846 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15847 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
15848 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15849 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15850 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15851 // CHECK-32: omp.inner.for.cond:
15852 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15853 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15854 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
15855 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15856 // CHECK-32: omp.inner.for.body:
15857 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15858 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
15859 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15860 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
15861 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15862 // CHECK-32: omp.body.continue:
15863 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15864 // CHECK-32: omp.inner.for.inc:
15865 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15866 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
15867 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
15868 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15869 // CHECK-32: omp.inner.for.end:
15870 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
15871 // CHECK-32: omp.loop.exit:
15872 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
15873 // CHECK-32-NEXT: ret void
15876 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166
15877 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
15878 // CHECK-32-NEXT: entry:
15879 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15880 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
15881 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15882 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_kernel_environment, ptr [[DYN_PTR]])
15883 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15884 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15885 // CHECK-32: user_code.entry:
15886 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15887 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
15888 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15889 // CHECK-32-NEXT: ret void
15890 // CHECK-32: worker.exit:
15891 // CHECK-32-NEXT: ret void
15894 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined
15895 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15896 // CHECK-32-NEXT: entry:
15897 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15898 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15899 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15900 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15901 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15902 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15903 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15904 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
15905 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
15906 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
15907 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
15908 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
15909 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
15910 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
15911 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
15912 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
15913 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
15914 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
15915 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
15916 // CHECK-32: omp.dispatch.cond:
15917 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15918 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
15919 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
15920 // CHECK-32: cond.true:
15921 // CHECK-32-NEXT: br label [[COND_END:%.*]]
15922 // CHECK-32: cond.false:
15923 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15924 // CHECK-32-NEXT: br label [[COND_END]]
15925 // CHECK-32: cond.end:
15926 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
15927 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
15928 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15929 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
15930 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15931 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15932 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
15933 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
15934 // CHECK-32: omp.dispatch.body:
15935 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
15936 // CHECK-32: omp.inner.for.cond:
15937 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15938 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15939 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
15940 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
15941 // CHECK-32: omp.inner.for.body:
15942 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15943 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
15944 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
15945 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
15946 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
15947 // CHECK-32: omp.body.continue:
15948 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
15949 // CHECK-32: omp.inner.for.inc:
15950 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
15951 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
15952 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
15953 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
15954 // CHECK-32: omp.inner.for.end:
15955 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
15956 // CHECK-32: omp.dispatch.inc:
15957 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
15958 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15959 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
15960 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
15961 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
15962 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
15963 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
15964 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
15965 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
15966 // CHECK-32: omp.dispatch.end:
15967 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
15968 // CHECK-32-NEXT: ret void
15971 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169
15972 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
15973 // CHECK-32-NEXT: entry:
15974 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
15975 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
15976 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
15977 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_kernel_environment, ptr [[DYN_PTR]])
15978 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
15979 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
15980 // CHECK-32: user_code.entry:
15981 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
15982 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
15983 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
15984 // CHECK-32-NEXT: ret void
15985 // CHECK-32: worker.exit:
15986 // CHECK-32-NEXT: ret void
15989 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined
15990 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
15991 // CHECK-32-NEXT: entry:
15992 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
15993 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
15994 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
15995 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
15996 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
15997 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
15998 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
15999 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16000 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16001 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16002 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16003 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16004 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16005 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16006 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16007 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16008 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16009 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
16010 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16011 // CHECK-32: omp.dispatch.cond:
16012 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16013 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16014 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16015 // CHECK-32: omp.dispatch.body:
16016 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16017 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16018 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16019 // CHECK-32: omp.inner.for.cond:
16020 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377:![0-9]+]]
16021 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP377]]
16022 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16023 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16024 // CHECK-32: omp.inner.for.body:
16025 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
16026 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16027 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16028 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP377]]
16029 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16030 // CHECK-32: omp.body.continue:
16031 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16032 // CHECK-32: omp.inner.for.inc:
16033 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
16034 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16035 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
16036 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP378:![0-9]+]]
16037 // CHECK-32: omp.inner.for.end:
16038 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16039 // CHECK-32: omp.dispatch.inc:
16040 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16041 // CHECK-32: omp.dispatch.end:
16042 // CHECK-32-NEXT: ret void
16045 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172
16046 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16047 // CHECK-32-NEXT: entry:
16048 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16049 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16050 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16051 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_kernel_environment, ptr [[DYN_PTR]])
16052 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16053 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16054 // CHECK-32: user_code.entry:
16055 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16056 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16057 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16058 // CHECK-32-NEXT: ret void
16059 // CHECK-32: worker.exit:
16060 // CHECK-32-NEXT: ret void
16063 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined
16064 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16065 // CHECK-32-NEXT: entry:
16066 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16067 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16068 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16069 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16070 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16071 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16072 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16073 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16074 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16075 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16076 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16077 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16078 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16079 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16080 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16081 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16082 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16083 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
16084 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16085 // CHECK-32: omp.dispatch.cond:
16086 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16087 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16088 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16089 // CHECK-32: omp.dispatch.body:
16090 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16091 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16092 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16093 // CHECK-32: omp.inner.for.cond:
16094 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380:![0-9]+]]
16095 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP380]]
16096 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16097 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16098 // CHECK-32: omp.inner.for.body:
16099 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
16100 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16101 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16102 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP380]]
16103 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16104 // CHECK-32: omp.body.continue:
16105 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16106 // CHECK-32: omp.inner.for.inc:
16107 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
16108 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16109 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
16110 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP381:![0-9]+]]
16111 // CHECK-32: omp.inner.for.end:
16112 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16113 // CHECK-32: omp.dispatch.inc:
16114 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16115 // CHECK-32: omp.dispatch.end:
16116 // CHECK-32-NEXT: ret void
16119 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175
16120 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16121 // CHECK-32-NEXT: entry:
16122 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16123 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16124 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16125 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_kernel_environment, ptr [[DYN_PTR]])
16126 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16127 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16128 // CHECK-32: user_code.entry:
16129 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16130 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16131 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16132 // CHECK-32-NEXT: ret void
16133 // CHECK-32: worker.exit:
16134 // CHECK-32-NEXT: ret void
16137 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined
16138 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16139 // CHECK-32-NEXT: entry:
16140 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16141 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16142 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16143 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16144 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16145 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16146 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16147 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16148 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16149 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16150 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16151 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16152 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16153 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16154 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16155 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16156 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16157 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
16158 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16159 // CHECK-32: omp.dispatch.cond:
16160 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16161 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16162 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16163 // CHECK-32: omp.dispatch.body:
16164 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16165 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16166 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16167 // CHECK-32: omp.inner.for.cond:
16168 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383:![0-9]+]]
16169 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP383]]
16170 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16171 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16172 // CHECK-32: omp.inner.for.body:
16173 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
16174 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16175 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16176 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP383]]
16177 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16178 // CHECK-32: omp.body.continue:
16179 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16180 // CHECK-32: omp.inner.for.inc:
16181 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
16182 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16183 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
16184 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP384:![0-9]+]]
16185 // CHECK-32: omp.inner.for.end:
16186 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16187 // CHECK-32: omp.dispatch.inc:
16188 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16189 // CHECK-32: omp.dispatch.end:
16190 // CHECK-32-NEXT: ret void
16193 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178
16194 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16195 // CHECK-32-NEXT: entry:
16196 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16197 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16198 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16199 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_kernel_environment, ptr [[DYN_PTR]])
16200 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16201 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16202 // CHECK-32: user_code.entry:
16203 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16204 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16205 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16206 // CHECK-32-NEXT: ret void
16207 // CHECK-32: worker.exit:
16208 // CHECK-32-NEXT: ret void
16211 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined
16212 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16213 // CHECK-32-NEXT: entry:
16214 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16215 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16216 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16217 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16218 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16219 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16220 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16221 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16222 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16223 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16224 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16225 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16226 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16227 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16228 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16229 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16230 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16231 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
16232 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16233 // CHECK-32: omp.dispatch.cond:
16234 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16235 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16236 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16237 // CHECK-32: omp.dispatch.body:
16238 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16239 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16240 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16241 // CHECK-32: omp.inner.for.cond:
16242 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386:![0-9]+]]
16243 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP386]]
16244 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16245 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16246 // CHECK-32: omp.inner.for.body:
16247 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
16248 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16249 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16250 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP386]]
16251 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16252 // CHECK-32: omp.body.continue:
16253 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16254 // CHECK-32: omp.inner.for.inc:
16255 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
16256 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16257 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
16258 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP387:![0-9]+]]
16259 // CHECK-32: omp.inner.for.end:
16260 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16261 // CHECK-32: omp.dispatch.inc:
16262 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16263 // CHECK-32: omp.dispatch.end:
16264 // CHECK-32-NEXT: ret void
16267 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181
16268 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8]] {
16269 // CHECK-32-NEXT: entry:
16270 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16271 // CHECK-32-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
16272 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16273 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16274 // CHECK-32-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
16275 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_kernel_environment, ptr [[DYN_PTR]])
16276 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16277 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16278 // CHECK-32: user_code.entry:
16279 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16280 // CHECK-32-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
16281 // CHECK-32-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
16282 // CHECK-32-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
16283 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16284 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16285 // CHECK-32-NEXT: ret void
16286 // CHECK-32: worker.exit:
16287 // CHECK-32-NEXT: ret void
16290 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined
16291 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16292 // CHECK-32-NEXT: entry:
16293 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16294 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16295 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16296 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16297 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16298 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16299 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16300 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16301 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16302 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16303 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16304 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16305 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16306 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16307 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16308 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16309 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16310 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
16311 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16312 // CHECK-32: omp.dispatch.cond:
16313 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16314 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
16315 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
16316 // CHECK-32: cond.true:
16317 // CHECK-32-NEXT: br label [[COND_END:%.*]]
16318 // CHECK-32: cond.false:
16319 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16320 // CHECK-32-NEXT: br label [[COND_END]]
16321 // CHECK-32: cond.end:
16322 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
16323 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
16324 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16325 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
16326 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
16327 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16328 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
16329 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16330 // CHECK-32: omp.dispatch.body:
16331 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16332 // CHECK-32: omp.inner.for.cond:
16333 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389:![0-9]+]]
16334 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP389]]
16335 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
16336 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16337 // CHECK-32: omp.inner.for.body:
16338 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
16339 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
16340 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16341 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP389]]
16342 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16343 // CHECK-32: omp.body.continue:
16344 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16345 // CHECK-32: omp.inner.for.inc:
16346 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
16347 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
16348 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
16349 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP390:![0-9]+]]
16350 // CHECK-32: omp.inner.for.end:
16351 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16352 // CHECK-32: omp.dispatch.inc:
16353 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16354 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
16355 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
16356 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
16357 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16358 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
16359 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
16360 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
16361 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16362 // CHECK-32: omp.dispatch.end:
16363 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
16364 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16365 // CHECK-32-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
16366 // CHECK-32-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16367 // CHECK-32: .omp.final.then:
16368 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16369 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16370 // CHECK-32: .omp.final.done:
16371 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4:[0-9]+]], i32 [[TMP1]])
16372 // CHECK-32-NEXT: ret void
16375 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185
16376 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16377 // CHECK-32-NEXT: entry:
16378 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16379 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16380 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16381 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_kernel_environment, ptr [[DYN_PTR]])
16382 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16383 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16384 // CHECK-32: user_code.entry:
16385 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16386 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16387 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16388 // CHECK-32-NEXT: ret void
16389 // CHECK-32: worker.exit:
16390 // CHECK-32-NEXT: ret void
16393 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined
16394 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16395 // CHECK-32-NEXT: entry:
16396 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16397 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16398 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16399 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16400 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16401 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16402 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16403 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16404 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16405 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16406 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16407 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16408 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16409 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16410 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16411 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16412 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16413 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
16414 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16415 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
16416 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
16417 // CHECK-32: cond.true:
16418 // CHECK-32-NEXT: br label [[COND_END:%.*]]
16419 // CHECK-32: cond.false:
16420 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16421 // CHECK-32-NEXT: br label [[COND_END]]
16422 // CHECK-32: cond.end:
16423 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
16424 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
16425 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16426 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
16427 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16428 // CHECK-32: omp.inner.for.cond:
16429 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392:![0-9]+]]
16430 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP392]]
16431 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
16432 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16433 // CHECK-32: omp.inner.for.body:
16434 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
16435 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
16436 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16437 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP392]]
16438 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16439 // CHECK-32: omp.body.continue:
16440 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16441 // CHECK-32: omp.inner.for.inc:
16442 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
16443 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
16444 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
16445 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP393:![0-9]+]]
16446 // CHECK-32: omp.inner.for.end:
16447 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
16448 // CHECK-32: omp.loop.exit:
16449 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
16450 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16451 // CHECK-32-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
16452 // CHECK-32-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16453 // CHECK-32: .omp.final.then:
16454 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16455 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16456 // CHECK-32: .omp.final.done:
16457 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16458 // CHECK-32-NEXT: ret void
16461 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189
16462 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16463 // CHECK-32-NEXT: entry:
16464 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16465 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16466 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16467 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_kernel_environment, ptr [[DYN_PTR]])
16468 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16469 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16470 // CHECK-32: user_code.entry:
16471 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16472 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16473 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16474 // CHECK-32-NEXT: ret void
16475 // CHECK-32: worker.exit:
16476 // CHECK-32-NEXT: ret void
16479 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined
16480 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16481 // CHECK-32-NEXT: entry:
16482 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16483 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16484 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16485 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16486 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16487 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16488 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16489 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16490 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16491 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16492 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16493 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16494 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16495 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16496 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16497 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16498 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16499 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
16500 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16501 // CHECK-32: omp.dispatch.cond:
16502 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16503 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
16504 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
16505 // CHECK-32: cond.true:
16506 // CHECK-32-NEXT: br label [[COND_END:%.*]]
16507 // CHECK-32: cond.false:
16508 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16509 // CHECK-32-NEXT: br label [[COND_END]]
16510 // CHECK-32: cond.end:
16511 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
16512 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
16513 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16514 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
16515 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
16516 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16517 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
16518 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16519 // CHECK-32: omp.dispatch.body:
16520 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16521 // CHECK-32: omp.inner.for.cond:
16522 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395:![0-9]+]]
16523 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP395]]
16524 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
16525 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16526 // CHECK-32: omp.inner.for.body:
16527 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
16528 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
16529 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16530 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP395]]
16531 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16532 // CHECK-32: omp.body.continue:
16533 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16534 // CHECK-32: omp.inner.for.inc:
16535 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
16536 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
16537 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
16538 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP396:![0-9]+]]
16539 // CHECK-32: omp.inner.for.end:
16540 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16541 // CHECK-32: omp.dispatch.inc:
16542 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16543 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
16544 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
16545 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
16546 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
16547 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
16548 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
16549 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
16550 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16551 // CHECK-32: omp.dispatch.end:
16552 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
16553 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16554 // CHECK-32-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
16555 // CHECK-32-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16556 // CHECK-32: .omp.final.then:
16557 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16558 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16559 // CHECK-32: .omp.final.done:
16560 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16561 // CHECK-32-NEXT: ret void
16564 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193
16565 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16566 // CHECK-32-NEXT: entry:
16567 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16568 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16569 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16570 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_kernel_environment, ptr [[DYN_PTR]])
16571 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16572 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16573 // CHECK-32: user_code.entry:
16574 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16575 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16576 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16577 // CHECK-32-NEXT: ret void
16578 // CHECK-32: worker.exit:
16579 // CHECK-32-NEXT: ret void
16582 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined
16583 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16584 // CHECK-32-NEXT: entry:
16585 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16586 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16587 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16588 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16589 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16590 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16591 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16592 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16593 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16594 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16595 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16596 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16597 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16598 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16599 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16600 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16601 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16602 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
16603 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16604 // CHECK-32: omp.dispatch.cond:
16605 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16606 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16607 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16608 // CHECK-32: omp.dispatch.body:
16609 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16610 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16611 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16612 // CHECK-32: omp.inner.for.cond:
16613 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398:![0-9]+]]
16614 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP398]]
16615 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16616 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16617 // CHECK-32: omp.inner.for.body:
16618 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
16619 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16620 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16621 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP398]]
16622 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16623 // CHECK-32: omp.body.continue:
16624 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16625 // CHECK-32: omp.inner.for.inc:
16626 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
16627 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16628 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
16629 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP399:![0-9]+]]
16630 // CHECK-32: omp.inner.for.end:
16631 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16632 // CHECK-32: omp.dispatch.inc:
16633 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16634 // CHECK-32: omp.dispatch.end:
16635 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16636 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
16637 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16638 // CHECK-32: .omp.final.then:
16639 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16640 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16641 // CHECK-32: .omp.final.done:
16642 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16643 // CHECK-32-NEXT: ret void
16646 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197
16647 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16648 // CHECK-32-NEXT: entry:
16649 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16650 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16651 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16652 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_kernel_environment, ptr [[DYN_PTR]])
16653 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16654 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16655 // CHECK-32: user_code.entry:
16656 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16657 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16658 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16659 // CHECK-32-NEXT: ret void
16660 // CHECK-32: worker.exit:
16661 // CHECK-32-NEXT: ret void
16664 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined
16665 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16666 // CHECK-32-NEXT: entry:
16667 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16668 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16669 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16670 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16671 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16672 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16673 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16674 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16675 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16676 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16677 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16678 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16679 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16680 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16681 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16682 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16683 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16684 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
16685 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16686 // CHECK-32: omp.dispatch.cond:
16687 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16688 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16689 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16690 // CHECK-32: omp.dispatch.body:
16691 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16692 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16693 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16694 // CHECK-32: omp.inner.for.cond:
16695 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401:![0-9]+]]
16696 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP401]]
16697 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16698 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16699 // CHECK-32: omp.inner.for.body:
16700 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
16701 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16702 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16703 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP401]]
16704 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16705 // CHECK-32: omp.body.continue:
16706 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16707 // CHECK-32: omp.inner.for.inc:
16708 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
16709 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16710 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
16711 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP402:![0-9]+]]
16712 // CHECK-32: omp.inner.for.end:
16713 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16714 // CHECK-32: omp.dispatch.inc:
16715 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16716 // CHECK-32: omp.dispatch.end:
16717 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16718 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
16719 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16720 // CHECK-32: .omp.final.then:
16721 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16722 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16723 // CHECK-32: .omp.final.done:
16724 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16725 // CHECK-32-NEXT: ret void
16728 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201
16729 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16730 // CHECK-32-NEXT: entry:
16731 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16732 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16733 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16734 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_kernel_environment, ptr [[DYN_PTR]])
16735 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16736 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16737 // CHECK-32: user_code.entry:
16738 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16739 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16740 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16741 // CHECK-32-NEXT: ret void
16742 // CHECK-32: worker.exit:
16743 // CHECK-32-NEXT: ret void
16746 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined
16747 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16748 // CHECK-32-NEXT: entry:
16749 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16750 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16751 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16752 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16753 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16754 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16755 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16756 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16757 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16758 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16759 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16760 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16761 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16762 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16763 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16764 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16765 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16766 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
16767 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16768 // CHECK-32: omp.dispatch.cond:
16769 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16770 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16771 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16772 // CHECK-32: omp.dispatch.body:
16773 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16774 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16775 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16776 // CHECK-32: omp.inner.for.cond:
16777 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404:![0-9]+]]
16778 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP404]]
16779 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16780 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16781 // CHECK-32: omp.inner.for.body:
16782 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
16783 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16784 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16785 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP404]]
16786 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16787 // CHECK-32: omp.body.continue:
16788 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16789 // CHECK-32: omp.inner.for.inc:
16790 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
16791 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16792 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
16793 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP405:![0-9]+]]
16794 // CHECK-32: omp.inner.for.end:
16795 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16796 // CHECK-32: omp.dispatch.inc:
16797 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16798 // CHECK-32: omp.dispatch.end:
16799 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16800 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
16801 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16802 // CHECK-32: .omp.final.then:
16803 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16804 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16805 // CHECK-32: .omp.final.done:
16806 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16807 // CHECK-32-NEXT: ret void
16810 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205
16811 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
16812 // CHECK-32-NEXT: entry:
16813 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16814 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16815 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16816 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_kernel_environment, ptr [[DYN_PTR]])
16817 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16818 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16819 // CHECK-32: user_code.entry:
16820 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16821 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16822 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16823 // CHECK-32-NEXT: ret void
16824 // CHECK-32: worker.exit:
16825 // CHECK-32-NEXT: ret void
16828 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined
16829 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16830 // CHECK-32-NEXT: entry:
16831 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16832 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16833 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16834 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16835 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16836 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16837 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16838 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16839 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16840 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16841 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16842 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16843 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16844 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16845 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16846 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16847 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16848 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
16849 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16850 // CHECK-32: omp.dispatch.cond:
16851 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16852 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16853 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16854 // CHECK-32: omp.dispatch.body:
16855 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16856 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16857 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16858 // CHECK-32: omp.inner.for.cond:
16859 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407:![0-9]+]]
16860 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP407]]
16861 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16862 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16863 // CHECK-32: omp.inner.for.body:
16864 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
16865 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16866 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16867 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP407]]
16868 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16869 // CHECK-32: omp.body.continue:
16870 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16871 // CHECK-32: omp.inner.for.inc:
16872 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
16873 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16874 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
16875 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP408:![0-9]+]]
16876 // CHECK-32: omp.inner.for.end:
16877 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16878 // CHECK-32: omp.dispatch.inc:
16879 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16880 // CHECK-32: omp.dispatch.end:
16881 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16882 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
16883 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16884 // CHECK-32: .omp.final.then:
16885 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16886 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16887 // CHECK-32: .omp.final.done:
16888 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16889 // CHECK-32-NEXT: ret void
16892 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209
16893 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10:[0-9]+]] {
16894 // CHECK-32-NEXT: entry:
16895 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16896 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16897 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16898 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_kernel_environment, ptr [[DYN_PTR]])
16899 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16900 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16901 // CHECK-32: user_code.entry:
16902 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16903 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16904 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16905 // CHECK-32-NEXT: ret void
16906 // CHECK-32: worker.exit:
16907 // CHECK-32-NEXT: ret void
16910 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined
16911 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16912 // CHECK-32-NEXT: entry:
16913 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16914 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16915 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16916 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
16917 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
16918 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
16919 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
16920 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
16921 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
16922 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
16923 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
16924 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
16925 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
16926 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
16927 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
16928 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
16929 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
16930 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 65, i32 0, i32 9, i32 1, i32 1)
16931 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
16932 // CHECK-32: omp.dispatch.cond:
16933 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
16934 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
16935 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
16936 // CHECK-32: omp.dispatch.body:
16937 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
16938 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
16939 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
16940 // CHECK-32: omp.inner.for.cond:
16941 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410:![0-9]+]]
16942 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP410]]
16943 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
16944 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
16945 // CHECK-32: omp.inner.for.body:
16946 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
16947 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
16948 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
16949 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP410]]
16950 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
16951 // CHECK-32: omp.body.continue:
16952 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
16953 // CHECK-32: omp.inner.for.inc:
16954 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
16955 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
16956 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
16957 // CHECK-32-NEXT: call void @__kmpc_dispatch_fini_4(ptr @[[GLOB1]], i32 [[TMP1]]), !llvm.access.group [[ACC_GRP410]]
16958 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP411:![0-9]+]]
16959 // CHECK-32: omp.inner.for.end:
16960 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
16961 // CHECK-32: omp.dispatch.inc:
16962 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
16963 // CHECK-32: omp.dispatch.end:
16964 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
16965 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
16966 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
16967 // CHECK-32: .omp.final.then:
16968 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
16969 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
16970 // CHECK-32: .omp.final.done:
16971 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
16972 // CHECK-32-NEXT: ret void
16975 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214
16976 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
16977 // CHECK-32-NEXT: entry:
16978 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
16979 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
16980 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
16981 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_kernel_environment, ptr [[DYN_PTR]])
16982 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
16983 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
16984 // CHECK-32: user_code.entry:
16985 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
16986 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
16987 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
16988 // CHECK-32-NEXT: ret void
16989 // CHECK-32: worker.exit:
16990 // CHECK-32-NEXT: ret void
16993 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined
16994 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
16995 // CHECK-32-NEXT: entry:
16996 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
16997 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
16998 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
16999 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17000 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17001 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17002 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17003 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17004 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17005 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17006 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17007 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17008 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17009 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17010 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17011 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17012 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17013 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
17014 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17015 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
17016 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
17017 // CHECK-32: cond.true:
17018 // CHECK-32-NEXT: br label [[COND_END:%.*]]
17019 // CHECK-32: cond.false:
17020 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17021 // CHECK-32-NEXT: br label [[COND_END]]
17022 // CHECK-32: cond.end:
17023 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
17024 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
17025 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17026 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
17027 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17028 // CHECK-32: omp.inner.for.cond:
17029 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413:![0-9]+]]
17030 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP413]]
17031 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
17032 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17033 // CHECK-32: omp.inner.for.body:
17034 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
17035 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
17036 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17037 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP413]]
17038 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17039 // CHECK-32: omp.body.continue:
17040 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17041 // CHECK-32: omp.inner.for.inc:
17042 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
17043 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
17044 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
17045 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP414:![0-9]+]]
17046 // CHECK-32: omp.inner.for.end:
17047 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
17048 // CHECK-32: omp.loop.exit:
17049 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
17050 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17051 // CHECK-32-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
17052 // CHECK-32-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17053 // CHECK-32: .omp.final.then:
17054 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17055 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17056 // CHECK-32: .omp.final.done:
17057 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17058 // CHECK-32-NEXT: ret void
17061 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219
17062 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
17063 // CHECK-32-NEXT: entry:
17064 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17065 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17066 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17067 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_kernel_environment, ptr [[DYN_PTR]])
17068 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17069 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17070 // CHECK-32: user_code.entry:
17071 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17072 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17073 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17074 // CHECK-32-NEXT: ret void
17075 // CHECK-32: worker.exit:
17076 // CHECK-32-NEXT: ret void
17079 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined
17080 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17081 // CHECK-32-NEXT: entry:
17082 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17083 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17084 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17085 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17086 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17087 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17088 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17089 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17090 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17091 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17092 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17093 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17094 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17095 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17096 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17097 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17098 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17099 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
17100 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17101 // CHECK-32: omp.dispatch.cond:
17102 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17103 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
17104 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
17105 // CHECK-32: cond.true:
17106 // CHECK-32-NEXT: br label [[COND_END:%.*]]
17107 // CHECK-32: cond.false:
17108 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17109 // CHECK-32-NEXT: br label [[COND_END]]
17110 // CHECK-32: cond.end:
17111 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
17112 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
17113 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17114 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
17115 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17116 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17117 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
17118 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17119 // CHECK-32: omp.dispatch.body:
17120 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17121 // CHECK-32: omp.inner.for.cond:
17122 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416:![0-9]+]]
17123 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP416]]
17124 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
17125 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17126 // CHECK-32: omp.inner.for.body:
17127 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
17128 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
17129 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17130 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP416]]
17131 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17132 // CHECK-32: omp.body.continue:
17133 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17134 // CHECK-32: omp.inner.for.inc:
17135 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
17136 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
17137 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
17138 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP417:![0-9]+]]
17139 // CHECK-32: omp.inner.for.end:
17140 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17141 // CHECK-32: omp.dispatch.inc:
17142 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17143 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17144 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
17145 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
17146 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17147 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17148 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
17149 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
17150 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17151 // CHECK-32: omp.dispatch.end:
17152 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
17153 // CHECK-32-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17154 // CHECK-32-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
17155 // CHECK-32-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17156 // CHECK-32: .omp.final.then:
17157 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17158 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17159 // CHECK-32: .omp.final.done:
17160 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17161 // CHECK-32-NEXT: ret void
17164 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224
17165 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
17166 // CHECK-32-NEXT: entry:
17167 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17168 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17169 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17170 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_kernel_environment, ptr [[DYN_PTR]])
17171 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17172 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17173 // CHECK-32: user_code.entry:
17174 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17175 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17176 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17177 // CHECK-32-NEXT: ret void
17178 // CHECK-32: worker.exit:
17179 // CHECK-32-NEXT: ret void
17182 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined
17183 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17184 // CHECK-32-NEXT: entry:
17185 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17186 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17187 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17188 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17189 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17190 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17191 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17192 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17193 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17194 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17195 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17196 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17197 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17198 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17199 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17200 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17201 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17202 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
17203 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17204 // CHECK-32: omp.dispatch.cond:
17205 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17206 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17207 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17208 // CHECK-32: omp.dispatch.body:
17209 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17210 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17211 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17212 // CHECK-32: omp.inner.for.cond:
17213 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419:![0-9]+]]
17214 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP419]]
17215 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17216 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17217 // CHECK-32: omp.inner.for.body:
17218 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
17219 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17220 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17221 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP419]]
17222 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17223 // CHECK-32: omp.body.continue:
17224 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17225 // CHECK-32: omp.inner.for.inc:
17226 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
17227 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17228 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
17229 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP420:![0-9]+]]
17230 // CHECK-32: omp.inner.for.end:
17231 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17232 // CHECK-32: omp.dispatch.inc:
17233 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17234 // CHECK-32: omp.dispatch.end:
17235 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17236 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
17237 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17238 // CHECK-32: .omp.final.then:
17239 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17240 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17241 // CHECK-32: .omp.final.done:
17242 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17243 // CHECK-32-NEXT: ret void
17246 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229
17247 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
17248 // CHECK-32-NEXT: entry:
17249 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17250 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17251 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17252 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_kernel_environment, ptr [[DYN_PTR]])
17253 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17254 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17255 // CHECK-32: user_code.entry:
17256 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17257 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17258 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17259 // CHECK-32-NEXT: ret void
17260 // CHECK-32: worker.exit:
17261 // CHECK-32-NEXT: ret void
17264 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined
17265 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17266 // CHECK-32-NEXT: entry:
17267 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17268 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17269 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17270 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17271 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17272 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17273 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17274 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17275 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17276 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17277 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17278 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17279 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17280 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17281 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17282 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17283 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17284 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
17285 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17286 // CHECK-32: omp.dispatch.cond:
17287 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17288 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17289 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17290 // CHECK-32: omp.dispatch.body:
17291 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17292 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17293 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17294 // CHECK-32: omp.inner.for.cond:
17295 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422:![0-9]+]]
17296 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP422]]
17297 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17298 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17299 // CHECK-32: omp.inner.for.body:
17300 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
17301 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17302 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17303 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP422]]
17304 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17305 // CHECK-32: omp.body.continue:
17306 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17307 // CHECK-32: omp.inner.for.inc:
17308 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
17309 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17310 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
17311 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP423:![0-9]+]]
17312 // CHECK-32: omp.inner.for.end:
17313 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17314 // CHECK-32: omp.dispatch.inc:
17315 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17316 // CHECK-32: omp.dispatch.end:
17317 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17318 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
17319 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17320 // CHECK-32: .omp.final.then:
17321 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17322 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17323 // CHECK-32: .omp.final.done:
17324 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17325 // CHECK-32-NEXT: ret void
17328 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234
17329 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
17330 // CHECK-32-NEXT: entry:
17331 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17332 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17333 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17334 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_kernel_environment, ptr [[DYN_PTR]])
17335 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17336 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17337 // CHECK-32: user_code.entry:
17338 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17339 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17340 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17341 // CHECK-32-NEXT: ret void
17342 // CHECK-32: worker.exit:
17343 // CHECK-32-NEXT: ret void
17346 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined
17347 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17348 // CHECK-32-NEXT: entry:
17349 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17350 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17351 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17352 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17353 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17354 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17355 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17356 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17357 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17358 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17359 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17360 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17361 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17362 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17363 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17364 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17365 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17366 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
17367 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17368 // CHECK-32: omp.dispatch.cond:
17369 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17370 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17371 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17372 // CHECK-32: omp.dispatch.body:
17373 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17374 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17375 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17376 // CHECK-32: omp.inner.for.cond:
17377 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425:![0-9]+]]
17378 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP425]]
17379 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17380 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17381 // CHECK-32: omp.inner.for.body:
17382 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
17383 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17384 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17385 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP425]]
17386 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17387 // CHECK-32: omp.body.continue:
17388 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17389 // CHECK-32: omp.inner.for.inc:
17390 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
17391 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17392 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
17393 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP426:![0-9]+]]
17394 // CHECK-32: omp.inner.for.end:
17395 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17396 // CHECK-32: omp.dispatch.inc:
17397 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17398 // CHECK-32: omp.dispatch.end:
17399 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17400 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
17401 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17402 // CHECK-32: .omp.final.then:
17403 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17404 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17405 // CHECK-32: .omp.final.done:
17406 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17407 // CHECK-32-NEXT: ret void
17410 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239
17411 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
17412 // CHECK-32-NEXT: entry:
17413 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17414 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17415 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17416 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_kernel_environment, ptr [[DYN_PTR]])
17417 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17418 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17419 // CHECK-32: user_code.entry:
17420 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17421 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17422 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17423 // CHECK-32-NEXT: ret void
17424 // CHECK-32: worker.exit:
17425 // CHECK-32-NEXT: ret void
17428 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined
17429 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17430 // CHECK-32-NEXT: entry:
17431 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17432 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17433 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17434 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17435 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17436 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17437 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17438 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17439 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17440 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17441 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17442 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17443 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17444 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17445 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17446 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17447 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17448 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
17449 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17450 // CHECK-32: omp.dispatch.cond:
17451 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17452 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17453 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17454 // CHECK-32: omp.dispatch.body:
17455 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17456 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17457 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17458 // CHECK-32: omp.inner.for.cond:
17459 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428:![0-9]+]]
17460 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP428]]
17461 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17462 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17463 // CHECK-32: omp.inner.for.body:
17464 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
17465 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17466 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17467 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP428]]
17468 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17469 // CHECK-32: omp.body.continue:
17470 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17471 // CHECK-32: omp.inner.for.inc:
17472 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
17473 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17474 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
17475 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP429:![0-9]+]]
17476 // CHECK-32: omp.inner.for.end:
17477 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17478 // CHECK-32: omp.dispatch.inc:
17479 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17480 // CHECK-32: omp.dispatch.end:
17481 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
17482 // CHECK-32-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
17483 // CHECK-32-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
17484 // CHECK-32: .omp.final.then:
17485 // CHECK-32-NEXT: store i32 10, ptr [[I]], align 4
17486 // CHECK-32-NEXT: br label [[DOTOMP_FINAL_DONE]]
17487 // CHECK-32: .omp.final.done:
17488 // CHECK-32-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
17489 // CHECK-32-NEXT: ret void
17492 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244
17493 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17494 // CHECK-32-NEXT: entry:
17495 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17496 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17497 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17498 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_kernel_environment, ptr [[DYN_PTR]])
17499 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17500 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17501 // CHECK-32: user_code.entry:
17502 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17503 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17504 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17505 // CHECK-32-NEXT: ret void
17506 // CHECK-32: worker.exit:
17507 // CHECK-32-NEXT: ret void
17510 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined
17511 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17512 // CHECK-32-NEXT: entry:
17513 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17514 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17515 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17516 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17517 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17518 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17519 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17520 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17521 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17522 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17523 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17524 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17525 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17526 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17527 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17528 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17529 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17530 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
17531 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17532 // CHECK-32: omp.dispatch.cond:
17533 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17534 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
17535 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
17536 // CHECK-32: cond.true:
17537 // CHECK-32-NEXT: br label [[COND_END:%.*]]
17538 // CHECK-32: cond.false:
17539 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17540 // CHECK-32-NEXT: br label [[COND_END]]
17541 // CHECK-32: cond.end:
17542 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
17543 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
17544 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17545 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
17546 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17547 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17548 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
17549 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17550 // CHECK-32: omp.dispatch.body:
17551 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17552 // CHECK-32: omp.inner.for.cond:
17553 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17554 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17555 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
17556 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17557 // CHECK-32: omp.inner.for.body:
17558 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17559 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
17560 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17561 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
17562 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17563 // CHECK-32: omp.body.continue:
17564 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17565 // CHECK-32: omp.inner.for.inc:
17566 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17567 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
17568 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
17569 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
17570 // CHECK-32: omp.inner.for.end:
17571 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17572 // CHECK-32: omp.dispatch.inc:
17573 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17574 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17575 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
17576 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
17577 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17578 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17579 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
17580 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
17581 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17582 // CHECK-32: omp.dispatch.end:
17583 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
17584 // CHECK-32-NEXT: ret void
17587 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248
17588 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17589 // CHECK-32-NEXT: entry:
17590 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17591 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17592 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17593 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_kernel_environment, ptr [[DYN_PTR]])
17594 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17595 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17596 // CHECK-32: user_code.entry:
17597 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17598 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17599 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17600 // CHECK-32-NEXT: ret void
17601 // CHECK-32: worker.exit:
17602 // CHECK-32-NEXT: ret void
17605 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined
17606 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17607 // CHECK-32-NEXT: entry:
17608 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17609 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17610 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17611 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17612 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17613 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17614 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17615 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17616 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17617 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17618 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17619 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17620 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17621 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17622 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17623 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17624 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17625 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
17626 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17627 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
17628 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
17629 // CHECK-32: cond.true:
17630 // CHECK-32-NEXT: br label [[COND_END:%.*]]
17631 // CHECK-32: cond.false:
17632 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17633 // CHECK-32-NEXT: br label [[COND_END]]
17634 // CHECK-32: cond.end:
17635 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
17636 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
17637 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17638 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
17639 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17640 // CHECK-32: omp.inner.for.cond:
17641 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17642 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17643 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
17644 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17645 // CHECK-32: omp.inner.for.body:
17646 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17647 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
17648 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17649 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
17650 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17651 // CHECK-32: omp.body.continue:
17652 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17653 // CHECK-32: omp.inner.for.inc:
17654 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17655 // CHECK-32-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
17656 // CHECK-32-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
17657 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
17658 // CHECK-32: omp.inner.for.end:
17659 // CHECK-32-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
17660 // CHECK-32: omp.loop.exit:
17661 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
17662 // CHECK-32-NEXT: ret void
17665 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252
17666 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17667 // CHECK-32-NEXT: entry:
17668 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17669 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17670 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17671 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_kernel_environment, ptr [[DYN_PTR]])
17672 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17673 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17674 // CHECK-32: user_code.entry:
17675 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17676 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17677 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17678 // CHECK-32-NEXT: ret void
17679 // CHECK-32: worker.exit:
17680 // CHECK-32-NEXT: ret void
17683 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined
17684 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17685 // CHECK-32-NEXT: entry:
17686 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17687 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17688 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17689 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17690 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17691 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17692 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17693 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17694 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17695 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17696 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17697 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17698 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17699 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17700 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17701 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17702 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17703 // CHECK-32-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
17704 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17705 // CHECK-32: omp.dispatch.cond:
17706 // CHECK-32-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17707 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
17708 // CHECK-32-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
17709 // CHECK-32: cond.true:
17710 // CHECK-32-NEXT: br label [[COND_END:%.*]]
17711 // CHECK-32: cond.false:
17712 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17713 // CHECK-32-NEXT: br label [[COND_END]]
17714 // CHECK-32: cond.end:
17715 // CHECK-32-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
17716 // CHECK-32-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
17717 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17718 // CHECK-32-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
17719 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17720 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17721 // CHECK-32-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
17722 // CHECK-32-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17723 // CHECK-32: omp.dispatch.body:
17724 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17725 // CHECK-32: omp.inner.for.cond:
17726 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17727 // CHECK-32-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17728 // CHECK-32-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
17729 // CHECK-32-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17730 // CHECK-32: omp.inner.for.body:
17731 // CHECK-32-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17732 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
17733 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17734 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4
17735 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17736 // CHECK-32: omp.body.continue:
17737 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17738 // CHECK-32: omp.inner.for.inc:
17739 // CHECK-32-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
17740 // CHECK-32-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
17741 // CHECK-32-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
17742 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]]
17743 // CHECK-32: omp.inner.for.end:
17744 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17745 // CHECK-32: omp.dispatch.inc:
17746 // CHECK-32-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17747 // CHECK-32-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17748 // CHECK-32-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
17749 // CHECK-32-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
17750 // CHECK-32-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
17751 // CHECK-32-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
17752 // CHECK-32-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
17753 // CHECK-32-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
17754 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17755 // CHECK-32: omp.dispatch.end:
17756 // CHECK-32-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
17757 // CHECK-32-NEXT: ret void
17760 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256
17761 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17762 // CHECK-32-NEXT: entry:
17763 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17764 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17765 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17766 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_kernel_environment, ptr [[DYN_PTR]])
17767 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17768 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17769 // CHECK-32: user_code.entry:
17770 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17771 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17772 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17773 // CHECK-32-NEXT: ret void
17774 // CHECK-32: worker.exit:
17775 // CHECK-32-NEXT: ret void
17778 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined
17779 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17780 // CHECK-32-NEXT: entry:
17781 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17782 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17783 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17784 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17785 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17786 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17787 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17788 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17789 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17790 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17791 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17792 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17793 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17794 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17795 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17796 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17797 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17798 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
17799 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17800 // CHECK-32: omp.dispatch.cond:
17801 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17802 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17803 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17804 // CHECK-32: omp.dispatch.body:
17805 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17806 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17807 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17808 // CHECK-32: omp.inner.for.cond:
17809 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431:![0-9]+]]
17810 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP431]]
17811 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17812 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17813 // CHECK-32: omp.inner.for.body:
17814 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
17815 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17816 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17817 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP431]]
17818 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17819 // CHECK-32: omp.body.continue:
17820 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17821 // CHECK-32: omp.inner.for.inc:
17822 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
17823 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17824 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
17825 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP432:![0-9]+]]
17826 // CHECK-32: omp.inner.for.end:
17827 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17828 // CHECK-32: omp.dispatch.inc:
17829 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17830 // CHECK-32: omp.dispatch.end:
17831 // CHECK-32-NEXT: ret void
17834 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260
17835 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17836 // CHECK-32-NEXT: entry:
17837 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17838 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17839 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17840 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_kernel_environment, ptr [[DYN_PTR]])
17841 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17842 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17843 // CHECK-32: user_code.entry:
17844 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17845 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17846 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17847 // CHECK-32-NEXT: ret void
17848 // CHECK-32: worker.exit:
17849 // CHECK-32-NEXT: ret void
17852 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined
17853 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17854 // CHECK-32-NEXT: entry:
17855 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17856 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17857 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17858 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17859 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17860 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17861 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17862 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17863 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17864 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17865 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17866 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17867 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17868 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17869 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17870 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17871 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17872 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
17873 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17874 // CHECK-32: omp.dispatch.cond:
17875 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17876 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17877 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17878 // CHECK-32: omp.dispatch.body:
17879 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17880 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17881 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17882 // CHECK-32: omp.inner.for.cond:
17883 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434:![0-9]+]]
17884 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP434]]
17885 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17886 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17887 // CHECK-32: omp.inner.for.body:
17888 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
17889 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17890 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17891 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP434]]
17892 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17893 // CHECK-32: omp.body.continue:
17894 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17895 // CHECK-32: omp.inner.for.inc:
17896 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
17897 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17898 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
17899 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP435:![0-9]+]]
17900 // CHECK-32: omp.inner.for.end:
17901 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17902 // CHECK-32: omp.dispatch.inc:
17903 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17904 // CHECK-32: omp.dispatch.end:
17905 // CHECK-32-NEXT: ret void
17908 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264
17909 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17910 // CHECK-32-NEXT: entry:
17911 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17912 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17913 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17914 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_kernel_environment, ptr [[DYN_PTR]])
17915 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17916 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17917 // CHECK-32: user_code.entry:
17918 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17919 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17920 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17921 // CHECK-32-NEXT: ret void
17922 // CHECK-32: worker.exit:
17923 // CHECK-32-NEXT: ret void
17926 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined
17927 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
17928 // CHECK-32-NEXT: entry:
17929 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
17930 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
17931 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
17932 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
17933 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
17934 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
17935 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
17936 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
17937 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
17938 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
17939 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
17940 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
17941 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
17942 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
17943 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
17944 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
17945 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
17946 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
17947 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
17948 // CHECK-32: omp.dispatch.cond:
17949 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
17950 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
17951 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
17952 // CHECK-32: omp.dispatch.body:
17953 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
17954 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
17955 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
17956 // CHECK-32: omp.inner.for.cond:
17957 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437:![0-9]+]]
17958 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP437]]
17959 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
17960 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
17961 // CHECK-32: omp.inner.for.body:
17962 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
17963 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
17964 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
17965 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP437]]
17966 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
17967 // CHECK-32: omp.body.continue:
17968 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
17969 // CHECK-32: omp.inner.for.inc:
17970 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
17971 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
17972 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
17973 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP438:![0-9]+]]
17974 // CHECK-32: omp.inner.for.end:
17975 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
17976 // CHECK-32: omp.dispatch.inc:
17977 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
17978 // CHECK-32: omp.dispatch.end:
17979 // CHECK-32-NEXT: ret void
17982 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268
17983 // CHECK-32-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
17984 // CHECK-32-NEXT: entry:
17985 // CHECK-32-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
17986 // CHECK-32-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
17987 // CHECK-32-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
17988 // CHECK-32-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_kernel_environment, ptr [[DYN_PTR]])
17989 // CHECK-32-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
17990 // CHECK-32-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
17991 // CHECK-32: user_code.entry:
17992 // CHECK-32-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
17993 // CHECK-32-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
17994 // CHECK-32-NEXT: call void @__kmpc_target_deinit()
17995 // CHECK-32-NEXT: ret void
17996 // CHECK-32: worker.exit:
17997 // CHECK-32-NEXT: ret void
18000 // CHECK-32-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined
18001 // CHECK-32-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
18002 // CHECK-32-NEXT: entry:
18003 // CHECK-32-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18004 // CHECK-32-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18005 // CHECK-32-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18006 // CHECK-32-NEXT: [[TMP:%.*]] = alloca i32, align 4
18007 // CHECK-32-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18008 // CHECK-32-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18009 // CHECK-32-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18010 // CHECK-32-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18011 // CHECK-32-NEXT: [[I:%.*]] = alloca i32, align 4
18012 // CHECK-32-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18013 // CHECK-32-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18014 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18015 // CHECK-32-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18016 // CHECK-32-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18017 // CHECK-32-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18018 // CHECK-32-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18019 // CHECK-32-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
18020 // CHECK-32-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
18021 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
18022 // CHECK-32: omp.dispatch.cond:
18023 // CHECK-32-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
18024 // CHECK-32-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
18025 // CHECK-32-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
18026 // CHECK-32: omp.dispatch.body:
18027 // CHECK-32-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18028 // CHECK-32-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
18029 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18030 // CHECK-32: omp.inner.for.cond:
18031 // CHECK-32-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440:![0-9]+]]
18032 // CHECK-32-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP440]]
18033 // CHECK-32-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
18034 // CHECK-32-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18035 // CHECK-32: omp.inner.for.body:
18036 // CHECK-32-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
18037 // CHECK-32-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
18038 // CHECK-32-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18039 // CHECK-32-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP440]]
18040 // CHECK-32-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18041 // CHECK-32: omp.body.continue:
18042 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18043 // CHECK-32: omp.inner.for.inc:
18044 // CHECK-32-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
18045 // CHECK-32-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
18046 // CHECK-32-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
18047 // CHECK-32-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP441:![0-9]+]]
18048 // CHECK-32: omp.inner.for.end:
18049 // CHECK-32-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
18050 // CHECK-32: omp.dispatch.inc:
18051 // CHECK-32-NEXT: br label [[OMP_DISPATCH_COND]]
18052 // CHECK-32: omp.dispatch.end:
18053 // CHECK-32-NEXT: ret void
18056 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15
18057 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR0:[0-9]+]] {
18058 // CHECK-32-EX-NEXT: entry:
18059 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
18060 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
18061 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
18062 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
18063 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
18064 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
18065 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
18066 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_kernel_environment, ptr [[DYN_PTR]])
18067 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
18068 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
18069 // CHECK-32-EX: user_code.entry:
18070 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
18071 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18072 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
18073 // CHECK-32-EX-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL]] to i8
18074 // CHECK-32-EX-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1
18075 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
18076 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
18077 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
18078 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR2:[0-9]+]]
18079 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
18080 // CHECK-32-EX-NEXT: ret void
18081 // CHECK-32-EX: worker.exit:
18082 // CHECK-32-EX-NEXT: ret void
18085 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined
18086 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1:[0-9]+]] {
18087 // CHECK-32-EX-NEXT: entry:
18088 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18089 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18090 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
18091 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18092 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18093 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
18094 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
18095 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18096 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18097 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18098 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
18099 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 4
18100 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__CASTED15:%.*]] = alloca i32, align 4
18101 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS17:%.*]] = alloca [3 x ptr], align 4
18102 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18103 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18104 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
18105 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
18106 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
18107 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18108 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18109 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
18110 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18111 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
18112 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
18113 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18114 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
18115 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
18116 // CHECK-32-EX: cond.true:
18117 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
18118 // CHECK-32-EX: cond.false:
18119 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18120 // CHECK-32-EX-NEXT: br label [[COND_END]]
18121 // CHECK-32-EX: cond.end:
18122 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
18123 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
18124 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18125 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
18126 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18127 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP5]] to i1
18128 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
18129 // CHECK-32-EX: omp_if.then:
18130 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18131 // CHECK-32-EX: omp.inner.for.cond:
18132 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249:![0-9]+]]
18133 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP6]], 10
18134 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18135 // CHECK-32-EX: omp.inner.for.body:
18136 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
18137 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18138 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
18139 // CHECK-32-EX-NEXT: [[TOBOOL2:%.*]] = trunc i8 [[TMP9]] to i1
18140 // CHECK-32-EX-NEXT: [[FROMBOOL:%.*]] = zext i1 [[TOBOOL2]] to i8
18141 // CHECK-32-EX-NEXT: store i8 [[FROMBOOL]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 1, !llvm.access.group [[ACC_GRP249]]
18142 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4, !llvm.access.group [[ACC_GRP249]]
18143 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
18144 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = inttoptr i32 [[TMP7]] to ptr
18145 // CHECK-32-EX-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 4, !llvm.access.group [[ACC_GRP249]]
18146 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
18147 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = inttoptr i32 [[TMP8]] to ptr
18148 // CHECK-32-EX-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 4, !llvm.access.group [[ACC_GRP249]]
18149 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
18150 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = inttoptr i32 [[TMP10]] to ptr
18151 // CHECK-32-EX-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 4, !llvm.access.group [[ACC_GRP249]]
18152 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1, !llvm.access.group [[ACC_GRP249]]
18153 // CHECK-32-EX-NEXT: [[TOBOOL3:%.*]] = trunc i8 [[TMP17]] to i1
18154 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = zext i1 [[TOBOOL3]] to i32
18155 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP18]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 3), !llvm.access.group [[ACC_GRP249]]
18156 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18157 // CHECK-32-EX: omp.inner.for.inc:
18158 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
18159 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
18160 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP19]], [[TMP20]]
18161 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
18162 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
18163 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
18164 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]
18165 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
18166 // CHECK-32-EX-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18167 // CHECK-32-EX-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP249]]
18168 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
18169 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18170 // CHECK-32-EX-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18171 // CHECK-32-EX-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP25]], 9
18172 // CHECK-32-EX-NEXT: br i1 [[CMP6]], label [[COND_TRUE7:%.*]], label [[COND_FALSE8:%.*]]
18173 // CHECK-32-EX: cond.true7:
18174 // CHECK-32-EX-NEXT: br label [[COND_END9:%.*]]
18175 // CHECK-32-EX: cond.false8:
18176 // CHECK-32-EX-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18177 // CHECK-32-EX-NEXT: br label [[COND_END9]]
18178 // CHECK-32-EX: cond.end9:
18179 // CHECK-32-EX-NEXT: [[COND10:%.*]] = phi i32 [ 9, [[COND_TRUE7]] ], [ [[TMP26]], [[COND_FALSE8]] ]
18180 // CHECK-32-EX-NEXT: store i32 [[COND10]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP249]]
18181 // CHECK-32-EX-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP249]]
18182 // CHECK-32-EX-NEXT: store i32 [[TMP27]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP249]]
18183 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP250:![0-9]+]]
18184 // CHECK-32-EX: omp.inner.for.end:
18185 // CHECK-32-EX-NEXT: br label [[OMP_IF_END:%.*]]
18186 // CHECK-32-EX: omp_if.else:
18187 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND11:%.*]]
18188 // CHECK-32-EX: omp.inner.for.cond11:
18189 // CHECK-32-EX-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18190 // CHECK-32-EX-NEXT: [[CMP12:%.*]] = icmp slt i32 [[TMP28]], 10
18191 // CHECK-32-EX-NEXT: br i1 [[CMP12]], label [[OMP_INNER_FOR_BODY13:%.*]], label [[OMP_INNER_FOR_END28:%.*]]
18192 // CHECK-32-EX: omp.inner.for.body13:
18193 // CHECK-32-EX-NEXT: [[TMP29:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18194 // CHECK-32-EX-NEXT: [[TMP30:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18195 // CHECK-32-EX-NEXT: [[TMP31:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18196 // CHECK-32-EX-NEXT: [[TOBOOL14:%.*]] = trunc i8 [[TMP31]] to i1
18197 // CHECK-32-EX-NEXT: [[FROMBOOL16:%.*]] = zext i1 [[TOBOOL14]] to i8
18198 // CHECK-32-EX-NEXT: store i8 [[FROMBOOL16]], ptr [[DOTCAPTURE_EXPR__CASTED15]], align 1
18199 // CHECK-32-EX-NEXT: [[TMP32:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED15]], align 4
18200 // CHECK-32-EX-NEXT: [[TMP33:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 0
18201 // CHECK-32-EX-NEXT: [[TMP34:%.*]] = inttoptr i32 [[TMP29]] to ptr
18202 // CHECK-32-EX-NEXT: store ptr [[TMP34]], ptr [[TMP33]], align 4
18203 // CHECK-32-EX-NEXT: [[TMP35:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 1
18204 // CHECK-32-EX-NEXT: [[TMP36:%.*]] = inttoptr i32 [[TMP30]] to ptr
18205 // CHECK-32-EX-NEXT: store ptr [[TMP36]], ptr [[TMP35]], align 4
18206 // CHECK-32-EX-NEXT: [[TMP37:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS17]], i32 0, i32 2
18207 // CHECK-32-EX-NEXT: [[TMP38:%.*]] = inttoptr i32 [[TMP32]] to ptr
18208 // CHECK-32-EX-NEXT: store ptr [[TMP38]], ptr [[TMP37]], align 4
18209 // CHECK-32-EX-NEXT: [[TMP39:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18210 // CHECK-32-EX-NEXT: [[TOBOOL18:%.*]] = trunc i8 [[TMP39]] to i1
18211 // CHECK-32-EX-NEXT: [[TMP40:%.*]] = zext i1 [[TOBOOL18]] to i32
18212 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP40]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1, ptr null, ptr [[CAPTURED_VARS_ADDRS17]], i32 3)
18213 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC19:%.*]]
18214 // CHECK-32-EX: omp.inner.for.inc19:
18215 // CHECK-32-EX-NEXT: [[TMP41:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18216 // CHECK-32-EX-NEXT: [[TMP42:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
18217 // CHECK-32-EX-NEXT: [[ADD20:%.*]] = add nsw i32 [[TMP41]], [[TMP42]]
18218 // CHECK-32-EX-NEXT: store i32 [[ADD20]], ptr [[DOTOMP_IV]], align 4
18219 // CHECK-32-EX-NEXT: [[TMP43:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18220 // CHECK-32-EX-NEXT: [[TMP44:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
18221 // CHECK-32-EX-NEXT: [[ADD21:%.*]] = add nsw i32 [[TMP43]], [[TMP44]]
18222 // CHECK-32-EX-NEXT: store i32 [[ADD21]], ptr [[DOTOMP_COMB_LB]], align 4
18223 // CHECK-32-EX-NEXT: [[TMP45:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18224 // CHECK-32-EX-NEXT: [[TMP46:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
18225 // CHECK-32-EX-NEXT: [[ADD22:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]
18226 // CHECK-32-EX-NEXT: store i32 [[ADD22]], ptr [[DOTOMP_COMB_UB]], align 4
18227 // CHECK-32-EX-NEXT: [[TMP47:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18228 // CHECK-32-EX-NEXT: [[CMP23:%.*]] = icmp sgt i32 [[TMP47]], 9
18229 // CHECK-32-EX-NEXT: br i1 [[CMP23]], label [[COND_TRUE24:%.*]], label [[COND_FALSE25:%.*]]
18230 // CHECK-32-EX: cond.true24:
18231 // CHECK-32-EX-NEXT: br label [[COND_END26:%.*]]
18232 // CHECK-32-EX: cond.false25:
18233 // CHECK-32-EX-NEXT: [[TMP48:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18234 // CHECK-32-EX-NEXT: br label [[COND_END26]]
18235 // CHECK-32-EX: cond.end26:
18236 // CHECK-32-EX-NEXT: [[COND27:%.*]] = phi i32 [ 9, [[COND_TRUE24]] ], [ [[TMP48]], [[COND_FALSE25]] ]
18237 // CHECK-32-EX-NEXT: store i32 [[COND27]], ptr [[DOTOMP_COMB_UB]], align 4
18238 // CHECK-32-EX-NEXT: [[TMP49:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18239 // CHECK-32-EX-NEXT: store i32 [[TMP49]], ptr [[DOTOMP_IV]], align 4
18240 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND11]], !llvm.loop [[LOOP253:![0-9]+]]
18241 // CHECK-32-EX: omp.inner.for.end28:
18242 // CHECK-32-EX-NEXT: br label [[OMP_IF_END]]
18243 // CHECK-32-EX: omp_if.end:
18244 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18245 // CHECK-32-EX: omp.loop.exit:
18246 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
18247 // CHECK-32-EX-NEXT: [[TMP50:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18248 // CHECK-32-EX-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
18249 // CHECK-32-EX-NEXT: br i1 [[TMP51]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18250 // CHECK-32-EX: .omp.final.then:
18251 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18252 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18253 // CHECK-32-EX: .omp.final.done:
18254 // CHECK-32-EX-NEXT: ret void
18257 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined
18258 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
18259 // CHECK-32-EX-NEXT: entry:
18260 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18261 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18262 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
18263 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
18264 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
18265 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18266 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18267 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18268 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18269 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18270 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18271 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18272 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18273 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18274 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18275 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18276 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
18277 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18278 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18279 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18280 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18281 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
18282 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
18283 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18284 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18285 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18286 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
18287 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
18288 // CHECK-32-EX: omp_if.then:
18289 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18290 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
18291 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3:[0-9]+]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18292 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18293 // CHECK-32-EX-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
18294 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18295 // CHECK-32-EX: omp.inner.for.cond:
18296 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255:![0-9]+]]
18297 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP255]]
18298 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP6]], [[TMP7]]
18299 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18300 // CHECK-32-EX: omp.inner.for.body:
18301 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
18302 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
18303 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18304 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP255]]
18305 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18306 // CHECK-32-EX: omp.body.continue:
18307 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18308 // CHECK-32-EX: omp.inner.for.inc:
18309 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
18310 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP255]]
18311 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
18312 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP255]]
18313 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP256:![0-9]+]]
18314 // CHECK-32-EX: omp.inner.for.end:
18315 // CHECK-32-EX-NEXT: br label [[OMP_IF_END:%.*]]
18316 // CHECK-32-EX: omp_if.else:
18317 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18318 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
18319 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18320 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18321 // CHECK-32-EX-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
18322 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND2:%.*]]
18323 // CHECK-32-EX: omp.inner.for.cond2:
18324 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18325 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18326 // CHECK-32-EX-NEXT: [[CMP3:%.*]] = icmp ule i32 [[TMP14]], [[TMP15]]
18327 // CHECK-32-EX-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY4:%.*]], label [[OMP_INNER_FOR_END10:%.*]]
18328 // CHECK-32-EX: omp.inner.for.body4:
18329 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18330 // CHECK-32-EX-NEXT: [[MUL5:%.*]] = mul nsw i32 [[TMP16]], 1
18331 // CHECK-32-EX-NEXT: [[ADD6:%.*]] = add nsw i32 0, [[MUL5]]
18332 // CHECK-32-EX-NEXT: store i32 [[ADD6]], ptr [[I]], align 4
18333 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE7:%.*]]
18334 // CHECK-32-EX: omp.body.continue7:
18335 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC8:%.*]]
18336 // CHECK-32-EX: omp.inner.for.inc8:
18337 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18338 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
18339 // CHECK-32-EX-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
18340 // CHECK-32-EX-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
18341 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND2]], !llvm.loop [[LOOP258:![0-9]+]]
18342 // CHECK-32-EX: omp.inner.for.end10:
18343 // CHECK-32-EX-NEXT: br label [[OMP_IF_END]]
18344 // CHECK-32-EX: omp_if.end:
18345 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18346 // CHECK-32-EX: omp.loop.exit:
18347 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18348 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
18349 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
18350 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18351 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
18352 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18353 // CHECK-32-EX: .omp.final.then:
18354 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18355 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18356 // CHECK-32-EX: .omp.final.done:
18357 // CHECK-32-EX-NEXT: ret void
18360 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l15_omp_outlined_omp_outlined1
18361 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR1]] {
18362 // CHECK-32-EX-NEXT: entry:
18363 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18364 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18365 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
18366 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
18367 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
18368 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18369 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18370 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18371 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18372 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18373 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18374 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18375 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18376 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18377 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18378 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18379 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
18380 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18381 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18382 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18383 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18384 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
18385 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
18386 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18387 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18388 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
18389 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
18390 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
18391 // CHECK-32-EX: omp_if.then:
18392 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18393 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
18394 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP4]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18395 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18396 // CHECK-32-EX-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
18397 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18398 // CHECK-32-EX: omp.inner.for.cond:
18399 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259:![0-9]+]]
18400 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP259]]
18401 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP6]], [[TMP7]]
18402 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18403 // CHECK-32-EX: omp.inner.for.body:
18404 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
18405 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
18406 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18407 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP259]]
18408 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18409 // CHECK-32-EX: omp.body.continue:
18410 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18411 // CHECK-32-EX: omp.inner.for.inc:
18412 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
18413 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP259]]
18414 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
18415 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP259]]
18416 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP260:![0-9]+]]
18417 // CHECK-32-EX: omp.inner.for.end:
18418 // CHECK-32-EX-NEXT: br label [[OMP_IF_END:%.*]]
18419 // CHECK-32-EX: omp_if.else:
18420 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18421 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
18422 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP12]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18423 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18424 // CHECK-32-EX-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
18425 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND2:%.*]]
18426 // CHECK-32-EX: omp.inner.for.cond2:
18427 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18428 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18429 // CHECK-32-EX-NEXT: [[CMP3:%.*]] = icmp ule i32 [[TMP14]], [[TMP15]]
18430 // CHECK-32-EX-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY4:%.*]], label [[OMP_INNER_FOR_END10:%.*]]
18431 // CHECK-32-EX: omp.inner.for.body4:
18432 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18433 // CHECK-32-EX-NEXT: [[MUL5:%.*]] = mul nsw i32 [[TMP16]], 1
18434 // CHECK-32-EX-NEXT: [[ADD6:%.*]] = add nsw i32 0, [[MUL5]]
18435 // CHECK-32-EX-NEXT: store i32 [[ADD6]], ptr [[I]], align 4
18436 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE7:%.*]]
18437 // CHECK-32-EX: omp.body.continue7:
18438 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC8:%.*]]
18439 // CHECK-32-EX: omp.inner.for.inc8:
18440 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
18441 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
18442 // CHECK-32-EX-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP17]], [[TMP18]]
18443 // CHECK-32-EX-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
18444 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND2]], !llvm.loop [[LOOP262:![0-9]+]]
18445 // CHECK-32-EX: omp.inner.for.end10:
18446 // CHECK-32-EX-NEXT: br label [[OMP_IF_END]]
18447 // CHECK-32-EX: omp_if.end:
18448 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18449 // CHECK-32-EX: omp.loop.exit:
18450 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18451 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
18452 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP20]])
18453 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18454 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
18455 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18456 // CHECK-32-EX: .omp.final.then:
18457 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18458 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18459 // CHECK-32-EX: .omp.final.done:
18460 // CHECK-32-EX-NEXT: ret void
18463 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18
18464 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
18465 // CHECK-32-EX-NEXT: entry:
18466 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
18467 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
18468 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
18469 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
18470 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_kernel_environment, ptr [[DYN_PTR]])
18471 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
18472 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
18473 // CHECK-32-EX: user_code.entry:
18474 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
18475 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
18476 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
18477 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
18478 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
18479 // CHECK-32-EX-NEXT: ret void
18480 // CHECK-32-EX: worker.exit:
18481 // CHECK-32-EX-NEXT: ret void
18484 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined
18485 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
18486 // CHECK-32-EX-NEXT: entry:
18487 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18488 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18489 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18490 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18491 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
18492 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
18493 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18494 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18495 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18496 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
18497 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18498 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18499 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
18500 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
18501 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18502 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18503 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
18504 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18505 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
18506 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
18507 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18508 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
18509 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
18510 // CHECK-32-EX: cond.true:
18511 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
18512 // CHECK-32-EX: cond.false:
18513 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18514 // CHECK-32-EX-NEXT: br label [[COND_END]]
18515 // CHECK-32-EX: cond.end:
18516 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
18517 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
18518 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18519 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
18520 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18521 // CHECK-32-EX: omp.inner.for.cond:
18522 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263:![0-9]+]]
18523 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
18524 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18525 // CHECK-32-EX: omp.inner.for.body:
18526 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
18527 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18528 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
18529 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
18530 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP263]]
18531 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
18532 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
18533 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP263]]
18534 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP263]]
18535 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18536 // CHECK-32-EX: omp.inner.for.inc:
18537 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
18538 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
18539 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
18540 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
18541 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
18542 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
18543 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
18544 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
18545 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18546 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP263]]
18547 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
18548 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18549 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18550 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
18551 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
18552 // CHECK-32-EX: cond.true5:
18553 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
18554 // CHECK-32-EX: cond.false6:
18555 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18556 // CHECK-32-EX-NEXT: br label [[COND_END7]]
18557 // CHECK-32-EX: cond.end7:
18558 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
18559 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP263]]
18560 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP263]]
18561 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP263]]
18562 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP264:![0-9]+]]
18563 // CHECK-32-EX: omp.inner.for.end:
18564 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18565 // CHECK-32-EX: omp.loop.exit:
18566 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
18567 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18568 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
18569 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18570 // CHECK-32-EX: .omp.final.then:
18571 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18572 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18573 // CHECK-32-EX: .omp.final.done:
18574 // CHECK-32-EX-NEXT: ret void
18577 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l18_omp_outlined_omp_outlined
18578 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
18579 // CHECK-32-EX-NEXT: entry:
18580 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18581 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18582 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
18583 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
18584 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18585 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18586 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18587 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18588 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18589 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18590 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18591 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18592 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18593 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18594 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18595 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18596 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18597 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18598 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18599 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
18600 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
18601 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18602 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18603 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18604 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
18605 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18606 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
18607 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
18608 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
18609 // CHECK-32-EX: cond.true:
18610 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
18611 // CHECK-32-EX: cond.false:
18612 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
18613 // CHECK-32-EX-NEXT: br label [[COND_END]]
18614 // CHECK-32-EX: cond.end:
18615 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
18616 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
18617 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18618 // CHECK-32-EX-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
18619 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18620 // CHECK-32-EX: omp.inner.for.cond:
18621 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266:![0-9]+]]
18622 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP266]]
18623 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
18624 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18625 // CHECK-32-EX: omp.inner.for.body:
18626 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
18627 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
18628 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18629 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP266]]
18630 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18631 // CHECK-32-EX: omp.body.continue:
18632 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18633 // CHECK-32-EX: omp.inner.for.inc:
18634 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
18635 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
18636 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP266]]
18637 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP267:![0-9]+]]
18638 // CHECK-32-EX: omp.inner.for.end:
18639 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18640 // CHECK-32-EX: omp.loop.exit:
18641 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
18642 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18643 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
18644 // CHECK-32-EX-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18645 // CHECK-32-EX: .omp.final.then:
18646 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18647 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18648 // CHECK-32-EX: .omp.final.done:
18649 // CHECK-32-EX-NEXT: ret void
18652 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21
18653 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
18654 // CHECK-32-EX-NEXT: entry:
18655 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
18656 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
18657 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
18658 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
18659 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_kernel_environment, ptr [[DYN_PTR]])
18660 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
18661 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
18662 // CHECK-32-EX: user_code.entry:
18663 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
18664 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
18665 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
18666 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
18667 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
18668 // CHECK-32-EX-NEXT: ret void
18669 // CHECK-32-EX: worker.exit:
18670 // CHECK-32-EX-NEXT: ret void
18673 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined
18674 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
18675 // CHECK-32-EX-NEXT: entry:
18676 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18677 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18678 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18679 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18680 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
18681 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
18682 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18683 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18684 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18685 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
18686 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18687 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18688 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
18689 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
18690 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18691 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18692 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
18693 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18694 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
18695 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
18696 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18697 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
18698 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
18699 // CHECK-32-EX: cond.true:
18700 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
18701 // CHECK-32-EX: cond.false:
18702 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18703 // CHECK-32-EX-NEXT: br label [[COND_END]]
18704 // CHECK-32-EX: cond.end:
18705 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
18706 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
18707 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18708 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
18709 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18710 // CHECK-32-EX: omp.inner.for.cond:
18711 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269:![0-9]+]]
18712 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
18713 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18714 // CHECK-32-EX: omp.inner.for.body:
18715 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
18716 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18717 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
18718 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
18719 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP269]]
18720 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
18721 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
18722 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP269]]
18723 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP269]]
18724 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18725 // CHECK-32-EX: omp.inner.for.inc:
18726 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
18727 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
18728 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
18729 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
18730 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
18731 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
18732 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
18733 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
18734 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18735 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP269]]
18736 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
18737 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18738 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18739 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
18740 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
18741 // CHECK-32-EX: cond.true5:
18742 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
18743 // CHECK-32-EX: cond.false6:
18744 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18745 // CHECK-32-EX-NEXT: br label [[COND_END7]]
18746 // CHECK-32-EX: cond.end7:
18747 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
18748 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP269]]
18749 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP269]]
18750 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP269]]
18751 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP270:![0-9]+]]
18752 // CHECK-32-EX: omp.inner.for.end:
18753 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18754 // CHECK-32-EX: omp.loop.exit:
18755 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
18756 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18757 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
18758 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18759 // CHECK-32-EX: .omp.final.then:
18760 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18761 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18762 // CHECK-32-EX: .omp.final.done:
18763 // CHECK-32-EX-NEXT: ret void
18766 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l21_omp_outlined_omp_outlined
18767 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
18768 // CHECK-32-EX-NEXT: entry:
18769 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18770 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18771 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
18772 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
18773 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18774 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18775 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18776 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18777 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18778 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18779 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18780 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18781 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18782 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18783 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18784 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18785 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18786 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18787 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18788 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
18789 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
18790 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18791 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18792 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18793 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
18794 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
18795 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18796 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
18797 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18798 // CHECK-32-EX: omp.inner.for.cond:
18799 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272:![0-9]+]]
18800 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP272]]
18801 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
18802 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18803 // CHECK-32-EX: omp.inner.for.body:
18804 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
18805 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
18806 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18807 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP272]]
18808 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18809 // CHECK-32-EX: omp.body.continue:
18810 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18811 // CHECK-32-EX: omp.inner.for.inc:
18812 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
18813 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP272]]
18814 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
18815 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP272]]
18816 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP273:![0-9]+]]
18817 // CHECK-32-EX: omp.inner.for.end:
18818 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18819 // CHECK-32-EX: omp.loop.exit:
18820 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
18821 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18822 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
18823 // CHECK-32-EX-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18824 // CHECK-32-EX: .omp.final.then:
18825 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18826 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18827 // CHECK-32-EX: .omp.final.done:
18828 // CHECK-32-EX-NEXT: ret void
18831 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24
18832 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
18833 // CHECK-32-EX-NEXT: entry:
18834 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
18835 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
18836 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
18837 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
18838 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_kernel_environment, ptr [[DYN_PTR]])
18839 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
18840 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
18841 // CHECK-32-EX: user_code.entry:
18842 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
18843 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
18844 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
18845 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
18846 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
18847 // CHECK-32-EX-NEXT: ret void
18848 // CHECK-32-EX: worker.exit:
18849 // CHECK-32-EX-NEXT: ret void
18852 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined
18853 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
18854 // CHECK-32-EX-NEXT: entry:
18855 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18856 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18857 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18858 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18859 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
18860 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
18861 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18862 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18863 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18864 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
18865 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18866 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18867 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
18868 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
18869 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18870 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18871 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
18872 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18873 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
18874 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
18875 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18876 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
18877 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
18878 // CHECK-32-EX: cond.true:
18879 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
18880 // CHECK-32-EX: cond.false:
18881 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
18882 // CHECK-32-EX-NEXT: br label [[COND_END]]
18883 // CHECK-32-EX: cond.end:
18884 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
18885 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
18886 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
18887 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
18888 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18889 // CHECK-32-EX: omp.inner.for.cond:
18890 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275:![0-9]+]]
18891 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
18892 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18893 // CHECK-32-EX: omp.inner.for.body:
18894 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
18895 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18896 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
18897 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
18898 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP275]]
18899 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
18900 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
18901 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP275]]
18902 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP275]]
18903 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18904 // CHECK-32-EX: omp.inner.for.inc:
18905 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
18906 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
18907 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
18908 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
18909 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
18910 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
18911 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
18912 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
18913 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18914 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP275]]
18915 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
18916 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18917 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18918 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
18919 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
18920 // CHECK-32-EX: cond.true5:
18921 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
18922 // CHECK-32-EX: cond.false6:
18923 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18924 // CHECK-32-EX-NEXT: br label [[COND_END7]]
18925 // CHECK-32-EX: cond.end7:
18926 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
18927 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP275]]
18928 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP275]]
18929 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP275]]
18930 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP276:![0-9]+]]
18931 // CHECK-32-EX: omp.inner.for.end:
18932 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
18933 // CHECK-32-EX: omp.loop.exit:
18934 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
18935 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
18936 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
18937 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
18938 // CHECK-32-EX: .omp.final.then:
18939 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
18940 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
18941 // CHECK-32-EX: .omp.final.done:
18942 // CHECK-32-EX-NEXT: ret void
18945 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l24_omp_outlined_omp_outlined
18946 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
18947 // CHECK-32-EX-NEXT: entry:
18948 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
18949 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
18950 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
18951 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
18952 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
18953 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
18954 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
18955 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
18956 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
18957 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
18958 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
18959 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
18960 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
18961 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18962 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18963 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
18964 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
18965 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
18966 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
18967 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
18968 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
18969 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
18970 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
18971 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18972 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
18973 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
18974 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
18975 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
18976 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
18977 // CHECK-32-EX: omp.dispatch.cond:
18978 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
18979 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
18980 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
18981 // CHECK-32-EX: omp.dispatch.body:
18982 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
18983 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
18984 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
18985 // CHECK-32-EX: omp.inner.for.cond:
18986 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278:![0-9]+]]
18987 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP278]]
18988 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
18989 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
18990 // CHECK-32-EX: omp.inner.for.body:
18991 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
18992 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
18993 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
18994 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP278]]
18995 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
18996 // CHECK-32-EX: omp.body.continue:
18997 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
18998 // CHECK-32-EX: omp.inner.for.inc:
18999 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
19000 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
19001 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP278]]
19002 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP279:![0-9]+]]
19003 // CHECK-32-EX: omp.inner.for.end:
19004 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
19005 // CHECK-32-EX: omp.dispatch.inc:
19006 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
19007 // CHECK-32-EX: omp.dispatch.end:
19008 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19009 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
19010 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19011 // CHECK-32-EX: .omp.final.then:
19012 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19013 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19014 // CHECK-32-EX: .omp.final.done:
19015 // CHECK-32-EX-NEXT: ret void
19018 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27
19019 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
19020 // CHECK-32-EX-NEXT: entry:
19021 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19022 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19023 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19024 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19025 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_kernel_environment, ptr [[DYN_PTR]])
19026 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19027 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19028 // CHECK-32-EX: user_code.entry:
19029 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19030 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19031 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19032 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
19033 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19034 // CHECK-32-EX-NEXT: ret void
19035 // CHECK-32-EX: worker.exit:
19036 // CHECK-32-EX-NEXT: ret void
19039 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined
19040 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
19041 // CHECK-32-EX-NEXT: entry:
19042 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19043 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19044 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19045 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19046 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19047 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19048 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19049 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19050 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19051 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
19052 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19053 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19054 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19055 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19056 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19057 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19058 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19059 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19060 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
19061 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
19062 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19063 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
19064 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19065 // CHECK-32-EX: cond.true:
19066 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19067 // CHECK-32-EX: cond.false:
19068 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19069 // CHECK-32-EX-NEXT: br label [[COND_END]]
19070 // CHECK-32-EX: cond.end:
19071 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
19072 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
19073 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19074 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19075 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19076 // CHECK-32-EX: omp.inner.for.cond:
19077 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281:![0-9]+]]
19078 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
19079 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19080 // CHECK-32-EX: omp.inner.for.body:
19081 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
19082 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19083 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
19084 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
19085 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP281]]
19086 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
19087 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
19088 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP281]]
19089 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP281]]
19090 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19091 // CHECK-32-EX: omp.inner.for.inc:
19092 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
19093 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
19094 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
19095 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
19096 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
19097 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
19098 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
19099 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
19100 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19101 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP281]]
19102 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
19103 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19104 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19105 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
19106 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
19107 // CHECK-32-EX: cond.true5:
19108 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
19109 // CHECK-32-EX: cond.false6:
19110 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19111 // CHECK-32-EX-NEXT: br label [[COND_END7]]
19112 // CHECK-32-EX: cond.end7:
19113 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
19114 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP281]]
19115 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP281]]
19116 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP281]]
19117 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP282:![0-9]+]]
19118 // CHECK-32-EX: omp.inner.for.end:
19119 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19120 // CHECK-32-EX: omp.loop.exit:
19121 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
19122 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19123 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
19124 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19125 // CHECK-32-EX: .omp.final.then:
19126 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19127 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19128 // CHECK-32-EX: .omp.final.done:
19129 // CHECK-32-EX-NEXT: ret void
19132 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l27_omp_outlined_omp_outlined
19133 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
19134 // CHECK-32-EX-NEXT: entry:
19135 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19136 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19137 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
19138 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
19139 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19140 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19141 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
19142 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
19143 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19144 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19145 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19146 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19147 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19148 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19149 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19150 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
19151 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
19152 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19153 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19154 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
19155 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
19156 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19157 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19158 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19159 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19160 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19161 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
19162 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
19163 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
19164 // CHECK-32-EX: omp.dispatch.cond:
19165 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
19166 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
19167 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
19168 // CHECK-32-EX: omp.dispatch.body:
19169 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19170 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
19171 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19172 // CHECK-32-EX: omp.inner.for.cond:
19173 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284:![0-9]+]]
19174 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP284]]
19175 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
19176 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19177 // CHECK-32-EX: omp.inner.for.body:
19178 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
19179 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
19180 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
19181 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP284]]
19182 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
19183 // CHECK-32-EX: omp.body.continue:
19184 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19185 // CHECK-32-EX: omp.inner.for.inc:
19186 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
19187 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
19188 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP284]]
19189 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP285:![0-9]+]]
19190 // CHECK-32-EX: omp.inner.for.end:
19191 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
19192 // CHECK-32-EX: omp.dispatch.inc:
19193 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
19194 // CHECK-32-EX: omp.dispatch.end:
19195 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19196 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
19197 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19198 // CHECK-32-EX: .omp.final.then:
19199 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19200 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19201 // CHECK-32-EX: .omp.final.done:
19202 // CHECK-32-EX-NEXT: ret void
19205 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30
19206 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
19207 // CHECK-32-EX-NEXT: entry:
19208 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19209 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19210 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19211 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19212 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_kernel_environment, ptr [[DYN_PTR]])
19213 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19214 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19215 // CHECK-32-EX: user_code.entry:
19216 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19217 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19218 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19219 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
19220 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19221 // CHECK-32-EX-NEXT: ret void
19222 // CHECK-32-EX: worker.exit:
19223 // CHECK-32-EX-NEXT: ret void
19226 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined
19227 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
19228 // CHECK-32-EX-NEXT: entry:
19229 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19230 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19231 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19232 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19233 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19234 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19235 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19236 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19237 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19238 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
19239 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19240 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19241 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19242 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19243 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19244 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19245 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19246 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19247 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
19248 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
19249 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19250 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
19251 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19252 // CHECK-32-EX: cond.true:
19253 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19254 // CHECK-32-EX: cond.false:
19255 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19256 // CHECK-32-EX-NEXT: br label [[COND_END]]
19257 // CHECK-32-EX: cond.end:
19258 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
19259 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
19260 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19261 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19262 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19263 // CHECK-32-EX: omp.inner.for.cond:
19264 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287:![0-9]+]]
19265 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
19266 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19267 // CHECK-32-EX: omp.inner.for.body:
19268 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
19269 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19270 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
19271 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
19272 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP287]]
19273 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
19274 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
19275 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP287]]
19276 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP287]]
19277 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19278 // CHECK-32-EX: omp.inner.for.inc:
19279 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
19280 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
19281 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
19282 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
19283 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
19284 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
19285 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
19286 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
19287 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19288 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP287]]
19289 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
19290 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19291 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19292 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
19293 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
19294 // CHECK-32-EX: cond.true5:
19295 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
19296 // CHECK-32-EX: cond.false6:
19297 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19298 // CHECK-32-EX-NEXT: br label [[COND_END7]]
19299 // CHECK-32-EX: cond.end7:
19300 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
19301 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP287]]
19302 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP287]]
19303 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP287]]
19304 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP288:![0-9]+]]
19305 // CHECK-32-EX: omp.inner.for.end:
19306 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19307 // CHECK-32-EX: omp.loop.exit:
19308 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
19309 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19310 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
19311 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19312 // CHECK-32-EX: .omp.final.then:
19313 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19314 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19315 // CHECK-32-EX: .omp.final.done:
19316 // CHECK-32-EX-NEXT: ret void
19319 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l30_omp_outlined_omp_outlined
19320 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
19321 // CHECK-32-EX-NEXT: entry:
19322 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19323 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19324 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
19325 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
19326 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19327 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19328 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
19329 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
19330 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19331 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19332 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19333 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19334 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19335 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19336 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19337 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
19338 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
19339 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19340 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19341 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
19342 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
19343 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19344 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19345 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19346 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19347 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19348 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
19349 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
19350 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
19351 // CHECK-32-EX: omp.dispatch.cond:
19352 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
19353 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
19354 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
19355 // CHECK-32-EX: omp.dispatch.body:
19356 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19357 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
19358 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19359 // CHECK-32-EX: omp.inner.for.cond:
19360 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290:![0-9]+]]
19361 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP290]]
19362 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
19363 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19364 // CHECK-32-EX: omp.inner.for.body:
19365 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
19366 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
19367 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
19368 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP290]]
19369 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
19370 // CHECK-32-EX: omp.body.continue:
19371 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19372 // CHECK-32-EX: omp.inner.for.inc:
19373 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
19374 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
19375 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP290]]
19376 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP291:![0-9]+]]
19377 // CHECK-32-EX: omp.inner.for.end:
19378 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
19379 // CHECK-32-EX: omp.dispatch.inc:
19380 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
19381 // CHECK-32-EX: omp.dispatch.end:
19382 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19383 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
19384 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19385 // CHECK-32-EX: .omp.final.then:
19386 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19387 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19388 // CHECK-32-EX: .omp.final.done:
19389 // CHECK-32-EX-NEXT: ret void
19392 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33
19393 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
19394 // CHECK-32-EX-NEXT: entry:
19395 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19396 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19397 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19398 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19399 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_kernel_environment, ptr [[DYN_PTR]])
19400 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19401 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19402 // CHECK-32-EX: user_code.entry:
19403 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19404 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19405 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19406 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
19407 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19408 // CHECK-32-EX-NEXT: ret void
19409 // CHECK-32-EX: worker.exit:
19410 // CHECK-32-EX-NEXT: ret void
19413 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined
19414 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
19415 // CHECK-32-EX-NEXT: entry:
19416 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19417 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19418 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19419 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19420 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19421 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19422 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19423 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19424 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19425 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
19426 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19427 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19428 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19429 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19430 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19431 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19432 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19433 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19434 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
19435 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
19436 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19437 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
19438 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19439 // CHECK-32-EX: cond.true:
19440 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19441 // CHECK-32-EX: cond.false:
19442 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19443 // CHECK-32-EX-NEXT: br label [[COND_END]]
19444 // CHECK-32-EX: cond.end:
19445 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
19446 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
19447 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19448 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19449 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19450 // CHECK-32-EX: omp.inner.for.cond:
19451 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293:![0-9]+]]
19452 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
19453 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19454 // CHECK-32-EX: omp.inner.for.body:
19455 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
19456 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19457 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
19458 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
19459 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP293]]
19460 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
19461 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
19462 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP293]]
19463 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP293]]
19464 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19465 // CHECK-32-EX: omp.inner.for.inc:
19466 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
19467 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
19468 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
19469 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
19470 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
19471 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
19472 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
19473 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
19474 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19475 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP293]]
19476 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
19477 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19478 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19479 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
19480 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
19481 // CHECK-32-EX: cond.true5:
19482 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
19483 // CHECK-32-EX: cond.false6:
19484 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19485 // CHECK-32-EX-NEXT: br label [[COND_END7]]
19486 // CHECK-32-EX: cond.end7:
19487 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
19488 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP293]]
19489 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP293]]
19490 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP293]]
19491 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP294:![0-9]+]]
19492 // CHECK-32-EX: omp.inner.for.end:
19493 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19494 // CHECK-32-EX: omp.loop.exit:
19495 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
19496 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19497 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
19498 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19499 // CHECK-32-EX: .omp.final.then:
19500 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19501 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19502 // CHECK-32-EX: .omp.final.done:
19503 // CHECK-32-EX-NEXT: ret void
19506 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l33_omp_outlined_omp_outlined
19507 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
19508 // CHECK-32-EX-NEXT: entry:
19509 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19510 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19511 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
19512 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
19513 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19514 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19515 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
19516 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
19517 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19518 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19519 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19520 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19521 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19522 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19523 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19524 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
19525 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
19526 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19527 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19528 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
19529 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
19530 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19531 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19532 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19533 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19534 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19535 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
19536 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
19537 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
19538 // CHECK-32-EX: omp.dispatch.cond:
19539 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
19540 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
19541 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
19542 // CHECK-32-EX: omp.dispatch.body:
19543 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19544 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
19545 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19546 // CHECK-32-EX: omp.inner.for.cond:
19547 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296:![0-9]+]]
19548 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP296]]
19549 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
19550 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19551 // CHECK-32-EX: omp.inner.for.body:
19552 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
19553 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
19554 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
19555 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP296]]
19556 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
19557 // CHECK-32-EX: omp.body.continue:
19558 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19559 // CHECK-32-EX: omp.inner.for.inc:
19560 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
19561 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
19562 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP296]]
19563 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP297:![0-9]+]]
19564 // CHECK-32-EX: omp.inner.for.end:
19565 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
19566 // CHECK-32-EX: omp.dispatch.inc:
19567 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
19568 // CHECK-32-EX: omp.dispatch.end:
19569 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19570 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
19571 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
19572 // CHECK-32-EX: .omp.final.then:
19573 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
19574 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
19575 // CHECK-32-EX: .omp.final.done:
19576 // CHECK-32-EX-NEXT: ret void
19579 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37
19580 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[A:%.*]]) #[[ATTR0]] {
19581 // CHECK-32-EX-NEXT: entry:
19582 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19583 // CHECK-32-EX-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
19584 // CHECK-32-EX-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
19585 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19586 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19587 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19588 // CHECK-32-EX-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
19589 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_kernel_environment, ptr [[DYN_PTR]])
19590 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19591 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19592 // CHECK-32-EX: user_code.entry:
19593 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19594 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[A_ADDR]], align 4
19595 // CHECK-32-EX-NEXT: store i32 [[TMP2]], ptr [[A_CASTED]], align 4
19596 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[A_CASTED]], align 4
19597 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19598 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19599 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]], i32 [[TMP3]]) #[[ATTR2]]
19600 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19601 // CHECK-32-EX-NEXT: ret void
19602 // CHECK-32-EX: worker.exit:
19603 // CHECK-32-EX-NEXT: ret void
19606 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined
19607 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[A:%.*]]) #[[ATTR1]] {
19608 // CHECK-32-EX-NEXT: entry:
19609 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19610 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19611 // CHECK-32-EX-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
19612 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19613 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19614 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19615 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19616 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19617 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19618 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19619 // CHECK-32-EX-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
19620 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [3 x ptr], align 4
19621 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19622 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19623 // CHECK-32-EX-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
19624 // CHECK-32-EX-NEXT: [[A1:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
19625 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19626 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19627 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19628 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19629 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19630 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19631 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
19632 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
19633 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19634 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
19635 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19636 // CHECK-32-EX: cond.true:
19637 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19638 // CHECK-32-EX: cond.false:
19639 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19640 // CHECK-32-EX-NEXT: br label [[COND_END]]
19641 // CHECK-32-EX: cond.end:
19642 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
19643 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
19644 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19645 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19646 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19647 // CHECK-32-EX: omp.inner.for.cond:
19648 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19649 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp slt i32 [[TMP5]], 10
19650 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19651 // CHECK-32-EX: omp.inner.for.body:
19652 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19653 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19654 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[A1]], align 4
19655 // CHECK-32-EX-NEXT: store i32 [[TMP8]], ptr [[A_CASTED]], align 4
19656 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[A_CASTED]], align 4
19657 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
19658 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP6]] to ptr
19659 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
19660 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
19661 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = inttoptr i32 [[TMP7]] to ptr
19662 // CHECK-32-EX-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 4
19663 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 2
19664 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = inttoptr i32 [[TMP9]] to ptr
19665 // CHECK-32-EX-NEXT: store ptr [[TMP15]], ptr [[TMP14]], align 4
19666 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 3)
19667 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19668 // CHECK-32-EX: omp.inner.for.inc:
19669 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19670 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19671 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
19672 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
19673 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19674 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19675 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
19676 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_LB]], align 4
19677 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19678 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19679 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP20]], [[TMP21]]
19680 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_COMB_UB]], align 4
19681 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19682 // CHECK-32-EX-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP22]], 9
19683 // CHECK-32-EX-NEXT: br i1 [[CMP5]], label [[COND_TRUE6:%.*]], label [[COND_FALSE7:%.*]]
19684 // CHECK-32-EX: cond.true6:
19685 // CHECK-32-EX-NEXT: br label [[COND_END8:%.*]]
19686 // CHECK-32-EX: cond.false7:
19687 // CHECK-32-EX-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19688 // CHECK-32-EX-NEXT: br label [[COND_END8]]
19689 // CHECK-32-EX: cond.end8:
19690 // CHECK-32-EX-NEXT: [[COND9:%.*]] = phi i32 [ 9, [[COND_TRUE6]] ], [ [[TMP23]], [[COND_FALSE7]] ]
19691 // CHECK-32-EX-NEXT: store i32 [[COND9]], ptr [[DOTOMP_COMB_UB]], align 4
19692 // CHECK-32-EX-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19693 // CHECK-32-EX-NEXT: store i32 [[TMP24]], ptr [[DOTOMP_IV]], align 4
19694 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
19695 // CHECK-32-EX: omp.inner.for.end:
19696 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19697 // CHECK-32-EX: omp.loop.exit:
19698 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
19699 // CHECK-32-EX-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19700 // CHECK-32-EX-NEXT: [[TMP26:%.*]] = icmp ne i32 [[TMP25]], 0
19701 // CHECK-32-EX-NEXT: br i1 [[TMP26]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
19702 // CHECK-32-EX: .omp.lastprivate.then:
19703 // CHECK-32-EX-NEXT: [[TMP27:%.*]] = load i32, ptr [[A1]], align 4
19704 // CHECK-32-EX-NEXT: store i32 [[TMP27]], ptr [[A_ADDR]], align 4
19705 // CHECK-32-EX-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
19706 // CHECK-32-EX: .omp.lastprivate.done:
19707 // CHECK-32-EX-NEXT: call void @__kmpc_free_shared(ptr [[A1]], i32 4)
19708 // CHECK-32-EX-NEXT: ret void
19711 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l37_omp_outlined_omp_outlined
19712 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], i32 noundef [[A:%.*]]) #[[ATTR1]] {
19713 // CHECK-32-EX-NEXT: entry:
19714 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19715 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19716 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
19717 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
19718 // CHECK-32-EX-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
19719 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19720 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19721 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
19722 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
19723 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19724 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19725 // CHECK-32-EX-NEXT: [[A1:%.*]] = alloca i32, align 4
19726 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19727 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19728 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19729 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19730 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19731 // CHECK-32-EX-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
19732 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
19733 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
19734 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19735 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19736 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
19737 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
19738 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19739 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19740 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19741 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
19742 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
19743 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19744 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19745 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19746 // CHECK-32-EX: omp.inner.for.cond:
19747 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19748 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19749 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
19750 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19751 // CHECK-32-EX: omp.inner.for.body:
19752 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19753 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
19754 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
19755 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
19756 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[I]], align 4
19757 // CHECK-32-EX-NEXT: store i32 [[TMP8]], ptr [[A1]], align 4
19758 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
19759 // CHECK-32-EX: omp.body.continue:
19760 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19761 // CHECK-32-EX: omp.inner.for.inc:
19762 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19763 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19764 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
19765 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
19766 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
19767 // CHECK-32-EX: omp.inner.for.end:
19768 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19769 // CHECK-32-EX: omp.loop.exit:
19770 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
19771 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
19772 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
19773 // CHECK-32-EX-NEXT: br i1 [[TMP12]], label [[DOTOMP_LASTPRIVATE_THEN:%.*]], label [[DOTOMP_LASTPRIVATE_DONE:%.*]]
19774 // CHECK-32-EX: .omp.lastprivate.then:
19775 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[A1]], align 4
19776 // CHECK-32-EX-NEXT: store i32 [[TMP13]], ptr [[A_ADDR]], align 4
19777 // CHECK-32-EX-NEXT: br label [[DOTOMP_LASTPRIVATE_DONE]]
19778 // CHECK-32-EX: .omp.lastprivate.done:
19779 // CHECK-32-EX-NEXT: ret void
19782 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40
19783 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
19784 // CHECK-32-EX-NEXT: entry:
19785 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19786 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19787 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19788 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19789 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_kernel_environment, ptr [[DYN_PTR]])
19790 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19791 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19792 // CHECK-32-EX: user_code.entry:
19793 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19794 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19795 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19796 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
19797 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19798 // CHECK-32-EX-NEXT: ret void
19799 // CHECK-32-EX: worker.exit:
19800 // CHECK-32-EX-NEXT: ret void
19803 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined
19804 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
19805 // CHECK-32-EX-NEXT: entry:
19806 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19807 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19808 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19809 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19810 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19811 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19812 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19813 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19814 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19815 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
19816 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19817 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19818 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19819 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19820 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19821 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19822 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19823 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19824 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
19825 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
19826 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19827 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
19828 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19829 // CHECK-32-EX: cond.true:
19830 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19831 // CHECK-32-EX: cond.false:
19832 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19833 // CHECK-32-EX-NEXT: br label [[COND_END]]
19834 // CHECK-32-EX: cond.end:
19835 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
19836 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
19837 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19838 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
19839 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19840 // CHECK-32-EX: omp.inner.for.cond:
19841 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19842 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
19843 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19844 // CHECK-32-EX: omp.inner.for.body:
19845 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19846 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19847 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
19848 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
19849 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
19850 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
19851 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
19852 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
19853 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
19854 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19855 // CHECK-32-EX: omp.inner.for.inc:
19856 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19857 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19858 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
19859 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
19860 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19861 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19862 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
19863 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
19864 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19865 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
19866 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
19867 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
19868 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19869 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
19870 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
19871 // CHECK-32-EX: cond.true5:
19872 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
19873 // CHECK-32-EX: cond.false6:
19874 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
19875 // CHECK-32-EX-NEXT: br label [[COND_END7]]
19876 // CHECK-32-EX: cond.end7:
19877 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
19878 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
19879 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
19880 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
19881 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
19882 // CHECK-32-EX: omp.inner.for.end:
19883 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19884 // CHECK-32-EX: omp.loop.exit:
19885 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
19886 // CHECK-32-EX-NEXT: ret void
19889 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l40_omp_outlined_omp_outlined
19890 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
19891 // CHECK-32-EX-NEXT: entry:
19892 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19893 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19894 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
19895 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
19896 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19897 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19898 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
19899 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
19900 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19901 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19902 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19903 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19904 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19905 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19906 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19907 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
19908 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
19909 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
19910 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
19911 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
19912 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
19913 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19914 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19915 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19916 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
19917 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
19918 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19919 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
19920 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
19921 // CHECK-32-EX: cond.true:
19922 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
19923 // CHECK-32-EX: cond.false:
19924 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19925 // CHECK-32-EX-NEXT: br label [[COND_END]]
19926 // CHECK-32-EX: cond.end:
19927 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
19928 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
19929 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
19930 // CHECK-32-EX-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
19931 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
19932 // CHECK-32-EX: omp.inner.for.cond:
19933 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19934 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
19935 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
19936 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
19937 // CHECK-32-EX: omp.inner.for.body:
19938 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19939 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
19940 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
19941 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
19942 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
19943 // CHECK-32-EX: omp.body.continue:
19944 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
19945 // CHECK-32-EX: omp.inner.for.inc:
19946 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
19947 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
19948 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
19949 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
19950 // CHECK-32-EX: omp.inner.for.end:
19951 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
19952 // CHECK-32-EX: omp.loop.exit:
19953 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
19954 // CHECK-32-EX-NEXT: ret void
19957 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43
19958 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
19959 // CHECK-32-EX-NEXT: entry:
19960 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
19961 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
19962 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
19963 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
19964 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_kernel_environment, ptr [[DYN_PTR]])
19965 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
19966 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
19967 // CHECK-32-EX: user_code.entry:
19968 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
19969 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
19970 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
19971 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
19972 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
19973 // CHECK-32-EX-NEXT: ret void
19974 // CHECK-32-EX: worker.exit:
19975 // CHECK-32-EX-NEXT: ret void
19978 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined
19979 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
19980 // CHECK-32-EX-NEXT: entry:
19981 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
19982 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
19983 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
19984 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
19985 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
19986 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
19987 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
19988 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
19989 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
19990 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
19991 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
19992 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
19993 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
19994 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
19995 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
19996 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
19997 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
19998 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
19999 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20000 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20001 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20002 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20003 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20004 // CHECK-32-EX: cond.true:
20005 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20006 // CHECK-32-EX: cond.false:
20007 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20008 // CHECK-32-EX-NEXT: br label [[COND_END]]
20009 // CHECK-32-EX: cond.end:
20010 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20011 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20012 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20013 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20014 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20015 // CHECK-32-EX: omp.inner.for.cond:
20016 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20017 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20018 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20019 // CHECK-32-EX: omp.inner.for.body:
20020 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20021 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20022 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20023 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20024 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
20025 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20026 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20027 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
20028 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
20029 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20030 // CHECK-32-EX: omp.inner.for.inc:
20031 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20032 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20033 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20034 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
20035 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20036 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20037 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20038 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
20039 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20040 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20041 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20042 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
20043 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20044 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20045 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20046 // CHECK-32-EX: cond.true5:
20047 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20048 // CHECK-32-EX: cond.false6:
20049 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20050 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20051 // CHECK-32-EX: cond.end7:
20052 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20053 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
20054 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20055 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
20056 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20057 // CHECK-32-EX: omp.inner.for.end:
20058 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20059 // CHECK-32-EX: omp.loop.exit:
20060 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20061 // CHECK-32-EX-NEXT: ret void
20064 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l43_omp_outlined_omp_outlined
20065 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20066 // CHECK-32-EX-NEXT: entry:
20067 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20068 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20069 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20070 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20071 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20072 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20073 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20074 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20075 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20076 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20077 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20078 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20079 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20080 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20081 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20082 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20083 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20084 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20085 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20086 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20087 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20088 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20089 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20090 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20091 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
20092 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
20093 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20094 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20095 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20096 // CHECK-32-EX: omp.inner.for.cond:
20097 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20098 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20099 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
20100 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20101 // CHECK-32-EX: omp.inner.for.body:
20102 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20103 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
20104 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20105 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
20106 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20107 // CHECK-32-EX: omp.body.continue:
20108 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20109 // CHECK-32-EX: omp.inner.for.inc:
20110 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20111 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20112 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
20113 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
20114 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20115 // CHECK-32-EX: omp.inner.for.end:
20116 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20117 // CHECK-32-EX: omp.loop.exit:
20118 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
20119 // CHECK-32-EX-NEXT: ret void
20122 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46
20123 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20124 // CHECK-32-EX-NEXT: entry:
20125 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20126 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20127 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
20128 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
20129 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_kernel_environment, ptr [[DYN_PTR]])
20130 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
20131 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
20132 // CHECK-32-EX: user_code.entry:
20133 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
20134 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
20135 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
20136 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
20137 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
20138 // CHECK-32-EX-NEXT: ret void
20139 // CHECK-32-EX: worker.exit:
20140 // CHECK-32-EX-NEXT: ret void
20143 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined
20144 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
20145 // CHECK-32-EX-NEXT: entry:
20146 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20147 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20148 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20149 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20150 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
20151 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
20152 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20153 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20154 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20155 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
20156 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20157 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20158 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
20159 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
20160 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20161 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20162 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
20163 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20164 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20165 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20166 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20167 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20168 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20169 // CHECK-32-EX: cond.true:
20170 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20171 // CHECK-32-EX: cond.false:
20172 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20173 // CHECK-32-EX-NEXT: br label [[COND_END]]
20174 // CHECK-32-EX: cond.end:
20175 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20176 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20177 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20178 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20179 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20180 // CHECK-32-EX: omp.inner.for.cond:
20181 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20182 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20183 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20184 // CHECK-32-EX: omp.inner.for.body:
20185 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20186 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20187 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20188 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20189 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
20190 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20191 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20192 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
20193 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
20194 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20195 // CHECK-32-EX: omp.inner.for.inc:
20196 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20197 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20198 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20199 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
20200 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20201 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20202 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20203 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
20204 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20205 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20206 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20207 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
20208 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20209 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20210 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20211 // CHECK-32-EX: cond.true5:
20212 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20213 // CHECK-32-EX: cond.false6:
20214 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20215 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20216 // CHECK-32-EX: cond.end7:
20217 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20218 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
20219 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20220 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
20221 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20222 // CHECK-32-EX: omp.inner.for.end:
20223 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20224 // CHECK-32-EX: omp.loop.exit:
20225 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20226 // CHECK-32-EX-NEXT: ret void
20229 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l46_omp_outlined_omp_outlined
20230 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20231 // CHECK-32-EX-NEXT: entry:
20232 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20233 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20234 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20235 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20236 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20237 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20238 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20239 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20240 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20241 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20242 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20243 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20244 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20245 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20246 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20247 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20248 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20249 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20250 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20251 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20252 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20253 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20254 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20255 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20256 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
20257 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20258 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
20259 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
20260 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
20261 // CHECK-32-EX: omp.dispatch.cond:
20262 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
20263 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
20264 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
20265 // CHECK-32-EX: omp.dispatch.body:
20266 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20267 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
20268 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20269 // CHECK-32-EX: omp.inner.for.cond:
20270 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299:![0-9]+]]
20271 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP299]]
20272 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
20273 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20274 // CHECK-32-EX: omp.inner.for.body:
20275 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
20276 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
20277 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20278 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP299]]
20279 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20280 // CHECK-32-EX: omp.body.continue:
20281 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20282 // CHECK-32-EX: omp.inner.for.inc:
20283 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
20284 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
20285 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP299]]
20286 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP300:![0-9]+]]
20287 // CHECK-32-EX: omp.inner.for.end:
20288 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
20289 // CHECK-32-EX: omp.dispatch.inc:
20290 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
20291 // CHECK-32-EX: omp.dispatch.end:
20292 // CHECK-32-EX-NEXT: ret void
20295 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49
20296 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20297 // CHECK-32-EX-NEXT: entry:
20298 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20299 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20300 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
20301 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
20302 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_kernel_environment, ptr [[DYN_PTR]])
20303 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
20304 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
20305 // CHECK-32-EX: user_code.entry:
20306 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
20307 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
20308 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
20309 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
20310 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
20311 // CHECK-32-EX-NEXT: ret void
20312 // CHECK-32-EX: worker.exit:
20313 // CHECK-32-EX-NEXT: ret void
20316 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined
20317 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
20318 // CHECK-32-EX-NEXT: entry:
20319 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20320 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20321 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20322 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20323 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
20324 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
20325 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20326 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20327 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20328 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
20329 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20330 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20331 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
20332 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
20333 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20334 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20335 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
20336 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20337 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20338 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20339 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20340 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20341 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20342 // CHECK-32-EX: cond.true:
20343 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20344 // CHECK-32-EX: cond.false:
20345 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20346 // CHECK-32-EX-NEXT: br label [[COND_END]]
20347 // CHECK-32-EX: cond.end:
20348 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20349 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20350 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20351 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20352 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20353 // CHECK-32-EX: omp.inner.for.cond:
20354 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20355 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20356 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20357 // CHECK-32-EX: omp.inner.for.body:
20358 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20359 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20360 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20361 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20362 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
20363 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20364 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20365 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
20366 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
20367 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20368 // CHECK-32-EX: omp.inner.for.inc:
20369 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20370 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20371 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20372 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
20373 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20374 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20375 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20376 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
20377 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20378 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20379 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20380 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
20381 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20382 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20383 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20384 // CHECK-32-EX: cond.true5:
20385 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20386 // CHECK-32-EX: cond.false6:
20387 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20388 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20389 // CHECK-32-EX: cond.end7:
20390 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20391 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
20392 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20393 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
20394 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20395 // CHECK-32-EX: omp.inner.for.end:
20396 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20397 // CHECK-32-EX: omp.loop.exit:
20398 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20399 // CHECK-32-EX-NEXT: ret void
20402 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l49_omp_outlined_omp_outlined
20403 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20404 // CHECK-32-EX-NEXT: entry:
20405 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20406 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20407 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20408 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20409 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20410 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20411 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20412 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20413 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20414 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20415 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20416 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20417 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20418 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20419 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20420 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20421 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20422 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20423 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20424 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20425 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20426 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20427 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20428 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20429 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
20430 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20431 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
20432 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
20433 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
20434 // CHECK-32-EX: omp.dispatch.cond:
20435 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
20436 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
20437 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
20438 // CHECK-32-EX: omp.dispatch.body:
20439 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20440 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
20441 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20442 // CHECK-32-EX: omp.inner.for.cond:
20443 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302:![0-9]+]]
20444 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP302]]
20445 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
20446 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20447 // CHECK-32-EX: omp.inner.for.body:
20448 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
20449 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
20450 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20451 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP302]]
20452 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20453 // CHECK-32-EX: omp.body.continue:
20454 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20455 // CHECK-32-EX: omp.inner.for.inc:
20456 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
20457 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
20458 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP302]]
20459 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP303:![0-9]+]]
20460 // CHECK-32-EX: omp.inner.for.end:
20461 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
20462 // CHECK-32-EX: omp.dispatch.inc:
20463 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
20464 // CHECK-32-EX: omp.dispatch.end:
20465 // CHECK-32-EX-NEXT: ret void
20468 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52
20469 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20470 // CHECK-32-EX-NEXT: entry:
20471 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20472 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20473 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
20474 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
20475 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_kernel_environment, ptr [[DYN_PTR]])
20476 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
20477 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
20478 // CHECK-32-EX: user_code.entry:
20479 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
20480 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
20481 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
20482 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
20483 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
20484 // CHECK-32-EX-NEXT: ret void
20485 // CHECK-32-EX: worker.exit:
20486 // CHECK-32-EX-NEXT: ret void
20489 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined
20490 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
20491 // CHECK-32-EX-NEXT: entry:
20492 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20493 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20494 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20495 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20496 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
20497 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
20498 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20499 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20500 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20501 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
20502 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20503 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20504 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
20505 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
20506 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20507 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20508 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
20509 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20510 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20511 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20512 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20513 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20514 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20515 // CHECK-32-EX: cond.true:
20516 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20517 // CHECK-32-EX: cond.false:
20518 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20519 // CHECK-32-EX-NEXT: br label [[COND_END]]
20520 // CHECK-32-EX: cond.end:
20521 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20522 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20523 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20524 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20525 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20526 // CHECK-32-EX: omp.inner.for.cond:
20527 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20528 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20529 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20530 // CHECK-32-EX: omp.inner.for.body:
20531 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20532 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20533 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20534 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20535 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
20536 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20537 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20538 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
20539 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
20540 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20541 // CHECK-32-EX: omp.inner.for.inc:
20542 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20543 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20544 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20545 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
20546 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20547 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20548 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20549 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
20550 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20551 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20552 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20553 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
20554 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20555 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20556 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20557 // CHECK-32-EX: cond.true5:
20558 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20559 // CHECK-32-EX: cond.false6:
20560 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20561 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20562 // CHECK-32-EX: cond.end7:
20563 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20564 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
20565 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20566 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
20567 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20568 // CHECK-32-EX: omp.inner.for.end:
20569 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20570 // CHECK-32-EX: omp.loop.exit:
20571 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20572 // CHECK-32-EX-NEXT: ret void
20575 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l52_omp_outlined_omp_outlined
20576 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20577 // CHECK-32-EX-NEXT: entry:
20578 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20579 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20580 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20581 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20582 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20583 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20584 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20585 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20586 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20587 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20588 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20589 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20590 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20591 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20592 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20593 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20594 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20595 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20596 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20597 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20598 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20599 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20600 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20601 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20602 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
20603 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20604 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
20605 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
20606 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
20607 // CHECK-32-EX: omp.dispatch.cond:
20608 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
20609 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
20610 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
20611 // CHECK-32-EX: omp.dispatch.body:
20612 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20613 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
20614 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20615 // CHECK-32-EX: omp.inner.for.cond:
20616 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305:![0-9]+]]
20617 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP305]]
20618 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
20619 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20620 // CHECK-32-EX: omp.inner.for.body:
20621 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
20622 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
20623 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20624 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP305]]
20625 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20626 // CHECK-32-EX: omp.body.continue:
20627 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20628 // CHECK-32-EX: omp.inner.for.inc:
20629 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
20630 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
20631 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP305]]
20632 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP306:![0-9]+]]
20633 // CHECK-32-EX: omp.inner.for.end:
20634 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
20635 // CHECK-32-EX: omp.dispatch.inc:
20636 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
20637 // CHECK-32-EX: omp.dispatch.end:
20638 // CHECK-32-EX-NEXT: ret void
20641 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55
20642 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20643 // CHECK-32-EX-NEXT: entry:
20644 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20645 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20646 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
20647 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
20648 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_kernel_environment, ptr [[DYN_PTR]])
20649 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
20650 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
20651 // CHECK-32-EX: user_code.entry:
20652 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
20653 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
20654 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
20655 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
20656 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
20657 // CHECK-32-EX-NEXT: ret void
20658 // CHECK-32-EX: worker.exit:
20659 // CHECK-32-EX-NEXT: ret void
20662 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined
20663 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
20664 // CHECK-32-EX-NEXT: entry:
20665 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20666 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20667 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20668 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20669 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
20670 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
20671 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20672 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20673 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20674 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
20675 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20676 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20677 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
20678 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
20679 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20680 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20681 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
20682 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20683 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20684 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20685 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20686 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20687 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20688 // CHECK-32-EX: cond.true:
20689 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20690 // CHECK-32-EX: cond.false:
20691 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20692 // CHECK-32-EX-NEXT: br label [[COND_END]]
20693 // CHECK-32-EX: cond.end:
20694 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20695 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20696 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20697 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20698 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20699 // CHECK-32-EX: omp.inner.for.cond:
20700 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20701 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20702 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20703 // CHECK-32-EX: omp.inner.for.body:
20704 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20705 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20706 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20707 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20708 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
20709 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20710 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20711 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
20712 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
20713 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20714 // CHECK-32-EX: omp.inner.for.inc:
20715 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
20716 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20717 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20718 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
20719 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20720 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20721 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20722 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
20723 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20724 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
20725 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20726 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
20727 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20728 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20729 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20730 // CHECK-32-EX: cond.true5:
20731 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20732 // CHECK-32-EX: cond.false6:
20733 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20734 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20735 // CHECK-32-EX: cond.end7:
20736 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20737 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
20738 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20739 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
20740 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
20741 // CHECK-32-EX: omp.inner.for.end:
20742 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20743 // CHECK-32-EX: omp.loop.exit:
20744 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20745 // CHECK-32-EX-NEXT: ret void
20748 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l55_omp_outlined_omp_outlined
20749 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20750 // CHECK-32-EX-NEXT: entry:
20751 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20752 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20753 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20754 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20755 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20756 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20757 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20758 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20759 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20760 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20761 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20762 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20763 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20764 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20765 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20766 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20767 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20768 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20769 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20770 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20771 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20772 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20773 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20774 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20775 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
20776 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20777 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
20778 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
20779 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
20780 // CHECK-32-EX: omp.dispatch.cond:
20781 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
20782 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
20783 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
20784 // CHECK-32-EX: omp.dispatch.body:
20785 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20786 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
20787 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20788 // CHECK-32-EX: omp.inner.for.cond:
20789 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308:![0-9]+]]
20790 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP308]]
20791 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
20792 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20793 // CHECK-32-EX: omp.inner.for.body:
20794 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
20795 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
20796 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20797 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP308]]
20798 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20799 // CHECK-32-EX: omp.body.continue:
20800 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20801 // CHECK-32-EX: omp.inner.for.inc:
20802 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
20803 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
20804 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP308]]
20805 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP309:![0-9]+]]
20806 // CHECK-32-EX: omp.inner.for.end:
20807 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
20808 // CHECK-32-EX: omp.dispatch.inc:
20809 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
20810 // CHECK-32-EX: omp.dispatch.end:
20811 // CHECK-32-EX-NEXT: ret void
20814 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58
20815 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20816 // CHECK-32-EX-NEXT: entry:
20817 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20818 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20819 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
20820 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
20821 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_kernel_environment, ptr [[DYN_PTR]])
20822 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
20823 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
20824 // CHECK-32-EX: user_code.entry:
20825 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
20826 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
20827 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
20828 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
20829 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
20830 // CHECK-32-EX-NEXT: ret void
20831 // CHECK-32-EX: worker.exit:
20832 // CHECK-32-EX-NEXT: ret void
20835 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined
20836 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
20837 // CHECK-32-EX-NEXT: entry:
20838 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20839 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20840 // CHECK-32-EX-NEXT: [[B:%.*]] = alloca i32, align 4
20841 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20842 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20843 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
20844 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
20845 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20846 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20847 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20848 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
20849 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20850 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20851 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
20852 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
20853 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20854 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20855 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
20856 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20857 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
20858 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
20859 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20860 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
20861 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
20862 // CHECK-32-EX: cond.true:
20863 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
20864 // CHECK-32-EX: cond.false:
20865 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
20866 // CHECK-32-EX-NEXT: br label [[COND_END]]
20867 // CHECK-32-EX: cond.end:
20868 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
20869 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
20870 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
20871 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20872 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20873 // CHECK-32-EX: omp.inner.for.cond:
20874 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311:![0-9]+]]
20875 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
20876 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20877 // CHECK-32-EX: omp.inner.for.body:
20878 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
20879 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20880 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
20881 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
20882 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP311]]
20883 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
20884 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
20885 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP311]]
20886 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP311]]
20887 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20888 // CHECK-32-EX: omp.inner.for.inc:
20889 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
20890 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
20891 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
20892 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
20893 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
20894 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
20895 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
20896 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
20897 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20898 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP311]]
20899 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
20900 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20901 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20902 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
20903 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
20904 // CHECK-32-EX: cond.true5:
20905 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
20906 // CHECK-32-EX: cond.false6:
20907 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20908 // CHECK-32-EX-NEXT: br label [[COND_END7]]
20909 // CHECK-32-EX: cond.end7:
20910 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
20911 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP311]]
20912 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP311]]
20913 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP311]]
20914 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP312:![0-9]+]]
20915 // CHECK-32-EX: omp.inner.for.end:
20916 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20917 // CHECK-32-EX: omp.loop.exit:
20918 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
20919 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
20920 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
20921 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
20922 // CHECK-32-EX: .omp.final.then:
20923 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
20924 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
20925 // CHECK-32-EX: .omp.final.done:
20926 // CHECK-32-EX-NEXT: ret void
20929 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l58_omp_outlined_omp_outlined
20930 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
20931 // CHECK-32-EX-NEXT: entry:
20932 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
20933 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
20934 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
20935 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
20936 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
20937 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
20938 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
20939 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
20940 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
20941 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
20942 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
20943 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
20944 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
20945 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20946 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20947 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
20948 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
20949 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
20950 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
20951 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
20952 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
20953 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
20954 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
20955 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
20956 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
20957 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
20958 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
20959 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
20960 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
20961 // CHECK-32-EX: omp.inner.for.cond:
20962 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314:![0-9]+]]
20963 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP314]]
20964 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
20965 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
20966 // CHECK-32-EX: omp.inner.for.body:
20967 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
20968 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
20969 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
20970 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP314]]
20971 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
20972 // CHECK-32-EX: omp.body.continue:
20973 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
20974 // CHECK-32-EX: omp.inner.for.inc:
20975 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
20976 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP314]]
20977 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
20978 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP314]]
20979 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP315:![0-9]+]]
20980 // CHECK-32-EX: omp.inner.for.end:
20981 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
20982 // CHECK-32-EX: omp.loop.exit:
20983 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
20984 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
20985 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
20986 // CHECK-32-EX-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
20987 // CHECK-32-EX: .omp.final.then:
20988 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
20989 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
20990 // CHECK-32-EX: .omp.final.done:
20991 // CHECK-32-EX-NEXT: ret void
20994 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66
20995 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
20996 // CHECK-32-EX-NEXT: entry:
20997 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
20998 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
20999 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21000 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21001 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_kernel_environment, ptr [[DYN_PTR]])
21002 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21003 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21004 // CHECK-32-EX: user_code.entry:
21005 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21006 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21007 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21008 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21009 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21010 // CHECK-32-EX-NEXT: ret void
21011 // CHECK-32-EX: worker.exit:
21012 // CHECK-32-EX-NEXT: ret void
21015 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined
21016 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21017 // CHECK-32-EX-NEXT: entry:
21018 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21019 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21020 // CHECK-32-EX-NEXT: [[B:%.*]] = alloca [3 x i32], align 4
21021 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21022 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21023 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21024 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21025 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21026 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21027 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21028 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21029 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21030 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21031 // CHECK-32-EX-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[B]], ptr align 4 @"__const.<captured>.b", i32 12, i1 false)
21032 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21033 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21034 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21035 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21036 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
21037 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21038 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21039 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
21040 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21041 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21042 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21043 // CHECK-32-EX: cond.true:
21044 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21045 // CHECK-32-EX: cond.false:
21046 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21047 // CHECK-32-EX-NEXT: br label [[COND_END]]
21048 // CHECK-32-EX: cond.end:
21049 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21050 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21051 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21052 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21053 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21054 // CHECK-32-EX: omp.inner.for.cond:
21055 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317:![0-9]+]]
21056 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
21057 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21058 // CHECK-32-EX: omp.inner.for.body:
21059 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
21060 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21061 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21062 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
21063 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP317]]
21064 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21065 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
21066 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP317]]
21067 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP317]]
21068 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21069 // CHECK-32-EX: omp.inner.for.inc:
21070 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
21071 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
21072 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
21073 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
21074 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
21075 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
21076 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
21077 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
21078 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21079 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP317]]
21080 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
21081 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21082 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21083 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
21084 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
21085 // CHECK-32-EX: cond.true5:
21086 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
21087 // CHECK-32-EX: cond.false6:
21088 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21089 // CHECK-32-EX-NEXT: br label [[COND_END7]]
21090 // CHECK-32-EX: cond.end7:
21091 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
21092 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP317]]
21093 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP317]]
21094 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP317]]
21095 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP318:![0-9]+]]
21096 // CHECK-32-EX: omp.inner.for.end:
21097 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21098 // CHECK-32-EX: omp.loop.exit:
21099 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
21100 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21101 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
21102 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21103 // CHECK-32-EX: .omp.final.then:
21104 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21105 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21106 // CHECK-32-EX: .omp.final.done:
21107 // CHECK-32-EX-NEXT: ret void
21110 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l66_omp_outlined_omp_outlined
21111 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
21112 // CHECK-32-EX-NEXT: entry:
21113 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21114 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21115 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
21116 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
21117 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21118 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21119 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
21120 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
21121 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21122 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21123 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21124 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21125 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21126 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21127 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21128 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
21129 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
21130 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21131 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21132 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
21133 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
21134 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21135 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21136 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21137 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
21138 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
21139 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
21140 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
21141 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21142 // CHECK-32-EX: cond.true:
21143 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21144 // CHECK-32-EX: cond.false:
21145 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
21146 // CHECK-32-EX-NEXT: br label [[COND_END]]
21147 // CHECK-32-EX: cond.end:
21148 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
21149 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
21150 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21151 // CHECK-32-EX-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
21152 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21153 // CHECK-32-EX: omp.inner.for.cond:
21154 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320:![0-9]+]]
21155 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP320]]
21156 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
21157 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21158 // CHECK-32-EX: omp.inner.for.body:
21159 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
21160 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
21161 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
21162 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP320]]
21163 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
21164 // CHECK-32-EX: omp.body.continue:
21165 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21166 // CHECK-32-EX: omp.inner.for.inc:
21167 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
21168 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
21169 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP320]]
21170 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP321:![0-9]+]]
21171 // CHECK-32-EX: omp.inner.for.end:
21172 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21173 // CHECK-32-EX: omp.loop.exit:
21174 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
21175 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21176 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
21177 // CHECK-32-EX-NEXT: br i1 [[TMP12]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21178 // CHECK-32-EX: .omp.final.then:
21179 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21180 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21181 // CHECK-32-EX: .omp.final.done:
21182 // CHECK-32-EX-NEXT: ret void
21185 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73
21186 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
21187 // CHECK-32-EX-NEXT: entry:
21188 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
21189 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21190 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21191 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21192 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_kernel_environment, ptr [[DYN_PTR]])
21193 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21194 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21195 // CHECK-32-EX: user_code.entry:
21196 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21197 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21198 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21199 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21200 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21201 // CHECK-32-EX-NEXT: ret void
21202 // CHECK-32-EX: worker.exit:
21203 // CHECK-32-EX-NEXT: ret void
21206 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined
21207 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21208 // CHECK-32-EX-NEXT: entry:
21209 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21210 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21211 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21212 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21213 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21214 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21215 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21216 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21217 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21218 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21219 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21220 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21221 // CHECK-32-EX-NEXT: [[C:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
21222 // CHECK-32-EX-NEXT: [[B:%.*]] = call align 8 ptr @__kmpc_alloc_shared(i32 4)
21223 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21224 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21225 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21226 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21227 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21228 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21229 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
21230 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21231 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21232 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21233 // CHECK-32-EX: cond.true:
21234 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21235 // CHECK-32-EX: cond.false:
21236 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21237 // CHECK-32-EX-NEXT: br label [[COND_END]]
21238 // CHECK-32-EX: cond.end:
21239 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21240 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21241 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21242 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21243 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21244 // CHECK-32-EX: omp.inner.for.cond:
21245 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323:![0-9]+]]
21246 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
21247 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
21248 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21249 // CHECK-32-EX: omp.inner.for.body:
21250 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP323]]
21251 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP323]]
21252 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21253 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = inttoptr i32 [[TMP7]] to ptr
21254 // CHECK-32-EX-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 4, !llvm.access.group [[ACC_GRP323]]
21255 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21256 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = inttoptr i32 [[TMP8]] to ptr
21257 // CHECK-32-EX-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 4, !llvm.access.group [[ACC_GRP323]]
21258 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP323]]
21259 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21260 // CHECK-32-EX: omp.inner.for.inc:
21261 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
21262 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP323]]
21263 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
21264 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP323]]
21265 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP324:![0-9]+]]
21266 // CHECK-32-EX: omp.inner.for.end:
21267 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21268 // CHECK-32-EX: omp.loop.exit:
21269 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
21270 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21271 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
21272 // CHECK-32-EX-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21273 // CHECK-32-EX: .omp.final.then:
21274 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21275 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21276 // CHECK-32-EX: .omp.final.done:
21277 // CHECK-32-EX-NEXT: store ptr [[B]], ptr [[C]], align 4
21278 // CHECK-32-EX-NEXT: call void @__kmpc_free_shared(ptr [[B]], i32 4)
21279 // CHECK-32-EX-NEXT: call void @__kmpc_free_shared(ptr [[C]], i32 4)
21280 // CHECK-32-EX-NEXT: ret void
21283 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined
21284 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
21285 // CHECK-32-EX-NEXT: entry:
21286 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21287 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21288 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
21289 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
21290 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21291 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21292 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
21293 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
21294 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21295 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21296 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21297 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21298 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21299 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21300 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21301 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
21302 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
21303 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21304 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21305 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
21306 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
21307 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21308 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21309 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21310 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
21311 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
21312 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21313 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21314 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21315 // CHECK-32-EX: omp.inner.for.cond:
21316 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326:![0-9]+]]
21317 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4, !llvm.access.group [[ACC_GRP326]]
21318 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
21319 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21320 // CHECK-32-EX: omp.inner.for.body:
21321 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
21322 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
21323 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
21324 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP326]]
21325 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
21326 // CHECK-32-EX: omp.body.continue:
21327 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21328 // CHECK-32-EX: omp.inner.for.inc:
21329 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
21330 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP326]]
21331 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
21332 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP326]]
21333 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP327:![0-9]+]]
21334 // CHECK-32-EX: omp.inner.for.end:
21335 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21336 // CHECK-32-EX: omp.loop.exit:
21337 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
21338 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21339 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
21340 // CHECK-32-EX-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21341 // CHECK-32-EX: .omp.final.then:
21342 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21343 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21344 // CHECK-32-EX: .omp.final.done:
21345 // CHECK-32-EX-NEXT: ret void
21348 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined_wrapper
21349 // CHECK-32-EX-SAME: (i16 noundef zeroext [[TMP0:%.*]], i32 noundef [[TMP1:%.*]]) #[[ATTR7:[0-9]+]] {
21350 // CHECK-32-EX-NEXT: entry:
21351 // CHECK-32-EX-NEXT: [[DOTADDR:%.*]] = alloca i16, align 2
21352 // CHECK-32-EX-NEXT: [[DOTADDR1:%.*]] = alloca i32, align 4
21353 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21354 // CHECK-32-EX-NEXT: [[GLOBAL_ARGS:%.*]] = alloca ptr, align 4
21355 // CHECK-32-EX-NEXT: store i16 [[TMP0]], ptr [[DOTADDR]], align 2
21356 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTADDR1]], align 4
21357 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21358 // CHECK-32-EX-NEXT: call void @__kmpc_get_shared_variables(ptr [[GLOBAL_ARGS]])
21359 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[GLOBAL_ARGS]], align 4
21360 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i32 0
21361 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
21362 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = getelementptr inbounds ptr, ptr [[TMP2]], i32 1
21363 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
21364 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l73_omp_outlined_omp_outlined(ptr [[DOTADDR1]], ptr [[DOTZERO_ADDR]], i32 [[TMP4]], i32 [[TMP6]]) #[[ATTR2]]
21365 // CHECK-32-EX-NEXT: ret void
21368 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81
21369 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
21370 // CHECK-32-EX-NEXT: entry:
21371 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
21372 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21373 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21374 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21375 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_kernel_environment, ptr [[DYN_PTR]])
21376 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21377 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21378 // CHECK-32-EX: user_code.entry:
21379 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21380 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21381 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21382 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21383 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21384 // CHECK-32-EX-NEXT: ret void
21385 // CHECK-32-EX: worker.exit:
21386 // CHECK-32-EX-NEXT: ret void
21389 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined
21390 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21391 // CHECK-32-EX-NEXT: entry:
21392 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21393 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21394 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21395 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21396 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21397 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21398 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21399 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21400 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21401 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21402 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21403 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21404 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21405 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21406 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21407 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21408 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
21409 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21410 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21411 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
21412 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21413 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21414 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21415 // CHECK-32-EX: cond.true:
21416 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21417 // CHECK-32-EX: cond.false:
21418 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21419 // CHECK-32-EX-NEXT: br label [[COND_END]]
21420 // CHECK-32-EX: cond.end:
21421 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21422 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21423 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21424 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21425 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21426 // CHECK-32-EX: omp.inner.for.cond:
21427 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329:![0-9]+]]
21428 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
21429 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21430 // CHECK-32-EX: omp.inner.for.body:
21431 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
21432 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21433 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21434 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
21435 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP329]]
21436 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21437 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
21438 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP329]]
21439 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP329]]
21440 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21441 // CHECK-32-EX: omp.inner.for.inc:
21442 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
21443 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
21444 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
21445 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
21446 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
21447 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
21448 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
21449 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
21450 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21451 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP329]]
21452 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
21453 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21454 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21455 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
21456 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
21457 // CHECK-32-EX: cond.true5:
21458 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
21459 // CHECK-32-EX: cond.false6:
21460 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21461 // CHECK-32-EX-NEXT: br label [[COND_END7]]
21462 // CHECK-32-EX: cond.end7:
21463 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
21464 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP329]]
21465 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP329]]
21466 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP329]]
21467 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP330:![0-9]+]]
21468 // CHECK-32-EX: omp.inner.for.end:
21469 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21470 // CHECK-32-EX: omp.loop.exit:
21471 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
21472 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21473 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
21474 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21475 // CHECK-32-EX: .omp.final.then:
21476 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21477 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21478 // CHECK-32-EX: .omp.final.done:
21479 // CHECK-32-EX-NEXT: ret void
21482 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l81_omp_outlined_omp_outlined
21483 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
21484 // CHECK-32-EX-NEXT: entry:
21485 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21486 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21487 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
21488 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
21489 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21490 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21491 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
21492 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
21493 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21494 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21495 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21496 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21497 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21498 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21499 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21500 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
21501 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
21502 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21503 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21504 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
21505 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
21506 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21507 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21508 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21509 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
21510 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21511 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
21512 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
21513 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
21514 // CHECK-32-EX: omp.dispatch.cond:
21515 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
21516 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
21517 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
21518 // CHECK-32-EX: omp.dispatch.body:
21519 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21520 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
21521 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21522 // CHECK-32-EX: omp.inner.for.cond:
21523 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332:![0-9]+]]
21524 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP332]]
21525 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
21526 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21527 // CHECK-32-EX: omp.inner.for.body:
21528 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
21529 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
21530 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
21531 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP332]]
21532 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
21533 // CHECK-32-EX: omp.body.continue:
21534 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21535 // CHECK-32-EX: omp.inner.for.inc:
21536 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
21537 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
21538 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP332]]
21539 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP333:![0-9]+]]
21540 // CHECK-32-EX: omp.inner.for.end:
21541 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
21542 // CHECK-32-EX: omp.dispatch.inc:
21543 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
21544 // CHECK-32-EX: omp.dispatch.end:
21545 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21546 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
21547 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21548 // CHECK-32-EX: .omp.final.then:
21549 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21550 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21551 // CHECK-32-EX: .omp.final.done:
21552 // CHECK-32-EX-NEXT: ret void
21555 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85
21556 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
21557 // CHECK-32-EX-NEXT: entry:
21558 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
21559 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21560 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21561 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21562 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_kernel_environment, ptr [[DYN_PTR]])
21563 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21564 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21565 // CHECK-32-EX: user_code.entry:
21566 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21567 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21568 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21569 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21570 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21571 // CHECK-32-EX-NEXT: ret void
21572 // CHECK-32-EX: worker.exit:
21573 // CHECK-32-EX-NEXT: ret void
21576 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined
21577 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21578 // CHECK-32-EX-NEXT: entry:
21579 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21580 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21581 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21582 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21583 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21584 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21585 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21586 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21587 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21588 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21589 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21590 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21591 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21592 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21593 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21594 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21595 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
21596 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21597 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21598 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
21599 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21600 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21601 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21602 // CHECK-32-EX: cond.true:
21603 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21604 // CHECK-32-EX: cond.false:
21605 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21606 // CHECK-32-EX-NEXT: br label [[COND_END]]
21607 // CHECK-32-EX: cond.end:
21608 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21609 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21610 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21611 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21612 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21613 // CHECK-32-EX: omp.inner.for.cond:
21614 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335:![0-9]+]]
21615 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
21616 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21617 // CHECK-32-EX: omp.inner.for.body:
21618 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
21619 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21620 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21621 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
21622 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP335]]
21623 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21624 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
21625 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP335]]
21626 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP335]]
21627 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21628 // CHECK-32-EX: omp.inner.for.inc:
21629 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
21630 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
21631 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
21632 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
21633 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
21634 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
21635 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
21636 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
21637 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21638 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP335]]
21639 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
21640 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21641 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21642 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
21643 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
21644 // CHECK-32-EX: cond.true5:
21645 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
21646 // CHECK-32-EX: cond.false6:
21647 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21648 // CHECK-32-EX-NEXT: br label [[COND_END7]]
21649 // CHECK-32-EX: cond.end7:
21650 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
21651 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP335]]
21652 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP335]]
21653 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP335]]
21654 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP336:![0-9]+]]
21655 // CHECK-32-EX: omp.inner.for.end:
21656 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21657 // CHECK-32-EX: omp.loop.exit:
21658 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
21659 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21660 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
21661 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21662 // CHECK-32-EX: .omp.final.then:
21663 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21664 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21665 // CHECK-32-EX: .omp.final.done:
21666 // CHECK-32-EX-NEXT: ret void
21669 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l85_omp_outlined_omp_outlined
21670 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
21671 // CHECK-32-EX-NEXT: entry:
21672 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21673 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21674 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
21675 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
21676 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21677 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21678 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
21679 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
21680 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21681 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21682 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21683 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21684 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21685 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21686 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21687 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
21688 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
21689 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21690 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21691 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
21692 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
21693 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21694 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21695 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21696 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
21697 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21698 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
21699 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
21700 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
21701 // CHECK-32-EX: omp.dispatch.cond:
21702 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
21703 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
21704 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
21705 // CHECK-32-EX: omp.dispatch.body:
21706 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21707 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
21708 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21709 // CHECK-32-EX: omp.inner.for.cond:
21710 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338:![0-9]+]]
21711 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP338]]
21712 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
21713 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21714 // CHECK-32-EX: omp.inner.for.body:
21715 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
21716 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
21717 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
21718 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP338]]
21719 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
21720 // CHECK-32-EX: omp.body.continue:
21721 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21722 // CHECK-32-EX: omp.inner.for.inc:
21723 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
21724 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
21725 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP338]]
21726 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP339:![0-9]+]]
21727 // CHECK-32-EX: omp.inner.for.end:
21728 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
21729 // CHECK-32-EX: omp.dispatch.inc:
21730 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
21731 // CHECK-32-EX: omp.dispatch.end:
21732 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21733 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
21734 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21735 // CHECK-32-EX: .omp.final.then:
21736 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21737 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21738 // CHECK-32-EX: .omp.final.done:
21739 // CHECK-32-EX-NEXT: ret void
21742 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89
21743 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
21744 // CHECK-32-EX-NEXT: entry:
21745 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
21746 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21747 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21748 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21749 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_kernel_environment, ptr [[DYN_PTR]])
21750 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21751 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21752 // CHECK-32-EX: user_code.entry:
21753 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21754 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21755 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21756 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21757 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21758 // CHECK-32-EX-NEXT: ret void
21759 // CHECK-32-EX: worker.exit:
21760 // CHECK-32-EX-NEXT: ret void
21763 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined
21764 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21765 // CHECK-32-EX-NEXT: entry:
21766 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21767 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21768 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21769 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21770 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21771 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21772 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21773 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21774 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21775 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21776 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21777 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21778 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21779 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21780 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21781 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21782 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
21783 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21784 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21785 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
21786 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21787 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21788 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21789 // CHECK-32-EX: cond.true:
21790 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21791 // CHECK-32-EX: cond.false:
21792 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21793 // CHECK-32-EX-NEXT: br label [[COND_END]]
21794 // CHECK-32-EX: cond.end:
21795 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21796 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21797 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21798 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21799 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21800 // CHECK-32-EX: omp.inner.for.cond:
21801 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341:![0-9]+]]
21802 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
21803 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21804 // CHECK-32-EX: omp.inner.for.body:
21805 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
21806 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21807 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21808 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
21809 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP341]]
21810 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21811 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
21812 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP341]]
21813 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP341]]
21814 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21815 // CHECK-32-EX: omp.inner.for.inc:
21816 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
21817 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
21818 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
21819 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
21820 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
21821 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
21822 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
21823 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
21824 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21825 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP341]]
21826 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
21827 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21828 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21829 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
21830 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
21831 // CHECK-32-EX: cond.true5:
21832 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
21833 // CHECK-32-EX: cond.false6:
21834 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21835 // CHECK-32-EX-NEXT: br label [[COND_END7]]
21836 // CHECK-32-EX: cond.end7:
21837 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
21838 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP341]]
21839 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP341]]
21840 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP341]]
21841 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP342:![0-9]+]]
21842 // CHECK-32-EX: omp.inner.for.end:
21843 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
21844 // CHECK-32-EX: omp.loop.exit:
21845 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
21846 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21847 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
21848 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21849 // CHECK-32-EX: .omp.final.then:
21850 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21851 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21852 // CHECK-32-EX: .omp.final.done:
21853 // CHECK-32-EX-NEXT: ret void
21856 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l89_omp_outlined_omp_outlined
21857 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
21858 // CHECK-32-EX-NEXT: entry:
21859 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21860 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21861 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
21862 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
21863 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21864 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21865 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
21866 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
21867 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21868 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21869 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21870 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21871 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21872 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21873 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21874 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
21875 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
21876 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
21877 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
21878 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
21879 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
21880 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21881 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21882 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21883 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
21884 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21885 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
21886 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
21887 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
21888 // CHECK-32-EX: omp.dispatch.cond:
21889 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
21890 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
21891 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
21892 // CHECK-32-EX: omp.dispatch.body:
21893 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
21894 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
21895 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21896 // CHECK-32-EX: omp.inner.for.cond:
21897 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344:![0-9]+]]
21898 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP344]]
21899 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
21900 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21901 // CHECK-32-EX: omp.inner.for.body:
21902 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
21903 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
21904 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
21905 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP344]]
21906 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
21907 // CHECK-32-EX: omp.body.continue:
21908 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
21909 // CHECK-32-EX: omp.inner.for.inc:
21910 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
21911 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
21912 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP344]]
21913 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP345:![0-9]+]]
21914 // CHECK-32-EX: omp.inner.for.end:
21915 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
21916 // CHECK-32-EX: omp.dispatch.inc:
21917 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
21918 // CHECK-32-EX: omp.dispatch.end:
21919 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
21920 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
21921 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
21922 // CHECK-32-EX: .omp.final.then:
21923 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
21924 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
21925 // CHECK-32-EX: .omp.final.done:
21926 // CHECK-32-EX-NEXT: ret void
21929 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93
21930 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
21931 // CHECK-32-EX-NEXT: entry:
21932 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
21933 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
21934 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
21935 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
21936 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_kernel_environment, ptr [[DYN_PTR]])
21937 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
21938 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
21939 // CHECK-32-EX: user_code.entry:
21940 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
21941 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
21942 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
21943 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
21944 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
21945 // CHECK-32-EX-NEXT: ret void
21946 // CHECK-32-EX: worker.exit:
21947 // CHECK-32-EX-NEXT: ret void
21950 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined
21951 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
21952 // CHECK-32-EX-NEXT: entry:
21953 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
21954 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
21955 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
21956 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
21957 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
21958 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
21959 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
21960 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
21961 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
21962 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
21963 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
21964 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
21965 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
21966 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
21967 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
21968 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
21969 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
21970 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
21971 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
21972 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
21973 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21974 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
21975 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
21976 // CHECK-32-EX: cond.true:
21977 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
21978 // CHECK-32-EX: cond.false:
21979 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
21980 // CHECK-32-EX-NEXT: br label [[COND_END]]
21981 // CHECK-32-EX: cond.end:
21982 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
21983 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
21984 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
21985 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
21986 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
21987 // CHECK-32-EX: omp.inner.for.cond:
21988 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347:![0-9]+]]
21989 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
21990 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
21991 // CHECK-32-EX: omp.inner.for.body:
21992 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
21993 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
21994 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
21995 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
21996 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP347]]
21997 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
21998 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
21999 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP347]]
22000 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2), !llvm.access.group [[ACC_GRP347]]
22001 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22002 // CHECK-32-EX: omp.inner.for.inc:
22003 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
22004 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
22005 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22006 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
22007 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
22008 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
22009 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22010 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
22011 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
22012 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4, !llvm.access.group [[ACC_GRP347]]
22013 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22014 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
22015 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
22016 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22017 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22018 // CHECK-32-EX: cond.true5:
22019 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22020 // CHECK-32-EX: cond.false6:
22021 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
22022 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22023 // CHECK-32-EX: cond.end7:
22024 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22025 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4, !llvm.access.group [[ACC_GRP347]]
22026 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4, !llvm.access.group [[ACC_GRP347]]
22027 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP347]]
22028 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP348:![0-9]+]]
22029 // CHECK-32-EX: omp.inner.for.end:
22030 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22031 // CHECK-32-EX: omp.loop.exit:
22032 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22033 // CHECK-32-EX-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
22034 // CHECK-32-EX-NEXT: [[TMP22:%.*]] = icmp ne i32 [[TMP21]], 0
22035 // CHECK-32-EX-NEXT: br i1 [[TMP22]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
22036 // CHECK-32-EX: .omp.final.then:
22037 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
22038 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
22039 // CHECK-32-EX: .omp.final.done:
22040 // CHECK-32-EX-NEXT: ret void
22043 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l93_omp_outlined_omp_outlined
22044 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22045 // CHECK-32-EX-NEXT: entry:
22046 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22047 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22048 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22049 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22050 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22051 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22052 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22053 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22054 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22055 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22056 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22057 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22058 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22059 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22060 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22061 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22062 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22063 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22064 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22065 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22066 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22067 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22068 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22069 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22070 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22071 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22072 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
22073 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
22074 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
22075 // CHECK-32-EX: omp.dispatch.cond:
22076 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
22077 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
22078 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
22079 // CHECK-32-EX: omp.dispatch.body:
22080 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22081 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
22082 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22083 // CHECK-32-EX: omp.inner.for.cond:
22084 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350:![0-9]+]]
22085 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP350]]
22086 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
22087 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22088 // CHECK-32-EX: omp.inner.for.body:
22089 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
22090 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
22091 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22092 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP350]]
22093 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22094 // CHECK-32-EX: omp.body.continue:
22095 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22096 // CHECK-32-EX: omp.inner.for.inc:
22097 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
22098 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
22099 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP350]]
22100 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP351:![0-9]+]]
22101 // CHECK-32-EX: omp.inner.for.end:
22102 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
22103 // CHECK-32-EX: omp.dispatch.inc:
22104 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
22105 // CHECK-32-EX: omp.dispatch.end:
22106 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
22107 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
22108 // CHECK-32-EX-NEXT: br i1 [[TMP13]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
22109 // CHECK-32-EX: .omp.final.then:
22110 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
22111 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
22112 // CHECK-32-EX: .omp.final.done:
22113 // CHECK-32-EX-NEXT: ret void
22116 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97
22117 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22118 // CHECK-32-EX-NEXT: entry:
22119 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22120 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22121 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22122 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22123 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_kernel_environment, ptr [[DYN_PTR]])
22124 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22125 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22126 // CHECK-32-EX: user_code.entry:
22127 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22128 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22129 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22130 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22131 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22132 // CHECK-32-EX-NEXT: ret void
22133 // CHECK-32-EX: worker.exit:
22134 // CHECK-32-EX-NEXT: ret void
22137 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined
22138 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22139 // CHECK-32-EX-NEXT: entry:
22140 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22141 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22142 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22143 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22144 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22145 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22146 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22147 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22148 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22149 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
22150 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22151 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22152 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
22153 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
22154 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22155 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22156 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
22157 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22158 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
22159 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
22160 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22161 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
22162 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22163 // CHECK-32-EX: cond.true:
22164 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22165 // CHECK-32-EX: cond.false:
22166 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22167 // CHECK-32-EX-NEXT: br label [[COND_END]]
22168 // CHECK-32-EX: cond.end:
22169 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
22170 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
22171 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22172 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22173 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22174 // CHECK-32-EX: omp.inner.for.cond:
22175 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22176 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
22177 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22178 // CHECK-32-EX: omp.inner.for.body:
22179 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22180 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22181 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
22182 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
22183 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
22184 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
22185 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
22186 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
22187 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
22188 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22189 // CHECK-32-EX: omp.inner.for.inc:
22190 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22191 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22192 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22193 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
22194 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22195 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22196 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22197 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
22198 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22199 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22200 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22201 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
22202 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22203 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22204 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22205 // CHECK-32-EX: cond.true5:
22206 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22207 // CHECK-32-EX: cond.false6:
22208 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22209 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22210 // CHECK-32-EX: cond.end7:
22211 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22212 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
22213 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22214 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
22215 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22216 // CHECK-32-EX: omp.inner.for.end:
22217 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22218 // CHECK-32-EX: omp.loop.exit:
22219 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22220 // CHECK-32-EX-NEXT: ret void
22223 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l97_omp_outlined_omp_outlined
22224 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22225 // CHECK-32-EX-NEXT: entry:
22226 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22227 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22228 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22229 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22230 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22231 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22232 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22233 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22234 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22235 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22236 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22237 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22238 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22239 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22240 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22241 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22242 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22243 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22244 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22245 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22246 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22247 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22248 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22249 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22250 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
22251 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
22252 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22253 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22254 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22255 // CHECK-32-EX: omp.inner.for.cond:
22256 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22257 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22258 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
22259 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22260 // CHECK-32-EX: omp.inner.for.body:
22261 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22262 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
22263 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22264 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
22265 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22266 // CHECK-32-EX: omp.body.continue:
22267 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22268 // CHECK-32-EX: omp.inner.for.inc:
22269 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22270 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22271 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
22272 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
22273 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22274 // CHECK-32-EX: omp.inner.for.end:
22275 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22276 // CHECK-32-EX: omp.loop.exit:
22277 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
22278 // CHECK-32-EX-NEXT: ret void
22281 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101
22282 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22283 // CHECK-32-EX-NEXT: entry:
22284 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22285 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22286 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22287 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22288 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_kernel_environment, ptr [[DYN_PTR]])
22289 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22290 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22291 // CHECK-32-EX: user_code.entry:
22292 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22293 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22294 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22295 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22296 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22297 // CHECK-32-EX-NEXT: ret void
22298 // CHECK-32-EX: worker.exit:
22299 // CHECK-32-EX-NEXT: ret void
22302 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined
22303 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22304 // CHECK-32-EX-NEXT: entry:
22305 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22306 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22307 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22308 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22309 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22310 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22311 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22312 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22313 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22314 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
22315 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22316 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22317 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
22318 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
22319 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22320 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22321 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
22322 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22323 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
22324 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
22325 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22326 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
22327 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22328 // CHECK-32-EX: cond.true:
22329 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22330 // CHECK-32-EX: cond.false:
22331 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22332 // CHECK-32-EX-NEXT: br label [[COND_END]]
22333 // CHECK-32-EX: cond.end:
22334 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
22335 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
22336 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22337 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22338 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22339 // CHECK-32-EX: omp.inner.for.cond:
22340 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22341 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
22342 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22343 // CHECK-32-EX: omp.inner.for.body:
22344 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22345 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22346 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
22347 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
22348 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
22349 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
22350 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
22351 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
22352 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
22353 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22354 // CHECK-32-EX: omp.inner.for.inc:
22355 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22356 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22357 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22358 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
22359 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22360 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22361 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22362 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
22363 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22364 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22365 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22366 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
22367 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22368 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22369 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22370 // CHECK-32-EX: cond.true5:
22371 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22372 // CHECK-32-EX: cond.false6:
22373 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22374 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22375 // CHECK-32-EX: cond.end7:
22376 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22377 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
22378 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22379 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
22380 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22381 // CHECK-32-EX: omp.inner.for.end:
22382 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22383 // CHECK-32-EX: omp.loop.exit:
22384 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22385 // CHECK-32-EX-NEXT: ret void
22388 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l101_omp_outlined_omp_outlined
22389 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22390 // CHECK-32-EX-NEXT: entry:
22391 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22392 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22393 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22394 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22395 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22396 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22397 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22398 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22399 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22400 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22401 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22402 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22403 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22404 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22405 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22406 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22407 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22408 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22409 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22410 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22411 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22412 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22413 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22414 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22415 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
22416 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
22417 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22418 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
22419 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22420 // CHECK-32-EX: cond.true:
22421 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22422 // CHECK-32-EX: cond.false:
22423 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22424 // CHECK-32-EX-NEXT: br label [[COND_END]]
22425 // CHECK-32-EX: cond.end:
22426 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
22427 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
22428 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22429 // CHECK-32-EX-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
22430 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22431 // CHECK-32-EX: omp.inner.for.cond:
22432 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22433 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22434 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
22435 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22436 // CHECK-32-EX: omp.inner.for.body:
22437 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22438 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
22439 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22440 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
22441 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22442 // CHECK-32-EX: omp.body.continue:
22443 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22444 // CHECK-32-EX: omp.inner.for.inc:
22445 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22446 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
22447 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
22448 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22449 // CHECK-32-EX: omp.inner.for.end:
22450 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22451 // CHECK-32-EX: omp.loop.exit:
22452 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
22453 // CHECK-32-EX-NEXT: ret void
22456 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105
22457 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22458 // CHECK-32-EX-NEXT: entry:
22459 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22460 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22461 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22462 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22463 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_kernel_environment, ptr [[DYN_PTR]])
22464 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22465 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22466 // CHECK-32-EX: user_code.entry:
22467 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22468 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22469 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22470 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22471 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22472 // CHECK-32-EX-NEXT: ret void
22473 // CHECK-32-EX: worker.exit:
22474 // CHECK-32-EX-NEXT: ret void
22477 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined
22478 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22479 // CHECK-32-EX-NEXT: entry:
22480 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22481 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22482 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22483 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22484 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22485 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22486 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22487 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22488 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22489 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
22490 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22491 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22492 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
22493 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
22494 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22495 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22496 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
22497 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22498 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
22499 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
22500 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22501 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
22502 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22503 // CHECK-32-EX: cond.true:
22504 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22505 // CHECK-32-EX: cond.false:
22506 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22507 // CHECK-32-EX-NEXT: br label [[COND_END]]
22508 // CHECK-32-EX: cond.end:
22509 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
22510 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
22511 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22512 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22513 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22514 // CHECK-32-EX: omp.inner.for.cond:
22515 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22516 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
22517 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22518 // CHECK-32-EX: omp.inner.for.body:
22519 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22520 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22521 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
22522 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
22523 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
22524 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
22525 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
22526 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
22527 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
22528 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22529 // CHECK-32-EX: omp.inner.for.inc:
22530 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22531 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22532 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22533 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
22534 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22535 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22536 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22537 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
22538 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22539 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22540 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22541 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
22542 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22543 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22544 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22545 // CHECK-32-EX: cond.true5:
22546 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22547 // CHECK-32-EX: cond.false6:
22548 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22549 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22550 // CHECK-32-EX: cond.end7:
22551 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22552 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
22553 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22554 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
22555 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22556 // CHECK-32-EX: omp.inner.for.end:
22557 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22558 // CHECK-32-EX: omp.loop.exit:
22559 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22560 // CHECK-32-EX-NEXT: ret void
22563 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l105_omp_outlined_omp_outlined
22564 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22565 // CHECK-32-EX-NEXT: entry:
22566 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22567 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22568 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22569 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22570 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22571 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22572 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22573 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22574 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22575 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22576 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22577 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22578 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22579 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22580 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22581 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22582 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22583 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22584 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22585 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22586 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22587 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22588 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22589 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22590 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
22591 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
22592 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22593 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22594 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22595 // CHECK-32-EX: omp.inner.for.cond:
22596 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22597 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22598 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
22599 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22600 // CHECK-32-EX: omp.inner.for.body:
22601 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22602 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
22603 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22604 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
22605 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22606 // CHECK-32-EX: omp.body.continue:
22607 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22608 // CHECK-32-EX: omp.inner.for.inc:
22609 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22610 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22611 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
22612 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
22613 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22614 // CHECK-32-EX: omp.inner.for.end:
22615 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22616 // CHECK-32-EX: omp.loop.exit:
22617 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
22618 // CHECK-32-EX-NEXT: ret void
22621 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109
22622 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22623 // CHECK-32-EX-NEXT: entry:
22624 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22625 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22626 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22627 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22628 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_kernel_environment, ptr [[DYN_PTR]])
22629 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22630 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22631 // CHECK-32-EX: user_code.entry:
22632 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22633 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22634 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22635 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22636 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22637 // CHECK-32-EX-NEXT: ret void
22638 // CHECK-32-EX: worker.exit:
22639 // CHECK-32-EX-NEXT: ret void
22642 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined
22643 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22644 // CHECK-32-EX-NEXT: entry:
22645 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22646 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22647 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22648 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22649 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22650 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22651 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22652 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22653 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22654 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
22655 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22656 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22657 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
22658 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
22659 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22660 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22661 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
22662 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22663 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
22664 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
22665 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22666 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
22667 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22668 // CHECK-32-EX: cond.true:
22669 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22670 // CHECK-32-EX: cond.false:
22671 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22672 // CHECK-32-EX-NEXT: br label [[COND_END]]
22673 // CHECK-32-EX: cond.end:
22674 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
22675 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
22676 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22677 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22678 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22679 // CHECK-32-EX: omp.inner.for.cond:
22680 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22681 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
22682 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22683 // CHECK-32-EX: omp.inner.for.body:
22684 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22685 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22686 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
22687 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
22688 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
22689 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
22690 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
22691 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
22692 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
22693 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22694 // CHECK-32-EX: omp.inner.for.inc:
22695 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22696 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22697 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22698 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
22699 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22700 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22701 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22702 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
22703 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22704 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22705 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22706 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
22707 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22708 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22709 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22710 // CHECK-32-EX: cond.true5:
22711 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22712 // CHECK-32-EX: cond.false6:
22713 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22714 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22715 // CHECK-32-EX: cond.end7:
22716 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22717 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
22718 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22719 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
22720 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22721 // CHECK-32-EX: omp.inner.for.end:
22722 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22723 // CHECK-32-EX: omp.loop.exit:
22724 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22725 // CHECK-32-EX-NEXT: ret void
22728 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l109_omp_outlined_omp_outlined
22729 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22730 // CHECK-32-EX-NEXT: entry:
22731 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22732 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22733 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22734 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22735 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22736 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22737 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22738 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22739 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22740 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22741 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22742 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22743 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22744 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22745 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22746 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22747 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22748 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22749 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22750 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22751 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22752 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22753 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22754 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22755 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22756 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22757 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
22758 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
22759 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
22760 // CHECK-32-EX: omp.dispatch.cond:
22761 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
22762 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
22763 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
22764 // CHECK-32-EX: omp.dispatch.body:
22765 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22766 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
22767 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22768 // CHECK-32-EX: omp.inner.for.cond:
22769 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353:![0-9]+]]
22770 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP353]]
22771 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
22772 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22773 // CHECK-32-EX: omp.inner.for.body:
22774 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
22775 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
22776 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22777 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP353]]
22778 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22779 // CHECK-32-EX: omp.body.continue:
22780 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22781 // CHECK-32-EX: omp.inner.for.inc:
22782 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
22783 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
22784 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP353]]
22785 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP354:![0-9]+]]
22786 // CHECK-32-EX: omp.inner.for.end:
22787 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
22788 // CHECK-32-EX: omp.dispatch.inc:
22789 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
22790 // CHECK-32-EX: omp.dispatch.end:
22791 // CHECK-32-EX-NEXT: ret void
22794 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113
22795 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22796 // CHECK-32-EX-NEXT: entry:
22797 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22798 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22799 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22800 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22801 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_kernel_environment, ptr [[DYN_PTR]])
22802 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22803 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22804 // CHECK-32-EX: user_code.entry:
22805 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22806 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22807 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22808 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22809 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22810 // CHECK-32-EX-NEXT: ret void
22811 // CHECK-32-EX: worker.exit:
22812 // CHECK-32-EX-NEXT: ret void
22815 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined
22816 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22817 // CHECK-32-EX-NEXT: entry:
22818 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22819 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22820 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22821 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22822 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22823 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22824 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22825 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22826 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22827 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
22828 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22829 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22830 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
22831 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
22832 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22833 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22834 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
22835 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22836 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
22837 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
22838 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22839 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
22840 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
22841 // CHECK-32-EX: cond.true:
22842 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
22843 // CHECK-32-EX: cond.false:
22844 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22845 // CHECK-32-EX-NEXT: br label [[COND_END]]
22846 // CHECK-32-EX: cond.end:
22847 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
22848 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
22849 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22850 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
22851 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22852 // CHECK-32-EX: omp.inner.for.cond:
22853 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22854 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
22855 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22856 // CHECK-32-EX: omp.inner.for.body:
22857 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22858 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22859 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
22860 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
22861 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
22862 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
22863 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
22864 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
22865 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
22866 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22867 // CHECK-32-EX: omp.inner.for.inc:
22868 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
22869 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22870 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
22871 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
22872 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22873 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22874 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
22875 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
22876 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22877 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
22878 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
22879 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
22880 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22881 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
22882 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
22883 // CHECK-32-EX: cond.true5:
22884 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
22885 // CHECK-32-EX: cond.false6:
22886 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
22887 // CHECK-32-EX-NEXT: br label [[COND_END7]]
22888 // CHECK-32-EX: cond.end7:
22889 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
22890 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
22891 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
22892 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
22893 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
22894 // CHECK-32-EX: omp.inner.for.end:
22895 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
22896 // CHECK-32-EX: omp.loop.exit:
22897 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
22898 // CHECK-32-EX-NEXT: ret void
22901 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l113_omp_outlined_omp_outlined
22902 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
22903 // CHECK-32-EX-NEXT: entry:
22904 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22905 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22906 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
22907 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
22908 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22909 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22910 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
22911 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
22912 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22913 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22914 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
22915 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
22916 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
22917 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22918 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22919 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
22920 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
22921 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
22922 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
22923 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
22924 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
22925 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
22926 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
22927 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22928 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
22929 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
22930 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
22931 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
22932 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
22933 // CHECK-32-EX: omp.dispatch.cond:
22934 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
22935 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
22936 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
22937 // CHECK-32-EX: omp.dispatch.body:
22938 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
22939 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
22940 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
22941 // CHECK-32-EX: omp.inner.for.cond:
22942 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356:![0-9]+]]
22943 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP356]]
22944 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
22945 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
22946 // CHECK-32-EX: omp.inner.for.body:
22947 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
22948 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
22949 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
22950 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP356]]
22951 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
22952 // CHECK-32-EX: omp.body.continue:
22953 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
22954 // CHECK-32-EX: omp.inner.for.inc:
22955 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
22956 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
22957 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP356]]
22958 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP357:![0-9]+]]
22959 // CHECK-32-EX: omp.inner.for.end:
22960 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
22961 // CHECK-32-EX: omp.dispatch.inc:
22962 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
22963 // CHECK-32-EX: omp.dispatch.end:
22964 // CHECK-32-EX-NEXT: ret void
22967 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117
22968 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
22969 // CHECK-32-EX-NEXT: entry:
22970 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
22971 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
22972 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
22973 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
22974 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_kernel_environment, ptr [[DYN_PTR]])
22975 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
22976 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
22977 // CHECK-32-EX: user_code.entry:
22978 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
22979 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
22980 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
22981 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
22982 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
22983 // CHECK-32-EX-NEXT: ret void
22984 // CHECK-32-EX: worker.exit:
22985 // CHECK-32-EX-NEXT: ret void
22988 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined
22989 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
22990 // CHECK-32-EX-NEXT: entry:
22991 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
22992 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
22993 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
22994 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
22995 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
22996 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
22997 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
22998 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
22999 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23000 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23001 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23002 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23003 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23004 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23005 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23006 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23007 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23008 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23009 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23010 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23011 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23012 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23013 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23014 // CHECK-32-EX: cond.true:
23015 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23016 // CHECK-32-EX: cond.false:
23017 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23018 // CHECK-32-EX-NEXT: br label [[COND_END]]
23019 // CHECK-32-EX: cond.end:
23020 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23021 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23022 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23023 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23024 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23025 // CHECK-32-EX: omp.inner.for.cond:
23026 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23027 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23028 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23029 // CHECK-32-EX: omp.inner.for.body:
23030 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23031 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23032 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23033 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23034 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23035 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23036 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23037 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23038 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23039 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23040 // CHECK-32-EX: omp.inner.for.inc:
23041 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23042 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23043 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23044 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23045 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23046 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23047 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23048 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23049 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23050 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23051 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23052 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23053 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23054 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23055 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23056 // CHECK-32-EX: cond.true5:
23057 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23058 // CHECK-32-EX: cond.false6:
23059 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23060 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23061 // CHECK-32-EX: cond.end7:
23062 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23063 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23064 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23065 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23066 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23067 // CHECK-32-EX: omp.inner.for.end:
23068 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23069 // CHECK-32-EX: omp.loop.exit:
23070 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23071 // CHECK-32-EX-NEXT: ret void
23074 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l117_omp_outlined_omp_outlined
23075 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23076 // CHECK-32-EX-NEXT: entry:
23077 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23078 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23079 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23080 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23081 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23082 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23083 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23084 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23085 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23086 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23087 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23088 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23089 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23090 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23091 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23092 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23093 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23094 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23095 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23096 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23097 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23098 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23099 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23100 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23101 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23102 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23103 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
23104 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
23105 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
23106 // CHECK-32-EX: omp.dispatch.cond:
23107 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
23108 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
23109 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
23110 // CHECK-32-EX: omp.dispatch.body:
23111 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23112 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
23113 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23114 // CHECK-32-EX: omp.inner.for.cond:
23115 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359:![0-9]+]]
23116 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP359]]
23117 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
23118 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23119 // CHECK-32-EX: omp.inner.for.body:
23120 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
23121 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
23122 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23123 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP359]]
23124 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23125 // CHECK-32-EX: omp.body.continue:
23126 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23127 // CHECK-32-EX: omp.inner.for.inc:
23128 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
23129 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
23130 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP359]]
23131 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP360:![0-9]+]]
23132 // CHECK-32-EX: omp.inner.for.end:
23133 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
23134 // CHECK-32-EX: omp.dispatch.inc:
23135 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
23136 // CHECK-32-EX: omp.dispatch.end:
23137 // CHECK-32-EX-NEXT: ret void
23140 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121
23141 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23142 // CHECK-32-EX-NEXT: entry:
23143 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23144 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23145 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23146 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23147 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_kernel_environment, ptr [[DYN_PTR]])
23148 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
23149 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
23150 // CHECK-32-EX: user_code.entry:
23151 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
23152 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
23153 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
23154 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
23155 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
23156 // CHECK-32-EX-NEXT: ret void
23157 // CHECK-32-EX: worker.exit:
23158 // CHECK-32-EX-NEXT: ret void
23161 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined
23162 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
23163 // CHECK-32-EX-NEXT: entry:
23164 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23165 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23166 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23167 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23168 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
23169 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
23170 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23171 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23172 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23173 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23174 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23175 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23176 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23177 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23178 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23179 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23180 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23181 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23182 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23183 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23184 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23185 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23186 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23187 // CHECK-32-EX: cond.true:
23188 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23189 // CHECK-32-EX: cond.false:
23190 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23191 // CHECK-32-EX-NEXT: br label [[COND_END]]
23192 // CHECK-32-EX: cond.end:
23193 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23194 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23195 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23196 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23197 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23198 // CHECK-32-EX: omp.inner.for.cond:
23199 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23200 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23201 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23202 // CHECK-32-EX: omp.inner.for.body:
23203 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23204 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23205 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23206 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23207 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23208 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23209 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23210 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23211 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23212 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23213 // CHECK-32-EX: omp.inner.for.inc:
23214 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23215 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23216 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23217 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23218 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23219 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23220 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23221 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23222 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23223 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23224 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23225 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23226 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23227 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23228 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23229 // CHECK-32-EX: cond.true5:
23230 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23231 // CHECK-32-EX: cond.false6:
23232 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23233 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23234 // CHECK-32-EX: cond.end7:
23235 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23236 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23237 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23238 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23239 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23240 // CHECK-32-EX: omp.inner.for.end:
23241 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23242 // CHECK-32-EX: omp.loop.exit:
23243 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23244 // CHECK-32-EX-NEXT: ret void
23247 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l121_omp_outlined_omp_outlined
23248 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23249 // CHECK-32-EX-NEXT: entry:
23250 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23251 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23252 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23253 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23254 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23255 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23256 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23257 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23258 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23259 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23260 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23261 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23262 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23263 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23264 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23265 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23266 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23267 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23268 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23269 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23270 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23271 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23272 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23273 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23274 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23275 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23276 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
23277 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
23278 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
23279 // CHECK-32-EX: omp.dispatch.cond:
23280 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
23281 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
23282 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
23283 // CHECK-32-EX: omp.dispatch.body:
23284 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23285 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
23286 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23287 // CHECK-32-EX: omp.inner.for.cond:
23288 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362:![0-9]+]]
23289 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP362]]
23290 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
23291 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23292 // CHECK-32-EX: omp.inner.for.body:
23293 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
23294 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
23295 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23296 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP362]]
23297 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23298 // CHECK-32-EX: omp.body.continue:
23299 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23300 // CHECK-32-EX: omp.inner.for.inc:
23301 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
23302 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
23303 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP362]]
23304 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP363:![0-9]+]]
23305 // CHECK-32-EX: omp.inner.for.end:
23306 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
23307 // CHECK-32-EX: omp.dispatch.inc:
23308 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
23309 // CHECK-32-EX: omp.dispatch.end:
23310 // CHECK-32-EX-NEXT: ret void
23313 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125
23314 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23315 // CHECK-32-EX-NEXT: entry:
23316 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23317 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23318 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23319 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23320 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_kernel_environment, ptr [[DYN_PTR]])
23321 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
23322 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
23323 // CHECK-32-EX: user_code.entry:
23324 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
23325 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
23326 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
23327 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
23328 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
23329 // CHECK-32-EX-NEXT: ret void
23330 // CHECK-32-EX: worker.exit:
23331 // CHECK-32-EX-NEXT: ret void
23334 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined
23335 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
23336 // CHECK-32-EX-NEXT: entry:
23337 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23338 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23339 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23340 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23341 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
23342 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
23343 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23344 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23345 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23346 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23347 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23348 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23349 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23350 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23351 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23352 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23353 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23354 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23355 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23356 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23357 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23358 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23359 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23360 // CHECK-32-EX: cond.true:
23361 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23362 // CHECK-32-EX: cond.false:
23363 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23364 // CHECK-32-EX-NEXT: br label [[COND_END]]
23365 // CHECK-32-EX: cond.end:
23366 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23367 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23368 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23369 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23370 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23371 // CHECK-32-EX: omp.inner.for.cond:
23372 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23373 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23374 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23375 // CHECK-32-EX: omp.inner.for.body:
23376 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23377 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23378 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23379 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23380 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23381 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23382 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23383 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23384 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23385 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23386 // CHECK-32-EX: omp.inner.for.inc:
23387 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23388 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23389 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23390 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23391 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23392 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23393 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23394 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23395 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23396 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23397 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23398 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23399 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23400 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23401 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23402 // CHECK-32-EX: cond.true5:
23403 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23404 // CHECK-32-EX: cond.false6:
23405 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23406 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23407 // CHECK-32-EX: cond.end7:
23408 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23409 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23410 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23411 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23412 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23413 // CHECK-32-EX: omp.inner.for.end:
23414 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23415 // CHECK-32-EX: omp.loop.exit:
23416 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23417 // CHECK-32-EX-NEXT: ret void
23420 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l125_omp_outlined_omp_outlined
23421 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23422 // CHECK-32-EX-NEXT: entry:
23423 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23424 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23425 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23426 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23427 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23428 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23429 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23430 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23431 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23432 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23433 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23434 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23435 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23436 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23437 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23438 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23439 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23440 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23441 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23442 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23443 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23444 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23445 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23446 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23447 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
23448 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
23449 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23450 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23451 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23452 // CHECK-32-EX: omp.inner.for.cond:
23453 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23454 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23455 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
23456 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23457 // CHECK-32-EX: omp.inner.for.body:
23458 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23459 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
23460 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23461 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
23462 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23463 // CHECK-32-EX: omp.body.continue:
23464 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23465 // CHECK-32-EX: omp.inner.for.inc:
23466 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23467 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23468 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
23469 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
23470 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23471 // CHECK-32-EX: omp.inner.for.end:
23472 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23473 // CHECK-32-EX: omp.loop.exit:
23474 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
23475 // CHECK-32-EX-NEXT: ret void
23478 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130
23479 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23480 // CHECK-32-EX-NEXT: entry:
23481 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23482 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23483 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23484 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23485 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_kernel_environment, ptr [[DYN_PTR]])
23486 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
23487 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
23488 // CHECK-32-EX: user_code.entry:
23489 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
23490 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
23491 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
23492 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
23493 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
23494 // CHECK-32-EX-NEXT: ret void
23495 // CHECK-32-EX: worker.exit:
23496 // CHECK-32-EX-NEXT: ret void
23499 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined
23500 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
23501 // CHECK-32-EX-NEXT: entry:
23502 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23503 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23504 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23505 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23506 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
23507 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
23508 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23509 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23510 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23511 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23512 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23513 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23514 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23515 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23516 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23517 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23518 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23519 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23520 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23521 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23522 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23523 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23524 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23525 // CHECK-32-EX: cond.true:
23526 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23527 // CHECK-32-EX: cond.false:
23528 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23529 // CHECK-32-EX-NEXT: br label [[COND_END]]
23530 // CHECK-32-EX: cond.end:
23531 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23532 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23533 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23534 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23535 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23536 // CHECK-32-EX: omp.inner.for.cond:
23537 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23538 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23539 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23540 // CHECK-32-EX: omp.inner.for.body:
23541 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23542 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23543 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23544 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23545 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23546 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23547 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23548 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23549 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23550 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23551 // CHECK-32-EX: omp.inner.for.inc:
23552 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23553 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23554 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23555 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23556 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23557 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23558 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23559 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23560 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23561 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23562 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23563 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23564 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23565 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23566 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23567 // CHECK-32-EX: cond.true5:
23568 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23569 // CHECK-32-EX: cond.false6:
23570 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23571 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23572 // CHECK-32-EX: cond.end7:
23573 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23574 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23575 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23576 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23577 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23578 // CHECK-32-EX: omp.inner.for.end:
23579 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23580 // CHECK-32-EX: omp.loop.exit:
23581 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23582 // CHECK-32-EX-NEXT: ret void
23585 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l130_omp_outlined_omp_outlined
23586 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23587 // CHECK-32-EX-NEXT: entry:
23588 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23589 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23590 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23591 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23592 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23593 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23594 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23595 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23596 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23597 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23598 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23599 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23600 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23601 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23602 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23603 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23604 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23605 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23606 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23607 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23608 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23609 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23610 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23611 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23612 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
23613 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
23614 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23615 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
23616 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23617 // CHECK-32-EX: cond.true:
23618 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23619 // CHECK-32-EX: cond.false:
23620 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23621 // CHECK-32-EX-NEXT: br label [[COND_END]]
23622 // CHECK-32-EX: cond.end:
23623 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
23624 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
23625 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23626 // CHECK-32-EX-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
23627 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23628 // CHECK-32-EX: omp.inner.for.cond:
23629 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23630 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23631 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
23632 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23633 // CHECK-32-EX: omp.inner.for.body:
23634 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23635 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
23636 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23637 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
23638 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23639 // CHECK-32-EX: omp.body.continue:
23640 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23641 // CHECK-32-EX: omp.inner.for.inc:
23642 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23643 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP10]], 1
23644 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
23645 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23646 // CHECK-32-EX: omp.inner.for.end:
23647 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23648 // CHECK-32-EX: omp.loop.exit:
23649 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
23650 // CHECK-32-EX-NEXT: ret void
23653 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135
23654 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23655 // CHECK-32-EX-NEXT: entry:
23656 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23657 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23658 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23659 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23660 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_kernel_environment, ptr [[DYN_PTR]])
23661 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
23662 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
23663 // CHECK-32-EX: user_code.entry:
23664 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
23665 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
23666 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
23667 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
23668 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
23669 // CHECK-32-EX-NEXT: ret void
23670 // CHECK-32-EX: worker.exit:
23671 // CHECK-32-EX-NEXT: ret void
23674 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined
23675 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
23676 // CHECK-32-EX-NEXT: entry:
23677 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23678 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23679 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23680 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23681 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
23682 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
23683 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23684 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23685 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23686 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23687 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23688 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23689 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23690 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23691 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23692 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23693 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23694 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23695 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23696 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23697 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23698 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23699 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23700 // CHECK-32-EX: cond.true:
23701 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23702 // CHECK-32-EX: cond.false:
23703 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23704 // CHECK-32-EX-NEXT: br label [[COND_END]]
23705 // CHECK-32-EX: cond.end:
23706 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23707 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23708 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23709 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23710 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23711 // CHECK-32-EX: omp.inner.for.cond:
23712 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23713 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23714 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23715 // CHECK-32-EX: omp.inner.for.body:
23716 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23717 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23718 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23719 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23720 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23721 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23722 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23723 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23724 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23725 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23726 // CHECK-32-EX: omp.inner.for.inc:
23727 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23728 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23729 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23730 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23731 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23732 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23733 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23734 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23735 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23736 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23737 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23738 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23739 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23740 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23741 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23742 // CHECK-32-EX: cond.true5:
23743 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23744 // CHECK-32-EX: cond.false6:
23745 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23746 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23747 // CHECK-32-EX: cond.end7:
23748 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23749 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23750 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23751 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23752 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23753 // CHECK-32-EX: omp.inner.for.end:
23754 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23755 // CHECK-32-EX: omp.loop.exit:
23756 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23757 // CHECK-32-EX-NEXT: ret void
23760 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l135_omp_outlined_omp_outlined
23761 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23762 // CHECK-32-EX-NEXT: entry:
23763 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23764 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23765 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23766 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23767 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23768 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23769 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23770 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23771 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23772 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23773 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23774 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23775 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23776 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23777 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23778 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23779 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23780 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23781 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23782 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23783 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23784 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23785 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23786 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23787 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
23788 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP3]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
23789 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23790 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23791 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23792 // CHECK-32-EX: omp.inner.for.cond:
23793 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23794 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23795 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp ule i32 [[TMP5]], [[TMP6]]
23796 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23797 // CHECK-32-EX: omp.inner.for.body:
23798 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23799 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
23800 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23801 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
23802 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23803 // CHECK-32-EX: omp.body.continue:
23804 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23805 // CHECK-32-EX: omp.inner.for.inc:
23806 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23807 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23808 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP8]], [[TMP9]]
23809 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4
23810 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23811 // CHECK-32-EX: omp.inner.for.end:
23812 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23813 // CHECK-32-EX: omp.loop.exit:
23814 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP3]])
23815 // CHECK-32-EX-NEXT: ret void
23818 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140
23819 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23820 // CHECK-32-EX-NEXT: entry:
23821 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23822 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23823 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23824 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23825 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_kernel_environment, ptr [[DYN_PTR]])
23826 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
23827 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
23828 // CHECK-32-EX: user_code.entry:
23829 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
23830 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
23831 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
23832 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
23833 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
23834 // CHECK-32-EX-NEXT: ret void
23835 // CHECK-32-EX: worker.exit:
23836 // CHECK-32-EX-NEXT: ret void
23839 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined
23840 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
23841 // CHECK-32-EX-NEXT: entry:
23842 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23843 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23844 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23845 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23846 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
23847 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
23848 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23849 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23850 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23851 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
23852 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23853 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23854 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
23855 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
23856 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23857 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23858 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
23859 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23860 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
23861 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
23862 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23863 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
23864 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
23865 // CHECK-32-EX: cond.true:
23866 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
23867 // CHECK-32-EX: cond.false:
23868 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23869 // CHECK-32-EX-NEXT: br label [[COND_END]]
23870 // CHECK-32-EX: cond.end:
23871 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
23872 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
23873 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23874 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
23875 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23876 // CHECK-32-EX: omp.inner.for.cond:
23877 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23878 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
23879 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23880 // CHECK-32-EX: omp.inner.for.body:
23881 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23882 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23883 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
23884 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
23885 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
23886 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
23887 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
23888 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
23889 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
23890 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23891 // CHECK-32-EX: omp.inner.for.inc:
23892 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
23893 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23894 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
23895 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
23896 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23897 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23898 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
23899 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
23900 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23901 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
23902 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
23903 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
23904 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23905 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
23906 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
23907 // CHECK-32-EX: cond.true5:
23908 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
23909 // CHECK-32-EX: cond.false6:
23910 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
23911 // CHECK-32-EX-NEXT: br label [[COND_END7]]
23912 // CHECK-32-EX: cond.end7:
23913 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
23914 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
23915 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
23916 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
23917 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
23918 // CHECK-32-EX: omp.inner.for.end:
23919 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
23920 // CHECK-32-EX: omp.loop.exit:
23921 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
23922 // CHECK-32-EX-NEXT: ret void
23925 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l140_omp_outlined_omp_outlined
23926 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
23927 // CHECK-32-EX-NEXT: entry:
23928 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
23929 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
23930 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
23931 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
23932 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
23933 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
23934 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
23935 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
23936 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
23937 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
23938 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
23939 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
23940 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
23941 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23942 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23943 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
23944 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
23945 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
23946 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
23947 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
23948 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
23949 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
23950 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
23951 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23952 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
23953 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
23954 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
23955 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741862, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
23956 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
23957 // CHECK-32-EX: omp.dispatch.cond:
23958 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
23959 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
23960 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
23961 // CHECK-32-EX: omp.dispatch.body:
23962 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
23963 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
23964 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
23965 // CHECK-32-EX: omp.inner.for.cond:
23966 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365:![0-9]+]]
23967 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP365]]
23968 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
23969 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
23970 // CHECK-32-EX: omp.inner.for.body:
23971 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
23972 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
23973 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
23974 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP365]]
23975 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
23976 // CHECK-32-EX: omp.body.continue:
23977 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
23978 // CHECK-32-EX: omp.inner.for.inc:
23979 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
23980 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
23981 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP365]]
23982 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP366:![0-9]+]]
23983 // CHECK-32-EX: omp.inner.for.end:
23984 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
23985 // CHECK-32-EX: omp.dispatch.inc:
23986 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
23987 // CHECK-32-EX: omp.dispatch.end:
23988 // CHECK-32-EX-NEXT: ret void
23991 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145
23992 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
23993 // CHECK-32-EX-NEXT: entry:
23994 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
23995 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
23996 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
23997 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
23998 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_kernel_environment, ptr [[DYN_PTR]])
23999 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24000 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24001 // CHECK-32-EX: user_code.entry:
24002 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24003 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
24004 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
24005 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
24006 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24007 // CHECK-32-EX-NEXT: ret void
24008 // CHECK-32-EX: worker.exit:
24009 // CHECK-32-EX-NEXT: ret void
24012 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined
24013 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24014 // CHECK-32-EX-NEXT: entry:
24015 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24016 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24017 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24018 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24019 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
24020 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
24021 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24022 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24023 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24024 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
24025 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24026 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24027 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
24028 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
24029 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24030 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24031 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
24032 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24033 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24034 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
24035 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24036 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24037 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24038 // CHECK-32-EX: cond.true:
24039 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24040 // CHECK-32-EX: cond.false:
24041 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24042 // CHECK-32-EX-NEXT: br label [[COND_END]]
24043 // CHECK-32-EX: cond.end:
24044 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24045 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
24046 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24047 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24048 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24049 // CHECK-32-EX: omp.inner.for.cond:
24050 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24051 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
24052 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24053 // CHECK-32-EX: omp.inner.for.body:
24054 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24055 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24056 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
24057 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
24058 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
24059 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
24060 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
24061 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
24062 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
24063 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24064 // CHECK-32-EX: omp.inner.for.inc:
24065 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24066 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24067 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
24068 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
24069 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24070 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24071 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
24072 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
24073 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24074 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24075 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
24076 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
24077 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24078 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
24079 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
24080 // CHECK-32-EX: cond.true5:
24081 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
24082 // CHECK-32-EX: cond.false6:
24083 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24084 // CHECK-32-EX-NEXT: br label [[COND_END7]]
24085 // CHECK-32-EX: cond.end7:
24086 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
24087 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
24088 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24089 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
24090 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24091 // CHECK-32-EX: omp.inner.for.end:
24092 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
24093 // CHECK-32-EX: omp.loop.exit:
24094 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
24095 // CHECK-32-EX-NEXT: ret void
24098 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l145_omp_outlined_omp_outlined
24099 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
24100 // CHECK-32-EX-NEXT: entry:
24101 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24102 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24103 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
24104 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
24105 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24106 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24107 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24108 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24109 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24110 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24111 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24112 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24113 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24114 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24115 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24116 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24117 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24118 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24119 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24120 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
24121 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
24122 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24123 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24124 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24125 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24126 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24127 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
24128 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741861, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
24129 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24130 // CHECK-32-EX: omp.dispatch.cond:
24131 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24132 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
24133 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24134 // CHECK-32-EX: omp.dispatch.body:
24135 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24136 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
24137 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24138 // CHECK-32-EX: omp.inner.for.cond:
24139 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368:![0-9]+]]
24140 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP368]]
24141 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
24142 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24143 // CHECK-32-EX: omp.inner.for.body:
24144 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
24145 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
24146 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24147 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP368]]
24148 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24149 // CHECK-32-EX: omp.body.continue:
24150 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24151 // CHECK-32-EX: omp.inner.for.inc:
24152 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
24153 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
24154 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP368]]
24155 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP369:![0-9]+]]
24156 // CHECK-32-EX: omp.inner.for.end:
24157 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24158 // CHECK-32-EX: omp.dispatch.inc:
24159 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24160 // CHECK-32-EX: omp.dispatch.end:
24161 // CHECK-32-EX-NEXT: ret void
24164 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150
24165 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
24166 // CHECK-32-EX-NEXT: entry:
24167 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24168 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
24169 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
24170 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24171 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_kernel_environment, ptr [[DYN_PTR]])
24172 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24173 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24174 // CHECK-32-EX: user_code.entry:
24175 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24176 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
24177 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
24178 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
24179 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24180 // CHECK-32-EX-NEXT: ret void
24181 // CHECK-32-EX: worker.exit:
24182 // CHECK-32-EX-NEXT: ret void
24185 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined
24186 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24187 // CHECK-32-EX-NEXT: entry:
24188 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24189 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24190 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24191 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24192 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
24193 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
24194 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24195 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24196 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24197 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
24198 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24199 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24200 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
24201 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
24202 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24203 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24204 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
24205 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24206 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24207 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
24208 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24209 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24210 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24211 // CHECK-32-EX: cond.true:
24212 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24213 // CHECK-32-EX: cond.false:
24214 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24215 // CHECK-32-EX-NEXT: br label [[COND_END]]
24216 // CHECK-32-EX: cond.end:
24217 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24218 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
24219 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24220 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24221 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24222 // CHECK-32-EX: omp.inner.for.cond:
24223 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24224 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
24225 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24226 // CHECK-32-EX: omp.inner.for.body:
24227 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24228 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24229 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
24230 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
24231 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
24232 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
24233 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
24234 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
24235 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
24236 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24237 // CHECK-32-EX: omp.inner.for.inc:
24238 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24239 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24240 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
24241 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
24242 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24243 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24244 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
24245 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
24246 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24247 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24248 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
24249 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
24250 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24251 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
24252 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
24253 // CHECK-32-EX: cond.true5:
24254 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
24255 // CHECK-32-EX: cond.false6:
24256 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24257 // CHECK-32-EX-NEXT: br label [[COND_END7]]
24258 // CHECK-32-EX: cond.end7:
24259 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
24260 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
24261 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24262 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
24263 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24264 // CHECK-32-EX: omp.inner.for.end:
24265 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
24266 // CHECK-32-EX: omp.loop.exit:
24267 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
24268 // CHECK-32-EX-NEXT: ret void
24271 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l150_omp_outlined_omp_outlined
24272 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
24273 // CHECK-32-EX-NEXT: entry:
24274 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24275 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24276 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
24277 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
24278 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24279 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24280 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24281 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24282 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24283 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24284 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24285 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24286 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24287 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24288 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24289 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24290 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24291 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24292 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24293 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
24294 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
24295 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24296 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24297 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24298 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24299 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24300 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
24301 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741859, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
24302 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24303 // CHECK-32-EX: omp.dispatch.cond:
24304 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24305 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
24306 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24307 // CHECK-32-EX: omp.dispatch.body:
24308 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24309 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
24310 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24311 // CHECK-32-EX: omp.inner.for.cond:
24312 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371:![0-9]+]]
24313 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP371]]
24314 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
24315 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24316 // CHECK-32-EX: omp.inner.for.body:
24317 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
24318 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
24319 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24320 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP371]]
24321 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24322 // CHECK-32-EX: omp.body.continue:
24323 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24324 // CHECK-32-EX: omp.inner.for.inc:
24325 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
24326 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
24327 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP371]]
24328 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP372:![0-9]+]]
24329 // CHECK-32-EX: omp.inner.for.end:
24330 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24331 // CHECK-32-EX: omp.dispatch.inc:
24332 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24333 // CHECK-32-EX: omp.dispatch.end:
24334 // CHECK-32-EX-NEXT: ret void
24337 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155
24338 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR0]] {
24339 // CHECK-32-EX-NEXT: entry:
24340 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24341 // CHECK-32-EX-NEXT: [[DOTZERO_ADDR:%.*]] = alloca i32, align 4
24342 // CHECK-32-EX-NEXT: [[DOTTHREADID_TEMP_:%.*]] = alloca i32, align 4
24343 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24344 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_kernel_environment, ptr [[DYN_PTR]])
24345 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24346 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24347 // CHECK-32-EX: user_code.entry:
24348 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24349 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTZERO_ADDR]], align 4
24350 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTTHREADID_TEMP_]], align 4
24351 // CHECK-32-EX-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined(ptr [[DOTTHREADID_TEMP_]], ptr [[DOTZERO_ADDR]]) #[[ATTR2]]
24352 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24353 // CHECK-32-EX-NEXT: ret void
24354 // CHECK-32-EX: worker.exit:
24355 // CHECK-32-EX-NEXT: ret void
24358 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined
24359 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24360 // CHECK-32-EX-NEXT: entry:
24361 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24362 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24363 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24364 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24365 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
24366 // CHECK-32-EX-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
24367 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24368 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24369 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24370 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [2 x ptr], align 4
24371 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24372 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24373 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
24374 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
24375 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24376 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24377 // CHECK-32-EX-NEXT: [[NVPTX_NUM_THREADS:%.*]] = call i32 @__kmpc_get_hardware_num_threads_in_block()
24378 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24379 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24380 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_init_4(ptr @[[GLOB2]], i32 [[TMP1]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[NVPTX_NUM_THREADS]])
24381 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24382 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24383 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24384 // CHECK-32-EX: cond.true:
24385 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24386 // CHECK-32-EX: cond.false:
24387 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24388 // CHECK-32-EX-NEXT: br label [[COND_END]]
24389 // CHECK-32-EX: cond.end:
24390 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24391 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
24392 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24393 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24394 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24395 // CHECK-32-EX: omp.inner.for.cond:
24396 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24397 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP5]], 10
24398 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24399 // CHECK-32-EX: omp.inner.for.body:
24400 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24401 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24402 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 0
24403 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = inttoptr i32 [[TMP6]] to ptr
24404 // CHECK-32-EX-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 4
24405 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = getelementptr inbounds [2 x ptr], ptr [[CAPTURED_VARS_ADDRS]], i32 0, i32 1
24406 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = inttoptr i32 [[TMP7]] to ptr
24407 // CHECK-32-EX-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4
24408 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 2)
24409 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24410 // CHECK-32-EX: omp.inner.for.inc:
24411 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24412 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24413 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
24414 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
24415 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24416 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24417 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
24418 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
24419 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24420 // CHECK-32-EX-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24421 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
24422 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
24423 // CHECK-32-EX-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24424 // CHECK-32-EX-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
24425 // CHECK-32-EX-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
24426 // CHECK-32-EX: cond.true5:
24427 // CHECK-32-EX-NEXT: br label [[COND_END7:%.*]]
24428 // CHECK-32-EX: cond.false6:
24429 // CHECK-32-EX-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
24430 // CHECK-32-EX-NEXT: br label [[COND_END7]]
24431 // CHECK-32-EX: cond.end7:
24432 // CHECK-32-EX-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
24433 // CHECK-32-EX-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
24434 // CHECK-32-EX-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
24435 // CHECK-32-EX-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
24436 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24437 // CHECK-32-EX: omp.inner.for.end:
24438 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
24439 // CHECK-32-EX: omp.loop.exit:
24440 // CHECK-32-EX-NEXT: call void @__kmpc_distribute_static_fini(ptr @[[GLOB2]], i32 [[TMP1]])
24441 // CHECK-32-EX-NEXT: ret void
24444 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l155_omp_outlined_omp_outlined
24445 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]]) #[[ATTR1]] {
24446 // CHECK-32-EX-NEXT: entry:
24447 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24448 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24449 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
24450 // CHECK-32-EX-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
24451 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24452 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24453 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24454 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24455 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24456 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24457 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24458 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24459 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24460 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24461 // CHECK-32-EX-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24462 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24463 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24464 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
24465 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
24466 // CHECK-32-EX-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_LB]], align 4
24467 // CHECK-32-EX-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_UB]], align 4
24468 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24469 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24470 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24471 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24472 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24473 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
24474 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP5]], i32 1073741860, i32 [[TMP2]], i32 [[TMP3]], i32 1, i32 1)
24475 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24476 // CHECK-32-EX: omp.dispatch.cond:
24477 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP5]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24478 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP6]], 0
24479 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24480 // CHECK-32-EX: omp.dispatch.body:
24481 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24482 // CHECK-32-EX-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
24483 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24484 // CHECK-32-EX: omp.inner.for.cond:
24485 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374:![0-9]+]]
24486 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP374]]
24487 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
24488 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24489 // CHECK-32-EX: omp.inner.for.body:
24490 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
24491 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
24492 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24493 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP374]]
24494 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24495 // CHECK-32-EX: omp.body.continue:
24496 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24497 // CHECK-32-EX: omp.inner.for.inc:
24498 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
24499 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP11]], 1
24500 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP374]]
24501 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP375:![0-9]+]]
24502 // CHECK-32-EX: omp.inner.for.end:
24503 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24504 // CHECK-32-EX: omp.dispatch.inc:
24505 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24506 // CHECK-32-EX: omp.dispatch.end:
24507 // CHECK-32-EX-NEXT: ret void
24510 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160
24511 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8:[0-9]+]] {
24512 // CHECK-32-EX-NEXT: entry:
24513 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24514 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
24515 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24516 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24517 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
24518 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_kernel_environment, ptr [[DYN_PTR]])
24519 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24520 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24521 // CHECK-32-EX: user_code.entry:
24522 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24523 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
24524 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
24525 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
24526 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24527 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24528 // CHECK-32-EX-NEXT: ret void
24529 // CHECK-32-EX: worker.exit:
24530 // CHECK-32-EX-NEXT: ret void
24533 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l160_omp_outlined
24534 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24535 // CHECK-32-EX-NEXT: entry:
24536 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24537 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24538 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24539 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24540 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24541 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24542 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24543 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24544 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24545 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24546 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24547 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24548 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24549 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24550 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24551 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24552 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24553 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
24554 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24555 // CHECK-32-EX: omp.dispatch.cond:
24556 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24557 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24558 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24559 // CHECK-32-EX: cond.true:
24560 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24561 // CHECK-32-EX: cond.false:
24562 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24563 // CHECK-32-EX-NEXT: br label [[COND_END]]
24564 // CHECK-32-EX: cond.end:
24565 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24566 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
24567 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24568 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24569 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24570 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24571 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
24572 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24573 // CHECK-32-EX: omp.dispatch.body:
24574 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24575 // CHECK-32-EX: omp.inner.for.cond:
24576 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24577 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24578 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
24579 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24580 // CHECK-32-EX: omp.inner.for.body:
24581 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24582 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
24583 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24584 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
24585 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24586 // CHECK-32-EX: omp.body.continue:
24587 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24588 // CHECK-32-EX: omp.inner.for.inc:
24589 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24590 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
24591 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
24592 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24593 // CHECK-32-EX: omp.inner.for.end:
24594 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24595 // CHECK-32-EX: omp.dispatch.inc:
24596 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24597 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24598 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
24599 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
24600 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24601 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24602 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
24603 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
24604 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24605 // CHECK-32-EX: omp.dispatch.end:
24606 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
24607 // CHECK-32-EX-NEXT: ret void
24610 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163
24611 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
24612 // CHECK-32-EX-NEXT: entry:
24613 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24614 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24615 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24616 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_kernel_environment, ptr [[DYN_PTR]])
24617 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24618 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24619 // CHECK-32-EX: user_code.entry:
24620 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24621 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24622 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24623 // CHECK-32-EX-NEXT: ret void
24624 // CHECK-32-EX: worker.exit:
24625 // CHECK-32-EX-NEXT: ret void
24628 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l163_omp_outlined
24629 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24630 // CHECK-32-EX-NEXT: entry:
24631 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24632 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24633 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24634 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24635 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24636 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24637 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24638 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24639 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24640 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24641 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24642 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24643 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24644 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24645 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24646 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24647 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24648 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
24649 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24650 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24651 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24652 // CHECK-32-EX: cond.true:
24653 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24654 // CHECK-32-EX: cond.false:
24655 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24656 // CHECK-32-EX-NEXT: br label [[COND_END]]
24657 // CHECK-32-EX: cond.end:
24658 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24659 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
24660 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24661 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24662 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24663 // CHECK-32-EX: omp.inner.for.cond:
24664 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24665 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24666 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
24667 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24668 // CHECK-32-EX: omp.inner.for.body:
24669 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24670 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
24671 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24672 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
24673 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24674 // CHECK-32-EX: omp.body.continue:
24675 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24676 // CHECK-32-EX: omp.inner.for.inc:
24677 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24678 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
24679 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
24680 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24681 // CHECK-32-EX: omp.inner.for.end:
24682 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
24683 // CHECK-32-EX: omp.loop.exit:
24684 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
24685 // CHECK-32-EX-NEXT: ret void
24688 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166
24689 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
24690 // CHECK-32-EX-NEXT: entry:
24691 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24692 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24693 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24694 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_kernel_environment, ptr [[DYN_PTR]])
24695 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24696 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24697 // CHECK-32-EX: user_code.entry:
24698 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24699 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24700 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24701 // CHECK-32-EX-NEXT: ret void
24702 // CHECK-32-EX: worker.exit:
24703 // CHECK-32-EX-NEXT: ret void
24706 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l166_omp_outlined
24707 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24708 // CHECK-32-EX-NEXT: entry:
24709 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24710 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24711 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24712 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24713 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24714 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24715 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24716 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24717 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24718 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24719 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24720 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24721 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24722 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24723 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24724 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24725 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24726 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
24727 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24728 // CHECK-32-EX: omp.dispatch.cond:
24729 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24730 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
24731 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
24732 // CHECK-32-EX: cond.true:
24733 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
24734 // CHECK-32-EX: cond.false:
24735 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24736 // CHECK-32-EX-NEXT: br label [[COND_END]]
24737 // CHECK-32-EX: cond.end:
24738 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
24739 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
24740 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24741 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
24742 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24743 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24744 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
24745 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24746 // CHECK-32-EX: omp.dispatch.body:
24747 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24748 // CHECK-32-EX: omp.inner.for.cond:
24749 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24750 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24751 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
24752 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24753 // CHECK-32-EX: omp.inner.for.body:
24754 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24755 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
24756 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24757 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
24758 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24759 // CHECK-32-EX: omp.body.continue:
24760 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24761 // CHECK-32-EX: omp.inner.for.inc:
24762 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
24763 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
24764 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
24765 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
24766 // CHECK-32-EX: omp.inner.for.end:
24767 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24768 // CHECK-32-EX: omp.dispatch.inc:
24769 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24770 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24771 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
24772 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
24773 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
24774 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
24775 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
24776 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
24777 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24778 // CHECK-32-EX: omp.dispatch.end:
24779 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
24780 // CHECK-32-EX-NEXT: ret void
24783 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169
24784 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
24785 // CHECK-32-EX-NEXT: entry:
24786 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24787 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24788 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24789 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_kernel_environment, ptr [[DYN_PTR]])
24790 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24791 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24792 // CHECK-32-EX: user_code.entry:
24793 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24794 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24795 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24796 // CHECK-32-EX-NEXT: ret void
24797 // CHECK-32-EX: worker.exit:
24798 // CHECK-32-EX-NEXT: ret void
24801 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l169_omp_outlined
24802 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24803 // CHECK-32-EX-NEXT: entry:
24804 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24805 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24806 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24807 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24808 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24809 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24810 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24811 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24812 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24813 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24814 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24815 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24816 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24817 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24818 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24819 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24820 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24821 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
24822 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24823 // CHECK-32-EX: omp.dispatch.cond:
24824 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24825 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
24826 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24827 // CHECK-32-EX: omp.dispatch.body:
24828 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24829 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
24830 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24831 // CHECK-32-EX: omp.inner.for.cond:
24832 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377:![0-9]+]]
24833 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP377]]
24834 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
24835 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24836 // CHECK-32-EX: omp.inner.for.body:
24837 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
24838 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
24839 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24840 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP377]]
24841 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24842 // CHECK-32-EX: omp.body.continue:
24843 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24844 // CHECK-32-EX: omp.inner.for.inc:
24845 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
24846 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
24847 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP377]]
24848 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP378:![0-9]+]]
24849 // CHECK-32-EX: omp.inner.for.end:
24850 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24851 // CHECK-32-EX: omp.dispatch.inc:
24852 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24853 // CHECK-32-EX: omp.dispatch.end:
24854 // CHECK-32-EX-NEXT: ret void
24857 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172
24858 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
24859 // CHECK-32-EX-NEXT: entry:
24860 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24861 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24862 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24863 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_kernel_environment, ptr [[DYN_PTR]])
24864 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24865 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24866 // CHECK-32-EX: user_code.entry:
24867 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24868 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24869 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24870 // CHECK-32-EX-NEXT: ret void
24871 // CHECK-32-EX: worker.exit:
24872 // CHECK-32-EX-NEXT: ret void
24875 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l172_omp_outlined
24876 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24877 // CHECK-32-EX-NEXT: entry:
24878 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24879 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24880 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24881 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24882 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24883 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24884 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24885 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24886 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24887 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24888 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24889 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24890 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24891 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24892 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24893 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24894 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24895 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
24896 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24897 // CHECK-32-EX: omp.dispatch.cond:
24898 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24899 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
24900 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24901 // CHECK-32-EX: omp.dispatch.body:
24902 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24903 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
24904 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24905 // CHECK-32-EX: omp.inner.for.cond:
24906 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380:![0-9]+]]
24907 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP380]]
24908 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
24909 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24910 // CHECK-32-EX: omp.inner.for.body:
24911 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
24912 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
24913 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24914 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP380]]
24915 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24916 // CHECK-32-EX: omp.body.continue:
24917 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24918 // CHECK-32-EX: omp.inner.for.inc:
24919 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
24920 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
24921 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP380]]
24922 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP381:![0-9]+]]
24923 // CHECK-32-EX: omp.inner.for.end:
24924 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24925 // CHECK-32-EX: omp.dispatch.inc:
24926 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
24927 // CHECK-32-EX: omp.dispatch.end:
24928 // CHECK-32-EX-NEXT: ret void
24931 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175
24932 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
24933 // CHECK-32-EX-NEXT: entry:
24934 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
24935 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
24936 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
24937 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_kernel_environment, ptr [[DYN_PTR]])
24938 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
24939 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
24940 // CHECK-32-EX: user_code.entry:
24941 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
24942 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
24943 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
24944 // CHECK-32-EX-NEXT: ret void
24945 // CHECK-32-EX: worker.exit:
24946 // CHECK-32-EX-NEXT: ret void
24949 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l175_omp_outlined
24950 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
24951 // CHECK-32-EX-NEXT: entry:
24952 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
24953 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
24954 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
24955 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
24956 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
24957 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
24958 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
24959 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
24960 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
24961 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
24962 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
24963 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
24964 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
24965 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
24966 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
24967 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
24968 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
24969 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
24970 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
24971 // CHECK-32-EX: omp.dispatch.cond:
24972 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
24973 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
24974 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
24975 // CHECK-32-EX: omp.dispatch.body:
24976 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
24977 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
24978 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
24979 // CHECK-32-EX: omp.inner.for.cond:
24980 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383:![0-9]+]]
24981 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP383]]
24982 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
24983 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
24984 // CHECK-32-EX: omp.inner.for.body:
24985 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
24986 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
24987 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
24988 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP383]]
24989 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
24990 // CHECK-32-EX: omp.body.continue:
24991 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
24992 // CHECK-32-EX: omp.inner.for.inc:
24993 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
24994 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
24995 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP383]]
24996 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP384:![0-9]+]]
24997 // CHECK-32-EX: omp.inner.for.end:
24998 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
24999 // CHECK-32-EX: omp.dispatch.inc:
25000 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25001 // CHECK-32-EX: omp.dispatch.end:
25002 // CHECK-32-EX-NEXT: ret void
25005 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178
25006 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25007 // CHECK-32-EX-NEXT: entry:
25008 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25009 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25010 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25011 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_kernel_environment, ptr [[DYN_PTR]])
25012 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25013 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25014 // CHECK-32-EX: user_code.entry:
25015 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25016 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25017 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25018 // CHECK-32-EX-NEXT: ret void
25019 // CHECK-32-EX: worker.exit:
25020 // CHECK-32-EX-NEXT: ret void
25023 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l178_omp_outlined
25024 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25025 // CHECK-32-EX-NEXT: entry:
25026 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25027 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25028 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25029 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25030 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25031 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25032 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25033 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25034 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25035 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25036 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25037 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25038 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25039 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25040 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25041 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25042 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25043 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
25044 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25045 // CHECK-32-EX: omp.dispatch.cond:
25046 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25047 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25048 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25049 // CHECK-32-EX: omp.dispatch.body:
25050 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25051 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25052 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25053 // CHECK-32-EX: omp.inner.for.cond:
25054 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386:![0-9]+]]
25055 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP386]]
25056 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25057 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25058 // CHECK-32-EX: omp.inner.for.body:
25059 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
25060 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25061 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25062 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP386]]
25063 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25064 // CHECK-32-EX: omp.body.continue:
25065 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25066 // CHECK-32-EX: omp.inner.for.inc:
25067 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
25068 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25069 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP386]]
25070 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP387:![0-9]+]]
25071 // CHECK-32-EX: omp.inner.for.end:
25072 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25073 // CHECK-32-EX: omp.dispatch.inc:
25074 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25075 // CHECK-32-EX: omp.dispatch.end:
25076 // CHECK-32-EX-NEXT: ret void
25079 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181
25080 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR8]] {
25081 // CHECK-32-EX-NEXT: entry:
25082 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25083 // CHECK-32-EX-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
25084 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25085 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25086 // CHECK-32-EX-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
25087 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_kernel_environment, ptr [[DYN_PTR]])
25088 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25089 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25090 // CHECK-32-EX: user_code.entry:
25091 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25092 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i8, ptr [[DOTCAPTURE_EXPR__ADDR]], align 1
25093 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = trunc i8 [[TMP2]] to i1
25094 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = zext i1 [[TOBOOL]] to i32
25095 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 [[TMP3]], i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25096 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25097 // CHECK-32-EX-NEXT: ret void
25098 // CHECK-32-EX: worker.exit:
25099 // CHECK-32-EX-NEXT: ret void
25102 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l181_omp_outlined
25103 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25104 // CHECK-32-EX-NEXT: entry:
25105 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25106 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25107 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25108 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25109 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25110 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25111 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25112 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25113 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25114 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25115 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25116 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25117 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25118 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25119 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25120 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25121 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25122 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
25123 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25124 // CHECK-32-EX: omp.dispatch.cond:
25125 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25126 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
25127 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
25128 // CHECK-32-EX: cond.true:
25129 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
25130 // CHECK-32-EX: cond.false:
25131 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25132 // CHECK-32-EX-NEXT: br label [[COND_END]]
25133 // CHECK-32-EX: cond.end:
25134 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
25135 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
25136 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25137 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
25138 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
25139 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25140 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
25141 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25142 // CHECK-32-EX: omp.dispatch.body:
25143 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25144 // CHECK-32-EX: omp.inner.for.cond:
25145 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389:![0-9]+]]
25146 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP389]]
25147 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
25148 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25149 // CHECK-32-EX: omp.inner.for.body:
25150 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
25151 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
25152 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25153 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP389]]
25154 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25155 // CHECK-32-EX: omp.body.continue:
25156 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25157 // CHECK-32-EX: omp.inner.for.inc:
25158 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
25159 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
25160 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP389]]
25161 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP390:![0-9]+]]
25162 // CHECK-32-EX: omp.inner.for.end:
25163 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25164 // CHECK-32-EX: omp.dispatch.inc:
25165 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25166 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25167 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
25168 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
25169 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25170 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25171 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
25172 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
25173 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25174 // CHECK-32-EX: omp.dispatch.end:
25175 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
25176 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25177 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
25178 // CHECK-32-EX-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25179 // CHECK-32-EX: .omp.final.then:
25180 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25181 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25182 // CHECK-32-EX: .omp.final.done:
25183 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4:[0-9]+]], i32 [[TMP1]])
25184 // CHECK-32-EX-NEXT: ret void
25187 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185
25188 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25189 // CHECK-32-EX-NEXT: entry:
25190 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25191 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25192 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25193 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_kernel_environment, ptr [[DYN_PTR]])
25194 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25195 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25196 // CHECK-32-EX: user_code.entry:
25197 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25198 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25199 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25200 // CHECK-32-EX-NEXT: ret void
25201 // CHECK-32-EX: worker.exit:
25202 // CHECK-32-EX-NEXT: ret void
25205 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l185_omp_outlined
25206 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25207 // CHECK-32-EX-NEXT: entry:
25208 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25209 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25210 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25211 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25212 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25213 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25214 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25215 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25216 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25217 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25218 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25219 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25220 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25221 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25222 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25223 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25224 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25225 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
25226 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25227 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
25228 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
25229 // CHECK-32-EX: cond.true:
25230 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
25231 // CHECK-32-EX: cond.false:
25232 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25233 // CHECK-32-EX-NEXT: br label [[COND_END]]
25234 // CHECK-32-EX: cond.end:
25235 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
25236 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
25237 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25238 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
25239 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25240 // CHECK-32-EX: omp.inner.for.cond:
25241 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392:![0-9]+]]
25242 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP392]]
25243 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
25244 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25245 // CHECK-32-EX: omp.inner.for.body:
25246 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
25247 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
25248 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25249 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP392]]
25250 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25251 // CHECK-32-EX: omp.body.continue:
25252 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25253 // CHECK-32-EX: omp.inner.for.inc:
25254 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
25255 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
25256 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP392]]
25257 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP393:![0-9]+]]
25258 // CHECK-32-EX: omp.inner.for.end:
25259 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
25260 // CHECK-32-EX: omp.loop.exit:
25261 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
25262 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25263 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
25264 // CHECK-32-EX-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25265 // CHECK-32-EX: .omp.final.then:
25266 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25267 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25268 // CHECK-32-EX: .omp.final.done:
25269 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25270 // CHECK-32-EX-NEXT: ret void
25273 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189
25274 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25275 // CHECK-32-EX-NEXT: entry:
25276 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25277 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25278 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25279 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_kernel_environment, ptr [[DYN_PTR]])
25280 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25281 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25282 // CHECK-32-EX: user_code.entry:
25283 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25284 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25285 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25286 // CHECK-32-EX-NEXT: ret void
25287 // CHECK-32-EX: worker.exit:
25288 // CHECK-32-EX-NEXT: ret void
25291 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l189_omp_outlined
25292 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25293 // CHECK-32-EX-NEXT: entry:
25294 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25295 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25296 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25297 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25298 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25299 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25300 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25301 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25302 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25303 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25304 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25305 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25306 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25307 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25308 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25309 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25310 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25311 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
25312 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25313 // CHECK-32-EX: omp.dispatch.cond:
25314 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25315 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
25316 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
25317 // CHECK-32-EX: cond.true:
25318 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
25319 // CHECK-32-EX: cond.false:
25320 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25321 // CHECK-32-EX-NEXT: br label [[COND_END]]
25322 // CHECK-32-EX: cond.end:
25323 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
25324 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
25325 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25326 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
25327 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
25328 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25329 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
25330 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25331 // CHECK-32-EX: omp.dispatch.body:
25332 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25333 // CHECK-32-EX: omp.inner.for.cond:
25334 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395:![0-9]+]]
25335 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP395]]
25336 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
25337 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25338 // CHECK-32-EX: omp.inner.for.body:
25339 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
25340 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
25341 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25342 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP395]]
25343 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25344 // CHECK-32-EX: omp.body.continue:
25345 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25346 // CHECK-32-EX: omp.inner.for.inc:
25347 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
25348 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
25349 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP395]]
25350 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP396:![0-9]+]]
25351 // CHECK-32-EX: omp.inner.for.end:
25352 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25353 // CHECK-32-EX: omp.dispatch.inc:
25354 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25355 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25356 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
25357 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
25358 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25359 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25360 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
25361 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
25362 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25363 // CHECK-32-EX: omp.dispatch.end:
25364 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
25365 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25366 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
25367 // CHECK-32-EX-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25368 // CHECK-32-EX: .omp.final.then:
25369 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25370 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25371 // CHECK-32-EX: .omp.final.done:
25372 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25373 // CHECK-32-EX-NEXT: ret void
25376 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193
25377 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25378 // CHECK-32-EX-NEXT: entry:
25379 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25380 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25381 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25382 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_kernel_environment, ptr [[DYN_PTR]])
25383 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25384 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25385 // CHECK-32-EX: user_code.entry:
25386 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25387 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25388 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25389 // CHECK-32-EX-NEXT: ret void
25390 // CHECK-32-EX: worker.exit:
25391 // CHECK-32-EX-NEXT: ret void
25394 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l193_omp_outlined
25395 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25396 // CHECK-32-EX-NEXT: entry:
25397 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25398 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25399 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25400 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25401 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25402 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25403 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25404 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25405 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25406 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25407 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25408 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25409 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25410 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25411 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25412 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25413 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25414 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
25415 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25416 // CHECK-32-EX: omp.dispatch.cond:
25417 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25418 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25419 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25420 // CHECK-32-EX: omp.dispatch.body:
25421 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25422 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25423 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25424 // CHECK-32-EX: omp.inner.for.cond:
25425 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398:![0-9]+]]
25426 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP398]]
25427 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25428 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25429 // CHECK-32-EX: omp.inner.for.body:
25430 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
25431 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25432 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25433 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP398]]
25434 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25435 // CHECK-32-EX: omp.body.continue:
25436 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25437 // CHECK-32-EX: omp.inner.for.inc:
25438 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
25439 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25440 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP398]]
25441 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP399:![0-9]+]]
25442 // CHECK-32-EX: omp.inner.for.end:
25443 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25444 // CHECK-32-EX: omp.dispatch.inc:
25445 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25446 // CHECK-32-EX: omp.dispatch.end:
25447 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25448 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
25449 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25450 // CHECK-32-EX: .omp.final.then:
25451 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25452 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25453 // CHECK-32-EX: .omp.final.done:
25454 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25455 // CHECK-32-EX-NEXT: ret void
25458 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197
25459 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25460 // CHECK-32-EX-NEXT: entry:
25461 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25462 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25463 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25464 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_kernel_environment, ptr [[DYN_PTR]])
25465 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25466 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25467 // CHECK-32-EX: user_code.entry:
25468 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25469 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25470 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25471 // CHECK-32-EX-NEXT: ret void
25472 // CHECK-32-EX: worker.exit:
25473 // CHECK-32-EX-NEXT: ret void
25476 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l197_omp_outlined
25477 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25478 // CHECK-32-EX-NEXT: entry:
25479 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25480 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25481 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25482 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25483 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25484 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25485 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25486 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25487 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25488 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25489 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25490 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25491 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25492 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25493 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25494 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25495 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25496 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
25497 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25498 // CHECK-32-EX: omp.dispatch.cond:
25499 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25500 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25501 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25502 // CHECK-32-EX: omp.dispatch.body:
25503 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25504 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25505 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25506 // CHECK-32-EX: omp.inner.for.cond:
25507 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401:![0-9]+]]
25508 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP401]]
25509 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25510 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25511 // CHECK-32-EX: omp.inner.for.body:
25512 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
25513 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25514 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25515 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP401]]
25516 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25517 // CHECK-32-EX: omp.body.continue:
25518 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25519 // CHECK-32-EX: omp.inner.for.inc:
25520 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
25521 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25522 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP401]]
25523 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP402:![0-9]+]]
25524 // CHECK-32-EX: omp.inner.for.end:
25525 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25526 // CHECK-32-EX: omp.dispatch.inc:
25527 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25528 // CHECK-32-EX: omp.dispatch.end:
25529 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25530 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
25531 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25532 // CHECK-32-EX: .omp.final.then:
25533 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25534 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25535 // CHECK-32-EX: .omp.final.done:
25536 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25537 // CHECK-32-EX-NEXT: ret void
25540 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201
25541 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25542 // CHECK-32-EX-NEXT: entry:
25543 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25544 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25545 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25546 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_kernel_environment, ptr [[DYN_PTR]])
25547 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25548 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25549 // CHECK-32-EX: user_code.entry:
25550 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25551 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25552 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25553 // CHECK-32-EX-NEXT: ret void
25554 // CHECK-32-EX: worker.exit:
25555 // CHECK-32-EX-NEXT: ret void
25558 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l201_omp_outlined
25559 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25560 // CHECK-32-EX-NEXT: entry:
25561 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25562 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25563 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25564 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25565 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25566 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25567 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25568 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25569 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25570 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25571 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25572 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25573 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25574 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25575 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25576 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25577 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25578 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
25579 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25580 // CHECK-32-EX: omp.dispatch.cond:
25581 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25582 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25583 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25584 // CHECK-32-EX: omp.dispatch.body:
25585 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25586 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25587 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25588 // CHECK-32-EX: omp.inner.for.cond:
25589 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404:![0-9]+]]
25590 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP404]]
25591 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25592 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25593 // CHECK-32-EX: omp.inner.for.body:
25594 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
25595 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25596 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25597 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP404]]
25598 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25599 // CHECK-32-EX: omp.body.continue:
25600 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25601 // CHECK-32-EX: omp.inner.for.inc:
25602 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
25603 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25604 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP404]]
25605 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP405:![0-9]+]]
25606 // CHECK-32-EX: omp.inner.for.end:
25607 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25608 // CHECK-32-EX: omp.dispatch.inc:
25609 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25610 // CHECK-32-EX: omp.dispatch.end:
25611 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25612 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
25613 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25614 // CHECK-32-EX: .omp.final.then:
25615 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25616 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25617 // CHECK-32-EX: .omp.final.done:
25618 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25619 // CHECK-32-EX-NEXT: ret void
25622 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205
25623 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
25624 // CHECK-32-EX-NEXT: entry:
25625 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25626 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25627 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25628 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_kernel_environment, ptr [[DYN_PTR]])
25629 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25630 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25631 // CHECK-32-EX: user_code.entry:
25632 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25633 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25634 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25635 // CHECK-32-EX-NEXT: ret void
25636 // CHECK-32-EX: worker.exit:
25637 // CHECK-32-EX-NEXT: ret void
25640 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l205_omp_outlined
25641 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25642 // CHECK-32-EX-NEXT: entry:
25643 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25644 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25645 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25646 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25647 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25648 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25649 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25650 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25651 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25652 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25653 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25654 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25655 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25656 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25657 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25658 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25659 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25660 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
25661 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25662 // CHECK-32-EX: omp.dispatch.cond:
25663 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25664 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25665 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25666 // CHECK-32-EX: omp.dispatch.body:
25667 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25668 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25669 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25670 // CHECK-32-EX: omp.inner.for.cond:
25671 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407:![0-9]+]]
25672 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP407]]
25673 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25674 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25675 // CHECK-32-EX: omp.inner.for.body:
25676 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
25677 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25678 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25679 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP407]]
25680 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25681 // CHECK-32-EX: omp.body.continue:
25682 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25683 // CHECK-32-EX: omp.inner.for.inc:
25684 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
25685 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25686 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP407]]
25687 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP408:![0-9]+]]
25688 // CHECK-32-EX: omp.inner.for.end:
25689 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25690 // CHECK-32-EX: omp.dispatch.inc:
25691 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25692 // CHECK-32-EX: omp.dispatch.end:
25693 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25694 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
25695 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25696 // CHECK-32-EX: .omp.final.then:
25697 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25698 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25699 // CHECK-32-EX: .omp.final.done:
25700 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25701 // CHECK-32-EX-NEXT: ret void
25704 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209
25705 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10:[0-9]+]] {
25706 // CHECK-32-EX-NEXT: entry:
25707 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25708 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25709 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25710 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_kernel_environment, ptr [[DYN_PTR]])
25711 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25712 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25713 // CHECK-32-EX: user_code.entry:
25714 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25715 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25716 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25717 // CHECK-32-EX-NEXT: ret void
25718 // CHECK-32-EX: worker.exit:
25719 // CHECK-32-EX-NEXT: ret void
25722 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l209_omp_outlined
25723 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25724 // CHECK-32-EX-NEXT: entry:
25725 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25726 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25727 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25728 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25729 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25730 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25731 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25732 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25733 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25734 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25735 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25736 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25737 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25738 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25739 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25740 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25741 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25742 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 65, i32 0, i32 9, i32 1, i32 1)
25743 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25744 // CHECK-32-EX: omp.dispatch.cond:
25745 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
25746 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
25747 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25748 // CHECK-32-EX: omp.dispatch.body:
25749 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25750 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
25751 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25752 // CHECK-32-EX: omp.inner.for.cond:
25753 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410:![0-9]+]]
25754 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP410]]
25755 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
25756 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25757 // CHECK-32-EX: omp.inner.for.body:
25758 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
25759 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
25760 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25761 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP410]]
25762 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25763 // CHECK-32-EX: omp.body.continue:
25764 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25765 // CHECK-32-EX: omp.inner.for.inc:
25766 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
25767 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
25768 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP410]]
25769 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_fini_4(ptr @[[GLOB1]], i32 [[TMP1]]), !llvm.access.group [[ACC_GRP410]]
25770 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP411:![0-9]+]]
25771 // CHECK-32-EX: omp.inner.for.end:
25772 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25773 // CHECK-32-EX: omp.dispatch.inc:
25774 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25775 // CHECK-32-EX: omp.dispatch.end:
25776 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25777 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
25778 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25779 // CHECK-32-EX: .omp.final.then:
25780 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25781 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25782 // CHECK-32-EX: .omp.final.done:
25783 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25784 // CHECK-32-EX-NEXT: ret void
25787 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214
25788 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
25789 // CHECK-32-EX-NEXT: entry:
25790 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25791 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25792 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25793 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_kernel_environment, ptr [[DYN_PTR]])
25794 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25795 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25796 // CHECK-32-EX: user_code.entry:
25797 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25798 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25799 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25800 // CHECK-32-EX-NEXT: ret void
25801 // CHECK-32-EX: worker.exit:
25802 // CHECK-32-EX-NEXT: ret void
25805 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l214_omp_outlined
25806 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25807 // CHECK-32-EX-NEXT: entry:
25808 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25809 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25810 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25811 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25812 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25813 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25814 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25815 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25816 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25817 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25818 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25819 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25820 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25821 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25822 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25823 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25824 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25825 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
25826 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25827 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
25828 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
25829 // CHECK-32-EX: cond.true:
25830 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
25831 // CHECK-32-EX: cond.false:
25832 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25833 // CHECK-32-EX-NEXT: br label [[COND_END]]
25834 // CHECK-32-EX: cond.end:
25835 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
25836 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
25837 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25838 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
25839 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25840 // CHECK-32-EX: omp.inner.for.cond:
25841 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413:![0-9]+]]
25842 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP413]]
25843 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
25844 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25845 // CHECK-32-EX: omp.inner.for.body:
25846 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
25847 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
25848 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25849 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP413]]
25850 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25851 // CHECK-32-EX: omp.body.continue:
25852 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25853 // CHECK-32-EX: omp.inner.for.inc:
25854 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
25855 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
25856 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP413]]
25857 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP414:![0-9]+]]
25858 // CHECK-32-EX: omp.inner.for.end:
25859 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
25860 // CHECK-32-EX: omp.loop.exit:
25861 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
25862 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25863 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
25864 // CHECK-32-EX-NEXT: br i1 [[TMP10]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25865 // CHECK-32-EX: .omp.final.then:
25866 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25867 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25868 // CHECK-32-EX: .omp.final.done:
25869 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25870 // CHECK-32-EX-NEXT: ret void
25873 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219
25874 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
25875 // CHECK-32-EX-NEXT: entry:
25876 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25877 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25878 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25879 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_kernel_environment, ptr [[DYN_PTR]])
25880 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25881 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25882 // CHECK-32-EX: user_code.entry:
25883 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25884 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25885 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25886 // CHECK-32-EX-NEXT: ret void
25887 // CHECK-32-EX: worker.exit:
25888 // CHECK-32-EX-NEXT: ret void
25891 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l219_omp_outlined
25892 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25893 // CHECK-32-EX-NEXT: entry:
25894 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25895 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25896 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
25897 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
25898 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
25899 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
25900 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
25901 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
25902 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
25903 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
25904 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
25905 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
25906 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
25907 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
25908 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
25909 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
25910 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
25911 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
25912 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
25913 // CHECK-32-EX: omp.dispatch.cond:
25914 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25915 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
25916 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
25917 // CHECK-32-EX: cond.true:
25918 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
25919 // CHECK-32-EX: cond.false:
25920 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25921 // CHECK-32-EX-NEXT: br label [[COND_END]]
25922 // CHECK-32-EX: cond.end:
25923 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
25924 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
25925 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25926 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
25927 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
25928 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25929 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
25930 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
25931 // CHECK-32-EX: omp.dispatch.body:
25932 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
25933 // CHECK-32-EX: omp.inner.for.cond:
25934 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416:![0-9]+]]
25935 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP416]]
25936 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
25937 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
25938 // CHECK-32-EX: omp.inner.for.body:
25939 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
25940 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
25941 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
25942 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP416]]
25943 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
25944 // CHECK-32-EX: omp.body.continue:
25945 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
25946 // CHECK-32-EX: omp.inner.for.inc:
25947 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
25948 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
25949 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP416]]
25950 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP417:![0-9]+]]
25951 // CHECK-32-EX: omp.inner.for.end:
25952 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
25953 // CHECK-32-EX: omp.dispatch.inc:
25954 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
25955 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25956 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
25957 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
25958 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
25959 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
25960 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
25961 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
25962 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
25963 // CHECK-32-EX: omp.dispatch.end:
25964 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
25965 // CHECK-32-EX-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
25966 // CHECK-32-EX-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
25967 // CHECK-32-EX-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
25968 // CHECK-32-EX: .omp.final.then:
25969 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
25970 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
25971 // CHECK-32-EX: .omp.final.done:
25972 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
25973 // CHECK-32-EX-NEXT: ret void
25976 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224
25977 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
25978 // CHECK-32-EX-NEXT: entry:
25979 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
25980 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
25981 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
25982 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_kernel_environment, ptr [[DYN_PTR]])
25983 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
25984 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
25985 // CHECK-32-EX: user_code.entry:
25986 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
25987 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
25988 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
25989 // CHECK-32-EX-NEXT: ret void
25990 // CHECK-32-EX: worker.exit:
25991 // CHECK-32-EX-NEXT: ret void
25994 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l224_omp_outlined
25995 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
25996 // CHECK-32-EX-NEXT: entry:
25997 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
25998 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
25999 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26000 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26001 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26002 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26003 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26004 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26005 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26006 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26007 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26008 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26009 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26010 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26011 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26012 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26013 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26014 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
26015 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26016 // CHECK-32-EX: omp.dispatch.cond:
26017 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26018 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26019 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26020 // CHECK-32-EX: omp.dispatch.body:
26021 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26022 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26023 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26024 // CHECK-32-EX: omp.inner.for.cond:
26025 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419:![0-9]+]]
26026 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP419]]
26027 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26028 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26029 // CHECK-32-EX: omp.inner.for.body:
26030 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
26031 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26032 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26033 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP419]]
26034 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26035 // CHECK-32-EX: omp.body.continue:
26036 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26037 // CHECK-32-EX: omp.inner.for.inc:
26038 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
26039 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26040 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP419]]
26041 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP420:![0-9]+]]
26042 // CHECK-32-EX: omp.inner.for.end:
26043 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26044 // CHECK-32-EX: omp.dispatch.inc:
26045 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26046 // CHECK-32-EX: omp.dispatch.end:
26047 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
26048 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
26049 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
26050 // CHECK-32-EX: .omp.final.then:
26051 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
26052 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
26053 // CHECK-32-EX: .omp.final.done:
26054 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
26055 // CHECK-32-EX-NEXT: ret void
26058 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229
26059 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
26060 // CHECK-32-EX-NEXT: entry:
26061 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26062 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26063 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26064 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_kernel_environment, ptr [[DYN_PTR]])
26065 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26066 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26067 // CHECK-32-EX: user_code.entry:
26068 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26069 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26070 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26071 // CHECK-32-EX-NEXT: ret void
26072 // CHECK-32-EX: worker.exit:
26073 // CHECK-32-EX-NEXT: ret void
26076 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l229_omp_outlined
26077 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26078 // CHECK-32-EX-NEXT: entry:
26079 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26080 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26081 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26082 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26083 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26084 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26085 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26086 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26087 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26088 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26089 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26090 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26091 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26092 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26093 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26094 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26095 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26096 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
26097 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26098 // CHECK-32-EX: omp.dispatch.cond:
26099 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26100 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26101 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26102 // CHECK-32-EX: omp.dispatch.body:
26103 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26104 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26105 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26106 // CHECK-32-EX: omp.inner.for.cond:
26107 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422:![0-9]+]]
26108 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP422]]
26109 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26110 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26111 // CHECK-32-EX: omp.inner.for.body:
26112 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
26113 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26114 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26115 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP422]]
26116 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26117 // CHECK-32-EX: omp.body.continue:
26118 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26119 // CHECK-32-EX: omp.inner.for.inc:
26120 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
26121 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26122 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP422]]
26123 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP423:![0-9]+]]
26124 // CHECK-32-EX: omp.inner.for.end:
26125 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26126 // CHECK-32-EX: omp.dispatch.inc:
26127 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26128 // CHECK-32-EX: omp.dispatch.end:
26129 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
26130 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
26131 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
26132 // CHECK-32-EX: .omp.final.then:
26133 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
26134 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
26135 // CHECK-32-EX: .omp.final.done:
26136 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
26137 // CHECK-32-EX-NEXT: ret void
26140 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234
26141 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
26142 // CHECK-32-EX-NEXT: entry:
26143 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26144 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26145 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26146 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_kernel_environment, ptr [[DYN_PTR]])
26147 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26148 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26149 // CHECK-32-EX: user_code.entry:
26150 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26151 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26152 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26153 // CHECK-32-EX-NEXT: ret void
26154 // CHECK-32-EX: worker.exit:
26155 // CHECK-32-EX-NEXT: ret void
26158 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l234_omp_outlined
26159 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26160 // CHECK-32-EX-NEXT: entry:
26161 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26162 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26163 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26164 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26165 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26166 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26167 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26168 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26169 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26170 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26171 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26172 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26173 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26174 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26175 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26176 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26177 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26178 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
26179 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26180 // CHECK-32-EX: omp.dispatch.cond:
26181 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26182 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26183 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26184 // CHECK-32-EX: omp.dispatch.body:
26185 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26186 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26187 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26188 // CHECK-32-EX: omp.inner.for.cond:
26189 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425:![0-9]+]]
26190 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP425]]
26191 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26192 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26193 // CHECK-32-EX: omp.inner.for.body:
26194 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
26195 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26196 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26197 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP425]]
26198 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26199 // CHECK-32-EX: omp.body.continue:
26200 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26201 // CHECK-32-EX: omp.inner.for.inc:
26202 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
26203 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26204 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP425]]
26205 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP426:![0-9]+]]
26206 // CHECK-32-EX: omp.inner.for.end:
26207 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26208 // CHECK-32-EX: omp.dispatch.inc:
26209 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26210 // CHECK-32-EX: omp.dispatch.end:
26211 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
26212 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
26213 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
26214 // CHECK-32-EX: .omp.final.then:
26215 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
26216 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
26217 // CHECK-32-EX: .omp.final.done:
26218 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
26219 // CHECK-32-EX-NEXT: ret void
26222 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239
26223 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR10]] {
26224 // CHECK-32-EX-NEXT: entry:
26225 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26226 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26227 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26228 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_kernel_environment, ptr [[DYN_PTR]])
26229 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26230 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26231 // CHECK-32-EX: user_code.entry:
26232 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26233 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26234 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26235 // CHECK-32-EX-NEXT: ret void
26236 // CHECK-32-EX: worker.exit:
26237 // CHECK-32-EX-NEXT: ret void
26240 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l239_omp_outlined
26241 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26242 // CHECK-32-EX-NEXT: entry:
26243 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26244 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26245 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26246 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26247 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26248 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26249 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26250 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26251 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26252 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26253 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26254 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26255 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26256 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26257 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26258 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26259 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26260 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
26261 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26262 // CHECK-32-EX: omp.dispatch.cond:
26263 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26264 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26265 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26266 // CHECK-32-EX: omp.dispatch.body:
26267 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26268 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26269 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26270 // CHECK-32-EX: omp.inner.for.cond:
26271 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428:![0-9]+]]
26272 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP428]]
26273 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26274 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26275 // CHECK-32-EX: omp.inner.for.body:
26276 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
26277 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26278 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26279 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP428]]
26280 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26281 // CHECK-32-EX: omp.body.continue:
26282 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26283 // CHECK-32-EX: omp.inner.for.inc:
26284 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
26285 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26286 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP428]]
26287 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP429:![0-9]+]]
26288 // CHECK-32-EX: omp.inner.for.end:
26289 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26290 // CHECK-32-EX: omp.dispatch.inc:
26291 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26292 // CHECK-32-EX: omp.dispatch.end:
26293 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
26294 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
26295 // CHECK-32-EX-NEXT: br i1 [[TMP9]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
26296 // CHECK-32-EX: .omp.final.then:
26297 // CHECK-32-EX-NEXT: store i32 10, ptr [[I]], align 4
26298 // CHECK-32-EX-NEXT: br label [[DOTOMP_FINAL_DONE]]
26299 // CHECK-32-EX: .omp.final.done:
26300 // CHECK-32-EX-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP1]])
26301 // CHECK-32-EX-NEXT: ret void
26304 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244
26305 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26306 // CHECK-32-EX-NEXT: entry:
26307 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26308 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26309 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26310 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_kernel_environment, ptr [[DYN_PTR]])
26311 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26312 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26313 // CHECK-32-EX: user_code.entry:
26314 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26315 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26316 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26317 // CHECK-32-EX-NEXT: ret void
26318 // CHECK-32-EX: worker.exit:
26319 // CHECK-32-EX-NEXT: ret void
26322 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l244_omp_outlined
26323 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26324 // CHECK-32-EX-NEXT: entry:
26325 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26326 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26327 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26328 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26329 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26330 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26331 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26332 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26333 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26334 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26335 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26336 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26337 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26338 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26339 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26340 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26341 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26342 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
26343 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26344 // CHECK-32-EX: omp.dispatch.cond:
26345 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26346 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
26347 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
26348 // CHECK-32-EX: cond.true:
26349 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
26350 // CHECK-32-EX: cond.false:
26351 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26352 // CHECK-32-EX-NEXT: br label [[COND_END]]
26353 // CHECK-32-EX: cond.end:
26354 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
26355 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
26356 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26357 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
26358 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26359 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26360 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
26361 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26362 // CHECK-32-EX: omp.dispatch.body:
26363 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26364 // CHECK-32-EX: omp.inner.for.cond:
26365 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26366 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26367 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
26368 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26369 // CHECK-32-EX: omp.inner.for.body:
26370 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26371 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
26372 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26373 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
26374 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26375 // CHECK-32-EX: omp.body.continue:
26376 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26377 // CHECK-32-EX: omp.inner.for.inc:
26378 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26379 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
26380 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
26381 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
26382 // CHECK-32-EX: omp.inner.for.end:
26383 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26384 // CHECK-32-EX: omp.dispatch.inc:
26385 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26386 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
26387 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
26388 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
26389 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26390 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
26391 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
26392 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
26393 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26394 // CHECK-32-EX: omp.dispatch.end:
26395 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
26396 // CHECK-32-EX-NEXT: ret void
26399 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248
26400 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26401 // CHECK-32-EX-NEXT: entry:
26402 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26403 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26404 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26405 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_kernel_environment, ptr [[DYN_PTR]])
26406 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26407 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26408 // CHECK-32-EX: user_code.entry:
26409 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26410 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26411 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26412 // CHECK-32-EX-NEXT: ret void
26413 // CHECK-32-EX: worker.exit:
26414 // CHECK-32-EX-NEXT: ret void
26417 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l248_omp_outlined
26418 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26419 // CHECK-32-EX-NEXT: entry:
26420 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26421 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26422 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26423 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26424 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26425 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26426 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26427 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26428 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26429 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26430 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26431 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26432 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26433 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26434 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26435 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26436 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26437 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
26438 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26439 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
26440 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
26441 // CHECK-32-EX: cond.true:
26442 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
26443 // CHECK-32-EX: cond.false:
26444 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26445 // CHECK-32-EX-NEXT: br label [[COND_END]]
26446 // CHECK-32-EX: cond.end:
26447 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
26448 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
26449 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26450 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
26451 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26452 // CHECK-32-EX: omp.inner.for.cond:
26453 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26454 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26455 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
26456 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26457 // CHECK-32-EX: omp.inner.for.body:
26458 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26459 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
26460 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26461 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
26462 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26463 // CHECK-32-EX: omp.body.continue:
26464 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26465 // CHECK-32-EX: omp.inner.for.inc:
26466 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26467 // CHECK-32-EX-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP8]], 1
26468 // CHECK-32-EX-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
26469 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
26470 // CHECK-32-EX: omp.inner.for.end:
26471 // CHECK-32-EX-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
26472 // CHECK-32-EX: omp.loop.exit:
26473 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
26474 // CHECK-32-EX-NEXT: ret void
26477 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252
26478 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26479 // CHECK-32-EX-NEXT: entry:
26480 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26481 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26482 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26483 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_kernel_environment, ptr [[DYN_PTR]])
26484 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26485 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26486 // CHECK-32-EX: user_code.entry:
26487 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26488 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26489 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26490 // CHECK-32-EX-NEXT: ret void
26491 // CHECK-32-EX: worker.exit:
26492 // CHECK-32-EX-NEXT: ret void
26495 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l252_omp_outlined
26496 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26497 // CHECK-32-EX-NEXT: entry:
26498 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26499 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26500 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26501 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26502 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26503 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26504 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26505 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26506 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26507 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26508 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26509 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26510 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26511 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26512 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26513 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26514 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26515 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB3]], i32 [[TMP1]], i32 33, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
26516 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26517 // CHECK-32-EX: omp.dispatch.cond:
26518 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26519 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 9
26520 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
26521 // CHECK-32-EX: cond.true:
26522 // CHECK-32-EX-NEXT: br label [[COND_END:%.*]]
26523 // CHECK-32-EX: cond.false:
26524 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26525 // CHECK-32-EX-NEXT: br label [[COND_END]]
26526 // CHECK-32-EX: cond.end:
26527 // CHECK-32-EX-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
26528 // CHECK-32-EX-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
26529 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26530 // CHECK-32-EX-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
26531 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26532 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26533 // CHECK-32-EX-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
26534 // CHECK-32-EX-NEXT: br i1 [[CMP1]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26535 // CHECK-32-EX: omp.dispatch.body:
26536 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26537 // CHECK-32-EX: omp.inner.for.cond:
26538 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26539 // CHECK-32-EX-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26540 // CHECK-32-EX-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP7]], [[TMP8]]
26541 // CHECK-32-EX-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26542 // CHECK-32-EX: omp.inner.for.body:
26543 // CHECK-32-EX-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26544 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP9]], 1
26545 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26546 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4
26547 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26548 // CHECK-32-EX: omp.body.continue:
26549 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26550 // CHECK-32-EX: omp.inner.for.inc:
26551 // CHECK-32-EX-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
26552 // CHECK-32-EX-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP10]], 1
26553 // CHECK-32-EX-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
26554 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]]
26555 // CHECK-32-EX: omp.inner.for.end:
26556 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26557 // CHECK-32-EX: omp.dispatch.inc:
26558 // CHECK-32-EX-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26559 // CHECK-32-EX-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
26560 // CHECK-32-EX-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
26561 // CHECK-32-EX-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_LB]], align 4
26562 // CHECK-32-EX-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
26563 // CHECK-32-EX-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
26564 // CHECK-32-EX-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
26565 // CHECK-32-EX-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_UB]], align 4
26566 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26567 // CHECK-32-EX: omp.dispatch.end:
26568 // CHECK-32-EX-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB3]], i32 [[TMP1]])
26569 // CHECK-32-EX-NEXT: ret void
26572 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256
26573 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26574 // CHECK-32-EX-NEXT: entry:
26575 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26576 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26577 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26578 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_kernel_environment, ptr [[DYN_PTR]])
26579 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26580 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26581 // CHECK-32-EX: user_code.entry:
26582 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26583 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26584 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26585 // CHECK-32-EX-NEXT: ret void
26586 // CHECK-32-EX: worker.exit:
26587 // CHECK-32-EX-NEXT: ret void
26590 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l256_omp_outlined
26591 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26592 // CHECK-32-EX-NEXT: entry:
26593 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26594 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26595 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26596 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26597 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26598 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26599 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26600 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26601 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26602 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26603 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26604 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26605 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26606 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26607 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26608 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26609 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26610 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741862, i32 0, i32 9, i32 1, i32 1)
26611 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26612 // CHECK-32-EX: omp.dispatch.cond:
26613 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26614 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26615 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26616 // CHECK-32-EX: omp.dispatch.body:
26617 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26618 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26619 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26620 // CHECK-32-EX: omp.inner.for.cond:
26621 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431:![0-9]+]]
26622 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP431]]
26623 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26624 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26625 // CHECK-32-EX: omp.inner.for.body:
26626 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
26627 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26628 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26629 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP431]]
26630 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26631 // CHECK-32-EX: omp.body.continue:
26632 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26633 // CHECK-32-EX: omp.inner.for.inc:
26634 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
26635 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26636 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP431]]
26637 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP432:![0-9]+]]
26638 // CHECK-32-EX: omp.inner.for.end:
26639 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26640 // CHECK-32-EX: omp.dispatch.inc:
26641 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26642 // CHECK-32-EX: omp.dispatch.end:
26643 // CHECK-32-EX-NEXT: ret void
26646 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260
26647 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26648 // CHECK-32-EX-NEXT: entry:
26649 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26650 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26651 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26652 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_kernel_environment, ptr [[DYN_PTR]])
26653 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26654 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26655 // CHECK-32-EX: user_code.entry:
26656 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26657 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26658 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26659 // CHECK-32-EX-NEXT: ret void
26660 // CHECK-32-EX: worker.exit:
26661 // CHECK-32-EX-NEXT: ret void
26664 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l260_omp_outlined
26665 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26666 // CHECK-32-EX-NEXT: entry:
26667 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26668 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26669 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26670 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26671 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26672 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26673 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26674 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26675 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26676 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26677 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26678 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26679 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26680 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26681 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26682 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26683 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26684 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741861, i32 0, i32 9, i32 1, i32 1)
26685 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26686 // CHECK-32-EX: omp.dispatch.cond:
26687 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26688 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26689 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26690 // CHECK-32-EX: omp.dispatch.body:
26691 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26692 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26693 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26694 // CHECK-32-EX: omp.inner.for.cond:
26695 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434:![0-9]+]]
26696 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP434]]
26697 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26698 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26699 // CHECK-32-EX: omp.inner.for.body:
26700 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
26701 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26702 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26703 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP434]]
26704 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26705 // CHECK-32-EX: omp.body.continue:
26706 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26707 // CHECK-32-EX: omp.inner.for.inc:
26708 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
26709 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26710 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP434]]
26711 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP435:![0-9]+]]
26712 // CHECK-32-EX: omp.inner.for.end:
26713 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26714 // CHECK-32-EX: omp.dispatch.inc:
26715 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26716 // CHECK-32-EX: omp.dispatch.end:
26717 // CHECK-32-EX-NEXT: ret void
26720 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264
26721 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26722 // CHECK-32-EX-NEXT: entry:
26723 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26724 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26725 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26726 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_kernel_environment, ptr [[DYN_PTR]])
26727 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26728 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26729 // CHECK-32-EX: user_code.entry:
26730 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26731 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26732 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26733 // CHECK-32-EX-NEXT: ret void
26734 // CHECK-32-EX: worker.exit:
26735 // CHECK-32-EX-NEXT: ret void
26738 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l264_omp_outlined
26739 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26740 // CHECK-32-EX-NEXT: entry:
26741 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26742 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26743 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26744 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26745 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26746 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26747 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26748 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26749 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26750 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26751 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26752 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26753 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26754 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26755 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26756 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26757 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26758 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741859, i32 0, i32 9, i32 1, i32 1)
26759 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26760 // CHECK-32-EX: omp.dispatch.cond:
26761 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26762 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26763 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26764 // CHECK-32-EX: omp.dispatch.body:
26765 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26766 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26767 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26768 // CHECK-32-EX: omp.inner.for.cond:
26769 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437:![0-9]+]]
26770 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP437]]
26771 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26772 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26773 // CHECK-32-EX: omp.inner.for.body:
26774 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
26775 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26776 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26777 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP437]]
26778 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26779 // CHECK-32-EX: omp.body.continue:
26780 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26781 // CHECK-32-EX: omp.inner.for.inc:
26782 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
26783 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26784 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP437]]
26785 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP438:![0-9]+]]
26786 // CHECK-32-EX: omp.inner.for.end:
26787 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26788 // CHECK-32-EX: omp.dispatch.inc:
26789 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26790 // CHECK-32-EX: omp.dispatch.end:
26791 // CHECK-32-EX-NEXT: ret void
26794 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268
26795 // CHECK-32-EX-SAME: (ptr noalias noundef [[DYN_PTR:%.*]]) #[[ATTR8]] {
26796 // CHECK-32-EX-NEXT: entry:
26797 // CHECK-32-EX-NEXT: [[DYN_PTR_ADDR:%.*]] = alloca ptr, align 4
26798 // CHECK-32-EX-NEXT: [[CAPTURED_VARS_ADDRS:%.*]] = alloca [0 x ptr], align 4
26799 // CHECK-32-EX-NEXT: store ptr [[DYN_PTR]], ptr [[DYN_PTR_ADDR]], align 4
26800 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_kernel_environment, ptr [[DYN_PTR]])
26801 // CHECK-32-EX-NEXT: [[EXEC_USER_CODE:%.*]] = icmp eq i32 [[TMP0]], -1
26802 // CHECK-32-EX-NEXT: br i1 [[EXEC_USER_CODE]], label [[USER_CODE_ENTRY:%.*]], label [[WORKER_EXIT:%.*]]
26803 // CHECK-32-EX: user_code.entry:
26804 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
26805 // CHECK-32-EX-NEXT: call void @__kmpc_parallel_51(ptr @[[GLOB1]], i32 [[TMP1]], i32 1, i32 -1, i32 -1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined, ptr null, ptr [[CAPTURED_VARS_ADDRS]], i32 0)
26806 // CHECK-32-EX-NEXT: call void @__kmpc_target_deinit()
26807 // CHECK-32-EX-NEXT: ret void
26808 // CHECK-32-EX: worker.exit:
26809 // CHECK-32-EX-NEXT: ret void
26812 // CHECK-32-EX-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z3foov_l268_omp_outlined
26813 // CHECK-32-EX-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
26814 // CHECK-32-EX-NEXT: entry:
26815 // CHECK-32-EX-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
26816 // CHECK-32-EX-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
26817 // CHECK-32-EX-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
26818 // CHECK-32-EX-NEXT: [[TMP:%.*]] = alloca i32, align 4
26819 // CHECK-32-EX-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
26820 // CHECK-32-EX-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
26821 // CHECK-32-EX-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
26822 // CHECK-32-EX-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
26823 // CHECK-32-EX-NEXT: [[I:%.*]] = alloca i32, align 4
26824 // CHECK-32-EX-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
26825 // CHECK-32-EX-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
26826 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
26827 // CHECK-32-EX-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
26828 // CHECK-32-EX-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
26829 // CHECK-32-EX-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
26830 // CHECK-32-EX-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
26831 // CHECK-32-EX-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
26832 // CHECK-32-EX-NEXT: call void @__kmpc_dispatch_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 1073741860, i32 0, i32 9, i32 1, i32 1)
26833 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND:%.*]]
26834 // CHECK-32-EX: omp.dispatch.cond:
26835 // CHECK-32-EX-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_dispatch_next_4(ptr @[[GLOB1]], i32 [[TMP1]], ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]])
26836 // CHECK-32-EX-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
26837 // CHECK-32-EX-NEXT: br i1 [[TOBOOL]], label [[OMP_DISPATCH_BODY:%.*]], label [[OMP_DISPATCH_END:%.*]]
26838 // CHECK-32-EX: omp.dispatch.body:
26839 // CHECK-32-EX-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
26840 // CHECK-32-EX-NEXT: store i32 [[TMP3]], ptr [[DOTOMP_IV]], align 4
26841 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
26842 // CHECK-32-EX: omp.inner.for.cond:
26843 // CHECK-32-EX-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440:![0-9]+]]
26844 // CHECK-32-EX-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP440]]
26845 // CHECK-32-EX-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
26846 // CHECK-32-EX-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
26847 // CHECK-32-EX: omp.inner.for.body:
26848 // CHECK-32-EX-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
26849 // CHECK-32-EX-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP6]], 1
26850 // CHECK-32-EX-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
26851 // CHECK-32-EX-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP440]]
26852 // CHECK-32-EX-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
26853 // CHECK-32-EX: omp.body.continue:
26854 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
26855 // CHECK-32-EX: omp.inner.for.inc:
26856 // CHECK-32-EX-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
26857 // CHECK-32-EX-NEXT: [[ADD1:%.*]] = add nsw i32 [[TMP7]], 1
26858 // CHECK-32-EX-NEXT: store i32 [[ADD1]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP440]]
26859 // CHECK-32-EX-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP441:![0-9]+]]
26860 // CHECK-32-EX: omp.inner.for.end:
26861 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_INC:%.*]]
26862 // CHECK-32-EX: omp.dispatch.inc:
26863 // CHECK-32-EX-NEXT: br label [[OMP_DISPATCH_COND]]
26864 // CHECK-32-EX: omp.dispatch.end:
26865 // CHECK-32-EX-NEXT: ret void