1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
2 ; RUN: opt -S -attributor -openmp-opt-cgscc -openmp-opt-enable-merging -enable-new-pm=0 < %s | FileCheck %s --check-prefix=CHECK1
3 ; RUN: opt -S -aa-pipeline= -passes='attributor,cgscc(openmp-opt-cgscc)' -openmp-opt-enable-merging < %s | FileCheck %s --check-prefix=CHECK2
13 ; #pragma omp parallel
18 ; void unmergable_proc_bind(int a) {
19 ; #pragma omp parallel proc_bind(close)
23 ; #pragma omp parallel
28 ; void unmergable_num_threads(int a) {
29 ; #pragma omp parallel num_threads(a)
33 ; #pragma omp parallel
38 ; void unmergable_seq_call(int a) {
39 ; #pragma omp parallel
44 ; #pragma omp parallel
49 ; void merge_seq(int a) {
50 ; #pragma omp parallel
55 ; #pragma omp parallel
61 ; void merge_seq_float(float f, float *p) {
62 ; #pragma omp parallel
67 ; #pragma omp parallel
72 ; void merge_seq_firstprivate(int a) {
73 ; #pragma omp parallel
78 ; #pragma omp parallel firstprivate(a)
84 ; void merge_seq_sink_lt(int a) {
85 ; #pragma omp parallel
92 ; #pragma omp parallel
97 ; void merge_seq_par_use(int a) {
98 ; #pragma omp parallel
103 ; #pragma omp parallel
109 ; void merge_cancellable_regions(int cancel1, int cancel2)
111 ; #pragma omp parallel
114 ; #pragma omp cancel parallel
117 ; #pragma omp parallel
120 ; #pragma omp cancel parallel
124 ; void merge_cancellable_regions_seq(int cancel1, int cancel2)
126 ; #pragma omp parallel
129 ; #pragma omp cancel parallel
132 ; cancel2 = !cancel1;
133 ; #pragma omp parallel
136 ; #pragma omp cancel parallel
140 ; void merge_3(int a) {
141 ; #pragma omp parallel
145 ; #pragma omp parallel
149 ; #pragma omp parallel
154 ; void merge_3_seq(int a, int b) {
155 ; #pragma omp parallel
160 ; #pragma omp parallel
165 ; #pragma omp parallel
171 ; void unmergable_3_seq_call(int a) {
172 ; #pragma omp parallel
177 ; #pragma omp parallel
182 ; #pragma omp parallel
187 ; void unmergable_3_proc_bind(int a) {
188 ; #pragma omp parallel
192 ; #pragma omp parallel proc_bind(close)
196 ; #pragma omp parallel
201 ; void unmergable_3_num_threads(int a) {
202 ; #pragma omp parallel
206 ; #pragma omp parallel num_threads(a)
210 ; #pragma omp parallel
215 ; void merge_2_unmergable_1(int a) {
216 ; #pragma omp parallel
220 ; #pragma omp parallel
225 ; #pragma omp parallel
230 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
232 %struct.ident_t = type { i32, i32, i32, i32, i8* }
234 @0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
235 @1 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @0, i32 0, i32 0) }, align 8
237 define dso_local void @merge(i32 %a) local_unnamed_addr {
239 %a.addr = alloca i32, align 4
240 store i32 %a, i32* %a.addr, align 4
241 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
242 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
246 define internal void @.omp_outlined.(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
248 %0 = load i32, i32* %a, align 4
249 call void @use(i32 %0)
253 declare dso_local void @use(i32) local_unnamed_addr
255 declare !callback !1 void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) local_unnamed_addr
257 define internal void @.omp_outlined..1(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
259 %0 = load i32, i32* %a, align 4
260 call void @use(i32 %0)
264 define dso_local void @unmergable_proc_bind(i32 %a) local_unnamed_addr {
266 %a.addr = alloca i32, align 4
267 %0 = call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @1)
268 store i32 %a, i32* %a.addr, align 4
269 call void @__kmpc_push_proc_bind(%struct.ident_t* nonnull @1, i32 %0, i32 3)
270 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
271 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
275 define internal void @.omp_outlined..2(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
277 %0 = load i32, i32* %a, align 4
278 call void @use(i32 %0)
282 declare i32 @__kmpc_global_thread_num(%struct.ident_t*) local_unnamed_addr
284 declare void @__kmpc_push_proc_bind(%struct.ident_t*, i32, i32) local_unnamed_addr
286 define internal void @.omp_outlined..3(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
288 %0 = load i32, i32* %a, align 4
289 call void @use(i32 %0)
293 define dso_local void @unmergable_num_threads(i32 %a) local_unnamed_addr {
295 %a.addr = alloca i32, align 4
296 %0 = call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @1)
297 store i32 %a, i32* %a.addr, align 4
298 call void @__kmpc_push_num_threads(%struct.ident_t* nonnull @1, i32 %0, i32 %a)
299 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
300 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
304 define internal void @.omp_outlined..4(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
306 %0 = load i32, i32* %a, align 4
307 call void @use(i32 %0)
311 declare void @__kmpc_push_num_threads(%struct.ident_t*, i32, i32) local_unnamed_addr
313 define internal void @.omp_outlined..5(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
315 %0 = load i32, i32* %a, align 4
316 call void @use(i32 %0)
320 define dso_local void @unmergable_seq_call(i32 %a) local_unnamed_addr {
322 %a.addr = alloca i32, align 4
323 store i32 %a, i32* %a.addr, align 4
324 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
325 call void (...) @foo()
326 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
330 define internal void @.omp_outlined..6(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
332 %0 = load i32, i32* %a, align 4
333 call void @use(i32 %0)
337 declare dso_local void @foo(...) local_unnamed_addr
339 define internal void @.omp_outlined..7(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
341 %0 = load i32, i32* %a, align 4
342 call void @use(i32 %0)
346 define dso_local void @merge_seq(i32 %a) local_unnamed_addr {
348 %a.addr = alloca i32, align 4
349 store i32 %a, i32* %a.addr, align 4
350 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..8 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
351 %0 = load i32, i32* %a.addr, align 4
352 %add = add nsw i32 %0, 1
353 store i32 %add, i32* %a.addr, align 4
354 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..9 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
355 %1 = load i32, i32* %a.addr, align 4
356 call void @use(i32 %1)
360 define internal void @.omp_outlined..8(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
362 %0 = load i32, i32* %a, align 4
363 call void @use(i32 %0)
367 define internal void @.omp_outlined..9(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
369 %0 = load i32, i32* %a, align 4
370 call void @use(i32 %0)
374 define dso_local void @merge_seq_float(float %f, float* nocapture %p) local_unnamed_addr {
376 %f.addr = alloca float, align 4
377 store float %f, float* %f.addr, align 4
378 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*)* @.omp_outlined..10 to void (i32*, i32*, ...)*), float* nonnull %f.addr)
379 %0 = load float, float* %f.addr, align 4
380 %add = fadd float %0, 0x40091EB860000000
381 store float %add, float* %p, align 4
382 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*)* @.omp_outlined..11 to void (i32*, i32*, ...)*), float* nonnull %f.addr)
386 define internal void @.omp_outlined..10(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., float* nocapture nonnull readonly align 4 dereferenceable(4) %f) {
388 %0 = load float, float* %f, align 4
389 %conv = fptosi float %0 to i32
390 call void @use(i32 %conv)
394 define internal void @.omp_outlined..11(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., float* nocapture nonnull readonly align 4 dereferenceable(4) %f) {
396 %0 = load float, float* %f, align 4
397 %conv = fptosi float %0 to i32
398 call void @use(i32 %conv)
402 define dso_local void @merge_seq_firstprivate(i32 %a) local_unnamed_addr {
404 %a.addr = alloca i32, align 4
405 store i32 %a, i32* %a.addr, align 4
406 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..12 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
407 %0 = load i32, i32* %a.addr, align 4
408 %add = add nsw i32 %0, 1
409 store i32 %add, i32* %a.addr, align 4
410 %a.casted.sroa.0.0.insert.ext = zext i32 %add to i64
411 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i64)* @.omp_outlined..13 to void (i32*, i32*, ...)*), i64 %a.casted.sroa.0.0.insert.ext)
412 %1 = load i32, i32* %a.addr, align 4
413 call void @use(i32 %1)
417 define internal void @.omp_outlined..12(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
419 %0 = load i32, i32* %a, align 4
420 call void @use(i32 %0)
424 define internal void @.omp_outlined..13(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i64 %a) {
426 %a.addr.sroa.0.0.extract.trunc = trunc i64 %a to i32
427 call void @use(i32 %a.addr.sroa.0.0.extract.trunc)
431 define dso_local void @merge_seq_sink_lt(i32 %a) local_unnamed_addr {
433 %a.addr = alloca i32, align 4
434 %b = alloca i32, align 4
435 store i32 %a, i32* %a.addr, align 4
436 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..14 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
437 %0 = bitcast i32* %b to i8*
438 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
439 %1 = ptrtoint i32* %b to i64
440 %2 = trunc i64 %1 to i32
441 store i32 %2, i32* %b, align 4
442 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %0)
443 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..15 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
447 define internal void @.omp_outlined..14(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
449 %0 = load i32, i32* %a, align 4
450 call void @use(i32 %0)
454 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
456 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
458 define internal void @.omp_outlined..15(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
460 %0 = load i32, i32* %a, align 4
461 call void @use(i32 %0)
465 define dso_local void @merge_seq_par_use(i32 %a) local_unnamed_addr {
467 %a.addr = alloca i32, align 4
468 %b = alloca i32, align 4
469 store i32 %a, i32* %a.addr, align 4
470 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..16 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
471 %0 = bitcast i32* %b to i8*
472 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %0)
473 %1 = load i32, i32* %a.addr, align 4
474 %add = add nsw i32 %1, 1
475 store i32 %add, i32* %b, align 4
476 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..17 to void (i32*, i32*, ...)*), i32* nonnull %a.addr, i32* nonnull %b)
477 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %0)
481 define internal void @.omp_outlined..16(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
483 %0 = load i32, i32* %a, align 4
484 call void @use(i32 %0)
488 define internal void @.omp_outlined..17(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a, i32* nocapture nonnull readonly align 4 dereferenceable(4) %b) {
490 %0 = load i32, i32* %a, align 4
491 call void @use(i32 %0)
492 %1 = load i32, i32* %b, align 4
493 call void @use(i32 %1)
497 define dso_local void @merge_cancellable_regions(i32 %cancel1, i32 %cancel2) local_unnamed_addr {
499 %cancel1.addr = alloca i32, align 4
500 %cancel2.addr = alloca i32, align 4
501 store i32 %cancel1, i32* %cancel1.addr, align 4
502 store i32 %cancel2, i32* %cancel2.addr, align 4
503 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..18 to void (i32*, i32*, ...)*), i32* nonnull %cancel1.addr)
504 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..19 to void (i32*, i32*, ...)*), i32* nonnull %cancel2.addr)
508 define internal void @.omp_outlined..18(i32* noalias nocapture readonly %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %cancel1) {
510 %0 = load i32, i32* %cancel1, align 4
511 %tobool.not = icmp eq i32 %0, 0
512 br i1 %tobool.not, label %if.end, label %if.then
514 if.then: ; preds = %entry
515 %1 = load i32, i32* %.global_tid., align 4
516 %2 = call i32 @__kmpc_cancel(%struct.ident_t* nonnull @1, i32 %1, i32 1)
519 if.end: ; preds = %entry
523 declare i32 @__kmpc_cancel(%struct.ident_t*, i32, i32) local_unnamed_addr
525 define internal void @.omp_outlined..19(i32* noalias nocapture readonly %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %cancel2) {
527 %0 = load i32, i32* %cancel2, align 4
528 %tobool.not = icmp eq i32 %0, 0
529 br i1 %tobool.not, label %if.end, label %if.then
531 if.then: ; preds = %entry
532 %1 = load i32, i32* %.global_tid., align 4
533 %2 = call i32 @__kmpc_cancel(%struct.ident_t* nonnull @1, i32 %1, i32 1)
536 if.end: ; preds = %entry
540 define dso_local void @merge_cancellable_regions_seq(i32 %cancel1, i32 %cancel2) local_unnamed_addr {
542 %cancel1.addr = alloca i32, align 4
543 %cancel2.addr = alloca i32, align 4
544 store i32 %cancel1, i32* %cancel1.addr, align 4
545 store i32 %cancel2, i32* %cancel2.addr, align 4
546 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..20 to void (i32*, i32*, ...)*), i32* nonnull %cancel1.addr)
547 %0 = load i32, i32* %cancel1.addr, align 4
548 %tobool.not = icmp eq i32 %0, 0
549 %lnot.ext = zext i1 %tobool.not to i32
550 store i32 %lnot.ext, i32* %cancel2.addr, align 4
551 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..21 to void (i32*, i32*, ...)*), i32* nonnull %cancel2.addr)
555 define internal void @.omp_outlined..20(i32* noalias nocapture readonly %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %cancel1) {
557 %0 = load i32, i32* %cancel1, align 4
558 %tobool.not = icmp eq i32 %0, 0
559 br i1 %tobool.not, label %if.end, label %if.then
561 if.then: ; preds = %entry
562 %1 = load i32, i32* %.global_tid., align 4
563 %2 = call i32 @__kmpc_cancel(%struct.ident_t* nonnull @1, i32 %1, i32 1)
566 if.end: ; preds = %entry
570 define internal void @.omp_outlined..21(i32* noalias nocapture readonly %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %cancel2) {
572 %0 = load i32, i32* %cancel2, align 4
573 %tobool.not = icmp eq i32 %0, 0
574 br i1 %tobool.not, label %if.end, label %if.then
576 if.then: ; preds = %entry
577 %1 = load i32, i32* %.global_tid., align 4
578 %2 = call i32 @__kmpc_cancel(%struct.ident_t* nonnull @1, i32 %1, i32 1)
581 if.end: ; preds = %entry
585 define dso_local void @merge_3(i32 %a) local_unnamed_addr {
587 %a.addr = alloca i32, align 4
588 store i32 %a, i32* %a.addr, align 4
589 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..22 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
590 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..23 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
591 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..24 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
595 define internal void @.omp_outlined..22(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
597 %0 = load i32, i32* %a, align 4
598 call void @use(i32 %0)
602 define internal void @.omp_outlined..23(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
604 %0 = load i32, i32* %a, align 4
605 call void @use(i32 %0)
609 define internal void @.omp_outlined..24(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
611 %0 = load i32, i32* %a, align 4
612 call void @use(i32 %0)
616 define dso_local void @merge_3_seq(i32 %a, i32 %b) local_unnamed_addr {
618 %a.addr = alloca i32, align 4
619 store i32 %a, i32* %a.addr, align 4
620 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..25 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
621 %0 = load i32, i32* %a.addr, align 4
622 %add = add nsw i32 %0, 1
623 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..26 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
624 %1 = load i32, i32* %a.addr, align 4
625 %add1 = add nsw i32 %add, %1
626 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..27 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
627 call void @use(i32 %add1)
631 define internal void @.omp_outlined..25(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
633 %0 = load i32, i32* %a, align 4
634 call void @use(i32 %0)
638 define internal void @.omp_outlined..26(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
640 %0 = load i32, i32* %a, align 4
641 call void @use(i32 %0)
645 define internal void @.omp_outlined..27(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
647 %0 = load i32, i32* %a, align 4
648 call void @use(i32 %0)
652 define dso_local void @unmergable_3_seq_call(i32 %a) local_unnamed_addr {
654 %a.addr = alloca i32, align 4
655 store i32 %a, i32* %a.addr, align 4
656 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
657 call void (...) @foo()
658 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
659 call void (...) @foo()
660 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
664 define internal void @.omp_outlined..28(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
666 %0 = load i32, i32* %a, align 4
667 call void @use(i32 %0)
671 define internal void @.omp_outlined..29(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
673 %0 = load i32, i32* %a, align 4
674 call void @use(i32 %0)
678 define internal void @.omp_outlined..30(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
680 %0 = load i32, i32* %a, align 4
681 call void @use(i32 %0)
685 define dso_local void @unmergable_3_proc_bind(i32 %a) local_unnamed_addr {
687 %a.addr = alloca i32, align 4
688 %0 = call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @1)
689 store i32 %a, i32* %a.addr, align 4
690 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
691 call void @__kmpc_push_proc_bind(%struct.ident_t* nonnull @1, i32 %0, i32 3)
692 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
693 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
697 define internal void @.omp_outlined..31(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
699 %0 = load i32, i32* %a, align 4
700 call void @use(i32 %0)
704 define internal void @.omp_outlined..32(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
706 %0 = load i32, i32* %a, align 4
707 call void @use(i32 %0)
711 define internal void @.omp_outlined..33(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
713 %0 = load i32, i32* %a, align 4
714 call void @use(i32 %0)
718 define dso_local void @unmergable_3_num_threads(i32 %a) local_unnamed_addr {
720 %a.addr = alloca i32, align 4
721 %0 = call i32 @__kmpc_global_thread_num(%struct.ident_t* nonnull @1)
722 store i32 %a, i32* %a.addr, align 4
723 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
724 %1 = load i32, i32* %a.addr, align 4
725 call void @__kmpc_push_num_threads(%struct.ident_t* nonnull @1, i32 %0, i32 %1)
726 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
727 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
731 define internal void @.omp_outlined..34(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
733 %0 = load i32, i32* %a, align 4
734 call void @use(i32 %0)
738 define internal void @.omp_outlined..35(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
740 %0 = load i32, i32* %a, align 4
741 call void @use(i32 %0)
745 define internal void @.omp_outlined..36(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
747 %0 = load i32, i32* %a, align 4
748 call void @use(i32 %0)
752 define dso_local void @merge_2_unmergable_1(i32 %a) local_unnamed_addr {
754 %a.addr = alloca i32, align 4
755 store i32 %a, i32* %a.addr, align 4
756 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..37 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
757 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..38 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
758 call void (...) @foo()
759 call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* nonnull @1, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nonnull %a.addr)
763 define internal void @.omp_outlined..37(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
765 %0 = load i32, i32* %a, align 4
766 call void @use(i32 %0)
770 define internal void @.omp_outlined..38(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
772 %0 = load i32, i32* %a, align 4
773 call void @use(i32 %0)
777 define internal void @.omp_outlined..39(i32* noalias nocapture readnone %.global_tid., i32* noalias nocapture readnone %.bound_tid., i32* nocapture nonnull readonly align 4 dereferenceable(4) %a) {
779 %0 = load i32, i32* %a, align 4
780 call void @use(i32 %0)
785 !llvm.module.flags = !{!0, !3}
787 !0 = !{i32 1, !"wchar_size", i32 4}
789 !2 = !{i64 2, i64 -1, i64 -1, i1 true}
790 !3 = !{i32 7, !"openmp", i32 50}
791 ; CHECK-LABEL: define {{[^@]+}}@merge
792 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
794 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
795 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
796 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
797 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
798 ; CHECK: omp_parallel:
799 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
800 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
801 ; CHECK: omp.par.outlined.exit:
802 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
803 ; CHECK: omp.par.exit.split:
804 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
805 ; CHECK: entry.split.split:
806 ; CHECK-NEXT: ret void
807 ; CHECK-LABEL: define {{[^@]+}}@merge..omp_par
808 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0:[0-9]+]] {
809 ; CHECK-NEXT: omp.par.entry:
810 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
811 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
812 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
813 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
814 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
815 ; CHECK: omp.par.outlined.exit.exitStub:
816 ; CHECK-NEXT: ret void
817 ; CHECK: omp.par.region:
818 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
819 ; CHECK: omp.par.merged:
820 ; CHECK-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
821 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
822 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM]])
823 ; CHECK-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
824 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
825 ; CHECK: entry.split:
826 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
827 ; CHECK: omp.par.region.split:
828 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
829 ; CHECK: omp.par.pre_finalize:
830 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
831 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
832 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
834 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
835 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
836 ; CHECK-NEXT: ret void
837 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..1
838 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
840 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
841 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
842 ; CHECK-NEXT: ret void
843 ; CHECK-LABEL: define {{[^@]+}}@unmergable_proc_bind
844 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
846 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
847 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
848 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
849 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
850 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
851 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
852 ; CHECK-NEXT: ret void
853 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..2
854 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
856 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
857 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
858 ; CHECK-NEXT: ret void
859 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..3
860 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
862 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
863 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
864 ; CHECK-NEXT: ret void
865 ; CHECK-LABEL: define {{[^@]+}}@unmergable_num_threads
866 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
868 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
869 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
870 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
871 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
872 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
873 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
874 ; CHECK-NEXT: ret void
875 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..4
876 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
878 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
879 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
880 ; CHECK-NEXT: ret void
881 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..5
882 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
884 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
885 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
886 ; CHECK-NEXT: ret void
887 ; CHECK-LABEL: define {{[^@]+}}@unmergable_seq_call
888 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
890 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
891 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
892 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
893 ; CHECK-NEXT: call void (...) @foo()
894 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
895 ; CHECK-NEXT: ret void
896 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..6
897 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
899 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
900 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
901 ; CHECK-NEXT: ret void
902 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..7
903 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
905 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
906 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
907 ; CHECK-NEXT: ret void
908 ; CHECK-LABEL: define {{[^@]+}}@merge_seq
909 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
911 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
912 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
913 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
914 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
915 ; CHECK: omp_parallel:
916 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
917 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
918 ; CHECK: omp.par.outlined.exit:
919 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
920 ; CHECK: omp.par.exit.split:
921 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
922 ; CHECK: entry.split.split:
923 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
924 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
925 ; CHECK-NEXT: ret void
926 ; CHECK-LABEL: define {{[^@]+}}@merge_seq..omp_par
927 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
928 ; CHECK-NEXT: omp.par.entry:
929 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
930 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
931 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
932 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
933 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
934 ; CHECK: omp.par.outlined.exit.exitStub:
935 ; CHECK-NEXT: ret void
936 ; CHECK: omp.par.region:
937 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
938 ; CHECK: omp.par.merged:
939 ; CHECK-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
940 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
941 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
942 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
943 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
944 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
945 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
946 ; CHECK: omp_region.end:
947 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
948 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
949 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
950 ; CHECK: omp.par.merged.split.split:
951 ; CHECK-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
952 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
953 ; CHECK: entry.split:
954 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
955 ; CHECK: omp.par.region.split:
956 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
957 ; CHECK: omp.par.pre_finalize:
958 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
959 ; CHECK: omp_region.body:
960 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
961 ; CHECK: seq.par.merged:
962 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
963 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
964 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
965 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
966 ; CHECK: omp.par.merged.split:
967 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
968 ; CHECK: omp_region.body.split:
969 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
970 ; CHECK-NEXT: br label [[OMP_REGION_END]]
971 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..8
972 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
974 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
975 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
976 ; CHECK-NEXT: ret void
977 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..9
978 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
980 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
981 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
982 ; CHECK-NEXT: ret void
983 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float
984 ; CHECK-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
986 ; CHECK-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
987 ; CHECK-NEXT: store float [[F]], float* [[F_ADDR]], align 4
988 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
989 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
990 ; CHECK: omp_parallel:
991 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_ADDR]], float* [[P]])
992 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
993 ; CHECK: omp.par.outlined.exit:
994 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
995 ; CHECK: omp.par.exit.split:
996 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
997 ; CHECK: entry.split.split:
998 ; CHECK-NEXT: ret void
999 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
1000 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
1001 ; CHECK-NEXT: omp.par.entry:
1002 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1003 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1004 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1005 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1006 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1007 ; CHECK: omp.par.outlined.exit.exitStub:
1008 ; CHECK-NEXT: ret void
1009 ; CHECK: omp.par.region:
1010 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1011 ; CHECK: omp.par.merged:
1012 ; CHECK-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
1013 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1014 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1015 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1016 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1017 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1018 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1019 ; CHECK: omp_region.end:
1020 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1021 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1022 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1023 ; CHECK: omp.par.merged.split.split:
1024 ; CHECK-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
1025 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1026 ; CHECK: entry.split:
1027 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1028 ; CHECK: omp.par.region.split:
1029 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1030 ; CHECK: omp.par.pre_finalize:
1031 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1032 ; CHECK: omp_region.body:
1033 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1034 ; CHECK: seq.par.merged:
1035 ; CHECK-NEXT: [[TMP3:%.*]] = load float, float* [[F_ADDR]], align 4
1036 ; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP3]], 0x40091EB860000000
1037 ; CHECK-NEXT: store float [[ADD]], float* [[P]], align 4
1038 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1039 ; CHECK: omp.par.merged.split:
1040 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1041 ; CHECK: omp_region.body.split:
1042 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1043 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1044 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..10
1045 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
1046 ; CHECK-NEXT: entry:
1047 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
1048 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
1049 ; CHECK-NEXT: call void @use(i32 [[CONV]])
1050 ; CHECK-NEXT: ret void
1051 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..11
1052 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
1053 ; CHECK-NEXT: entry:
1054 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
1055 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
1056 ; CHECK-NEXT: call void @use(i32 [[CONV]])
1057 ; CHECK-NEXT: ret void
1058 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate
1059 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1060 ; CHECK-NEXT: entry:
1061 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
1062 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1063 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1064 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1065 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1066 ; CHECK: omp_parallel:
1067 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
1068 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1069 ; CHECK: omp.par.outlined.exit:
1070 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1071 ; CHECK: omp.par.exit.split:
1072 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1073 ; CHECK: entry.split.split:
1074 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
1075 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1076 ; CHECK-NEXT: ret void
1077 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
1078 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
1079 ; CHECK-NEXT: omp.par.entry:
1080 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1081 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1082 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1083 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1084 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1085 ; CHECK: omp.par.outlined.exit.exitStub:
1086 ; CHECK-NEXT: ret void
1087 ; CHECK: omp.par.region:
1088 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1089 ; CHECK: omp.par.merged:
1090 ; CHECK-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1091 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1092 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1093 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1094 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1095 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1096 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1097 ; CHECK: omp_region.end:
1098 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1099 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1100 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1101 ; CHECK: omp.par.merged.split.split:
1102 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
1103 ; CHECK-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
1104 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1105 ; CHECK: entry.split:
1106 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1107 ; CHECK: omp.par.region.split:
1108 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1109 ; CHECK: omp.par.pre_finalize:
1110 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1111 ; CHECK: omp_region.body:
1112 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1113 ; CHECK: seq.par.merged:
1114 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
1115 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
1116 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
1117 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
1118 ; CHECK-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
1119 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1120 ; CHECK: omp.par.merged.split:
1121 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1122 ; CHECK: omp_region.body.split:
1123 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1124 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1125 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..12
1126 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1127 ; CHECK-NEXT: entry:
1128 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1129 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1130 ; CHECK-NEXT: ret void
1131 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..13
1132 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
1133 ; CHECK-NEXT: entry:
1134 ; CHECK-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
1135 ; CHECK-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
1136 ; CHECK-NEXT: ret void
1137 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt
1138 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1139 ; CHECK-NEXT: entry:
1140 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1141 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1142 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1143 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1144 ; CHECK: omp_parallel:
1145 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
1146 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1147 ; CHECK: omp.par.outlined.exit:
1148 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1149 ; CHECK: omp.par.exit.split:
1150 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1151 ; CHECK: entry.split.split:
1152 ; CHECK-NEXT: ret void
1153 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
1154 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
1155 ; CHECK-NEXT: omp.par.entry:
1156 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
1157 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1158 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1159 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1160 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1161 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1162 ; CHECK: omp.par.outlined.exit.exitStub:
1163 ; CHECK-NEXT: ret void
1164 ; CHECK: omp.par.region:
1165 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1166 ; CHECK: omp.par.merged:
1167 ; CHECK-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1168 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1169 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1170 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1171 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1172 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1173 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1174 ; CHECK: omp_region.end:
1175 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1176 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1177 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1178 ; CHECK: omp.par.merged.split.split:
1179 ; CHECK-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1180 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1181 ; CHECK: entry.split:
1182 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1183 ; CHECK: omp.par.region.split:
1184 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1185 ; CHECK: omp.par.pre_finalize:
1186 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1187 ; CHECK: omp_region.body:
1188 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1189 ; CHECK: seq.par.merged:
1190 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
1191 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
1192 ; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
1193 ; CHECK-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
1194 ; CHECK-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
1195 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
1196 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1197 ; CHECK: omp.par.merged.split:
1198 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1199 ; CHECK: omp_region.body.split:
1200 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1201 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1202 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..14
1203 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1204 ; CHECK-NEXT: entry:
1205 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1206 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1207 ; CHECK-NEXT: ret void
1208 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..15
1209 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1210 ; CHECK-NEXT: entry:
1211 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1212 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1213 ; CHECK-NEXT: ret void
1214 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use
1215 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1216 ; CHECK-NEXT: entry:
1217 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1218 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
1219 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1220 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1221 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1222 ; CHECK: omp_parallel:
1223 ; CHECK-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
1224 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
1225 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[B]])
1226 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1227 ; CHECK: omp.par.outlined.exit:
1228 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1229 ; CHECK: omp.par.exit.split:
1230 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1231 ; CHECK: entry.split.split:
1232 ; CHECK-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
1233 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
1234 ; CHECK-NEXT: ret void
1235 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
1236 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
1237 ; CHECK-NEXT: omp.par.entry:
1238 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1239 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1240 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1241 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1242 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1243 ; CHECK: omp.par.outlined.exit.exitStub:
1244 ; CHECK-NEXT: ret void
1245 ; CHECK: omp.par.region:
1246 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1247 ; CHECK: omp.par.merged:
1248 ; CHECK-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1249 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1250 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1251 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1252 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1253 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1254 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1255 ; CHECK: omp_region.end:
1256 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1257 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1258 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1259 ; CHECK: omp.par.merged.split.split:
1260 ; CHECK-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
1261 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1262 ; CHECK: entry.split:
1263 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1264 ; CHECK: omp.par.region.split:
1265 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1266 ; CHECK: omp.par.pre_finalize:
1267 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1268 ; CHECK: omp_region.body:
1269 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1270 ; CHECK: seq.par.merged:
1271 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
1272 ; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[A_ADDR]], align 4
1273 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP4]], 1
1274 ; CHECK-NEXT: store i32 [[ADD]], i32* [[B]], align 4
1275 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1276 ; CHECK: omp.par.merged.split:
1277 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1278 ; CHECK: omp_region.body.split:
1279 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1280 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1281 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..16
1282 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1283 ; CHECK-NEXT: entry:
1284 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1285 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1286 ; CHECK-NEXT: ret void
1287 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..17
1288 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
1289 ; CHECK-NEXT: entry:
1290 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1291 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1292 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
1293 ; CHECK-NEXT: call void @use(i32 [[TMP1]])
1294 ; CHECK-NEXT: ret void
1295 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions
1296 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
1297 ; CHECK-NEXT: entry:
1298 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
1299 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
1300 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
1301 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
1302 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1303 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1304 ; CHECK: omp_parallel:
1305 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
1306 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1307 ; CHECK: omp.par.outlined.exit:
1308 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1309 ; CHECK: omp.par.exit.split:
1310 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1311 ; CHECK: entry.split.split:
1312 ; CHECK-NEXT: ret void
1313 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
1314 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
1315 ; CHECK-NEXT: omp.par.entry:
1316 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1317 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1318 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1319 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1320 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1321 ; CHECK: omp.par.outlined.exit.exitStub:
1322 ; CHECK-NEXT: ret void
1323 ; CHECK: omp.par.region:
1324 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1325 ; CHECK: omp.par.merged:
1326 ; CHECK-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
1327 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1328 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1329 ; CHECK-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
1330 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1331 ; CHECK: entry.split:
1332 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1333 ; CHECK: omp.par.region.split:
1334 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1335 ; CHECK: omp.par.pre_finalize:
1336 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1337 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..18
1338 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
1339 ; CHECK-NEXT: entry:
1340 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
1341 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
1342 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
1344 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
1345 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
1346 ; CHECK-NEXT: ret void
1348 ; CHECK-NEXT: ret void
1349 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..19
1350 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
1351 ; CHECK-NEXT: entry:
1352 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
1353 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
1354 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
1356 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
1357 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
1358 ; CHECK-NEXT: ret void
1360 ; CHECK-NEXT: ret void
1361 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
1362 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
1363 ; CHECK-NEXT: entry:
1364 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
1365 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
1366 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
1367 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
1368 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1369 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1370 ; CHECK: omp_parallel:
1371 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
1372 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1373 ; CHECK: omp.par.outlined.exit:
1374 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1375 ; CHECK: omp.par.exit.split:
1376 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1377 ; CHECK: entry.split.split:
1378 ; CHECK-NEXT: ret void
1379 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
1380 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
1381 ; CHECK-NEXT: omp.par.entry:
1382 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1383 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1384 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1385 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1386 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1387 ; CHECK: omp.par.outlined.exit.exitStub:
1388 ; CHECK-NEXT: ret void
1389 ; CHECK: omp.par.region:
1390 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1391 ; CHECK: omp.par.merged:
1392 ; CHECK-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
1393 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1394 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1395 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1396 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1397 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1398 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1399 ; CHECK: omp_region.end:
1400 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1401 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1402 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1403 ; CHECK: omp.par.merged.split.split:
1404 ; CHECK-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
1405 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1406 ; CHECK: entry.split:
1407 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1408 ; CHECK: omp.par.region.split:
1409 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1410 ; CHECK: omp.par.pre_finalize:
1411 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1412 ; CHECK: omp_region.body:
1413 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1414 ; CHECK: seq.par.merged:
1415 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[CANCEL1_ADDR]], align 4
1416 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP3]], 0
1417 ; CHECK-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
1418 ; CHECK-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
1419 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1420 ; CHECK: omp.par.merged.split:
1421 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1422 ; CHECK: omp_region.body.split:
1423 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1424 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1425 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..20
1426 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
1427 ; CHECK-NEXT: entry:
1428 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
1429 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
1430 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
1432 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
1433 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
1434 ; CHECK-NEXT: ret void
1436 ; CHECK-NEXT: ret void
1437 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..21
1438 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
1439 ; CHECK-NEXT: entry:
1440 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
1441 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
1442 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
1444 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
1445 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
1446 ; CHECK-NEXT: ret void
1448 ; CHECK-NEXT: ret void
1449 ; CHECK-LABEL: define {{[^@]+}}@merge_3
1450 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1451 ; CHECK-NEXT: entry:
1452 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1453 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1454 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1455 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1456 ; CHECK: omp_parallel:
1457 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
1458 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1459 ; CHECK: omp.par.outlined.exit:
1460 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1461 ; CHECK: omp.par.exit.split:
1462 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1463 ; CHECK: entry.split.split:
1464 ; CHECK-NEXT: ret void
1465 ; CHECK-LABEL: define {{[^@]+}}@merge_3..omp_par
1466 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
1467 ; CHECK-NEXT: omp.par.entry:
1468 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1469 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1470 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1471 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1472 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1473 ; CHECK: omp.par.outlined.exit.exitStub:
1474 ; CHECK-NEXT: ret void
1475 ; CHECK: omp.par.region:
1476 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1477 ; CHECK: omp.par.merged:
1478 ; CHECK-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1479 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1480 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1481 ; CHECK-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1482 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1483 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1484 ; CHECK-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1485 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1486 ; CHECK: entry.split:
1487 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1488 ; CHECK: omp.par.region.split:
1489 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1490 ; CHECK: omp.par.pre_finalize:
1491 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1492 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..22
1493 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1494 ; CHECK-NEXT: entry:
1495 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1496 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1497 ; CHECK-NEXT: ret void
1498 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..23
1499 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1500 ; CHECK-NEXT: entry:
1501 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1502 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1503 ; CHECK-NEXT: ret void
1504 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..24
1505 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1506 ; CHECK-NEXT: entry:
1507 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1508 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1509 ; CHECK-NEXT: ret void
1510 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq
1511 ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
1512 ; CHECK-NEXT: entry:
1513 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
1514 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
1515 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1516 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1517 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1518 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1519 ; CHECK: omp_parallel:
1520 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
1521 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1522 ; CHECK: omp.par.outlined.exit:
1523 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1524 ; CHECK: omp.par.exit.split:
1525 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1526 ; CHECK: entry.split.split:
1527 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
1528 ; CHECK-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
1529 ; CHECK-NEXT: ret void
1530 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
1531 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
1532 ; CHECK-NEXT: omp.par.entry:
1533 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1534 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1535 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1536 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1537 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1538 ; CHECK: omp.par.outlined.exit.exitStub:
1539 ; CHECK-NEXT: ret void
1540 ; CHECK: omp.par.region:
1541 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1542 ; CHECK: omp.par.merged:
1543 ; CHECK-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1544 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1545 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1546 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1547 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1548 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1549 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1550 ; CHECK: omp_region.end:
1551 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1552 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1553 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1554 ; CHECK: omp.par.merged.split.split:
1555 ; CHECK-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1556 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1557 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
1558 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1559 ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
1560 ; CHECK-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
1561 ; CHECK-NEXT: br i1 [[TMP4]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
1562 ; CHECK: omp_region.end4:
1563 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1564 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
1565 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
1566 ; CHECK: omp.par.merged.split.split.split.split:
1567 ; CHECK-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1568 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1569 ; CHECK: entry.split:
1570 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1571 ; CHECK: omp.par.region.split:
1572 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1573 ; CHECK: omp.par.pre_finalize:
1574 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1575 ; CHECK: omp_region.body5:
1576 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
1577 ; CHECK: seq.par.merged2:
1578 ; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[A_ADDR]], align 4
1579 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
1580 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP5]]
1581 ; CHECK-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
1582 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
1583 ; CHECK: omp.par.merged.split.split.split:
1584 ; CHECK-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
1585 ; CHECK: omp_region.body5.split:
1586 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
1587 ; CHECK-NEXT: br label [[OMP_REGION_END4]]
1588 ; CHECK: omp_region.body:
1589 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1590 ; CHECK: seq.par.merged:
1591 ; CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ADDR]], align 4
1592 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
1593 ; CHECK-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
1594 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1595 ; CHECK: omp.par.merged.split:
1596 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1597 ; CHECK: omp_region.body.split:
1598 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1599 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1600 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..25
1601 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1602 ; CHECK-NEXT: entry:
1603 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1604 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1605 ; CHECK-NEXT: ret void
1606 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..26
1607 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1608 ; CHECK-NEXT: entry:
1609 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1610 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1611 ; CHECK-NEXT: ret void
1612 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..27
1613 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1614 ; CHECK-NEXT: entry:
1615 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1616 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1617 ; CHECK-NEXT: ret void
1618 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_seq_call
1619 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1620 ; CHECK-NEXT: entry:
1621 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1622 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1623 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1624 ; CHECK-NEXT: call void (...) @foo()
1625 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1626 ; CHECK-NEXT: call void (...) @foo()
1627 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1628 ; CHECK-NEXT: ret void
1629 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..28
1630 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1631 ; CHECK-NEXT: entry:
1632 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1633 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1634 ; CHECK-NEXT: ret void
1635 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..29
1636 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1637 ; CHECK-NEXT: entry:
1638 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1639 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1640 ; CHECK-NEXT: ret void
1641 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..30
1642 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1643 ; CHECK-NEXT: entry:
1644 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1645 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1646 ; CHECK-NEXT: ret void
1647 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
1648 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1649 ; CHECK-NEXT: entry:
1650 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1651 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
1652 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1653 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1654 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
1655 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1656 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1657 ; CHECK-NEXT: ret void
1658 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..31
1659 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1660 ; CHECK-NEXT: entry:
1661 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1662 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1663 ; CHECK-NEXT: ret void
1664 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..32
1665 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1666 ; CHECK-NEXT: entry:
1667 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1668 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1669 ; CHECK-NEXT: ret void
1670 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..33
1671 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1672 ; CHECK-NEXT: entry:
1673 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1674 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1675 ; CHECK-NEXT: ret void
1676 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_num_threads
1677 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1678 ; CHECK-NEXT: entry:
1679 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1680 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
1681 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1682 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1683 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_ADDR]], align 4
1684 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[TMP1]])
1685 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1686 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1687 ; CHECK-NEXT: ret void
1688 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..34
1689 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1690 ; CHECK-NEXT: entry:
1691 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1692 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1693 ; CHECK-NEXT: ret void
1694 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..35
1695 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1696 ; CHECK-NEXT: entry:
1697 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1698 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1699 ; CHECK-NEXT: ret void
1700 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..36
1701 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1702 ; CHECK-NEXT: entry:
1703 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1704 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1705 ; CHECK-NEXT: ret void
1706 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1
1707 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1708 ; CHECK-NEXT: entry:
1709 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1710 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1711 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1712 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1713 ; CHECK: omp_parallel:
1714 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
1715 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1716 ; CHECK: omp.par.outlined.exit:
1717 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1718 ; CHECK: omp.par.exit.split:
1719 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1720 ; CHECK: entry.split.split:
1721 ; CHECK-NEXT: call void (...) @foo()
1722 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1723 ; CHECK-NEXT: ret void
1724 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
1725 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
1726 ; CHECK-NEXT: omp.par.entry:
1727 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1728 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1729 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1730 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1731 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1732 ; CHECK: omp.par.outlined.exit.exitStub:
1733 ; CHECK-NEXT: ret void
1734 ; CHECK: omp.par.region:
1735 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1736 ; CHECK: omp.par.merged:
1737 ; CHECK-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1738 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1739 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1740 ; CHECK-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1741 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1742 ; CHECK: entry.split:
1743 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1744 ; CHECK: omp.par.region.split:
1745 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1746 ; CHECK: omp.par.pre_finalize:
1747 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1748 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..37
1749 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1750 ; CHECK-NEXT: entry:
1751 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1752 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1753 ; CHECK-NEXT: ret void
1754 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..38
1755 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1756 ; CHECK-NEXT: entry:
1757 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1758 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1759 ; CHECK-NEXT: ret void
1760 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..39
1761 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1762 ; CHECK-NEXT: entry:
1763 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1764 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1765 ; CHECK-NEXT: ret void
1766 ; CHECK-LABEL: define {{[^@]+}}@merge
1767 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1768 ; CHECK-NEXT: entry:
1769 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1770 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1771 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1772 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1773 ; CHECK: omp_parallel:
1774 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
1775 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1776 ; CHECK: omp.par.outlined.exit:
1777 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1778 ; CHECK: omp.par.exit.split:
1779 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1780 ; CHECK: entry.split.split:
1781 ; CHECK-NEXT: ret void
1782 ; CHECK-LABEL: define {{[^@]+}}@merge..omp_par
1783 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
1784 ; CHECK-NEXT: omp.par.entry:
1785 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1786 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1787 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1788 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1789 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1790 ; CHECK: omp.par.outlined.exit.exitStub:
1791 ; CHECK-NEXT: ret void
1792 ; CHECK: omp.par.region:
1793 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1794 ; CHECK: omp.par.merged:
1795 ; CHECK-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1796 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1797 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1798 ; CHECK-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1799 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1800 ; CHECK: entry.split:
1801 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1802 ; CHECK: omp.par.region.split:
1803 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1804 ; CHECK: omp.par.pre_finalize:
1805 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1806 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
1807 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1808 ; CHECK-NEXT: entry:
1809 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1810 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1811 ; CHECK-NEXT: ret void
1812 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..1
1813 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1814 ; CHECK-NEXT: entry:
1815 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1816 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1817 ; CHECK-NEXT: ret void
1818 ; CHECK-LABEL: define {{[^@]+}}@unmergable_proc_bind
1819 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1820 ; CHECK-NEXT: entry:
1821 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1822 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
1823 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1824 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
1825 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1826 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1827 ; CHECK-NEXT: ret void
1828 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..2
1829 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1830 ; CHECK-NEXT: entry:
1831 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1832 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1833 ; CHECK-NEXT: ret void
1834 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..3
1835 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1836 ; CHECK-NEXT: entry:
1837 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1838 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1839 ; CHECK-NEXT: ret void
1840 ; CHECK-LABEL: define {{[^@]+}}@unmergable_num_threads
1841 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1842 ; CHECK-NEXT: entry:
1843 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1844 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
1845 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1846 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
1847 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1848 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1849 ; CHECK-NEXT: ret void
1850 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..4
1851 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1852 ; CHECK-NEXT: entry:
1853 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1854 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1855 ; CHECK-NEXT: ret void
1856 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..5
1857 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1858 ; CHECK-NEXT: entry:
1859 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1860 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1861 ; CHECK-NEXT: ret void
1862 ; CHECK-LABEL: define {{[^@]+}}@unmergable_seq_call
1863 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1864 ; CHECK-NEXT: entry:
1865 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1866 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1867 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1868 ; CHECK-NEXT: call void (...) @foo()
1869 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1870 ; CHECK-NEXT: ret void
1871 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..6
1872 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1873 ; CHECK-NEXT: entry:
1874 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1875 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1876 ; CHECK-NEXT: ret void
1877 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..7
1878 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1879 ; CHECK-NEXT: entry:
1880 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1881 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1882 ; CHECK-NEXT: ret void
1883 ; CHECK-LABEL: define {{[^@]+}}@merge_seq
1884 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
1885 ; CHECK-NEXT: entry:
1886 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1887 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
1888 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1889 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1890 ; CHECK: omp_parallel:
1891 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
1892 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1893 ; CHECK: omp.par.outlined.exit:
1894 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1895 ; CHECK: omp.par.exit.split:
1896 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1897 ; CHECK: entry.split.split:
1898 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
1899 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1900 ; CHECK-NEXT: ret void
1901 ; CHECK-LABEL: define {{[^@]+}}@merge_seq..omp_par
1902 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
1903 ; CHECK-NEXT: omp.par.entry:
1904 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1905 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1906 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1907 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1908 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1909 ; CHECK: omp.par.outlined.exit.exitStub:
1910 ; CHECK-NEXT: ret void
1911 ; CHECK: omp.par.region:
1912 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1913 ; CHECK: omp.par.merged:
1914 ; CHECK-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1915 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1916 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1917 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1918 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1919 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1920 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1921 ; CHECK: omp_region.end:
1922 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1923 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1924 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1925 ; CHECK: omp.par.merged.split.split:
1926 ; CHECK-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
1927 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
1928 ; CHECK: entry.split:
1929 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
1930 ; CHECK: omp.par.region.split:
1931 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
1932 ; CHECK: omp.par.pre_finalize:
1933 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
1934 ; CHECK: omp_region.body:
1935 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
1936 ; CHECK: seq.par.merged:
1937 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
1938 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
1939 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
1940 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
1941 ; CHECK: omp.par.merged.split:
1942 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
1943 ; CHECK: omp_region.body.split:
1944 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1945 ; CHECK-NEXT: br label [[OMP_REGION_END]]
1946 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..8
1947 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1948 ; CHECK-NEXT: entry:
1949 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1950 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1951 ; CHECK-NEXT: ret void
1952 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..9
1953 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
1954 ; CHECK-NEXT: entry:
1955 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
1956 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
1957 ; CHECK-NEXT: ret void
1958 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float
1959 ; CHECK-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
1960 ; CHECK-NEXT: entry:
1961 ; CHECK-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
1962 ; CHECK-NEXT: store float [[F]], float* [[F_ADDR]], align 4
1963 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1964 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
1965 ; CHECK: omp_parallel:
1966 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_ADDR]], float* [[P]])
1967 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
1968 ; CHECK: omp.par.outlined.exit:
1969 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
1970 ; CHECK: omp.par.exit.split:
1971 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
1972 ; CHECK: entry.split.split:
1973 ; CHECK-NEXT: ret void
1974 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
1975 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
1976 ; CHECK-NEXT: omp.par.entry:
1977 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
1978 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
1979 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
1980 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
1981 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
1982 ; CHECK: omp.par.outlined.exit.exitStub:
1983 ; CHECK-NEXT: ret void
1984 ; CHECK: omp.par.region:
1985 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
1986 ; CHECK: omp.par.merged:
1987 ; CHECK-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
1988 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1989 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1990 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1991 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
1992 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1993 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
1994 ; CHECK: omp_region.end:
1995 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1996 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
1997 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
1998 ; CHECK: omp.par.merged.split.split:
1999 ; CHECK-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
2000 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2001 ; CHECK: entry.split:
2002 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2003 ; CHECK: omp.par.region.split:
2004 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2005 ; CHECK: omp.par.pre_finalize:
2006 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2007 ; CHECK: omp_region.body:
2008 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2009 ; CHECK: seq.par.merged:
2010 ; CHECK-NEXT: [[TMP3:%.*]] = load float, float* [[F_ADDR]], align 4
2011 ; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP3]], 0x40091EB860000000
2012 ; CHECK-NEXT: store float [[ADD]], float* [[P]], align 4
2013 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2014 ; CHECK: omp.par.merged.split:
2015 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2016 ; CHECK: omp_region.body.split:
2017 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2018 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2019 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..10
2020 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
2021 ; CHECK-NEXT: entry:
2022 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
2023 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
2024 ; CHECK-NEXT: call void @use(i32 [[CONV]])
2025 ; CHECK-NEXT: ret void
2026 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..11
2027 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
2028 ; CHECK-NEXT: entry:
2029 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
2030 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
2031 ; CHECK-NEXT: call void @use(i32 [[CONV]])
2032 ; CHECK-NEXT: ret void
2033 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate
2034 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2035 ; CHECK-NEXT: entry:
2036 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
2037 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2038 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2039 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2040 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2041 ; CHECK: omp_parallel:
2042 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
2043 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2044 ; CHECK: omp.par.outlined.exit:
2045 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2046 ; CHECK: omp.par.exit.split:
2047 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2048 ; CHECK: entry.split.split:
2049 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
2050 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2051 ; CHECK-NEXT: ret void
2052 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
2053 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
2054 ; CHECK-NEXT: omp.par.entry:
2055 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2056 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2057 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2058 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2059 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2060 ; CHECK: omp.par.outlined.exit.exitStub:
2061 ; CHECK-NEXT: ret void
2062 ; CHECK: omp.par.region:
2063 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2064 ; CHECK: omp.par.merged:
2065 ; CHECK-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2066 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2067 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2068 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2069 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2070 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2071 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2072 ; CHECK: omp_region.end:
2073 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2074 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2075 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2076 ; CHECK: omp.par.merged.split.split:
2077 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
2078 ; CHECK-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
2079 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2080 ; CHECK: entry.split:
2081 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2082 ; CHECK: omp.par.region.split:
2083 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2084 ; CHECK: omp.par.pre_finalize:
2085 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2086 ; CHECK: omp_region.body:
2087 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2088 ; CHECK: seq.par.merged:
2089 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
2090 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
2091 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
2092 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
2093 ; CHECK-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
2094 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2095 ; CHECK: omp.par.merged.split:
2096 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2097 ; CHECK: omp_region.body.split:
2098 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2099 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2100 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..12
2101 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2102 ; CHECK-NEXT: entry:
2103 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2104 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2105 ; CHECK-NEXT: ret void
2106 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..13
2107 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
2108 ; CHECK-NEXT: entry:
2109 ; CHECK-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
2110 ; CHECK-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
2111 ; CHECK-NEXT: ret void
2112 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt
2113 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2114 ; CHECK-NEXT: entry:
2115 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2116 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2117 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2118 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2119 ; CHECK: omp_parallel:
2120 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
2121 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2122 ; CHECK: omp.par.outlined.exit:
2123 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2124 ; CHECK: omp.par.exit.split:
2125 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2126 ; CHECK: entry.split.split:
2127 ; CHECK-NEXT: ret void
2128 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
2129 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
2130 ; CHECK-NEXT: omp.par.entry:
2131 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
2132 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2133 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2134 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2135 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2136 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2137 ; CHECK: omp.par.outlined.exit.exitStub:
2138 ; CHECK-NEXT: ret void
2139 ; CHECK: omp.par.region:
2140 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2141 ; CHECK: omp.par.merged:
2142 ; CHECK-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2143 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2144 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2145 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2146 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2147 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2148 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2149 ; CHECK: omp_region.end:
2150 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2151 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2152 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2153 ; CHECK: omp.par.merged.split.split:
2154 ; CHECK-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2155 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2156 ; CHECK: entry.split:
2157 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2158 ; CHECK: omp.par.region.split:
2159 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2160 ; CHECK: omp.par.pre_finalize:
2161 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2162 ; CHECK: omp_region.body:
2163 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2164 ; CHECK: seq.par.merged:
2165 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
2166 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
2167 ; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
2168 ; CHECK-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
2169 ; CHECK-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
2170 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
2171 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2172 ; CHECK: omp.par.merged.split:
2173 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2174 ; CHECK: omp_region.body.split:
2175 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2176 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2177 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..14
2178 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2179 ; CHECK-NEXT: entry:
2180 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2181 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2182 ; CHECK-NEXT: ret void
2183 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..15
2184 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2185 ; CHECK-NEXT: entry:
2186 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2187 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2188 ; CHECK-NEXT: ret void
2189 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use
2190 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2191 ; CHECK-NEXT: entry:
2192 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2193 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
2194 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2195 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2196 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2197 ; CHECK: omp_parallel:
2198 ; CHECK-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
2199 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
2200 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[B]])
2201 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2202 ; CHECK: omp.par.outlined.exit:
2203 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2204 ; CHECK: omp.par.exit.split:
2205 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2206 ; CHECK: entry.split.split:
2207 ; CHECK-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
2208 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
2209 ; CHECK-NEXT: ret void
2210 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
2211 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
2212 ; CHECK-NEXT: omp.par.entry:
2213 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2214 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2215 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2216 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2217 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2218 ; CHECK: omp.par.outlined.exit.exitStub:
2219 ; CHECK-NEXT: ret void
2220 ; CHECK: omp.par.region:
2221 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2222 ; CHECK: omp.par.merged:
2223 ; CHECK-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2224 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2225 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2226 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2227 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2228 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2229 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2230 ; CHECK: omp_region.end:
2231 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2232 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2233 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2234 ; CHECK: omp.par.merged.split.split:
2235 ; CHECK-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
2236 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2237 ; CHECK: entry.split:
2238 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2239 ; CHECK: omp.par.region.split:
2240 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2241 ; CHECK: omp.par.pre_finalize:
2242 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2243 ; CHECK: omp_region.body:
2244 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2245 ; CHECK: seq.par.merged:
2246 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
2247 ; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[A_ADDR]], align 4
2248 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP4]], 1
2249 ; CHECK-NEXT: store i32 [[ADD]], i32* [[B]], align 4
2250 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2251 ; CHECK: omp.par.merged.split:
2252 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2253 ; CHECK: omp_region.body.split:
2254 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2255 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2256 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..16
2257 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2258 ; CHECK-NEXT: entry:
2259 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2260 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2261 ; CHECK-NEXT: ret void
2262 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..17
2263 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
2264 ; CHECK-NEXT: entry:
2265 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2266 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2267 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
2268 ; CHECK-NEXT: call void @use(i32 [[TMP1]])
2269 ; CHECK-NEXT: ret void
2270 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions
2271 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
2272 ; CHECK-NEXT: entry:
2273 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
2274 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
2275 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
2276 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
2277 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2278 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2279 ; CHECK: omp_parallel:
2280 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
2281 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2282 ; CHECK: omp.par.outlined.exit:
2283 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2284 ; CHECK: omp.par.exit.split:
2285 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2286 ; CHECK: entry.split.split:
2287 ; CHECK-NEXT: ret void
2288 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
2289 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
2290 ; CHECK-NEXT: omp.par.entry:
2291 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2292 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2293 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2294 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2295 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2296 ; CHECK: omp.par.outlined.exit.exitStub:
2297 ; CHECK-NEXT: ret void
2298 ; CHECK: omp.par.region:
2299 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2300 ; CHECK: omp.par.merged:
2301 ; CHECK-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
2302 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2303 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2304 ; CHECK-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
2305 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2306 ; CHECK: entry.split:
2307 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2308 ; CHECK: omp.par.region.split:
2309 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2310 ; CHECK: omp.par.pre_finalize:
2311 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2312 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..18
2313 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
2314 ; CHECK-NEXT: entry:
2315 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
2316 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
2317 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2319 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
2320 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
2321 ; CHECK-NEXT: ret void
2323 ; CHECK-NEXT: ret void
2324 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..19
2325 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
2326 ; CHECK-NEXT: entry:
2327 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
2328 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
2329 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2331 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
2332 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
2333 ; CHECK-NEXT: ret void
2335 ; CHECK-NEXT: ret void
2336 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
2337 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
2338 ; CHECK-NEXT: entry:
2339 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
2340 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
2341 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
2342 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
2343 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2344 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2345 ; CHECK: omp_parallel:
2346 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
2347 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2348 ; CHECK: omp.par.outlined.exit:
2349 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2350 ; CHECK: omp.par.exit.split:
2351 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2352 ; CHECK: entry.split.split:
2353 ; CHECK-NEXT: ret void
2354 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
2355 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
2356 ; CHECK-NEXT: omp.par.entry:
2357 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2358 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2359 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2360 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2361 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2362 ; CHECK: omp.par.outlined.exit.exitStub:
2363 ; CHECK-NEXT: ret void
2364 ; CHECK: omp.par.region:
2365 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2366 ; CHECK: omp.par.merged:
2367 ; CHECK-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
2368 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2369 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2370 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2371 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2372 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2373 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2374 ; CHECK: omp_region.end:
2375 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2376 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2377 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2378 ; CHECK: omp.par.merged.split.split:
2379 ; CHECK-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
2380 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2381 ; CHECK: entry.split:
2382 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2383 ; CHECK: omp.par.region.split:
2384 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2385 ; CHECK: omp.par.pre_finalize:
2386 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2387 ; CHECK: omp_region.body:
2388 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2389 ; CHECK: seq.par.merged:
2390 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[CANCEL1_ADDR]], align 4
2391 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP3]], 0
2392 ; CHECK-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
2393 ; CHECK-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
2394 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2395 ; CHECK: omp.par.merged.split:
2396 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2397 ; CHECK: omp_region.body.split:
2398 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2399 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2400 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..20
2401 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
2402 ; CHECK-NEXT: entry:
2403 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
2404 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
2405 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2407 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
2408 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
2409 ; CHECK-NEXT: ret void
2411 ; CHECK-NEXT: ret void
2412 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..21
2413 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
2414 ; CHECK-NEXT: entry:
2415 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
2416 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
2417 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
2419 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
2420 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
2421 ; CHECK-NEXT: ret void
2423 ; CHECK-NEXT: ret void
2424 ; CHECK-LABEL: define {{[^@]+}}@merge_3
2425 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2426 ; CHECK-NEXT: entry:
2427 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2428 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2429 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2430 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2431 ; CHECK: omp_parallel:
2432 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
2433 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2434 ; CHECK: omp.par.outlined.exit:
2435 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2436 ; CHECK: omp.par.exit.split:
2437 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2438 ; CHECK: entry.split.split:
2439 ; CHECK-NEXT: ret void
2440 ; CHECK-LABEL: define {{[^@]+}}@merge_3..omp_par
2441 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
2442 ; CHECK-NEXT: omp.par.entry:
2443 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2444 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2445 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2446 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2447 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2448 ; CHECK: omp.par.outlined.exit.exitStub:
2449 ; CHECK-NEXT: ret void
2450 ; CHECK: omp.par.region:
2451 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2452 ; CHECK: omp.par.merged:
2453 ; CHECK-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2454 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2455 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2456 ; CHECK-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2457 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2458 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2459 ; CHECK-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2460 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2461 ; CHECK: entry.split:
2462 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2463 ; CHECK: omp.par.region.split:
2464 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2465 ; CHECK: omp.par.pre_finalize:
2466 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2467 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..22
2468 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2469 ; CHECK-NEXT: entry:
2470 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2471 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2472 ; CHECK-NEXT: ret void
2473 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..23
2474 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2475 ; CHECK-NEXT: entry:
2476 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2477 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2478 ; CHECK-NEXT: ret void
2479 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..24
2480 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2481 ; CHECK-NEXT: entry:
2482 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2483 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2484 ; CHECK-NEXT: ret void
2485 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq
2486 ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
2487 ; CHECK-NEXT: entry:
2488 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
2489 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
2490 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2491 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2492 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2493 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2494 ; CHECK: omp_parallel:
2495 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
2496 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2497 ; CHECK: omp.par.outlined.exit:
2498 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2499 ; CHECK: omp.par.exit.split:
2500 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2501 ; CHECK: entry.split.split:
2502 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
2503 ; CHECK-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
2504 ; CHECK-NEXT: ret void
2505 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
2506 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
2507 ; CHECK-NEXT: omp.par.entry:
2508 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2509 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2510 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2511 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2512 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2513 ; CHECK: omp.par.outlined.exit.exitStub:
2514 ; CHECK-NEXT: ret void
2515 ; CHECK: omp.par.region:
2516 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2517 ; CHECK: omp.par.merged:
2518 ; CHECK-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2519 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2520 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2521 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2522 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2523 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2524 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2525 ; CHECK: omp_region.end:
2526 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2527 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2528 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2529 ; CHECK: omp.par.merged.split.split:
2530 ; CHECK-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2531 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2532 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
2533 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2534 ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
2535 ; CHECK-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
2536 ; CHECK-NEXT: br i1 [[TMP4]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
2537 ; CHECK: omp_region.end4:
2538 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2539 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
2540 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
2541 ; CHECK: omp.par.merged.split.split.split.split:
2542 ; CHECK-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2543 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2544 ; CHECK: entry.split:
2545 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2546 ; CHECK: omp.par.region.split:
2547 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2548 ; CHECK: omp.par.pre_finalize:
2549 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2550 ; CHECK: omp_region.body5:
2551 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
2552 ; CHECK: seq.par.merged2:
2553 ; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[A_ADDR]], align 4
2554 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
2555 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP5]]
2556 ; CHECK-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
2557 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
2558 ; CHECK: omp.par.merged.split.split.split:
2559 ; CHECK-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
2560 ; CHECK: omp_region.body5.split:
2561 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
2562 ; CHECK-NEXT: br label [[OMP_REGION_END4]]
2563 ; CHECK: omp_region.body:
2564 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2565 ; CHECK: seq.par.merged:
2566 ; CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ADDR]], align 4
2567 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
2568 ; CHECK-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
2569 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2570 ; CHECK: omp.par.merged.split:
2571 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2572 ; CHECK: omp_region.body.split:
2573 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2574 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2575 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..25
2576 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2577 ; CHECK-NEXT: entry:
2578 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2579 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2580 ; CHECK-NEXT: ret void
2581 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..26
2582 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2583 ; CHECK-NEXT: entry:
2584 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2585 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2586 ; CHECK-NEXT: ret void
2587 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..27
2588 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2589 ; CHECK-NEXT: entry:
2590 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2591 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2592 ; CHECK-NEXT: ret void
2593 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_seq_call
2594 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2595 ; CHECK-NEXT: entry:
2596 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2597 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2598 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2599 ; CHECK-NEXT: call void (...) @foo()
2600 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2601 ; CHECK-NEXT: call void (...) @foo()
2602 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2603 ; CHECK-NEXT: ret void
2604 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..28
2605 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2606 ; CHECK-NEXT: entry:
2607 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2608 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2609 ; CHECK-NEXT: ret void
2610 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..29
2611 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2612 ; CHECK-NEXT: entry:
2613 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2614 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2615 ; CHECK-NEXT: ret void
2616 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..30
2617 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2618 ; CHECK-NEXT: entry:
2619 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2620 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2621 ; CHECK-NEXT: ret void
2622 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
2623 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2624 ; CHECK-NEXT: entry:
2625 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2626 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
2627 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2628 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2629 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
2630 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2631 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2632 ; CHECK-NEXT: ret void
2633 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..31
2634 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2635 ; CHECK-NEXT: entry:
2636 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2637 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2638 ; CHECK-NEXT: ret void
2639 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..32
2640 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2641 ; CHECK-NEXT: entry:
2642 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2643 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2644 ; CHECK-NEXT: ret void
2645 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..33
2646 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2647 ; CHECK-NEXT: entry:
2648 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2649 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2650 ; CHECK-NEXT: ret void
2651 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_num_threads
2652 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2653 ; CHECK-NEXT: entry:
2654 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2655 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
2656 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2657 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2658 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_ADDR]], align 4
2659 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[TMP1]])
2660 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2661 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2662 ; CHECK-NEXT: ret void
2663 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..34
2664 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2665 ; CHECK-NEXT: entry:
2666 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2667 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2668 ; CHECK-NEXT: ret void
2669 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..35
2670 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2671 ; CHECK-NEXT: entry:
2672 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2673 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2674 ; CHECK-NEXT: ret void
2675 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..36
2676 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2677 ; CHECK-NEXT: entry:
2678 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2679 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2680 ; CHECK-NEXT: ret void
2681 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1
2682 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2683 ; CHECK-NEXT: entry:
2684 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2685 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2686 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2687 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2688 ; CHECK: omp_parallel:
2689 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
2690 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2691 ; CHECK: omp.par.outlined.exit:
2692 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2693 ; CHECK: omp.par.exit.split:
2694 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2695 ; CHECK: entry.split.split:
2696 ; CHECK-NEXT: call void (...) @foo()
2697 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2698 ; CHECK-NEXT: ret void
2699 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
2700 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
2701 ; CHECK-NEXT: omp.par.entry:
2702 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2703 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2704 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2705 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2706 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2707 ; CHECK: omp.par.outlined.exit.exitStub:
2708 ; CHECK-NEXT: ret void
2709 ; CHECK: omp.par.region:
2710 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2711 ; CHECK: omp.par.merged:
2712 ; CHECK-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2713 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2714 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2715 ; CHECK-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2716 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2717 ; CHECK: entry.split:
2718 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2719 ; CHECK: omp.par.region.split:
2720 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2721 ; CHECK: omp.par.pre_finalize:
2722 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2723 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..37
2724 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2725 ; CHECK-NEXT: entry:
2726 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2727 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2728 ; CHECK-NEXT: ret void
2729 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..38
2730 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2731 ; CHECK-NEXT: entry:
2732 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2733 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2734 ; CHECK-NEXT: ret void
2735 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..39
2736 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2737 ; CHECK-NEXT: entry:
2738 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2739 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2740 ; CHECK-NEXT: ret void
2741 ; CHECK-LABEL: define {{[^@]+}}@merge
2742 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2743 ; CHECK-NEXT: entry:
2744 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2745 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2746 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2747 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2748 ; CHECK: omp_parallel:
2749 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
2750 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2751 ; CHECK: omp.par.outlined.exit:
2752 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2753 ; CHECK: omp.par.exit.split:
2754 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2755 ; CHECK: entry.split.split:
2756 ; CHECK-NEXT: ret void
2757 ; CHECK-LABEL: define {{[^@]+}}@merge..omp_par
2758 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
2759 ; CHECK-NEXT: omp.par.entry:
2760 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2761 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2762 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2763 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2764 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2765 ; CHECK: omp.par.outlined.exit.exitStub:
2766 ; CHECK-NEXT: ret void
2767 ; CHECK: omp.par.region:
2768 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2769 ; CHECK: omp.par.merged:
2770 ; CHECK-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2771 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2772 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2773 ; CHECK-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2774 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2775 ; CHECK: entry.split:
2776 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2777 ; CHECK: omp.par.region.split:
2778 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2779 ; CHECK: omp.par.pre_finalize:
2780 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2781 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
2782 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2783 ; CHECK-NEXT: entry:
2784 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2785 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2786 ; CHECK-NEXT: ret void
2787 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..1
2788 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2789 ; CHECK-NEXT: entry:
2790 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2791 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2792 ; CHECK-NEXT: ret void
2793 ; CHECK-LABEL: define {{[^@]+}}@unmergable_proc_bind
2794 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2795 ; CHECK-NEXT: entry:
2796 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2797 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
2798 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2799 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
2800 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2801 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2802 ; CHECK-NEXT: ret void
2803 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..2
2804 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2805 ; CHECK-NEXT: entry:
2806 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2807 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2808 ; CHECK-NEXT: ret void
2809 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..3
2810 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2811 ; CHECK-NEXT: entry:
2812 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2813 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2814 ; CHECK-NEXT: ret void
2815 ; CHECK-LABEL: define {{[^@]+}}@unmergable_num_threads
2816 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2817 ; CHECK-NEXT: entry:
2818 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2819 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
2820 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2821 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
2822 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2823 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2824 ; CHECK-NEXT: ret void
2825 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..4
2826 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2827 ; CHECK-NEXT: entry:
2828 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2829 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2830 ; CHECK-NEXT: ret void
2831 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..5
2832 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2833 ; CHECK-NEXT: entry:
2834 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2835 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2836 ; CHECK-NEXT: ret void
2837 ; CHECK-LABEL: define {{[^@]+}}@unmergable_seq_call
2838 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2839 ; CHECK-NEXT: entry:
2840 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2841 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2842 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2843 ; CHECK-NEXT: call void (...) @foo()
2844 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2845 ; CHECK-NEXT: ret void
2846 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..6
2847 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2848 ; CHECK-NEXT: entry:
2849 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2850 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2851 ; CHECK-NEXT: ret void
2852 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..7
2853 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2854 ; CHECK-NEXT: entry:
2855 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2856 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2857 ; CHECK-NEXT: ret void
2858 ; CHECK-LABEL: define {{[^@]+}}@merge_seq
2859 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
2860 ; CHECK-NEXT: entry:
2861 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2862 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
2863 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2864 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2865 ; CHECK: omp_parallel:
2866 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
2867 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2868 ; CHECK: omp.par.outlined.exit:
2869 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2870 ; CHECK: omp.par.exit.split:
2871 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2872 ; CHECK: entry.split.split:
2873 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
2874 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2875 ; CHECK-NEXT: ret void
2876 ; CHECK-LABEL: define {{[^@]+}}@merge_seq..omp_par
2877 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
2878 ; CHECK-NEXT: omp.par.entry:
2879 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2880 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2881 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2882 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2883 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2884 ; CHECK: omp.par.outlined.exit.exitStub:
2885 ; CHECK-NEXT: ret void
2886 ; CHECK: omp.par.region:
2887 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2888 ; CHECK: omp.par.merged:
2889 ; CHECK-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2890 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2891 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2892 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2893 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2894 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2895 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2896 ; CHECK: omp_region.end:
2897 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2898 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2899 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2900 ; CHECK: omp.par.merged.split.split:
2901 ; CHECK-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
2902 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2903 ; CHECK: entry.split:
2904 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2905 ; CHECK: omp.par.region.split:
2906 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2907 ; CHECK: omp.par.pre_finalize:
2908 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2909 ; CHECK: omp_region.body:
2910 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2911 ; CHECK: seq.par.merged:
2912 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
2913 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
2914 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
2915 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2916 ; CHECK: omp.par.merged.split:
2917 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2918 ; CHECK: omp_region.body.split:
2919 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2920 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2921 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..8
2922 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2923 ; CHECK-NEXT: entry:
2924 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2925 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2926 ; CHECK-NEXT: ret void
2927 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..9
2928 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
2929 ; CHECK-NEXT: entry:
2930 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
2931 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
2932 ; CHECK-NEXT: ret void
2933 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float
2934 ; CHECK-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
2935 ; CHECK-NEXT: entry:
2936 ; CHECK-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
2937 ; CHECK-NEXT: store float [[F]], float* [[F_ADDR]], align 4
2938 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2939 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
2940 ; CHECK: omp_parallel:
2941 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_ADDR]], float* [[P]])
2942 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
2943 ; CHECK: omp.par.outlined.exit:
2944 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
2945 ; CHECK: omp.par.exit.split:
2946 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
2947 ; CHECK: entry.split.split:
2948 ; CHECK-NEXT: ret void
2949 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
2950 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
2951 ; CHECK-NEXT: omp.par.entry:
2952 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
2953 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
2954 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
2955 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
2956 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
2957 ; CHECK: omp.par.outlined.exit.exitStub:
2958 ; CHECK-NEXT: ret void
2959 ; CHECK: omp.par.region:
2960 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
2961 ; CHECK: omp.par.merged:
2962 ; CHECK-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
2963 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2964 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
2965 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2966 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2967 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2968 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
2969 ; CHECK: omp_region.end:
2970 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
2971 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
2972 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
2973 ; CHECK: omp.par.merged.split.split:
2974 ; CHECK-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
2975 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
2976 ; CHECK: entry.split:
2977 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
2978 ; CHECK: omp.par.region.split:
2979 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
2980 ; CHECK: omp.par.pre_finalize:
2981 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
2982 ; CHECK: omp_region.body:
2983 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
2984 ; CHECK: seq.par.merged:
2985 ; CHECK-NEXT: [[TMP3:%.*]] = load float, float* [[F_ADDR]], align 4
2986 ; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP3]], 0x40091EB860000000
2987 ; CHECK-NEXT: store float [[ADD]], float* [[P]], align 4
2988 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
2989 ; CHECK: omp.par.merged.split:
2990 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
2991 ; CHECK: omp_region.body.split:
2992 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
2993 ; CHECK-NEXT: br label [[OMP_REGION_END]]
2994 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..10
2995 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
2996 ; CHECK-NEXT: entry:
2997 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
2998 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
2999 ; CHECK-NEXT: call void @use(i32 [[CONV]])
3000 ; CHECK-NEXT: ret void
3001 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..11
3002 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
3003 ; CHECK-NEXT: entry:
3004 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
3005 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
3006 ; CHECK-NEXT: call void @use(i32 [[CONV]])
3007 ; CHECK-NEXT: ret void
3008 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate
3009 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3010 ; CHECK-NEXT: entry:
3011 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
3012 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3013 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3014 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3015 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3016 ; CHECK: omp_parallel:
3017 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
3018 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3019 ; CHECK: omp.par.outlined.exit:
3020 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3021 ; CHECK: omp.par.exit.split:
3022 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3023 ; CHECK: entry.split.split:
3024 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
3025 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3026 ; CHECK-NEXT: ret void
3027 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
3028 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
3029 ; CHECK-NEXT: omp.par.entry:
3030 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3031 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3032 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3033 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3034 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3035 ; CHECK: omp.par.outlined.exit.exitStub:
3036 ; CHECK-NEXT: ret void
3037 ; CHECK: omp.par.region:
3038 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3039 ; CHECK: omp.par.merged:
3040 ; CHECK-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3041 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3042 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3043 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3044 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3045 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3046 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3047 ; CHECK: omp_region.end:
3048 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3049 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3050 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3051 ; CHECK: omp.par.merged.split.split:
3052 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
3053 ; CHECK-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
3054 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3055 ; CHECK: entry.split:
3056 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3057 ; CHECK: omp.par.region.split:
3058 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3059 ; CHECK: omp.par.pre_finalize:
3060 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3061 ; CHECK: omp_region.body:
3062 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3063 ; CHECK: seq.par.merged:
3064 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
3065 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
3066 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
3067 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
3068 ; CHECK-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
3069 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3070 ; CHECK: omp.par.merged.split:
3071 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3072 ; CHECK: omp_region.body.split:
3073 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3074 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3075 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..12
3076 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3077 ; CHECK-NEXT: entry:
3078 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3079 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3080 ; CHECK-NEXT: ret void
3081 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..13
3082 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
3083 ; CHECK-NEXT: entry:
3084 ; CHECK-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
3085 ; CHECK-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
3086 ; CHECK-NEXT: ret void
3087 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt
3088 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3089 ; CHECK-NEXT: entry:
3090 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3091 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3092 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3093 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3094 ; CHECK: omp_parallel:
3095 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
3096 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3097 ; CHECK: omp.par.outlined.exit:
3098 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3099 ; CHECK: omp.par.exit.split:
3100 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3101 ; CHECK: entry.split.split:
3102 ; CHECK-NEXT: ret void
3103 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
3104 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
3105 ; CHECK-NEXT: omp.par.entry:
3106 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
3107 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3108 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3109 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3110 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3111 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3112 ; CHECK: omp.par.outlined.exit.exitStub:
3113 ; CHECK-NEXT: ret void
3114 ; CHECK: omp.par.region:
3115 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3116 ; CHECK: omp.par.merged:
3117 ; CHECK-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3118 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3119 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3120 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3121 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3122 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3123 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3124 ; CHECK: omp_region.end:
3125 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3126 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3127 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3128 ; CHECK: omp.par.merged.split.split:
3129 ; CHECK-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3130 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3131 ; CHECK: entry.split:
3132 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3133 ; CHECK: omp.par.region.split:
3134 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3135 ; CHECK: omp.par.pre_finalize:
3136 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3137 ; CHECK: omp_region.body:
3138 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3139 ; CHECK: seq.par.merged:
3140 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
3141 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
3142 ; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
3143 ; CHECK-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
3144 ; CHECK-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
3145 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
3146 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3147 ; CHECK: omp.par.merged.split:
3148 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3149 ; CHECK: omp_region.body.split:
3150 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3151 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3152 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..14
3153 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3154 ; CHECK-NEXT: entry:
3155 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3156 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3157 ; CHECK-NEXT: ret void
3158 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..15
3159 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3160 ; CHECK-NEXT: entry:
3161 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3162 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3163 ; CHECK-NEXT: ret void
3164 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use
3165 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3166 ; CHECK-NEXT: entry:
3167 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3168 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
3169 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3170 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3171 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3172 ; CHECK: omp_parallel:
3173 ; CHECK-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
3174 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
3175 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[B]])
3176 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3177 ; CHECK: omp.par.outlined.exit:
3178 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3179 ; CHECK: omp.par.exit.split:
3180 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3181 ; CHECK: entry.split.split:
3182 ; CHECK-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
3183 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
3184 ; CHECK-NEXT: ret void
3185 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
3186 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
3187 ; CHECK-NEXT: omp.par.entry:
3188 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3189 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3190 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3191 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3192 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3193 ; CHECK: omp.par.outlined.exit.exitStub:
3194 ; CHECK-NEXT: ret void
3195 ; CHECK: omp.par.region:
3196 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3197 ; CHECK: omp.par.merged:
3198 ; CHECK-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3199 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3200 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3201 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3202 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3203 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3204 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3205 ; CHECK: omp_region.end:
3206 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3207 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3208 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3209 ; CHECK: omp.par.merged.split.split:
3210 ; CHECK-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
3211 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3212 ; CHECK: entry.split:
3213 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3214 ; CHECK: omp.par.region.split:
3215 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3216 ; CHECK: omp.par.pre_finalize:
3217 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3218 ; CHECK: omp_region.body:
3219 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3220 ; CHECK: seq.par.merged:
3221 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
3222 ; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[A_ADDR]], align 4
3223 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP4]], 1
3224 ; CHECK-NEXT: store i32 [[ADD]], i32* [[B]], align 4
3225 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3226 ; CHECK: omp.par.merged.split:
3227 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3228 ; CHECK: omp_region.body.split:
3229 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3230 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3231 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..16
3232 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3233 ; CHECK-NEXT: entry:
3234 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3235 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3236 ; CHECK-NEXT: ret void
3237 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..17
3238 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
3239 ; CHECK-NEXT: entry:
3240 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3241 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3242 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
3243 ; CHECK-NEXT: call void @use(i32 [[TMP1]])
3244 ; CHECK-NEXT: ret void
3245 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions
3246 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
3247 ; CHECK-NEXT: entry:
3248 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
3249 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
3250 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
3251 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
3252 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3253 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3254 ; CHECK: omp_parallel:
3255 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
3256 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3257 ; CHECK: omp.par.outlined.exit:
3258 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3259 ; CHECK: omp.par.exit.split:
3260 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3261 ; CHECK: entry.split.split:
3262 ; CHECK-NEXT: ret void
3263 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
3264 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
3265 ; CHECK-NEXT: omp.par.entry:
3266 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3267 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3268 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3269 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3270 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3271 ; CHECK: omp.par.outlined.exit.exitStub:
3272 ; CHECK-NEXT: ret void
3273 ; CHECK: omp.par.region:
3274 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3275 ; CHECK: omp.par.merged:
3276 ; CHECK-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
3277 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3278 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3279 ; CHECK-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
3280 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3281 ; CHECK: entry.split:
3282 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3283 ; CHECK: omp.par.region.split:
3284 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3285 ; CHECK: omp.par.pre_finalize:
3286 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3287 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..18
3288 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
3289 ; CHECK-NEXT: entry:
3290 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
3291 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
3292 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
3294 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
3295 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
3296 ; CHECK-NEXT: ret void
3298 ; CHECK-NEXT: ret void
3299 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..19
3300 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
3301 ; CHECK-NEXT: entry:
3302 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
3303 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
3304 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
3306 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
3307 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
3308 ; CHECK-NEXT: ret void
3310 ; CHECK-NEXT: ret void
3311 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
3312 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
3313 ; CHECK-NEXT: entry:
3314 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
3315 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
3316 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
3317 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
3318 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3319 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3320 ; CHECK: omp_parallel:
3321 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
3322 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3323 ; CHECK: omp.par.outlined.exit:
3324 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3325 ; CHECK: omp.par.exit.split:
3326 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3327 ; CHECK: entry.split.split:
3328 ; CHECK-NEXT: ret void
3329 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
3330 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
3331 ; CHECK-NEXT: omp.par.entry:
3332 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3333 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3334 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3335 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3336 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3337 ; CHECK: omp.par.outlined.exit.exitStub:
3338 ; CHECK-NEXT: ret void
3339 ; CHECK: omp.par.region:
3340 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3341 ; CHECK: omp.par.merged:
3342 ; CHECK-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
3343 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3344 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3345 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3346 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3347 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3348 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3349 ; CHECK: omp_region.end:
3350 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3351 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3352 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3353 ; CHECK: omp.par.merged.split.split:
3354 ; CHECK-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
3355 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3356 ; CHECK: entry.split:
3357 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3358 ; CHECK: omp.par.region.split:
3359 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3360 ; CHECK: omp.par.pre_finalize:
3361 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3362 ; CHECK: omp_region.body:
3363 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3364 ; CHECK: seq.par.merged:
3365 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[CANCEL1_ADDR]], align 4
3366 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP3]], 0
3367 ; CHECK-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
3368 ; CHECK-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
3369 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3370 ; CHECK: omp.par.merged.split:
3371 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3372 ; CHECK: omp_region.body.split:
3373 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3374 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3375 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..20
3376 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
3377 ; CHECK-NEXT: entry:
3378 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
3379 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
3380 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
3382 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
3383 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
3384 ; CHECK-NEXT: ret void
3386 ; CHECK-NEXT: ret void
3387 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..21
3388 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
3389 ; CHECK-NEXT: entry:
3390 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
3391 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
3392 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
3394 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
3395 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
3396 ; CHECK-NEXT: ret void
3398 ; CHECK-NEXT: ret void
3399 ; CHECK-LABEL: define {{[^@]+}}@merge_3
3400 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3401 ; CHECK-NEXT: entry:
3402 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3403 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3404 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3405 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3406 ; CHECK: omp_parallel:
3407 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
3408 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3409 ; CHECK: omp.par.outlined.exit:
3410 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3411 ; CHECK: omp.par.exit.split:
3412 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3413 ; CHECK: entry.split.split:
3414 ; CHECK-NEXT: ret void
3415 ; CHECK-LABEL: define {{[^@]+}}@merge_3..omp_par
3416 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
3417 ; CHECK-NEXT: omp.par.entry:
3418 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3419 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3420 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3421 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3422 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3423 ; CHECK: omp.par.outlined.exit.exitStub:
3424 ; CHECK-NEXT: ret void
3425 ; CHECK: omp.par.region:
3426 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3427 ; CHECK: omp.par.merged:
3428 ; CHECK-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3429 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3430 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3431 ; CHECK-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3432 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3433 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3434 ; CHECK-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3435 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3436 ; CHECK: entry.split:
3437 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3438 ; CHECK: omp.par.region.split:
3439 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3440 ; CHECK: omp.par.pre_finalize:
3441 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3442 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..22
3443 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3444 ; CHECK-NEXT: entry:
3445 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3446 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3447 ; CHECK-NEXT: ret void
3448 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..23
3449 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3450 ; CHECK-NEXT: entry:
3451 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3452 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3453 ; CHECK-NEXT: ret void
3454 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..24
3455 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3456 ; CHECK-NEXT: entry:
3457 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3458 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3459 ; CHECK-NEXT: ret void
3460 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq
3461 ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
3462 ; CHECK-NEXT: entry:
3463 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
3464 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
3465 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3466 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3467 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3468 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3469 ; CHECK: omp_parallel:
3470 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
3471 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3472 ; CHECK: omp.par.outlined.exit:
3473 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3474 ; CHECK: omp.par.exit.split:
3475 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3476 ; CHECK: entry.split.split:
3477 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
3478 ; CHECK-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
3479 ; CHECK-NEXT: ret void
3480 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
3481 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
3482 ; CHECK-NEXT: omp.par.entry:
3483 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3484 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3485 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3486 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3487 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3488 ; CHECK: omp.par.outlined.exit.exitStub:
3489 ; CHECK-NEXT: ret void
3490 ; CHECK: omp.par.region:
3491 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3492 ; CHECK: omp.par.merged:
3493 ; CHECK-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3494 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3495 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3496 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3497 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3498 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3499 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3500 ; CHECK: omp_region.end:
3501 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3502 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3503 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3504 ; CHECK: omp.par.merged.split.split:
3505 ; CHECK-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3506 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3507 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
3508 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3509 ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
3510 ; CHECK-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
3511 ; CHECK-NEXT: br i1 [[TMP4]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
3512 ; CHECK: omp_region.end4:
3513 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3514 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
3515 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
3516 ; CHECK: omp.par.merged.split.split.split.split:
3517 ; CHECK-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3518 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3519 ; CHECK: entry.split:
3520 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3521 ; CHECK: omp.par.region.split:
3522 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3523 ; CHECK: omp.par.pre_finalize:
3524 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3525 ; CHECK: omp_region.body5:
3526 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
3527 ; CHECK: seq.par.merged2:
3528 ; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[A_ADDR]], align 4
3529 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
3530 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP5]]
3531 ; CHECK-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
3532 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
3533 ; CHECK: omp.par.merged.split.split.split:
3534 ; CHECK-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
3535 ; CHECK: omp_region.body5.split:
3536 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
3537 ; CHECK-NEXT: br label [[OMP_REGION_END4]]
3538 ; CHECK: omp_region.body:
3539 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3540 ; CHECK: seq.par.merged:
3541 ; CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ADDR]], align 4
3542 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
3543 ; CHECK-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
3544 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3545 ; CHECK: omp.par.merged.split:
3546 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3547 ; CHECK: omp_region.body.split:
3548 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3549 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3550 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..25
3551 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3552 ; CHECK-NEXT: entry:
3553 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3554 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3555 ; CHECK-NEXT: ret void
3556 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..26
3557 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3558 ; CHECK-NEXT: entry:
3559 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3560 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3561 ; CHECK-NEXT: ret void
3562 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..27
3563 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3564 ; CHECK-NEXT: entry:
3565 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3566 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3567 ; CHECK-NEXT: ret void
3568 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_seq_call
3569 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3570 ; CHECK-NEXT: entry:
3571 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3572 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3573 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3574 ; CHECK-NEXT: call void (...) @foo()
3575 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3576 ; CHECK-NEXT: call void (...) @foo()
3577 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3578 ; CHECK-NEXT: ret void
3579 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..28
3580 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3581 ; CHECK-NEXT: entry:
3582 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3583 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3584 ; CHECK-NEXT: ret void
3585 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..29
3586 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3587 ; CHECK-NEXT: entry:
3588 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3589 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3590 ; CHECK-NEXT: ret void
3591 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..30
3592 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3593 ; CHECK-NEXT: entry:
3594 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3595 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3596 ; CHECK-NEXT: ret void
3597 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
3598 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3599 ; CHECK-NEXT: entry:
3600 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3601 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
3602 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3603 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3604 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
3605 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3606 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3607 ; CHECK-NEXT: ret void
3608 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..31
3609 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3610 ; CHECK-NEXT: entry:
3611 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3612 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3613 ; CHECK-NEXT: ret void
3614 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..32
3615 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3616 ; CHECK-NEXT: entry:
3617 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3618 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3619 ; CHECK-NEXT: ret void
3620 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..33
3621 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3622 ; CHECK-NEXT: entry:
3623 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3624 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3625 ; CHECK-NEXT: ret void
3626 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_num_threads
3627 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3628 ; CHECK-NEXT: entry:
3629 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3630 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
3631 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3632 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3633 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_ADDR]], align 4
3634 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[TMP1]])
3635 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3636 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3637 ; CHECK-NEXT: ret void
3638 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..34
3639 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3640 ; CHECK-NEXT: entry:
3641 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3642 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3643 ; CHECK-NEXT: ret void
3644 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..35
3645 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3646 ; CHECK-NEXT: entry:
3647 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3648 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3649 ; CHECK-NEXT: ret void
3650 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..36
3651 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3652 ; CHECK-NEXT: entry:
3653 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3654 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3655 ; CHECK-NEXT: ret void
3656 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1
3657 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3658 ; CHECK-NEXT: entry:
3659 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3660 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3661 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3662 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3663 ; CHECK: omp_parallel:
3664 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
3665 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3666 ; CHECK: omp.par.outlined.exit:
3667 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3668 ; CHECK: omp.par.exit.split:
3669 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3670 ; CHECK: entry.split.split:
3671 ; CHECK-NEXT: call void (...) @foo()
3672 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3673 ; CHECK-NEXT: ret void
3674 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
3675 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
3676 ; CHECK-NEXT: omp.par.entry:
3677 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3678 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3679 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3680 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3681 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3682 ; CHECK: omp.par.outlined.exit.exitStub:
3683 ; CHECK-NEXT: ret void
3684 ; CHECK: omp.par.region:
3685 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3686 ; CHECK: omp.par.merged:
3687 ; CHECK-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3688 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3689 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3690 ; CHECK-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3691 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3692 ; CHECK: entry.split:
3693 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3694 ; CHECK: omp.par.region.split:
3695 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3696 ; CHECK: omp.par.pre_finalize:
3697 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3698 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..37
3699 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3700 ; CHECK-NEXT: entry:
3701 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3702 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3703 ; CHECK-NEXT: ret void
3704 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..38
3705 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3706 ; CHECK-NEXT: entry:
3707 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3708 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3709 ; CHECK-NEXT: ret void
3710 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..39
3711 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3712 ; CHECK-NEXT: entry:
3713 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3714 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3715 ; CHECK-NEXT: ret void
3716 ; CHECK-LABEL: define {{[^@]+}}@merge
3717 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3718 ; CHECK-NEXT: entry:
3719 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3720 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3721 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3722 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3723 ; CHECK: omp_parallel:
3724 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
3725 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3726 ; CHECK: omp.par.outlined.exit:
3727 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3728 ; CHECK: omp.par.exit.split:
3729 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3730 ; CHECK: entry.split.split:
3731 ; CHECK-NEXT: ret void
3732 ; CHECK-LABEL: define {{[^@]+}}@merge..omp_par
3733 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
3734 ; CHECK-NEXT: omp.par.entry:
3735 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3736 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3737 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3738 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3739 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3740 ; CHECK: omp.par.outlined.exit.exitStub:
3741 ; CHECK-NEXT: ret void
3742 ; CHECK: omp.par.region:
3743 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3744 ; CHECK: omp.par.merged:
3745 ; CHECK-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3746 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3747 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3748 ; CHECK-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3749 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3750 ; CHECK: entry.split:
3751 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3752 ; CHECK: omp.par.region.split:
3753 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3754 ; CHECK: omp.par.pre_finalize:
3755 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3756 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
3757 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3758 ; CHECK-NEXT: entry:
3759 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3760 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3761 ; CHECK-NEXT: ret void
3762 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..1
3763 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3764 ; CHECK-NEXT: entry:
3765 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3766 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3767 ; CHECK-NEXT: ret void
3768 ; CHECK-LABEL: define {{[^@]+}}@unmergable_proc_bind
3769 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3770 ; CHECK-NEXT: entry:
3771 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3772 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
3773 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3774 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
3775 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3776 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3777 ; CHECK-NEXT: ret void
3778 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..2
3779 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3780 ; CHECK-NEXT: entry:
3781 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3782 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3783 ; CHECK-NEXT: ret void
3784 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..3
3785 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3786 ; CHECK-NEXT: entry:
3787 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3788 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3789 ; CHECK-NEXT: ret void
3790 ; CHECK-LABEL: define {{[^@]+}}@unmergable_num_threads
3791 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3792 ; CHECK-NEXT: entry:
3793 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3794 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
3795 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3796 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
3797 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3798 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3799 ; CHECK-NEXT: ret void
3800 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..4
3801 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3802 ; CHECK-NEXT: entry:
3803 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3804 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3805 ; CHECK-NEXT: ret void
3806 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..5
3807 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3808 ; CHECK-NEXT: entry:
3809 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3810 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3811 ; CHECK-NEXT: ret void
3812 ; CHECK-LABEL: define {{[^@]+}}@unmergable_seq_call
3813 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3814 ; CHECK-NEXT: entry:
3815 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3816 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3817 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3818 ; CHECK-NEXT: call void (...) @foo()
3819 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3820 ; CHECK-NEXT: ret void
3821 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..6
3822 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3823 ; CHECK-NEXT: entry:
3824 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3825 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3826 ; CHECK-NEXT: ret void
3827 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..7
3828 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3829 ; CHECK-NEXT: entry:
3830 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3831 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3832 ; CHECK-NEXT: ret void
3833 ; CHECK-LABEL: define {{[^@]+}}@merge_seq
3834 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3835 ; CHECK-NEXT: entry:
3836 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3837 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3838 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3839 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3840 ; CHECK: omp_parallel:
3841 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
3842 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3843 ; CHECK: omp.par.outlined.exit:
3844 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3845 ; CHECK: omp.par.exit.split:
3846 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3847 ; CHECK: entry.split.split:
3848 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
3849 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3850 ; CHECK-NEXT: ret void
3851 ; CHECK-LABEL: define {{[^@]+}}@merge_seq..omp_par
3852 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
3853 ; CHECK-NEXT: omp.par.entry:
3854 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3855 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3856 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3857 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3858 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3859 ; CHECK: omp.par.outlined.exit.exitStub:
3860 ; CHECK-NEXT: ret void
3861 ; CHECK: omp.par.region:
3862 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3863 ; CHECK: omp.par.merged:
3864 ; CHECK-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3865 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3866 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3867 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3868 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3869 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3870 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3871 ; CHECK: omp_region.end:
3872 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3873 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3874 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3875 ; CHECK: omp.par.merged.split.split:
3876 ; CHECK-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
3877 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3878 ; CHECK: entry.split:
3879 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3880 ; CHECK: omp.par.region.split:
3881 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3882 ; CHECK: omp.par.pre_finalize:
3883 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3884 ; CHECK: omp_region.body:
3885 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3886 ; CHECK: seq.par.merged:
3887 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
3888 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
3889 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
3890 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3891 ; CHECK: omp.par.merged.split:
3892 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3893 ; CHECK: omp_region.body.split:
3894 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3895 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3896 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..8
3897 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3898 ; CHECK-NEXT: entry:
3899 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3900 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3901 ; CHECK-NEXT: ret void
3902 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..9
3903 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
3904 ; CHECK-NEXT: entry:
3905 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
3906 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
3907 ; CHECK-NEXT: ret void
3908 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float
3909 ; CHECK-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
3910 ; CHECK-NEXT: entry:
3911 ; CHECK-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
3912 ; CHECK-NEXT: store float [[F]], float* [[F_ADDR]], align 4
3913 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3914 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3915 ; CHECK: omp_parallel:
3916 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_ADDR]], float* [[P]])
3917 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3918 ; CHECK: omp.par.outlined.exit:
3919 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3920 ; CHECK: omp.par.exit.split:
3921 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3922 ; CHECK: entry.split.split:
3923 ; CHECK-NEXT: ret void
3924 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
3925 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
3926 ; CHECK-NEXT: omp.par.entry:
3927 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
3928 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
3929 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
3930 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
3931 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
3932 ; CHECK: omp.par.outlined.exit.exitStub:
3933 ; CHECK-NEXT: ret void
3934 ; CHECK: omp.par.region:
3935 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
3936 ; CHECK: omp.par.merged:
3937 ; CHECK-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
3938 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3939 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
3940 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3941 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3942 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
3943 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
3944 ; CHECK: omp_region.end:
3945 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3946 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
3947 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
3948 ; CHECK: omp.par.merged.split.split:
3949 ; CHECK-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
3950 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
3951 ; CHECK: entry.split:
3952 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
3953 ; CHECK: omp.par.region.split:
3954 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
3955 ; CHECK: omp.par.pre_finalize:
3956 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
3957 ; CHECK: omp_region.body:
3958 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
3959 ; CHECK: seq.par.merged:
3960 ; CHECK-NEXT: [[TMP3:%.*]] = load float, float* [[F_ADDR]], align 4
3961 ; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP3]], 0x40091EB860000000
3962 ; CHECK-NEXT: store float [[ADD]], float* [[P]], align 4
3963 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
3964 ; CHECK: omp.par.merged.split:
3965 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
3966 ; CHECK: omp_region.body.split:
3967 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
3968 ; CHECK-NEXT: br label [[OMP_REGION_END]]
3969 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..10
3970 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
3971 ; CHECK-NEXT: entry:
3972 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
3973 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
3974 ; CHECK-NEXT: call void @use(i32 [[CONV]])
3975 ; CHECK-NEXT: ret void
3976 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..11
3977 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
3978 ; CHECK-NEXT: entry:
3979 ; CHECK-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
3980 ; CHECK-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
3981 ; CHECK-NEXT: call void @use(i32 [[CONV]])
3982 ; CHECK-NEXT: ret void
3983 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate
3984 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
3985 ; CHECK-NEXT: entry:
3986 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
3987 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3988 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
3989 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
3990 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
3991 ; CHECK: omp_parallel:
3992 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
3993 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
3994 ; CHECK: omp.par.outlined.exit:
3995 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
3996 ; CHECK: omp.par.exit.split:
3997 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
3998 ; CHECK: entry.split.split:
3999 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
4000 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4001 ; CHECK-NEXT: ret void
4002 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
4003 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
4004 ; CHECK-NEXT: omp.par.entry:
4005 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4006 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4007 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4008 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4009 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4010 ; CHECK: omp.par.outlined.exit.exitStub:
4011 ; CHECK-NEXT: ret void
4012 ; CHECK: omp.par.region:
4013 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4014 ; CHECK: omp.par.merged:
4015 ; CHECK-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4016 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4017 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4018 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4019 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4020 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4021 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4022 ; CHECK: omp_region.end:
4023 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4024 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4025 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4026 ; CHECK: omp.par.merged.split.split:
4027 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
4028 ; CHECK-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
4029 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4030 ; CHECK: entry.split:
4031 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4032 ; CHECK: omp.par.region.split:
4033 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4034 ; CHECK: omp.par.pre_finalize:
4035 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4036 ; CHECK: omp_region.body:
4037 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4038 ; CHECK: seq.par.merged:
4039 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
4040 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
4041 ; CHECK-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
4042 ; CHECK-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
4043 ; CHECK-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
4044 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4045 ; CHECK: omp.par.merged.split:
4046 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4047 ; CHECK: omp_region.body.split:
4048 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4049 ; CHECK-NEXT: br label [[OMP_REGION_END]]
4050 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..12
4051 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4052 ; CHECK-NEXT: entry:
4053 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4054 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4055 ; CHECK-NEXT: ret void
4056 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..13
4057 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
4058 ; CHECK-NEXT: entry:
4059 ; CHECK-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
4060 ; CHECK-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
4061 ; CHECK-NEXT: ret void
4062 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt
4063 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4064 ; CHECK-NEXT: entry:
4065 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4066 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4067 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4068 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4069 ; CHECK: omp_parallel:
4070 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
4071 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4072 ; CHECK: omp.par.outlined.exit:
4073 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4074 ; CHECK: omp.par.exit.split:
4075 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4076 ; CHECK: entry.split.split:
4077 ; CHECK-NEXT: ret void
4078 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
4079 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
4080 ; CHECK-NEXT: omp.par.entry:
4081 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
4082 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4083 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4084 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4085 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4086 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4087 ; CHECK: omp.par.outlined.exit.exitStub:
4088 ; CHECK-NEXT: ret void
4089 ; CHECK: omp.par.region:
4090 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4091 ; CHECK: omp.par.merged:
4092 ; CHECK-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4093 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4094 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4095 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4096 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4097 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4098 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4099 ; CHECK: omp_region.end:
4100 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4101 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4102 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4103 ; CHECK: omp.par.merged.split.split:
4104 ; CHECK-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4105 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4106 ; CHECK: entry.split:
4107 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4108 ; CHECK: omp.par.region.split:
4109 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4110 ; CHECK: omp.par.pre_finalize:
4111 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4112 ; CHECK: omp_region.body:
4113 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4114 ; CHECK: seq.par.merged:
4115 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
4116 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
4117 ; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
4118 ; CHECK-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
4119 ; CHECK-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
4120 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
4121 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4122 ; CHECK: omp.par.merged.split:
4123 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4124 ; CHECK: omp_region.body.split:
4125 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4126 ; CHECK-NEXT: br label [[OMP_REGION_END]]
4127 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..14
4128 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4129 ; CHECK-NEXT: entry:
4130 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4131 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4132 ; CHECK-NEXT: ret void
4133 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..15
4134 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4135 ; CHECK-NEXT: entry:
4136 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4137 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4138 ; CHECK-NEXT: ret void
4139 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use
4140 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4141 ; CHECK-NEXT: entry:
4142 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4143 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
4144 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4145 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4146 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4147 ; CHECK: omp_parallel:
4148 ; CHECK-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
4149 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
4150 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[B]])
4151 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4152 ; CHECK: omp.par.outlined.exit:
4153 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4154 ; CHECK: omp.par.exit.split:
4155 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4156 ; CHECK: entry.split.split:
4157 ; CHECK-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
4158 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
4159 ; CHECK-NEXT: ret void
4160 ; CHECK-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
4161 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
4162 ; CHECK-NEXT: omp.par.entry:
4163 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4164 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4165 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4166 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4167 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4168 ; CHECK: omp.par.outlined.exit.exitStub:
4169 ; CHECK-NEXT: ret void
4170 ; CHECK: omp.par.region:
4171 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4172 ; CHECK: omp.par.merged:
4173 ; CHECK-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4174 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4175 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4176 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4177 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4178 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4179 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4180 ; CHECK: omp_region.end:
4181 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4182 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4183 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4184 ; CHECK: omp.par.merged.split.split:
4185 ; CHECK-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
4186 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4187 ; CHECK: entry.split:
4188 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4189 ; CHECK: omp.par.region.split:
4190 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4191 ; CHECK: omp.par.pre_finalize:
4192 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4193 ; CHECK: omp_region.body:
4194 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4195 ; CHECK: seq.par.merged:
4196 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
4197 ; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[A_ADDR]], align 4
4198 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP4]], 1
4199 ; CHECK-NEXT: store i32 [[ADD]], i32* [[B]], align 4
4200 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4201 ; CHECK: omp.par.merged.split:
4202 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4203 ; CHECK: omp_region.body.split:
4204 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4205 ; CHECK-NEXT: br label [[OMP_REGION_END]]
4206 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..16
4207 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4208 ; CHECK-NEXT: entry:
4209 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4210 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4211 ; CHECK-NEXT: ret void
4212 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..17
4213 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
4214 ; CHECK-NEXT: entry:
4215 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4216 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4217 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
4218 ; CHECK-NEXT: call void @use(i32 [[TMP1]])
4219 ; CHECK-NEXT: ret void
4220 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions
4221 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
4222 ; CHECK-NEXT: entry:
4223 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
4224 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
4225 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
4226 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
4227 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4228 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4229 ; CHECK: omp_parallel:
4230 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
4231 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4232 ; CHECK: omp.par.outlined.exit:
4233 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4234 ; CHECK: omp.par.exit.split:
4235 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4236 ; CHECK: entry.split.split:
4237 ; CHECK-NEXT: ret void
4238 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
4239 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
4240 ; CHECK-NEXT: omp.par.entry:
4241 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4242 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4243 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4244 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4245 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4246 ; CHECK: omp.par.outlined.exit.exitStub:
4247 ; CHECK-NEXT: ret void
4248 ; CHECK: omp.par.region:
4249 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4250 ; CHECK: omp.par.merged:
4251 ; CHECK-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
4252 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4253 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4254 ; CHECK-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
4255 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4256 ; CHECK: entry.split:
4257 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4258 ; CHECK: omp.par.region.split:
4259 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4260 ; CHECK: omp.par.pre_finalize:
4261 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4262 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..18
4263 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
4264 ; CHECK-NEXT: entry:
4265 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
4266 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
4267 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
4269 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
4270 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
4271 ; CHECK-NEXT: ret void
4273 ; CHECK-NEXT: ret void
4274 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..19
4275 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
4276 ; CHECK-NEXT: entry:
4277 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
4278 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
4279 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
4281 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
4282 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
4283 ; CHECK-NEXT: ret void
4285 ; CHECK-NEXT: ret void
4286 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
4287 ; CHECK-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
4288 ; CHECK-NEXT: entry:
4289 ; CHECK-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
4290 ; CHECK-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
4291 ; CHECK-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
4292 ; CHECK-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
4293 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4294 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4295 ; CHECK: omp_parallel:
4296 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
4297 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4298 ; CHECK: omp.par.outlined.exit:
4299 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4300 ; CHECK: omp.par.exit.split:
4301 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4302 ; CHECK: entry.split.split:
4303 ; CHECK-NEXT: ret void
4304 ; CHECK-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
4305 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
4306 ; CHECK-NEXT: omp.par.entry:
4307 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4308 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4309 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4310 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4311 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4312 ; CHECK: omp.par.outlined.exit.exitStub:
4313 ; CHECK-NEXT: ret void
4314 ; CHECK: omp.par.region:
4315 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4316 ; CHECK: omp.par.merged:
4317 ; CHECK-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
4318 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4319 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4320 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4321 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4322 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4323 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4324 ; CHECK: omp_region.end:
4325 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4326 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4327 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4328 ; CHECK: omp.par.merged.split.split:
4329 ; CHECK-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
4330 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4331 ; CHECK: entry.split:
4332 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4333 ; CHECK: omp.par.region.split:
4334 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4335 ; CHECK: omp.par.pre_finalize:
4336 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4337 ; CHECK: omp_region.body:
4338 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4339 ; CHECK: seq.par.merged:
4340 ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[CANCEL1_ADDR]], align 4
4341 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP3]], 0
4342 ; CHECK-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
4343 ; CHECK-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
4344 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4345 ; CHECK: omp.par.merged.split:
4346 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4347 ; CHECK: omp_region.body.split:
4348 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4349 ; CHECK-NEXT: br label [[OMP_REGION_END]]
4350 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..20
4351 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
4352 ; CHECK-NEXT: entry:
4353 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
4354 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
4355 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
4357 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
4358 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
4359 ; CHECK-NEXT: ret void
4361 ; CHECK-NEXT: ret void
4362 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..21
4363 ; CHECK-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
4364 ; CHECK-NEXT: entry:
4365 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
4366 ; CHECK-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
4367 ; CHECK-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
4369 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
4370 ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
4371 ; CHECK-NEXT: ret void
4373 ; CHECK-NEXT: ret void
4374 ; CHECK-LABEL: define {{[^@]+}}@merge_3
4375 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4376 ; CHECK-NEXT: entry:
4377 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4378 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4379 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4380 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4381 ; CHECK: omp_parallel:
4382 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
4383 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4384 ; CHECK: omp.par.outlined.exit:
4385 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4386 ; CHECK: omp.par.exit.split:
4387 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4388 ; CHECK: entry.split.split:
4389 ; CHECK-NEXT: ret void
4390 ; CHECK-LABEL: define {{[^@]+}}@merge_3..omp_par
4391 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
4392 ; CHECK-NEXT: omp.par.entry:
4393 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4394 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4395 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4396 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4397 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4398 ; CHECK: omp.par.outlined.exit.exitStub:
4399 ; CHECK-NEXT: ret void
4400 ; CHECK: omp.par.region:
4401 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4402 ; CHECK: omp.par.merged:
4403 ; CHECK-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4404 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4405 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4406 ; CHECK-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4407 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4408 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4409 ; CHECK-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4410 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4411 ; CHECK: entry.split:
4412 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4413 ; CHECK: omp.par.region.split:
4414 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4415 ; CHECK: omp.par.pre_finalize:
4416 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4417 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..22
4418 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4419 ; CHECK-NEXT: entry:
4420 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4421 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4422 ; CHECK-NEXT: ret void
4423 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..23
4424 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4425 ; CHECK-NEXT: entry:
4426 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4427 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4428 ; CHECK-NEXT: ret void
4429 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..24
4430 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4431 ; CHECK-NEXT: entry:
4432 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4433 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4434 ; CHECK-NEXT: ret void
4435 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq
4436 ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
4437 ; CHECK-NEXT: entry:
4438 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
4439 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
4440 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4441 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4442 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4443 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4444 ; CHECK: omp_parallel:
4445 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
4446 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4447 ; CHECK: omp.par.outlined.exit:
4448 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4449 ; CHECK: omp.par.exit.split:
4450 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4451 ; CHECK: entry.split.split:
4452 ; CHECK-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
4453 ; CHECK-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
4454 ; CHECK-NEXT: ret void
4455 ; CHECK-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
4456 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
4457 ; CHECK-NEXT: omp.par.entry:
4458 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4459 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4460 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4461 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4462 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4463 ; CHECK: omp.par.outlined.exit.exitStub:
4464 ; CHECK-NEXT: ret void
4465 ; CHECK: omp.par.region:
4466 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4467 ; CHECK: omp.par.merged:
4468 ; CHECK-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4469 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4470 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4471 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4472 ; CHECK-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4473 ; CHECK-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4474 ; CHECK-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4475 ; CHECK: omp_region.end:
4476 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4477 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4478 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4479 ; CHECK: omp.par.merged.split.split:
4480 ; CHECK-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4481 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4482 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
4483 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4484 ; CHECK-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
4485 ; CHECK-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
4486 ; CHECK-NEXT: br i1 [[TMP4]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
4487 ; CHECK: omp_region.end4:
4488 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4489 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
4490 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
4491 ; CHECK: omp.par.merged.split.split.split.split:
4492 ; CHECK-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4493 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4494 ; CHECK: entry.split:
4495 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4496 ; CHECK: omp.par.region.split:
4497 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4498 ; CHECK: omp.par.pre_finalize:
4499 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4500 ; CHECK: omp_region.body5:
4501 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
4502 ; CHECK: seq.par.merged2:
4503 ; CHECK-NEXT: [[TMP5:%.*]] = load i32, i32* [[A_ADDR]], align 4
4504 ; CHECK-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
4505 ; CHECK-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP5]]
4506 ; CHECK-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
4507 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
4508 ; CHECK: omp.par.merged.split.split.split:
4509 ; CHECK-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
4510 ; CHECK: omp_region.body5.split:
4511 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
4512 ; CHECK-NEXT: br label [[OMP_REGION_END4]]
4513 ; CHECK: omp_region.body:
4514 ; CHECK-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4515 ; CHECK: seq.par.merged:
4516 ; CHECK-NEXT: [[TMP6:%.*]] = load i32, i32* [[A_ADDR]], align 4
4517 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP6]], 1
4518 ; CHECK-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
4519 ; CHECK-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4520 ; CHECK: omp.par.merged.split:
4521 ; CHECK-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4522 ; CHECK: omp_region.body.split:
4523 ; CHECK-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4524 ; CHECK-NEXT: br label [[OMP_REGION_END]]
4525 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..25
4526 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4527 ; CHECK-NEXT: entry:
4528 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4529 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4530 ; CHECK-NEXT: ret void
4531 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..26
4532 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4533 ; CHECK-NEXT: entry:
4534 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4535 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4536 ; CHECK-NEXT: ret void
4537 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..27
4538 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4539 ; CHECK-NEXT: entry:
4540 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4541 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4542 ; CHECK-NEXT: ret void
4543 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_seq_call
4544 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4545 ; CHECK-NEXT: entry:
4546 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4547 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4548 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4549 ; CHECK-NEXT: call void (...) @foo()
4550 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4551 ; CHECK-NEXT: call void (...) @foo()
4552 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4553 ; CHECK-NEXT: ret void
4554 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..28
4555 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4556 ; CHECK-NEXT: entry:
4557 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4558 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4559 ; CHECK-NEXT: ret void
4560 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..29
4561 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4562 ; CHECK-NEXT: entry:
4563 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4564 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4565 ; CHECK-NEXT: ret void
4566 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..30
4567 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4568 ; CHECK-NEXT: entry:
4569 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4570 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4571 ; CHECK-NEXT: ret void
4572 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
4573 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4574 ; CHECK-NEXT: entry:
4575 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4576 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
4577 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4578 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4579 ; CHECK-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
4580 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4581 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4582 ; CHECK-NEXT: ret void
4583 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..31
4584 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4585 ; CHECK-NEXT: entry:
4586 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4587 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4588 ; CHECK-NEXT: ret void
4589 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..32
4590 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4591 ; CHECK-NEXT: entry:
4592 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4593 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4594 ; CHECK-NEXT: ret void
4595 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..33
4596 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4597 ; CHECK-NEXT: entry:
4598 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4599 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4600 ; CHECK-NEXT: ret void
4601 ; CHECK-LABEL: define {{[^@]+}}@unmergable_3_num_threads
4602 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4603 ; CHECK-NEXT: entry:
4604 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4605 ; CHECK-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
4606 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4607 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4608 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_ADDR]], align 4
4609 ; CHECK-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[TMP1]])
4610 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4611 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4612 ; CHECK-NEXT: ret void
4613 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..34
4614 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4615 ; CHECK-NEXT: entry:
4616 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4617 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4618 ; CHECK-NEXT: ret void
4619 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..35
4620 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4621 ; CHECK-NEXT: entry:
4622 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4623 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4624 ; CHECK-NEXT: ret void
4625 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..36
4626 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4627 ; CHECK-NEXT: entry:
4628 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4629 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4630 ; CHECK-NEXT: ret void
4631 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1
4632 ; CHECK-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4633 ; CHECK-NEXT: entry:
4634 ; CHECK-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4635 ; CHECK-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4636 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4637 ; CHECK-NEXT: br label [[OMP_PARALLEL:%.*]]
4638 ; CHECK: omp_parallel:
4639 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
4640 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4641 ; CHECK: omp.par.outlined.exit:
4642 ; CHECK-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4643 ; CHECK: omp.par.exit.split:
4644 ; CHECK-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4645 ; CHECK: entry.split.split:
4646 ; CHECK-NEXT: call void (...) @foo()
4647 ; CHECK-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4648 ; CHECK-NEXT: ret void
4649 ; CHECK-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
4650 ; CHECK-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
4651 ; CHECK-NEXT: omp.par.entry:
4652 ; CHECK-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4653 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4654 ; CHECK-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4655 ; CHECK-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4656 ; CHECK-NEXT: br label [[OMP_PAR_REGION:%.*]]
4657 ; CHECK: omp.par.outlined.exit.exitStub:
4658 ; CHECK-NEXT: ret void
4659 ; CHECK: omp.par.region:
4660 ; CHECK-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4661 ; CHECK: omp.par.merged:
4662 ; CHECK-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4663 ; CHECK-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4664 ; CHECK-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4665 ; CHECK-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4666 ; CHECK-NEXT: br label [[ENTRY_SPLIT:%.*]]
4667 ; CHECK: entry.split:
4668 ; CHECK-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4669 ; CHECK: omp.par.region.split:
4670 ; CHECK-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4671 ; CHECK: omp.par.pre_finalize:
4672 ; CHECK-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4673 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..37
4674 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4675 ; CHECK-NEXT: entry:
4676 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4677 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4678 ; CHECK-NEXT: ret void
4679 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..38
4680 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4681 ; CHECK-NEXT: entry:
4682 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4683 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4684 ; CHECK-NEXT: ret void
4685 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined..39
4686 ; CHECK-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4687 ; CHECK-NEXT: entry:
4688 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4689 ; CHECK-NEXT: call void @use(i32 [[TMP0]])
4690 ; CHECK-NEXT: ret void
4692 ; CHECK1-LABEL: define {{[^@]+}}@merge
4693 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4694 ; CHECK1-NEXT: entry:
4695 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4696 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4697 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
4698 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
4699 ; CHECK1: omp_parallel:
4700 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
4701 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4702 ; CHECK1: omp.par.outlined.exit:
4703 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4704 ; CHECK1: omp.par.exit.split:
4705 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4706 ; CHECK1: entry.split.split:
4707 ; CHECK1-NEXT: ret void
4710 ; CHECK1-LABEL: define {{[^@]+}}@merge..omp_par
4711 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0:[0-9]+]] {
4712 ; CHECK1-NEXT: omp.par.entry:
4713 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4714 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4715 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4716 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4717 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
4718 ; CHECK1: omp.par.outlined.exit.exitStub:
4719 ; CHECK1-NEXT: ret void
4720 ; CHECK1: omp.par.region:
4721 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4722 ; CHECK1: omp.par.merged:
4723 ; CHECK1-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4724 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4725 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4726 ; CHECK1-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4727 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
4728 ; CHECK1: entry.split:
4729 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4730 ; CHECK1: omp.par.region.split:
4731 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4732 ; CHECK1: omp.par.pre_finalize:
4733 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4736 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined.
4737 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4738 ; CHECK1-NEXT: entry:
4739 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4740 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4741 ; CHECK1-NEXT: ret void
4744 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..1
4745 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4746 ; CHECK1-NEXT: entry:
4747 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4748 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4749 ; CHECK1-NEXT: ret void
4752 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_proc_bind
4753 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4754 ; CHECK1-NEXT: entry:
4755 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4756 ; CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
4757 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4758 ; CHECK1-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
4759 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4760 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4761 ; CHECK1-NEXT: ret void
4764 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..2
4765 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4766 ; CHECK1-NEXT: entry:
4767 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4768 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4769 ; CHECK1-NEXT: ret void
4772 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..3
4773 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4774 ; CHECK1-NEXT: entry:
4775 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4776 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4777 ; CHECK1-NEXT: ret void
4780 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_num_threads
4781 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4782 ; CHECK1-NEXT: entry:
4783 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4784 ; CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
4785 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4786 ; CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
4787 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4788 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4789 ; CHECK1-NEXT: ret void
4792 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..4
4793 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4794 ; CHECK1-NEXT: entry:
4795 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4796 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4797 ; CHECK1-NEXT: ret void
4800 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..5
4801 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4802 ; CHECK1-NEXT: entry:
4803 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4804 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4805 ; CHECK1-NEXT: ret void
4808 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_seq_call
4809 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4810 ; CHECK1-NEXT: entry:
4811 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4812 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4813 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4814 ; CHECK1-NEXT: call void (...) @foo()
4815 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4816 ; CHECK1-NEXT: ret void
4819 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..6
4820 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4821 ; CHECK1-NEXT: entry:
4822 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4823 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4824 ; CHECK1-NEXT: ret void
4827 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..7
4828 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4829 ; CHECK1-NEXT: entry:
4830 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4831 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4832 ; CHECK1-NEXT: ret void
4835 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq
4836 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
4837 ; CHECK1-NEXT: entry:
4838 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
4839 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
4840 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4841 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
4842 ; CHECK1: omp_parallel:
4843 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
4844 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4845 ; CHECK1: omp.par.outlined.exit:
4846 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4847 ; CHECK1: omp.par.exit.split:
4848 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4849 ; CHECK1: entry.split.split:
4850 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
4851 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4852 ; CHECK1-NEXT: ret void
4855 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq..omp_par
4856 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
4857 ; CHECK1-NEXT: omp.par.entry:
4858 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4859 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4860 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4861 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4862 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
4863 ; CHECK1: omp.par.outlined.exit.exitStub:
4864 ; CHECK1-NEXT: ret void
4865 ; CHECK1: omp.par.region:
4866 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4867 ; CHECK1: omp.par.merged:
4868 ; CHECK1-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4869 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4870 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4871 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4872 ; CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4873 ; CHECK1-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
4874 ; CHECK1-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4875 ; CHECK1: omp_region.end:
4876 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4877 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4878 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4879 ; CHECK1: omp.par.merged.split.split:
4880 ; CHECK1-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
4881 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
4882 ; CHECK1: entry.split:
4883 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4884 ; CHECK1: omp.par.region.split:
4885 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4886 ; CHECK1: omp.par.pre_finalize:
4887 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4888 ; CHECK1: omp_region.body:
4889 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4890 ; CHECK1: seq.par.merged:
4891 ; CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
4892 ; CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
4893 ; CHECK1-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
4894 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4895 ; CHECK1: omp.par.merged.split:
4896 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4897 ; CHECK1: omp_region.body.split:
4898 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4899 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
4902 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..8
4903 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4904 ; CHECK1-NEXT: entry:
4905 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4906 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4907 ; CHECK1-NEXT: ret void
4910 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..9
4911 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
4912 ; CHECK1-NEXT: entry:
4913 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
4914 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
4915 ; CHECK1-NEXT: ret void
4918 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_float
4919 ; CHECK1-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
4920 ; CHECK1-NEXT: entry:
4921 ; CHECK1-NEXT: [[F_RELOADED:%.*]] = alloca float, align 4
4922 ; CHECK1-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
4923 ; CHECK1-NEXT: store float [[F]], float* [[F_ADDR]], align 4
4924 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4925 ; CHECK1-NEXT: store float [[F]], float* [[F_RELOADED]], align 4
4926 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
4927 ; CHECK1: omp_parallel:
4928 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_RELOADED]], float* [[F_ADDR]], float* [[P]])
4929 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
4930 ; CHECK1: omp.par.outlined.exit:
4931 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
4932 ; CHECK1: omp.par.exit.split:
4933 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
4934 ; CHECK1: entry.split.split:
4935 ; CHECK1-NEXT: ret void
4938 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
4939 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_RELOADED:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
4940 ; CHECK1-NEXT: omp.par.entry:
4941 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
4942 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
4943 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
4944 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
4945 ; CHECK1-NEXT: [[TMP1:%.*]] = load float, float* [[F_RELOADED]], align 4
4946 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
4947 ; CHECK1: omp.par.outlined.exit.exitStub:
4948 ; CHECK1-NEXT: ret void
4949 ; CHECK1: omp.par.region:
4950 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
4951 ; CHECK1: omp.par.merged:
4952 ; CHECK1-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
4953 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4954 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
4955 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4956 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4957 ; CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
4958 ; CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
4959 ; CHECK1: omp_region.end:
4960 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
4961 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
4962 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
4963 ; CHECK1: omp.par.merged.split.split:
4964 ; CHECK1-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
4965 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
4966 ; CHECK1: entry.split:
4967 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
4968 ; CHECK1: omp.par.region.split:
4969 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
4970 ; CHECK1: omp.par.pre_finalize:
4971 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
4972 ; CHECK1: omp_region.body:
4973 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
4974 ; CHECK1: seq.par.merged:
4975 ; CHECK1-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], 0x40091EB860000000
4976 ; CHECK1-NEXT: store float [[ADD]], float* [[P]], align 4
4977 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
4978 ; CHECK1: omp.par.merged.split:
4979 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
4980 ; CHECK1: omp_region.body.split:
4981 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
4982 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
4985 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..10
4986 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
4987 ; CHECK1-NEXT: entry:
4988 ; CHECK1-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
4989 ; CHECK1-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
4990 ; CHECK1-NEXT: call void @use(i32 [[CONV]])
4991 ; CHECK1-NEXT: ret void
4994 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..11
4995 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
4996 ; CHECK1-NEXT: entry:
4997 ; CHECK1-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
4998 ; CHECK1-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
4999 ; CHECK1-NEXT: call void @use(i32 [[CONV]])
5000 ; CHECK1-NEXT: ret void
5003 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_firstprivate
5004 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5005 ; CHECK1-NEXT: entry:
5006 ; CHECK1-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
5007 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5008 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5009 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5010 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5011 ; CHECK1: omp_parallel:
5012 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
5013 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5014 ; CHECK1: omp.par.outlined.exit:
5015 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5016 ; CHECK1: omp.par.exit.split:
5017 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5018 ; CHECK1: entry.split.split:
5019 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
5020 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5021 ; CHECK1-NEXT: ret void
5024 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
5025 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
5026 ; CHECK1-NEXT: omp.par.entry:
5027 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5028 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5029 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5030 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5031 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5032 ; CHECK1: omp.par.outlined.exit.exitStub:
5033 ; CHECK1-NEXT: ret void
5034 ; CHECK1: omp.par.region:
5035 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5036 ; CHECK1: omp.par.merged:
5037 ; CHECK1-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5038 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5039 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5040 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5041 ; CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5042 ; CHECK1-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
5043 ; CHECK1-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5044 ; CHECK1: omp_region.end:
5045 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5046 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5047 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5048 ; CHECK1: omp.par.merged.split.split:
5049 ; CHECK1-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
5050 ; CHECK1-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
5051 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5052 ; CHECK1: entry.split:
5053 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5054 ; CHECK1: omp.par.region.split:
5055 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5056 ; CHECK1: omp.par.pre_finalize:
5057 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5058 ; CHECK1: omp_region.body:
5059 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
5060 ; CHECK1: seq.par.merged:
5061 ; CHECK1-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
5062 ; CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
5063 ; CHECK1-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
5064 ; CHECK1-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
5065 ; CHECK1-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
5066 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
5067 ; CHECK1: omp.par.merged.split:
5068 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
5069 ; CHECK1: omp_region.body.split:
5070 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5071 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
5074 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..12
5075 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5076 ; CHECK1-NEXT: entry:
5077 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5078 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5079 ; CHECK1-NEXT: ret void
5082 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..13
5083 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
5084 ; CHECK1-NEXT: entry:
5085 ; CHECK1-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
5086 ; CHECK1-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
5087 ; CHECK1-NEXT: ret void
5090 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_sink_lt
5091 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5092 ; CHECK1-NEXT: entry:
5093 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5094 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5095 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5096 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5097 ; CHECK1: omp_parallel:
5098 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
5099 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5100 ; CHECK1: omp.par.outlined.exit:
5101 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5102 ; CHECK1: omp.par.exit.split:
5103 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5104 ; CHECK1: entry.split.split:
5105 ; CHECK1-NEXT: ret void
5108 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
5109 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
5110 ; CHECK1-NEXT: omp.par.entry:
5111 ; CHECK1-NEXT: [[B:%.*]] = alloca i32, align 4
5112 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5113 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5114 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5115 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5116 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5117 ; CHECK1: omp.par.outlined.exit.exitStub:
5118 ; CHECK1-NEXT: ret void
5119 ; CHECK1: omp.par.region:
5120 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5121 ; CHECK1: omp.par.merged:
5122 ; CHECK1-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5123 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5124 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5125 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5126 ; CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5127 ; CHECK1-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
5128 ; CHECK1-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5129 ; CHECK1: omp_region.end:
5130 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5131 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5132 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5133 ; CHECK1: omp.par.merged.split.split:
5134 ; CHECK1-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5135 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5136 ; CHECK1: entry.split:
5137 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5138 ; CHECK1: omp.par.region.split:
5139 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5140 ; CHECK1: omp.par.pre_finalize:
5141 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5142 ; CHECK1: omp_region.body:
5143 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
5144 ; CHECK1: seq.par.merged:
5145 ; CHECK1-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
5146 ; CHECK1-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
5147 ; CHECK1-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
5148 ; CHECK1-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
5149 ; CHECK1-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
5150 ; CHECK1-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
5151 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
5152 ; CHECK1: omp.par.merged.split:
5153 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
5154 ; CHECK1: omp_region.body.split:
5155 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5156 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
5159 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..14
5160 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5161 ; CHECK1-NEXT: entry:
5162 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5163 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5164 ; CHECK1-NEXT: ret void
5167 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..15
5168 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5169 ; CHECK1-NEXT: entry:
5170 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5171 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5172 ; CHECK1-NEXT: ret void
5175 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_par_use
5176 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5177 ; CHECK1-NEXT: entry:
5178 ; CHECK1-NEXT: [[A_RELOADED:%.*]] = alloca i32, align 4
5179 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5180 ; CHECK1-NEXT: [[B:%.*]] = alloca i32, align 4
5181 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5182 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5183 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_RELOADED]], align 4
5184 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5185 ; CHECK1: omp_parallel:
5186 ; CHECK1-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
5187 ; CHECK1-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
5188 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_RELOADED]], i32* [[A_ADDR]], i32* [[B]])
5189 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5190 ; CHECK1: omp.par.outlined.exit:
5191 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5192 ; CHECK1: omp.par.exit.split:
5193 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5194 ; CHECK1: entry.split.split:
5195 ; CHECK1-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
5196 ; CHECK1-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
5197 ; CHECK1-NEXT: ret void
5200 ; CHECK1-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
5201 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_RELOADED:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
5202 ; CHECK1-NEXT: omp.par.entry:
5203 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5204 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5205 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5206 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5207 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_RELOADED]], align 4
5208 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5209 ; CHECK1: omp.par.outlined.exit.exitStub:
5210 ; CHECK1-NEXT: ret void
5211 ; CHECK1: omp.par.region:
5212 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5213 ; CHECK1: omp.par.merged:
5214 ; CHECK1-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5215 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5216 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5217 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5218 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5219 ; CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
5220 ; CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5221 ; CHECK1: omp_region.end:
5222 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5223 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5224 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5225 ; CHECK1: omp.par.merged.split.split:
5226 ; CHECK1-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
5227 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5228 ; CHECK1: entry.split:
5229 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5230 ; CHECK1: omp.par.region.split:
5231 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5232 ; CHECK1: omp.par.pre_finalize:
5233 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5234 ; CHECK1: omp_region.body:
5235 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
5236 ; CHECK1: seq.par.merged:
5237 ; CHECK1-NEXT: [[TMP4:%.*]] = bitcast i32* [[B]] to i8*
5238 ; CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], 1
5239 ; CHECK1-NEXT: store i32 [[ADD]], i32* [[B]], align 4
5240 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
5241 ; CHECK1: omp.par.merged.split:
5242 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
5243 ; CHECK1: omp_region.body.split:
5244 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5245 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
5248 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..16
5249 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5250 ; CHECK1-NEXT: entry:
5251 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5252 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5253 ; CHECK1-NEXT: ret void
5256 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..17
5257 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
5258 ; CHECK1-NEXT: entry:
5259 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5260 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5261 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
5262 ; CHECK1-NEXT: call void @use(i32 [[TMP1]])
5263 ; CHECK1-NEXT: ret void
5266 ; CHECK1-LABEL: define {{[^@]+}}@merge_cancellable_regions
5267 ; CHECK1-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
5268 ; CHECK1-NEXT: entry:
5269 ; CHECK1-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
5270 ; CHECK1-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
5271 ; CHECK1-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
5272 ; CHECK1-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
5273 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5274 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5275 ; CHECK1: omp_parallel:
5276 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
5277 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5278 ; CHECK1: omp.par.outlined.exit:
5279 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5280 ; CHECK1: omp.par.exit.split:
5281 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5282 ; CHECK1: entry.split.split:
5283 ; CHECK1-NEXT: ret void
5286 ; CHECK1-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
5287 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
5288 ; CHECK1-NEXT: omp.par.entry:
5289 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5290 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5291 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5292 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5293 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5294 ; CHECK1: omp.par.outlined.exit.exitStub:
5295 ; CHECK1-NEXT: ret void
5296 ; CHECK1: omp.par.region:
5297 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5298 ; CHECK1: omp.par.merged:
5299 ; CHECK1-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
5300 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5301 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5302 ; CHECK1-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
5303 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5304 ; CHECK1: entry.split:
5305 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5306 ; CHECK1: omp.par.region.split:
5307 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5308 ; CHECK1: omp.par.pre_finalize:
5309 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5312 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..18
5313 ; CHECK1-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
5314 ; CHECK1-NEXT: entry:
5315 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
5316 ; CHECK1-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
5317 ; CHECK1-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
5319 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
5320 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
5321 ; CHECK1-NEXT: ret void
5323 ; CHECK1-NEXT: ret void
5326 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..19
5327 ; CHECK1-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
5328 ; CHECK1-NEXT: entry:
5329 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
5330 ; CHECK1-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
5331 ; CHECK1-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
5333 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
5334 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
5335 ; CHECK1-NEXT: ret void
5337 ; CHECK1-NEXT: ret void
5340 ; CHECK1-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
5341 ; CHECK1-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
5342 ; CHECK1-NEXT: entry:
5343 ; CHECK1-NEXT: [[CANCEL1_RELOADED:%.*]] = alloca i32, align 4
5344 ; CHECK1-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
5345 ; CHECK1-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
5346 ; CHECK1-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
5347 ; CHECK1-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
5348 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5349 ; CHECK1-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_RELOADED]], align 4
5350 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5351 ; CHECK1: omp_parallel:
5352 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_RELOADED]], i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
5353 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5354 ; CHECK1: omp.par.outlined.exit:
5355 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5356 ; CHECK1: omp.par.exit.split:
5357 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5358 ; CHECK1: entry.split.split:
5359 ; CHECK1-NEXT: ret void
5362 ; CHECK1-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
5363 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_RELOADED:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
5364 ; CHECK1-NEXT: omp.par.entry:
5365 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5366 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5367 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5368 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5369 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[CANCEL1_RELOADED]], align 4
5370 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5371 ; CHECK1: omp.par.outlined.exit.exitStub:
5372 ; CHECK1-NEXT: ret void
5373 ; CHECK1: omp.par.region:
5374 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5375 ; CHECK1: omp.par.merged:
5376 ; CHECK1-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
5377 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5378 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5379 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5380 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5381 ; CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
5382 ; CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5383 ; CHECK1: omp_region.end:
5384 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5385 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5386 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5387 ; CHECK1: omp.par.merged.split.split:
5388 ; CHECK1-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
5389 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5390 ; CHECK1: entry.split:
5391 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5392 ; CHECK1: omp.par.region.split:
5393 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5394 ; CHECK1: omp.par.pre_finalize:
5395 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5396 ; CHECK1: omp_region.body:
5397 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
5398 ; CHECK1: seq.par.merged:
5399 ; CHECK1-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP1]], 0
5400 ; CHECK1-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
5401 ; CHECK1-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
5402 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
5403 ; CHECK1: omp.par.merged.split:
5404 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
5405 ; CHECK1: omp_region.body.split:
5406 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5407 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
5410 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..20
5411 ; CHECK1-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
5412 ; CHECK1-NEXT: entry:
5413 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
5414 ; CHECK1-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
5415 ; CHECK1-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
5417 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
5418 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
5419 ; CHECK1-NEXT: ret void
5421 ; CHECK1-NEXT: ret void
5424 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..21
5425 ; CHECK1-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
5426 ; CHECK1-NEXT: entry:
5427 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
5428 ; CHECK1-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
5429 ; CHECK1-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
5431 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
5432 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
5433 ; CHECK1-NEXT: ret void
5435 ; CHECK1-NEXT: ret void
5438 ; CHECK1-LABEL: define {{[^@]+}}@merge_3
5439 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5440 ; CHECK1-NEXT: entry:
5441 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5442 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5443 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5444 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5445 ; CHECK1: omp_parallel:
5446 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
5447 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5448 ; CHECK1: omp.par.outlined.exit:
5449 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5450 ; CHECK1: omp.par.exit.split:
5451 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5452 ; CHECK1: entry.split.split:
5453 ; CHECK1-NEXT: ret void
5456 ; CHECK1-LABEL: define {{[^@]+}}@merge_3..omp_par
5457 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
5458 ; CHECK1-NEXT: omp.par.entry:
5459 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5460 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5461 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5462 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5463 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5464 ; CHECK1: omp.par.outlined.exit.exitStub:
5465 ; CHECK1-NEXT: ret void
5466 ; CHECK1: omp.par.region:
5467 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5468 ; CHECK1: omp.par.merged:
5469 ; CHECK1-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5470 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5471 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5472 ; CHECK1-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5473 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5474 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5475 ; CHECK1-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5476 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5477 ; CHECK1: entry.split:
5478 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5479 ; CHECK1: omp.par.region.split:
5480 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5481 ; CHECK1: omp.par.pre_finalize:
5482 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5485 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..22
5486 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5487 ; CHECK1-NEXT: entry:
5488 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5489 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5490 ; CHECK1-NEXT: ret void
5493 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..23
5494 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5495 ; CHECK1-NEXT: entry:
5496 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5497 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5498 ; CHECK1-NEXT: ret void
5501 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..24
5502 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5503 ; CHECK1-NEXT: entry:
5504 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5505 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5506 ; CHECK1-NEXT: ret void
5509 ; CHECK1-LABEL: define {{[^@]+}}@merge_3_seq
5510 ; CHECK1-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
5511 ; CHECK1-NEXT: entry:
5512 ; CHECK1-NEXT: [[A_RELOADED:%.*]] = alloca i32, align 4
5513 ; CHECK1-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
5514 ; CHECK1-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
5515 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5516 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5517 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5518 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_RELOADED]], align 4
5519 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5520 ; CHECK1: omp_parallel:
5521 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_RELOADED]], i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
5522 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5523 ; CHECK1: omp.par.outlined.exit:
5524 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5525 ; CHECK1: omp.par.exit.split:
5526 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5527 ; CHECK1: entry.split.split:
5528 ; CHECK1-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
5529 ; CHECK1-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
5530 ; CHECK1-NEXT: ret void
5533 ; CHECK1-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
5534 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_RELOADED:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
5535 ; CHECK1-NEXT: omp.par.entry:
5536 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5537 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5538 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5539 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5540 ; CHECK1-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_RELOADED]], align 4
5541 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5542 ; CHECK1: omp.par.outlined.exit.exitStub:
5543 ; CHECK1-NEXT: ret void
5544 ; CHECK1: omp.par.region:
5545 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5546 ; CHECK1: omp.par.merged:
5547 ; CHECK1-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5548 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5549 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5550 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5551 ; CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5552 ; CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
5553 ; CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5554 ; CHECK1: omp_region.end:
5555 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5556 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5557 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5558 ; CHECK1: omp.par.merged.split.split:
5559 ; CHECK1-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5560 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5561 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
5562 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5563 ; CHECK1-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
5564 ; CHECK1-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
5565 ; CHECK1-NEXT: br i1 [[TMP5]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
5566 ; CHECK1: omp_region.end4:
5567 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5568 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
5569 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
5570 ; CHECK1: omp.par.merged.split.split.split.split:
5571 ; CHECK1-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5572 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5573 ; CHECK1: entry.split:
5574 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5575 ; CHECK1: omp.par.region.split:
5576 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5577 ; CHECK1: omp.par.pre_finalize:
5578 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5579 ; CHECK1: omp_region.body5:
5580 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
5581 ; CHECK1: seq.par.merged2:
5582 ; CHECK1-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
5583 ; CHECK1-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP1]]
5584 ; CHECK1-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
5585 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
5586 ; CHECK1: omp.par.merged.split.split.split:
5587 ; CHECK1-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
5588 ; CHECK1: omp_region.body5.split:
5589 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
5590 ; CHECK1-NEXT: br label [[OMP_REGION_END4]]
5591 ; CHECK1: omp_region.body:
5592 ; CHECK1-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
5593 ; CHECK1: seq.par.merged:
5594 ; CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], 1
5595 ; CHECK1-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
5596 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
5597 ; CHECK1: omp.par.merged.split:
5598 ; CHECK1-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
5599 ; CHECK1: omp_region.body.split:
5600 ; CHECK1-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5601 ; CHECK1-NEXT: br label [[OMP_REGION_END]]
5604 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..25
5605 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5606 ; CHECK1-NEXT: entry:
5607 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5608 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5609 ; CHECK1-NEXT: ret void
5612 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..26
5613 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5614 ; CHECK1-NEXT: entry:
5615 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5616 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5617 ; CHECK1-NEXT: ret void
5620 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..27
5621 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5622 ; CHECK1-NEXT: entry:
5623 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5624 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5625 ; CHECK1-NEXT: ret void
5628 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_3_seq_call
5629 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5630 ; CHECK1-NEXT: entry:
5631 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5632 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5633 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5634 ; CHECK1-NEXT: call void (...) @foo()
5635 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5636 ; CHECK1-NEXT: call void (...) @foo()
5637 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5638 ; CHECK1-NEXT: ret void
5641 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..28
5642 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5643 ; CHECK1-NEXT: entry:
5644 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5645 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5646 ; CHECK1-NEXT: ret void
5649 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..29
5650 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5651 ; CHECK1-NEXT: entry:
5652 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5653 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5654 ; CHECK1-NEXT: ret void
5657 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..30
5658 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5659 ; CHECK1-NEXT: entry:
5660 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5661 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5662 ; CHECK1-NEXT: ret void
5665 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
5666 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5667 ; CHECK1-NEXT: entry:
5668 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5669 ; CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
5670 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5671 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5672 ; CHECK1-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
5673 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5674 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5675 ; CHECK1-NEXT: ret void
5678 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..31
5679 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5680 ; CHECK1-NEXT: entry:
5681 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5682 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5683 ; CHECK1-NEXT: ret void
5686 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..32
5687 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5688 ; CHECK1-NEXT: entry:
5689 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5690 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5691 ; CHECK1-NEXT: ret void
5694 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..33
5695 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5696 ; CHECK1-NEXT: entry:
5697 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5698 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5699 ; CHECK1-NEXT: ret void
5702 ; CHECK1-LABEL: define {{[^@]+}}@unmergable_3_num_threads
5703 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5704 ; CHECK1-NEXT: entry:
5705 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5706 ; CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
5707 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5708 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5709 ; CHECK1-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
5710 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5711 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5712 ; CHECK1-NEXT: ret void
5715 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..34
5716 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5717 ; CHECK1-NEXT: entry:
5718 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5719 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5720 ; CHECK1-NEXT: ret void
5723 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..35
5724 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5725 ; CHECK1-NEXT: entry:
5726 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5727 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5728 ; CHECK1-NEXT: ret void
5731 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..36
5732 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5733 ; CHECK1-NEXT: entry:
5734 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5735 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5736 ; CHECK1-NEXT: ret void
5739 ; CHECK1-LABEL: define {{[^@]+}}@merge_2_unmergable_1
5740 ; CHECK1-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5741 ; CHECK1-NEXT: entry:
5742 ; CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5743 ; CHECK1-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5744 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5745 ; CHECK1-NEXT: br label [[OMP_PARALLEL:%.*]]
5746 ; CHECK1: omp_parallel:
5747 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
5748 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5749 ; CHECK1: omp.par.outlined.exit:
5750 ; CHECK1-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5751 ; CHECK1: omp.par.exit.split:
5752 ; CHECK1-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5753 ; CHECK1: entry.split.split:
5754 ; CHECK1-NEXT: call void (...) @foo()
5755 ; CHECK1-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5756 ; CHECK1-NEXT: ret void
5759 ; CHECK1-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
5760 ; CHECK1-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
5761 ; CHECK1-NEXT: omp.par.entry:
5762 ; CHECK1-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5763 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5764 ; CHECK1-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5765 ; CHECK1-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5766 ; CHECK1-NEXT: br label [[OMP_PAR_REGION:%.*]]
5767 ; CHECK1: omp.par.outlined.exit.exitStub:
5768 ; CHECK1-NEXT: ret void
5769 ; CHECK1: omp.par.region:
5770 ; CHECK1-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5771 ; CHECK1: omp.par.merged:
5772 ; CHECK1-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5773 ; CHECK1-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5774 ; CHECK1-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5775 ; CHECK1-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5776 ; CHECK1-NEXT: br label [[ENTRY_SPLIT:%.*]]
5777 ; CHECK1: entry.split:
5778 ; CHECK1-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5779 ; CHECK1: omp.par.region.split:
5780 ; CHECK1-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5781 ; CHECK1: omp.par.pre_finalize:
5782 ; CHECK1-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5785 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..37
5786 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5787 ; CHECK1-NEXT: entry:
5788 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5789 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5790 ; CHECK1-NEXT: ret void
5793 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..38
5794 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5795 ; CHECK1-NEXT: entry:
5796 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5797 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5798 ; CHECK1-NEXT: ret void
5801 ; CHECK1-LABEL: define {{[^@]+}}@.omp_outlined..39
5802 ; CHECK1-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5803 ; CHECK1-NEXT: entry:
5804 ; CHECK1-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5805 ; CHECK1-NEXT: call void @use(i32 [[TMP0]])
5806 ; CHECK1-NEXT: ret void
5809 ; CHECK2-LABEL: define {{[^@]+}}@merge
5810 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5811 ; CHECK2-NEXT: entry:
5812 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5813 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5814 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
5815 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
5816 ; CHECK2: omp_parallel:
5817 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
5818 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5819 ; CHECK2: omp.par.outlined.exit:
5820 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5821 ; CHECK2: omp.par.exit.split:
5822 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5823 ; CHECK2: entry.split.split:
5824 ; CHECK2-NEXT: ret void
5827 ; CHECK2-LABEL: define {{[^@]+}}@merge..omp_par
5828 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0:[0-9]+]] {
5829 ; CHECK2-NEXT: omp.par.entry:
5830 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5831 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5832 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5833 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5834 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
5835 ; CHECK2: omp.par.outlined.exit.exitStub:
5836 ; CHECK2-NEXT: ret void
5837 ; CHECK2: omp.par.region:
5838 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5839 ; CHECK2: omp.par.merged:
5840 ; CHECK2-NEXT: call void @.omp_outlined.(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5841 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5842 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5843 ; CHECK2-NEXT: call void @.omp_outlined..1(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5844 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
5845 ; CHECK2: entry.split:
5846 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
5847 ; CHECK2: omp.par.region.split:
5848 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
5849 ; CHECK2: omp.par.pre_finalize:
5850 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
5853 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined.
5854 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5855 ; CHECK2-NEXT: entry:
5856 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5857 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5858 ; CHECK2-NEXT: ret void
5861 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..1
5862 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5863 ; CHECK2-NEXT: entry:
5864 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5865 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5866 ; CHECK2-NEXT: ret void
5869 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_proc_bind
5870 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5871 ; CHECK2-NEXT: entry:
5872 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5873 ; CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
5874 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5875 ; CHECK2-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
5876 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5877 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5878 ; CHECK2-NEXT: ret void
5881 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..2
5882 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5883 ; CHECK2-NEXT: entry:
5884 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5885 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5886 ; CHECK2-NEXT: ret void
5889 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..3
5890 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5891 ; CHECK2-NEXT: entry:
5892 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5893 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5894 ; CHECK2-NEXT: ret void
5897 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_num_threads
5898 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5899 ; CHECK2-NEXT: entry:
5900 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5901 ; CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
5902 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5903 ; CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
5904 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5905 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..5 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5906 ; CHECK2-NEXT: ret void
5909 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..4
5910 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5911 ; CHECK2-NEXT: entry:
5912 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5913 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5914 ; CHECK2-NEXT: ret void
5917 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..5
5918 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5919 ; CHECK2-NEXT: entry:
5920 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5921 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5922 ; CHECK2-NEXT: ret void
5925 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_seq_call
5926 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5927 ; CHECK2-NEXT: entry:
5928 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5929 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5930 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..6 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5931 ; CHECK2-NEXT: call void (...) @foo()
5932 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..7 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5933 ; CHECK2-NEXT: ret void
5936 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..6
5937 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5938 ; CHECK2-NEXT: entry:
5939 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5940 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5941 ; CHECK2-NEXT: ret void
5944 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..7
5945 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
5946 ; CHECK2-NEXT: entry:
5947 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
5948 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5949 ; CHECK2-NEXT: ret void
5952 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq
5953 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
5954 ; CHECK2-NEXT: entry:
5955 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
5956 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
5957 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5958 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
5959 ; CHECK2: omp_parallel:
5960 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
5961 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
5962 ; CHECK2: omp.par.outlined.exit:
5963 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
5964 ; CHECK2: omp.par.exit.split:
5965 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
5966 ; CHECK2: entry.split.split:
5967 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
5968 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
5969 ; CHECK2-NEXT: ret void
5972 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq..omp_par
5973 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
5974 ; CHECK2-NEXT: omp.par.entry:
5975 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
5976 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
5977 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
5978 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
5979 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
5980 ; CHECK2: omp.par.outlined.exit.exitStub:
5981 ; CHECK2-NEXT: ret void
5982 ; CHECK2: omp.par.region:
5983 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
5984 ; CHECK2: omp.par.merged:
5985 ; CHECK2-NEXT: call void @.omp_outlined..8(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5986 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5987 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
5988 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5989 ; CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
5990 ; CHECK2-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
5991 ; CHECK2-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
5992 ; CHECK2: omp_region.end:
5993 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
5994 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
5995 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
5996 ; CHECK2: omp.par.merged.split.split:
5997 ; CHECK2-NEXT: call void @.omp_outlined..9(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
5998 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
5999 ; CHECK2: entry.split:
6000 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6001 ; CHECK2: omp.par.region.split:
6002 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6003 ; CHECK2: omp.par.pre_finalize:
6004 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6005 ; CHECK2: omp_region.body:
6006 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6007 ; CHECK2: seq.par.merged:
6008 ; CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
6009 ; CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
6010 ; CHECK2-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
6011 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6012 ; CHECK2: omp.par.merged.split:
6013 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6014 ; CHECK2: omp_region.body.split:
6015 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6016 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6019 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..8
6020 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6021 ; CHECK2-NEXT: entry:
6022 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6023 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6024 ; CHECK2-NEXT: ret void
6027 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..9
6028 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6029 ; CHECK2-NEXT: entry:
6030 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6031 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6032 ; CHECK2-NEXT: ret void
6035 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_float
6036 ; CHECK2-SAME: (float [[F:%.*]], float* nocapture nofree writeonly [[P:%.*]]) local_unnamed_addr {
6037 ; CHECK2-NEXT: entry:
6038 ; CHECK2-NEXT: [[F_RELOADED:%.*]] = alloca float, align 4
6039 ; CHECK2-NEXT: [[F_ADDR:%.*]] = alloca float, align 4
6040 ; CHECK2-NEXT: store float [[F]], float* [[F_ADDR]], align 4
6041 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6042 ; CHECK2-NEXT: store float [[F]], float* [[F_RELOADED]], align 4
6043 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6044 ; CHECK2: omp_parallel:
6045 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, float*, float*, float*)* @merge_seq_float..omp_par to void (i32*, i32*, ...)*), float* [[F_RELOADED]], float* [[F_ADDR]], float* [[P]])
6046 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6047 ; CHECK2: omp.par.outlined.exit:
6048 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6049 ; CHECK2: omp.par.exit.split:
6050 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6051 ; CHECK2: entry.split.split:
6052 ; CHECK2-NEXT: ret void
6055 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_float..omp_par
6056 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], float* [[F_RELOADED:%.*]], float* [[F_ADDR:%.*]], float* [[P:%.*]]) #[[ATTR0]] {
6057 ; CHECK2-NEXT: omp.par.entry:
6058 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6059 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6060 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6061 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6062 ; CHECK2-NEXT: [[TMP1:%.*]] = load float, float* [[F_RELOADED]], align 4
6063 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6064 ; CHECK2: omp.par.outlined.exit.exitStub:
6065 ; CHECK2-NEXT: ret void
6066 ; CHECK2: omp.par.region:
6067 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6068 ; CHECK2: omp.par.merged:
6069 ; CHECK2-NEXT: call void @.omp_outlined..10(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
6070 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6071 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6072 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6073 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6074 ; CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
6075 ; CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6076 ; CHECK2: omp_region.end:
6077 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6078 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6079 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6080 ; CHECK2: omp.par.merged.split.split:
6081 ; CHECK2-NEXT: call void @.omp_outlined..11(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F_ADDR]])
6082 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6083 ; CHECK2: entry.split:
6084 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6085 ; CHECK2: omp.par.region.split:
6086 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6087 ; CHECK2: omp.par.pre_finalize:
6088 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6089 ; CHECK2: omp_region.body:
6090 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6091 ; CHECK2: seq.par.merged:
6092 ; CHECK2-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], 0x40091EB860000000
6093 ; CHECK2-NEXT: store float [[ADD]], float* [[P]], align 4
6094 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6095 ; CHECK2: omp.par.merged.split:
6096 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6097 ; CHECK2: omp_region.body.split:
6098 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6099 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6102 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..10
6103 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
6104 ; CHECK2-NEXT: entry:
6105 ; CHECK2-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
6106 ; CHECK2-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
6107 ; CHECK2-NEXT: call void @use(i32 [[CONV]])
6108 ; CHECK2-NEXT: ret void
6111 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..11
6112 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], float* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[F:%.*]]) {
6113 ; CHECK2-NEXT: entry:
6114 ; CHECK2-NEXT: [[TMP0:%.*]] = load float, float* [[F]], align 4
6115 ; CHECK2-NEXT: [[CONV:%.*]] = fptosi float [[TMP0]] to i32
6116 ; CHECK2-NEXT: call void @use(i32 [[CONV]])
6117 ; CHECK2-NEXT: ret void
6120 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_firstprivate
6121 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6122 ; CHECK2-NEXT: entry:
6123 ; CHECK2-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]] = alloca i64, align 8
6124 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6125 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6126 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6127 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6128 ; CHECK2: omp_parallel:
6129 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i64*)* @merge_seq_firstprivate..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]])
6130 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6131 ; CHECK2: omp.par.outlined.exit:
6132 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6133 ; CHECK2: omp.par.exit.split:
6134 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6135 ; CHECK2: entry.split.split:
6136 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
6137 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6138 ; CHECK2-NEXT: ret void
6141 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_firstprivate..omp_par
6142 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
6143 ; CHECK2-NEXT: omp.par.entry:
6144 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6145 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6146 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6147 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6148 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6149 ; CHECK2: omp.par.outlined.exit.exitStub:
6150 ; CHECK2-NEXT: ret void
6151 ; CHECK2: omp.par.region:
6152 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6153 ; CHECK2: omp.par.merged:
6154 ; CHECK2-NEXT: call void @.omp_outlined..12(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6155 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6156 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6157 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6158 ; CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6159 ; CHECK2-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
6160 ; CHECK2-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6161 ; CHECK2: omp_region.end:
6162 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6163 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6164 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6165 ; CHECK2: omp.par.merged.split.split:
6166 ; CHECK2-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD:%.*]] = load i64, i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
6167 ; CHECK2-NEXT: call void @.omp_outlined..13(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i64 [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_LOAD]])
6168 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6169 ; CHECK2: entry.split:
6170 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6171 ; CHECK2: omp.par.region.split:
6172 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6173 ; CHECK2: omp.par.pre_finalize:
6174 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6175 ; CHECK2: omp_region.body:
6176 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6177 ; CHECK2: seq.par.merged:
6178 ; CHECK2-NEXT: [[TMP3:%.*]] = load i32, i32* [[A_ADDR]], align 4
6179 ; CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP3]], 1
6180 ; CHECK2-NEXT: store i32 [[ADD]], i32* [[A_ADDR]], align 4
6181 ; CHECK2-NEXT: [[A_CASTED_SROA_0_0_INSERT_EXT:%.*]] = zext i32 [[ADD]] to i64
6182 ; CHECK2-NEXT: store i64 [[A_CASTED_SROA_0_0_INSERT_EXT]], i64* [[A_CASTED_SROA_0_0_INSERT_EXT_SEQ_OUTPUT_ALLOC]], align 8
6183 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6184 ; CHECK2: omp.par.merged.split:
6185 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6186 ; CHECK2: omp_region.body.split:
6187 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6188 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6191 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..12
6192 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6193 ; CHECK2-NEXT: entry:
6194 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6195 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6196 ; CHECK2-NEXT: ret void
6199 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..13
6200 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i64 [[A:%.*]]) {
6201 ; CHECK2-NEXT: entry:
6202 ; CHECK2-NEXT: [[A_ADDR_SROA_0_0_EXTRACT_TRUNC:%.*]] = trunc i64 [[A]] to i32
6203 ; CHECK2-NEXT: call void @use(i32 [[A_ADDR_SROA_0_0_EXTRACT_TRUNC]])
6204 ; CHECK2-NEXT: ret void
6207 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_sink_lt
6208 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6209 ; CHECK2-NEXT: entry:
6210 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6211 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6212 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6213 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6214 ; CHECK2: omp_parallel:
6215 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_seq_sink_lt..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
6216 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6217 ; CHECK2: omp.par.outlined.exit:
6218 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6219 ; CHECK2: omp.par.exit.split:
6220 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6221 ; CHECK2: entry.split.split:
6222 ; CHECK2-NEXT: ret void
6225 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_sink_lt..omp_par
6226 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
6227 ; CHECK2-NEXT: omp.par.entry:
6228 ; CHECK2-NEXT: [[B:%.*]] = alloca i32, align 4
6229 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6230 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6231 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6232 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6233 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6234 ; CHECK2: omp.par.outlined.exit.exitStub:
6235 ; CHECK2-NEXT: ret void
6236 ; CHECK2: omp.par.region:
6237 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6238 ; CHECK2: omp.par.merged:
6239 ; CHECK2-NEXT: call void @.omp_outlined..14(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6240 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6241 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6242 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6243 ; CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6244 ; CHECK2-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
6245 ; CHECK2-NEXT: br i1 [[TMP2]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6246 ; CHECK2: omp_region.end:
6247 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6248 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6249 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6250 ; CHECK2: omp.par.merged.split.split:
6251 ; CHECK2-NEXT: call void @.omp_outlined..15(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6252 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6253 ; CHECK2: entry.split:
6254 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6255 ; CHECK2: omp.par.region.split:
6256 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6257 ; CHECK2: omp.par.pre_finalize:
6258 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6259 ; CHECK2: omp_region.body:
6260 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6261 ; CHECK2: seq.par.merged:
6262 ; CHECK2-NEXT: [[TMP3:%.*]] = bitcast i32* [[B]] to i8*
6263 ; CHECK2-NEXT: call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
6264 ; CHECK2-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[B]] to i64
6265 ; CHECK2-NEXT: [[TMP5:%.*]] = trunc i64 [[TMP4]] to i32
6266 ; CHECK2-NEXT: store i32 [[TMP5]], i32* [[B]], align 4
6267 ; CHECK2-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[TMP3]])
6268 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6269 ; CHECK2: omp.par.merged.split:
6270 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6271 ; CHECK2: omp_region.body.split:
6272 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6273 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6276 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..14
6277 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6278 ; CHECK2-NEXT: entry:
6279 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6280 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6281 ; CHECK2-NEXT: ret void
6284 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..15
6285 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6286 ; CHECK2-NEXT: entry:
6287 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6288 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6289 ; CHECK2-NEXT: ret void
6292 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_par_use
6293 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6294 ; CHECK2-NEXT: entry:
6295 ; CHECK2-NEXT: [[A_RELOADED:%.*]] = alloca i32, align 4
6296 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6297 ; CHECK2-NEXT: [[B:%.*]] = alloca i32, align 4
6298 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6299 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6300 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_RELOADED]], align 4
6301 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6302 ; CHECK2: omp_parallel:
6303 ; CHECK2-NEXT: [[LT_CAST3:%.*]] = bitcast i32* [[B]] to i8*
6304 ; CHECK2-NEXT: call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[LT_CAST3]])
6305 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_seq_par_use..omp_par to void (i32*, i32*, ...)*), i32* [[A_RELOADED]], i32* [[A_ADDR]], i32* [[B]])
6306 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6307 ; CHECK2: omp.par.outlined.exit:
6308 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6309 ; CHECK2: omp.par.exit.split:
6310 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6311 ; CHECK2: entry.split.split:
6312 ; CHECK2-NEXT: [[LT_CAST:%.*]] = bitcast i32* [[B]] to i8*
6313 ; CHECK2-NEXT: call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* noundef nonnull [[LT_CAST]])
6314 ; CHECK2-NEXT: ret void
6317 ; CHECK2-LABEL: define {{[^@]+}}@merge_seq_par_use..omp_par
6318 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_RELOADED:%.*]], i32* [[A_ADDR:%.*]], i32* [[B:%.*]]) #[[ATTR0]] {
6319 ; CHECK2-NEXT: omp.par.entry:
6320 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6321 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6322 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6323 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6324 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_RELOADED]], align 4
6325 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6326 ; CHECK2: omp.par.outlined.exit.exitStub:
6327 ; CHECK2-NEXT: ret void
6328 ; CHECK2: omp.par.region:
6329 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6330 ; CHECK2: omp.par.merged:
6331 ; CHECK2-NEXT: call void @.omp_outlined..16(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6332 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6333 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6334 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6335 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6336 ; CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
6337 ; CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6338 ; CHECK2: omp_region.end:
6339 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6340 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6341 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6342 ; CHECK2: omp.par.merged.split.split:
6343 ; CHECK2-NEXT: call void @.omp_outlined..17(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B]])
6344 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6345 ; CHECK2: entry.split:
6346 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6347 ; CHECK2: omp.par.region.split:
6348 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6349 ; CHECK2: omp.par.pre_finalize:
6350 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6351 ; CHECK2: omp_region.body:
6352 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6353 ; CHECK2: seq.par.merged:
6354 ; CHECK2-NEXT: [[TMP4:%.*]] = bitcast i32* [[B]] to i8*
6355 ; CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], 1
6356 ; CHECK2-NEXT: store i32 [[ADD]], i32* [[B]], align 4
6357 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6358 ; CHECK2: omp.par.merged.split:
6359 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6360 ; CHECK2: omp_region.body.split:
6361 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6362 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6365 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..16
6366 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6367 ; CHECK2-NEXT: entry:
6368 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6369 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6370 ; CHECK2-NEXT: ret void
6373 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..17
6374 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B:%.*]]) {
6375 ; CHECK2-NEXT: entry:
6376 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6377 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6378 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[B]], align 4
6379 ; CHECK2-NEXT: call void @use(i32 [[TMP1]])
6380 ; CHECK2-NEXT: ret void
6383 ; CHECK2-LABEL: define {{[^@]+}}@merge_cancellable_regions
6384 ; CHECK2-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
6385 ; CHECK2-NEXT: entry:
6386 ; CHECK2-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
6387 ; CHECK2-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
6388 ; CHECK2-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
6389 ; CHECK2-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
6390 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6391 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6392 ; CHECK2: omp_parallel:
6393 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @merge_cancellable_regions..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
6394 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6395 ; CHECK2: omp.par.outlined.exit:
6396 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6397 ; CHECK2: omp.par.exit.split:
6398 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6399 ; CHECK2: entry.split.split:
6400 ; CHECK2-NEXT: ret void
6403 ; CHECK2-LABEL: define {{[^@]+}}@merge_cancellable_regions..omp_par
6404 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
6405 ; CHECK2-NEXT: omp.par.entry:
6406 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6407 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6408 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6409 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6410 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6411 ; CHECK2: omp.par.outlined.exit.exitStub:
6412 ; CHECK2-NEXT: ret void
6413 ; CHECK2: omp.par.region:
6414 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6415 ; CHECK2: omp.par.merged:
6416 ; CHECK2-NEXT: call void @.omp_outlined..18(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
6417 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6418 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6419 ; CHECK2-NEXT: call void @.omp_outlined..19(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
6420 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6421 ; CHECK2: entry.split:
6422 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6423 ; CHECK2: omp.par.region.split:
6424 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6425 ; CHECK2: omp.par.pre_finalize:
6426 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6429 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..18
6430 ; CHECK2-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
6431 ; CHECK2-NEXT: entry:
6432 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
6433 ; CHECK2-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
6434 ; CHECK2-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
6436 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
6437 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
6438 ; CHECK2-NEXT: ret void
6440 ; CHECK2-NEXT: ret void
6443 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..19
6444 ; CHECK2-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
6445 ; CHECK2-NEXT: entry:
6446 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
6447 ; CHECK2-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
6448 ; CHECK2-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
6450 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
6451 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
6452 ; CHECK2-NEXT: ret void
6454 ; CHECK2-NEXT: ret void
6457 ; CHECK2-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq
6458 ; CHECK2-SAME: (i32 [[CANCEL1:%.*]], i32 [[CANCEL2:%.*]]) local_unnamed_addr {
6459 ; CHECK2-NEXT: entry:
6460 ; CHECK2-NEXT: [[CANCEL1_RELOADED:%.*]] = alloca i32, align 4
6461 ; CHECK2-NEXT: [[CANCEL1_ADDR:%.*]] = alloca i32, align 4
6462 ; CHECK2-NEXT: [[CANCEL2_ADDR:%.*]] = alloca i32, align 4
6463 ; CHECK2-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_ADDR]], align 4
6464 ; CHECK2-NEXT: store i32 [[CANCEL2]], i32* [[CANCEL2_ADDR]], align 4
6465 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6466 ; CHECK2-NEXT: store i32 [[CANCEL1]], i32* [[CANCEL1_RELOADED]], align 4
6467 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6468 ; CHECK2: omp_parallel:
6469 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 3, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*)* @merge_cancellable_regions_seq..omp_par to void (i32*, i32*, ...)*), i32* [[CANCEL1_RELOADED]], i32* [[CANCEL1_ADDR]], i32* [[CANCEL2_ADDR]])
6470 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6471 ; CHECK2: omp.par.outlined.exit:
6472 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6473 ; CHECK2: omp.par.exit.split:
6474 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6475 ; CHECK2: entry.split.split:
6476 ; CHECK2-NEXT: ret void
6479 ; CHECK2-LABEL: define {{[^@]+}}@merge_cancellable_regions_seq..omp_par
6480 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[CANCEL1_RELOADED:%.*]], i32* [[CANCEL1_ADDR:%.*]], i32* [[CANCEL2_ADDR:%.*]]) #[[ATTR0]] {
6481 ; CHECK2-NEXT: omp.par.entry:
6482 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6483 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6484 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6485 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6486 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[CANCEL1_RELOADED]], align 4
6487 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6488 ; CHECK2: omp.par.outlined.exit.exitStub:
6489 ; CHECK2-NEXT: ret void
6490 ; CHECK2: omp.par.region:
6491 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6492 ; CHECK2: omp.par.merged:
6493 ; CHECK2-NEXT: call void @.omp_outlined..20(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1_ADDR]])
6494 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6495 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6496 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6497 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6498 ; CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
6499 ; CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6500 ; CHECK2: omp_region.end:
6501 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6502 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6503 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6504 ; CHECK2: omp.par.merged.split.split:
6505 ; CHECK2-NEXT: call void @.omp_outlined..21(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2_ADDR]])
6506 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6507 ; CHECK2: entry.split:
6508 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6509 ; CHECK2: omp.par.region.split:
6510 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6511 ; CHECK2: omp.par.pre_finalize:
6512 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6513 ; CHECK2: omp_region.body:
6514 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6515 ; CHECK2: seq.par.merged:
6516 ; CHECK2-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP1]], 0
6517 ; CHECK2-NEXT: [[LNOT_EXT:%.*]] = zext i1 [[TOBOOL_NOT]] to i32
6518 ; CHECK2-NEXT: store i32 [[LNOT_EXT]], i32* [[CANCEL2_ADDR]], align 4
6519 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6520 ; CHECK2: omp.par.merged.split:
6521 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6522 ; CHECK2: omp_region.body.split:
6523 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6524 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6527 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..20
6528 ; CHECK2-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL1:%.*]]) {
6529 ; CHECK2-NEXT: entry:
6530 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL1]], align 4
6531 ; CHECK2-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
6532 ; CHECK2-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
6534 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
6535 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
6536 ; CHECK2-NEXT: ret void
6538 ; CHECK2-NEXT: ret void
6541 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..21
6542 ; CHECK2-SAME: (i32* noalias nocapture nofree readonly [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[CANCEL2:%.*]]) {
6543 ; CHECK2-NEXT: entry:
6544 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[CANCEL2]], align 4
6545 ; CHECK2-NEXT: [[TOBOOL_NOT:%.*]] = icmp eq i32 [[TMP0]], 0
6546 ; CHECK2-NEXT: br i1 [[TOBOOL_NOT]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
6548 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
6549 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* noundef nonnull @[[GLOB1]], i32 [[TMP1]], i32 noundef 1)
6550 ; CHECK2-NEXT: ret void
6552 ; CHECK2-NEXT: ret void
6555 ; CHECK2-LABEL: define {{[^@]+}}@merge_3
6556 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6557 ; CHECK2-NEXT: entry:
6558 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6559 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6560 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6561 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6562 ; CHECK2: omp_parallel:
6563 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_3..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
6564 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6565 ; CHECK2: omp.par.outlined.exit:
6566 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6567 ; CHECK2: omp.par.exit.split:
6568 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6569 ; CHECK2: entry.split.split:
6570 ; CHECK2-NEXT: ret void
6573 ; CHECK2-LABEL: define {{[^@]+}}@merge_3..omp_par
6574 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
6575 ; CHECK2-NEXT: omp.par.entry:
6576 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6577 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6578 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6579 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6580 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6581 ; CHECK2: omp.par.outlined.exit.exitStub:
6582 ; CHECK2-NEXT: ret void
6583 ; CHECK2: omp.par.region:
6584 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6585 ; CHECK2: omp.par.merged:
6586 ; CHECK2-NEXT: call void @.omp_outlined..22(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6587 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6588 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6589 ; CHECK2-NEXT: call void @.omp_outlined..23(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6590 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6591 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6592 ; CHECK2-NEXT: call void @.omp_outlined..24(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6593 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6594 ; CHECK2: entry.split:
6595 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6596 ; CHECK2: omp.par.region.split:
6597 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6598 ; CHECK2: omp.par.pre_finalize:
6599 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6602 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..22
6603 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6604 ; CHECK2-NEXT: entry:
6605 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6606 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6607 ; CHECK2-NEXT: ret void
6610 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..23
6611 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6612 ; CHECK2-NEXT: entry:
6613 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6614 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6615 ; CHECK2-NEXT: ret void
6618 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..24
6619 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6620 ; CHECK2-NEXT: entry:
6621 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6622 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6623 ; CHECK2-NEXT: ret void
6626 ; CHECK2-LABEL: define {{[^@]+}}@merge_3_seq
6627 ; CHECK2-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) local_unnamed_addr {
6628 ; CHECK2-NEXT: entry:
6629 ; CHECK2-NEXT: [[A_RELOADED:%.*]] = alloca i32, align 4
6630 ; CHECK2-NEXT: [[ADD1_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
6631 ; CHECK2-NEXT: [[ADD_SEQ_OUTPUT_ALLOC:%.*]] = alloca i32, align 4
6632 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6633 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6634 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6635 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_RELOADED]], align 4
6636 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6637 ; CHECK2: omp_parallel:
6638 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 4, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*, i32*, i32*)* @merge_3_seq..omp_par to void (i32*, i32*, ...)*), i32* [[A_RELOADED]], i32* [[A_ADDR]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]])
6639 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6640 ; CHECK2: omp.par.outlined.exit:
6641 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6642 ; CHECK2: omp.par.exit.split:
6643 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6644 ; CHECK2: entry.split.split:
6645 ; CHECK2-NEXT: [[ADD1_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
6646 ; CHECK2-NEXT: call void @use(i32 [[ADD1_SEQ_OUTPUT_LOAD]])
6647 ; CHECK2-NEXT: ret void
6650 ; CHECK2-LABEL: define {{[^@]+}}@merge_3_seq..omp_par
6651 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_RELOADED:%.*]], i32* [[A_ADDR:%.*]], i32* [[ADD_SEQ_OUTPUT_ALLOC:%.*]], i32* [[ADD1_SEQ_OUTPUT_ALLOC:%.*]]) #[[ATTR0]] {
6652 ; CHECK2-NEXT: omp.par.entry:
6653 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6654 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6655 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6656 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6657 ; CHECK2-NEXT: [[TMP1:%.*]] = load i32, i32* [[A_RELOADED]], align 4
6658 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6659 ; CHECK2: omp.par.outlined.exit.exitStub:
6660 ; CHECK2-NEXT: ret void
6661 ; CHECK2: omp.par.region:
6662 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6663 ; CHECK2: omp.par.merged:
6664 ; CHECK2-NEXT: call void @.omp_outlined..25(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6665 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6666 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
6667 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6668 ; CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6669 ; CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
6670 ; CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_REGION_BODY:%.*]], label [[OMP_REGION_END:%.*]]
6671 ; CHECK2: omp_region.end:
6672 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6673 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM1]])
6674 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT:%.*]]
6675 ; CHECK2: omp.par.merged.split.split:
6676 ; CHECK2-NEXT: call void @.omp_outlined..26(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6677 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6678 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
6679 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6680 ; CHECK2-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
6681 ; CHECK2-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
6682 ; CHECK2-NEXT: br i1 [[TMP5]], label [[OMP_REGION_BODY5:%.*]], label [[OMP_REGION_END4:%.*]]
6683 ; CHECK2: omp_region.end4:
6684 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM6:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6685 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM6]])
6686 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT_SPLIT:%.*]]
6687 ; CHECK2: omp.par.merged.split.split.split.split:
6688 ; CHECK2-NEXT: call void @.omp_outlined..27(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6689 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6690 ; CHECK2: entry.split:
6691 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6692 ; CHECK2: omp.par.region.split:
6693 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6694 ; CHECK2: omp.par.pre_finalize:
6695 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6696 ; CHECK2: omp_region.body5:
6697 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED2:%.*]]
6698 ; CHECK2: seq.par.merged2:
6699 ; CHECK2-NEXT: [[ADD_SEQ_OUTPUT_LOAD:%.*]] = load i32, i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
6700 ; CHECK2-NEXT: [[ADD1:%.*]] = add nsw i32 [[ADD_SEQ_OUTPUT_LOAD]], [[TMP1]]
6701 ; CHECK2-NEXT: store i32 [[ADD1]], i32* [[ADD1_SEQ_OUTPUT_ALLOC]], align 4
6702 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT_SPLIT_SPLIT:%.*]]
6703 ; CHECK2: omp.par.merged.split.split.split:
6704 ; CHECK2-NEXT: br label [[OMP_REGION_BODY5_SPLIT:%.*]]
6705 ; CHECK2: omp_region.body5.split:
6706 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
6707 ; CHECK2-NEXT: br label [[OMP_REGION_END4]]
6708 ; CHECK2: omp_region.body:
6709 ; CHECK2-NEXT: br label [[SEQ_PAR_MERGED:%.*]]
6710 ; CHECK2: seq.par.merged:
6711 ; CHECK2-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], 1
6712 ; CHECK2-NEXT: store i32 [[ADD]], i32* [[ADD_SEQ_OUTPUT_ALLOC]], align 4
6713 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED_SPLIT:%.*]]
6714 ; CHECK2: omp.par.merged.split:
6715 ; CHECK2-NEXT: br label [[OMP_REGION_BODY_SPLIT:%.*]]
6716 ; CHECK2: omp_region.body.split:
6717 ; CHECK2-NEXT: call void @__kmpc_end_master(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6718 ; CHECK2-NEXT: br label [[OMP_REGION_END]]
6721 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..25
6722 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6723 ; CHECK2-NEXT: entry:
6724 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6725 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6726 ; CHECK2-NEXT: ret void
6729 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..26
6730 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6731 ; CHECK2-NEXT: entry:
6732 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6733 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6734 ; CHECK2-NEXT: ret void
6737 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..27
6738 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6739 ; CHECK2-NEXT: entry:
6740 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6741 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6742 ; CHECK2-NEXT: ret void
6745 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_3_seq_call
6746 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6747 ; CHECK2-NEXT: entry:
6748 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6749 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6750 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..28 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6751 ; CHECK2-NEXT: call void (...) @foo()
6752 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..29 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6753 ; CHECK2-NEXT: call void (...) @foo()
6754 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..30 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6755 ; CHECK2-NEXT: ret void
6758 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..28
6759 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6760 ; CHECK2-NEXT: entry:
6761 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6762 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6763 ; CHECK2-NEXT: ret void
6766 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..29
6767 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6768 ; CHECK2-NEXT: entry:
6769 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6770 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6771 ; CHECK2-NEXT: ret void
6774 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..30
6775 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6776 ; CHECK2-NEXT: entry:
6777 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6778 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6779 ; CHECK2-NEXT: ret void
6782 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_3_proc_bind
6783 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6784 ; CHECK2-NEXT: entry:
6785 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6786 ; CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
6787 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6788 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..31 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6789 ; CHECK2-NEXT: call void @__kmpc_push_proc_bind(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 noundef 3)
6790 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..32 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6791 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..33 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6792 ; CHECK2-NEXT: ret void
6795 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..31
6796 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6797 ; CHECK2-NEXT: entry:
6798 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6799 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6800 ; CHECK2-NEXT: ret void
6803 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..32
6804 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6805 ; CHECK2-NEXT: entry:
6806 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6807 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6808 ; CHECK2-NEXT: ret void
6811 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..33
6812 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6813 ; CHECK2-NEXT: entry:
6814 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6815 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6816 ; CHECK2-NEXT: ret void
6819 ; CHECK2-LABEL: define {{[^@]+}}@unmergable_3_num_threads
6820 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6821 ; CHECK2-NEXT: entry:
6822 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6823 ; CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]])
6824 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6825 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..34 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6826 ; CHECK2-NEXT: call void @__kmpc_push_num_threads(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 [[TMP0]], i32 [[A]])
6827 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..35 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6828 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..36 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6829 ; CHECK2-NEXT: ret void
6832 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..34
6833 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6834 ; CHECK2-NEXT: entry:
6835 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6836 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6837 ; CHECK2-NEXT: ret void
6840 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..35
6841 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6842 ; CHECK2-NEXT: entry:
6843 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6844 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6845 ; CHECK2-NEXT: ret void
6848 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..36
6849 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6850 ; CHECK2-NEXT: entry:
6851 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6852 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6853 ; CHECK2-NEXT: ret void
6856 ; CHECK2-LABEL: define {{[^@]+}}@merge_2_unmergable_1
6857 ; CHECK2-SAME: (i32 [[A:%.*]]) local_unnamed_addr {
6858 ; CHECK2-NEXT: entry:
6859 ; CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
6860 ; CHECK2-NEXT: store i32 [[A]], i32* [[A_ADDR]], align 4
6861 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6862 ; CHECK2-NEXT: br label [[OMP_PARALLEL:%.*]]
6863 ; CHECK2: omp_parallel:
6864 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*)* @merge_2_unmergable_1..omp_par to void (i32*, i32*, ...)*), i32* [[A_ADDR]])
6865 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
6866 ; CHECK2: omp.par.outlined.exit:
6867 ; CHECK2-NEXT: br label [[OMP_PAR_EXIT_SPLIT:%.*]]
6868 ; CHECK2: omp.par.exit.split:
6869 ; CHECK2-NEXT: br label [[ENTRY_SPLIT_SPLIT:%.*]]
6870 ; CHECK2: entry.split.split:
6871 ; CHECK2-NEXT: call void (...) @foo()
6872 ; CHECK2-NEXT: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* noundef nonnull align 8 dereferenceable(24) @[[GLOB1]], i32 noundef 1, void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*)* @.omp_outlined..39 to void (i32*, i32*, ...)*), i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6873 ; CHECK2-NEXT: ret void
6876 ; CHECK2-LABEL: define {{[^@]+}}@merge_2_unmergable_1..omp_par
6877 ; CHECK2-SAME: (i32* noalias [[TID_ADDR:%.*]], i32* noalias [[ZERO_ADDR:%.*]], i32* [[A_ADDR:%.*]]) #[[ATTR0]] {
6878 ; CHECK2-NEXT: omp.par.entry:
6879 ; CHECK2-NEXT: [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
6880 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[TID_ADDR]], align 4
6881 ; CHECK2-NEXT: store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
6882 ; CHECK2-NEXT: [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
6883 ; CHECK2-NEXT: br label [[OMP_PAR_REGION:%.*]]
6884 ; CHECK2: omp.par.outlined.exit.exitStub:
6885 ; CHECK2-NEXT: ret void
6886 ; CHECK2: omp.par.region:
6887 ; CHECK2-NEXT: br label [[OMP_PAR_MERGED:%.*]]
6888 ; CHECK2: omp.par.merged:
6889 ; CHECK2-NEXT: call void @.omp_outlined..37(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6890 ; CHECK2-NEXT: [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
6891 ; CHECK2-NEXT: call void @__kmpc_barrier(%struct.ident_t* @[[GLOB2]], i32 [[OMP_GLOBAL_THREAD_NUM]])
6892 ; CHECK2-NEXT: call void @.omp_outlined..38(i32* [[TID_ADDR]], i32* [[ZERO_ADDR]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_ADDR]])
6893 ; CHECK2-NEXT: br label [[ENTRY_SPLIT:%.*]]
6894 ; CHECK2: entry.split:
6895 ; CHECK2-NEXT: br label [[OMP_PAR_REGION_SPLIT:%.*]]
6896 ; CHECK2: omp.par.region.split:
6897 ; CHECK2-NEXT: br label [[OMP_PAR_PRE_FINALIZE:%.*]]
6898 ; CHECK2: omp.par.pre_finalize:
6899 ; CHECK2-NEXT: br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
6902 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..37
6903 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6904 ; CHECK2-NEXT: entry:
6905 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6906 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6907 ; CHECK2-NEXT: ret void
6910 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..38
6911 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6912 ; CHECK2-NEXT: entry:
6913 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6914 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6915 ; CHECK2-NEXT: ret void
6918 ; CHECK2-LABEL: define {{[^@]+}}@.omp_outlined..39
6919 ; CHECK2-SAME: (i32* noalias nocapture nofree readnone [[DOTGLOBAL_TID_:%.*]], i32* noalias nocapture nofree readnone [[DOTBOUND_TID_:%.*]], i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A:%.*]]) {
6920 ; CHECK2-NEXT: entry:
6921 ; CHECK2-NEXT: [[TMP0:%.*]] = load i32, i32* [[A]], align 4
6922 ; CHECK2-NEXT: call void @use(i32 [[TMP0]])
6923 ; CHECK2-NEXT: ret void