1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _
2 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-apple-darwin10 -emit-pch -o %t %s
4 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
6 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK3
7 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-apple-darwin10 -emit-pch -o %t %s
8 // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK3
9 // expected-no-diagnostics
13 enum omp_allocator_handle_t
{
14 omp_null_allocator
= 0,
15 omp_default_mem_alloc
= 1,
16 omp_large_cap_mem_alloc
= 2,
17 omp_const_mem_alloc
= 3,
18 omp_high_bw_mem_alloc
= 4,
19 omp_low_lat_mem_alloc
= 5,
20 omp_cgroup_mem_alloc
= 6,
21 omp_pteam_mem_alloc
= 7,
22 omp_thread_mem_alloc
= 8,
23 KMP_ALLOCATOR_MAX_HANDLE
= __UINTPTR_MAX__
26 volatile double g
, g_orig
;
27 volatile double &g1
= g_orig
;
37 struct S
: public BaseS
, public BaseS1
{
41 S
& operator=(const S
&);
44 void red(BaseS1
&, const BaseS1
&);
45 void red_plus(BaseS1
&, const BaseS1
&);
46 void init(BaseS1
&, const BaseS1
&);
47 void init1(BaseS1
&, const BaseS1
&);
48 void init2(BaseS1
&, const BaseS1
&);
49 void init_plus(BaseS1
&, const BaseS1
&);
50 #pragma omp declare reduction(operator& : BaseS1 : red(omp_out, omp_in)) initializer(init(omp_priv, omp_orig))
51 #pragma omp declare reduction(+ : BaseS1 : red_plus(omp_out, omp_in)) initializer(init_plus(omp_priv, omp_orig))
52 #pragma omp declare reduction(&& : S<float>, S<int> : omp_out.f *= omp_in.f) initializer(init1(omp_priv, omp_orig))
55 #pragma omp declare reduction(operator* : S<int> : omp_out.f = 17 * omp_in.f) initializer(omp_priv = S<int>())
59 #pragma omp simd reduction(*: s)
60 for (int I
= 0; I
< 10; ++I
)
66 #pragma omp declare reduction(operator&& : int : omp_out = 111 & omp_in)
67 template <typename T
, int length
>
71 T t_var
= T(), t_var1
;
73 S
<T
> s_arr
[] = {1, 2};
77 #pragma omp declare reduction(operator& : T : omp_out = 15 + omp_in)
78 #pragma omp declare reduction(operator+ : T : omp_out = 1513 + omp_in) initializer(omp_priv = 321)
79 #pragma omp declare reduction(min : T : omp_out = 47 - omp_in) initializer(omp_priv = 432 / omp_orig)
80 #pragma omp declare reduction(operator&& : S<T> : omp_out.f = 17 * omp_in.f) initializer(init2(omp_priv, omp_orig))
81 #pragma omp declare reduction(operator&& : T : omp_out = 17 * omp_in)
83 #pragma omp for reduction(+ : t_var) reduction(& : var) reduction(&& : var1) reduction(min : t_var1) nowait
84 for (int i
= 0; i
< 2; ++i
) {
89 #pragma omp for reduction(&& : t_var)
90 for (int i
= 0; i
< 2; ++i
) {
95 #pragma omp for reduction(+ : arr[1:length-2])
96 for (int i
= 0; i
< 2; ++i
) {
103 extern S
<float> **foo();
105 #pragma omp declare reduction(operator- : float, double : omp_out = 333 + omp_in)
106 #pragma omp declare reduction(min : float, double : omp_out = 555 + omp_in)
108 #pragma omp declare reduction(operator+ : float, double : omp_out = 222 - omp_in) initializer(omp_priv = -1)
110 float t_var
= 0, t_var1
;
112 S
<float> s_arr
[] = {1, 2, 3, 4};
113 S
<float> &var
= test
;
114 S
<float> var1
, arrs
[10][4];
115 S
<float> **var2
= foo();
117 S
<float>(&var3
)[4] = s_arr
;
118 #pragma omp declare reduction(operator+ : int : omp_out = 555 * omp_in) initializer(omp_priv = 888)
120 #pragma omp for reduction(+ : t_var) reduction(& : var) reduction(&& : var1) reduction(min : t_var1)
121 for (int i
= 0; i
< 2; ++i
) {
126 #pragma omp parallel for reduction(+ : arr[1][ : vec[1]]) reduction(& : arrs[1 : vec[1]][1 : 2])
127 for (int i
= 0; i
< 10; ++i
)
130 #pragma omp for reduction(+ : arr) reduction(& : arrs)
131 for (int i
= 0; i
< 10; ++i
)
134 #pragma omp for reduction(& : var2[0 : 5][1 : 6])
135 for (int i
= 0; i
< 10; ++i
)
138 #pragma omp for reduction(& : vvar2[0 : 5])
139 for (int i
= 0; i
< 10; ++i
)
142 #pragma omp for reduction(& : var3[1 : 2])
143 for (int i
= 0; i
< 10; ++i
)
146 #pragma omp for reduction(& : var3) allocate(omp_cgroup_mem_alloc: var3)
147 for (int i
= 0; i
< 10; ++i
)
149 return tmain
<int, 42>();
153 // Reduction list for runtime.
157 // For + reduction operation initial value of private variable is -1.
159 // For & reduction operation initial value of private variable is defined by call of 'init()' function.
161 // For && reduction operation initial value of private variable is 1.0.
163 // For min reduction operation initial value of private variable is largest repesentable value.
165 // Skip checks for internal operations.
167 // ptr RedList[<n>] = {<ReductionVars>[0], ..., <ReductionVars>[<n>-1]};
170 // res = __kmpc_reduce(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>);
176 // t_var += t_var_reduction;
178 // var = var.operator &(var_reduction);
180 // var1 = var1.operator &&(var1_reduction);
182 // t_var1 = min(t_var1, t_var1_reduction);
184 // __kmpc_end_reduce(<loc>, <gtid>, &<lock>);
189 // t_var += t_var_reduction;
191 // var = var.operator &(var_reduction);
193 // var1 = var1.operator &&(var1_reduction);
195 // t_var1 = min(t_var1, t_var1_reduction);
197 // __kmpc_end_reduce(<loc>, <gtid>, &<lock>);
208 // void reduce_func(ptr lhs[<n>], ptr rhs[<n>]) {
209 // *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]);
211 // *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1],
212 // *(Type<n>-1*)rhs[<n>-1]);
214 // t_var_lhs = (ptr)lhs[0];
215 // t_var_rhs = (ptr)rhs[0];
217 // var_lhs = (Sptr)lhs[1];
218 // var_rhs = (Sptr)rhs[1];
220 // var1_lhs = (Sptr)lhs[2];
221 // var1_rhs = (Sptr)rhs[2];
223 // t_var1_lhs = (ptr)lhs[3];
224 // t_var1_rhs = (ptr)rhs[3];
226 // t_var_lhs += t_var_rhs;
228 // var_lhs = var_lhs.operator &(var_rhs);
230 // var1_lhs = var1_lhs.operator &&(var1_rhs);
232 // t_var1_lhs = min(t_var1_lhs, t_var1_rhs);
236 // Reduction list for runtime.
240 // Check initialization of private copy.
243 // Check initialization of private copy.
245 // Skip checks for internal operations.
247 // ptr RedList[<n>] = {<ReductionVars>[0], ..., <ReductionVars>[<n>-1]};
250 // res = __kmpc_reduce(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>);
257 // arr[:] += arr_reduction[:];
259 // arrs[:] = var.operator &(arrs_reduction[:]);
261 // __kmpc_end_reduce(<loc>, <gtid>, &<lock>);
267 // arr[:] += arr_reduction[:];
269 // arrs[:] = var.operator &(arrs_reduction[:]);
273 // Check destruction of private copy.
278 // void reduce_func(ptr lhs[<n>], ptr rhs[<n>]) {
279 // *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]);
281 // *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1],
282 // *(Type<n>-1*)rhs[<n>-1]);
284 // arr_rhs = (int*)rhs[0];
285 // arr_lhs = (int*)lhs[0];
287 // arr_size = (size_t)lhs[1];
289 // arrs_rhs = (Sptr)rhs[2];
290 // arrs_lhs = (Sptr)lhs[2];
292 // arrs_size = (size_t)lhs[3];
294 // arr_lhs[:] += arr_rhs[:];
296 // arrs_lhs = arrs_lhs.operator &(arrs_rhs);
301 // Reduction list for runtime.
305 // Check initialization of private copy.
307 // Check initialization of private copy.
310 // Skip checks for internal operations.
312 // ptr RedList[<n>] = {<ReductionVars>[0], ..., <ReductionVars>[<n>-1]};
315 // res = __kmpc_reduce(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>);
322 // arr[:] += arr_reduction[:];
324 // arrs[:] = var.operator &(arrs_reduction[:]);
326 // __kmpc_end_reduce(<loc>, <gtid>, &<lock>);
332 // arr[:] += arr_reduction[:];
334 // arrs[:] = var.operator &(arrs_reduction[:]);
338 // Check destruction of private copy.
341 // void reduce_func(ptr lhs[<n>], ptr rhs[<n>]) {
342 // *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]);
344 // *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1],
345 // *(Type<n>-1*)rhs[<n>-1]);
347 // arr_rhs = (int*)rhs[0];
348 // arr_lhs = (int*)lhs[0];
350 // arr_size = (size_t)lhs[1];
352 // arrs_rhs = (Sptr)rhs[2];
353 // arrs_lhs = (Sptr)lhs[2];
355 // arr_lhs[:] += arr_rhs[:];
357 // arrs_lhs = arrs_lhs.operator &(arrs_rhs);
362 // Reduction list for runtime.
368 // Reduction list for runtime.
374 // Reduction list for runtime.
384 // Reduction list for runtime.
389 // Not interested in this one:
391 // Reduction list for runtime.
395 // For + reduction operation initial value of private variable is 0.
397 // For & reduction operation initial value of private variable is ones in all bits.
399 // For && reduction operation initial value of private variable is 1.0.
401 // For min reduction operation initial value of private variable is largest repesentable value.
403 // Skip checks for internal operations.
405 // ptr RedList[<n>] = {<ReductionVars>[0], ..., <ReductionVars>[<n>-1]};
408 // res = __kmpc_reduce_nowait(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>);
414 // t_var += t_var_reduction;
416 // var = var.operator &(var_reduction);
418 // var1 = var1.operator &&(var1_reduction);
420 // t_var1 = min(t_var1, t_var1_reduction);
422 // __kmpc_end_reduce_nowait(<loc>, <gtid>, &<lock>);
427 // t_var += t_var_reduction;
429 // var = var.operator &(var_reduction);
431 // var1 = var1.operator &&(var1_reduction);
433 // t_var1 = min(t_var1, t_var1_reduction);
443 // void reduce_func(ptr lhs[<n>], ptr rhs[<n>]) {
444 // *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]);
446 // *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1],
447 // *(Type<n>-1*)rhs[<n>-1]);
449 // t_var_lhs = (iptr)lhs[0];
450 // t_var_rhs = (iptr)rhs[0];
452 // var_lhs = (Sptr)lhs[1];
453 // var_rhs = (Sptr)rhs[1];
455 // var1_lhs = (Sptr)lhs[2];
456 // var1_rhs = (Sptr)rhs[2];
458 // t_var1_lhs = (iptr)lhs[3];
459 // t_var1_rhs = (iptr)rhs[3];
461 // t_var_lhs += t_var_rhs;
463 // var_lhs = var_lhs.operator &(var_rhs);
465 // var1_lhs = var1_lhs.operator &&(var1_rhs);
467 // t_var1_lhs = min(t_var1_lhs, t_var1_rhs);
471 // Reduction list for runtime.
478 // CHECK1-LABEL: define {{[^@]+}}@_Z4bazzv
479 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
480 // CHECK1-NEXT: entry:
481 // CHECK1-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
482 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S]])
483 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 1, ptr @_Z4bazzv.omp_outlined, ptr [[S]])
484 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S]]) #[[ATTR4:[0-9]+]]
485 // CHECK1-NEXT: ret void
488 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
489 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] align 2 {
490 // CHECK1-NEXT: entry:
491 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
492 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
493 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
494 // CHECK1-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]])
495 // CHECK1-NEXT: ret void
498 // CHECK1-LABEL: define {{[^@]+}}@_Z4bazzv.omp_outlined
499 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[S:%.*]]) #[[ATTR2:[0-9]+]] {
500 // CHECK1-NEXT: entry:
501 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
502 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
503 // CHECK1-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
504 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
505 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
506 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
507 // CHECK1-NEXT: [[S1:%.*]] = alloca [[STRUCT_S:%.*]], align 4
508 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
509 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
510 // CHECK1-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
511 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
512 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IV]], align 4
513 // CHECK1-NEXT: call void @.omp_initializer.(ptr noundef [[S1]], ptr noundef [[TMP0]])
514 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
515 // CHECK1: omp.inner.for.cond:
516 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3:![0-9]+]]
517 // CHECK1-NEXT: [[CMP:%.*]] = icmp slt i32 [[TMP1]], 10
518 // CHECK1-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
519 // CHECK1: omp.inner.for.cond.cleanup:
520 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
521 // CHECK1: omp.inner.for.body:
522 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
523 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP2]], 1
524 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
525 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP3]]
526 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
527 // CHECK1: omp.body.continue:
528 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
529 // CHECK1: omp.inner.for.inc:
530 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
531 // CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP3]], 1
532 // CHECK1-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
533 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
534 // CHECK1: omp.inner.for.end:
535 // CHECK1-NEXT: store i32 10, ptr [[I]], align 4
536 // CHECK1-NEXT: call void @.omp_combiner.(ptr noundef [[TMP0]], ptr noundef [[S1]])
537 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S1]]) #[[ATTR4]]
538 // CHECK1-NEXT: ret void
541 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner.
542 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3:[0-9]+]] {
543 // CHECK1-NEXT: entry:
544 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
545 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
546 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
547 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
548 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
549 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
550 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[TMP2]], i32 0, i32 2
551 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[F]], align 4
552 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 17, [[TMP4]]
553 // CHECK1-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[TMP3]], i32 0, i32 2
554 // CHECK1-NEXT: store i32 [[MUL]], ptr [[F2]], align 4
555 // CHECK1-NEXT: ret void
558 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer.
559 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
560 // CHECK1-NEXT: entry:
561 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
562 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
563 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
564 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
565 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
566 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
567 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TMP3]])
568 // CHECK1-NEXT: ret void
571 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
572 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
573 // CHECK1-NEXT: entry:
574 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
575 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
576 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
577 // CHECK1-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]]) #[[ATTR4]]
578 // CHECK1-NEXT: ret void
581 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
582 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
583 // CHECK1-NEXT: entry:
584 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
585 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
586 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
587 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
588 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 2
589 // CHECK1-NEXT: [[TMP1:%.*]] = load volatile double, ptr @g, align 8
590 // CHECK1-NEXT: [[CONV:%.*]] = fptosi double [[TMP1]] to i32
591 // CHECK1-NEXT: store i32 [[CONV]], ptr [[F]], align 4
592 // CHECK1-NEXT: ret void
595 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
596 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
597 // CHECK1-NEXT: entry:
598 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
599 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
600 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
601 // CHECK1-NEXT: ret void
604 // CHECK1-LABEL: define {{[^@]+}}@main
605 // CHECK1-SAME: () #[[ATTR5:[0-9]+]] {
606 // CHECK1-NEXT: entry:
607 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
608 // CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
609 // CHECK1-NEXT: [[T_VAR:%.*]] = alloca float, align 4
610 // CHECK1-NEXT: [[T_VAR1:%.*]] = alloca float, align 4
611 // CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
612 // CHECK1-NEXT: [[S_ARR:%.*]] = alloca [4 x %struct.S.0], align 16
613 // CHECK1-NEXT: [[VAR:%.*]] = alloca ptr, align 8
614 // CHECK1-NEXT: [[VAR1:%.*]] = alloca [[STRUCT_S_0]], align 4
615 // CHECK1-NEXT: [[ARRS:%.*]] = alloca [10 x [4 x %struct.S.0]], align 16
616 // CHECK1-NEXT: [[VAR2:%.*]] = alloca ptr, align 8
617 // CHECK1-NEXT: [[VVAR2:%.*]] = alloca [5 x %struct.S.0], align 16
618 // CHECK1-NEXT: [[VAR3:%.*]] = alloca ptr, align 8
619 // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
620 // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
621 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
622 // CHECK1-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]])
623 // CHECK1-NEXT: store float 0.000000e+00, ptr [[T_VAR]], align 4
624 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
625 // CHECK1-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
626 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
627 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
628 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
629 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_ELEMENT]], i64 1
630 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT1]], float noundef 3.000000e+00)
631 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_ELEMENT1]], i64 1
632 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT2]], float noundef 4.000000e+00)
633 // CHECK1-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
634 // CHECK1-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]])
635 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS]], i32 0, i32 0, i32 0
636 // CHECK1-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 40
637 // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
638 // CHECK1: arrayctor.loop:
639 // CHECK1-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
640 // CHECK1-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR]])
641 // CHECK1-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
642 // CHECK1-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
643 // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
644 // CHECK1: arrayctor.cont:
645 // CHECK1-NEXT: [[CALL:%.*]] = call noundef ptr @_Z3foov()
646 // CHECK1-NEXT: store ptr [[CALL]], ptr [[VAR2]], align 8
647 // CHECK1-NEXT: [[ARRAY_BEGIN3:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR2]], i32 0, i32 0
648 // CHECK1-NEXT: [[ARRAYCTOR_END4:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN3]], i64 5
649 // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP5:%.*]]
650 // CHECK1: arrayctor.loop5:
651 // CHECK1-NEXT: [[ARRAYCTOR_CUR6:%.*]] = phi ptr [ [[ARRAY_BEGIN3]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYCTOR_NEXT7:%.*]], [[ARRAYCTOR_LOOP5]] ]
652 // CHECK1-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR6]])
653 // CHECK1-NEXT: [[ARRAYCTOR_NEXT7]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR6]], i64 1
654 // CHECK1-NEXT: [[ARRAYCTOR_DONE8:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT7]], [[ARRAYCTOR_END4]]
655 // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE8]], label [[ARRAYCTOR_CONT9:%.*]], label [[ARRAYCTOR_LOOP5]]
656 // CHECK1: arrayctor.cont9:
657 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[VAR3]], align 8
658 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
659 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 6, ptr @main.omp_outlined, ptr [[T_VAR]], ptr [[TMP0]], ptr [[VAR1]], ptr [[T_VAR1]], ptr [[VEC]], ptr [[S_ARR]])
660 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 1
661 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
662 // CHECK1-NEXT: [[TMP2:%.*]] = zext i32 [[TMP1]] to i64
663 // CHECK1-NEXT: [[TMP3:%.*]] = call ptr @llvm.stacksave.p0()
664 // CHECK1-NEXT: store ptr [[TMP3]], ptr [[SAVED_STACK]], align 8
665 // CHECK1-NEXT: [[TMP4:%.*]] = mul nuw i64 10, [[TMP2]]
666 // CHECK1-NEXT: [[VLA:%.*]] = alloca i32, i64 [[TMP4]], align 16
667 // CHECK1-NEXT: store i64 [[TMP2]], ptr [[__VLA_EXPR0]], align 8
668 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @main.omp_outlined.8, i64 10, i64 [[TMP2]], ptr [[VLA]], ptr [[VEC]], ptr [[ARRS]])
669 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @main.omp_outlined.11, i64 10, i64 [[TMP2]], ptr [[VLA]], ptr [[ARRS]])
670 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.12, ptr [[VAR2]])
671 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.13, ptr [[VVAR2]])
672 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[VAR3]], align 8
673 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.14, ptr [[TMP5]])
674 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[VAR3]], align 8
675 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.15, ptr [[TMP6]])
676 // CHECK1-NEXT: [[CALL10:%.*]] = call noundef i32 @_Z5tmainIiLi42EET_v()
677 // CHECK1-NEXT: store i32 [[CALL10]], ptr [[RETVAL]], align 4
678 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
679 // CHECK1-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP7]])
680 // CHECK1-NEXT: [[ARRAY_BEGIN11:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR2]], i32 0, i32 0
681 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN11]], i64 5
682 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
683 // CHECK1: arraydestroy.body:
684 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP8]], [[ARRAYCTOR_CONT9]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
685 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
686 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
687 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN11]]
688 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE12:%.*]], label [[ARRAYDESTROY_BODY]]
689 // CHECK1: arraydestroy.done12:
690 // CHECK1-NEXT: [[ARRAY_BEGIN13:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS]], i32 0, i32 0, i32 0
691 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN13]], i64 40
692 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY14:%.*]]
693 // CHECK1: arraydestroy.body14:
694 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST15:%.*]] = phi ptr [ [[TMP9]], [[ARRAYDESTROY_DONE12]] ], [ [[ARRAYDESTROY_ELEMENT16:%.*]], [[ARRAYDESTROY_BODY14]] ]
695 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT16]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST15]], i64 -1
696 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT16]]) #[[ATTR4]]
697 // CHECK1-NEXT: [[ARRAYDESTROY_DONE17:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT16]], [[ARRAY_BEGIN13]]
698 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE17]], label [[ARRAYDESTROY_DONE18:%.*]], label [[ARRAYDESTROY_BODY14]]
699 // CHECK1: arraydestroy.done18:
700 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]]) #[[ATTR4]]
701 // CHECK1-NEXT: [[ARRAY_BEGIN19:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
702 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN19]], i64 4
703 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY20:%.*]]
704 // CHECK1: arraydestroy.body20:
705 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST21:%.*]] = phi ptr [ [[TMP10]], [[ARRAYDESTROY_DONE18]] ], [ [[ARRAYDESTROY_ELEMENT22:%.*]], [[ARRAYDESTROY_BODY20]] ]
706 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT22]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST21]], i64 -1
707 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT22]]) #[[ATTR4]]
708 // CHECK1-NEXT: [[ARRAYDESTROY_DONE23:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT22]], [[ARRAY_BEGIN19]]
709 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE23]], label [[ARRAYDESTROY_DONE24:%.*]], label [[ARRAYDESTROY_BODY20]]
710 // CHECK1: arraydestroy.done24:
711 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]]) #[[ATTR4]]
712 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[RETVAL]], align 4
713 // CHECK1-NEXT: ret i32 [[TMP11]]
716 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
717 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
718 // CHECK1-NEXT: entry:
719 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
720 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
721 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
722 // CHECK1-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]])
723 // CHECK1-NEXT: ret void
726 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
727 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
728 // CHECK1-NEXT: entry:
729 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
730 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
731 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
732 // CHECK1-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
733 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
734 // CHECK1-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
735 // CHECK1-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], float noundef [[TMP0]])
736 // CHECK1-NEXT: ret void
739 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined
740 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR1:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(48) [[S_ARR:%.*]]) #[[ATTR2]] {
741 // CHECK1-NEXT: entry:
742 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
743 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
744 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
745 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
746 // CHECK1-NEXT: [[VAR1_ADDR:%.*]] = alloca ptr, align 8
747 // CHECK1-NEXT: [[T_VAR1_ADDR:%.*]] = alloca ptr, align 8
748 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
749 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
750 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
751 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
752 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
753 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
754 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
755 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
756 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
757 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
758 // CHECK1-NEXT: [[T_VAR3:%.*]] = alloca float, align 4
759 // CHECK1-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
760 // CHECK1-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
761 // CHECK1-NEXT: [[VAR17:%.*]] = alloca [[STRUCT_S_0]], align 4
762 // CHECK1-NEXT: [[T_VAR18:%.*]] = alloca float, align 4
763 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
764 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [4 x ptr], align 8
765 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
766 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
767 // CHECK1-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
768 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
769 // CHECK1-NEXT: store ptr [[VAR1]], ptr [[VAR1_ADDR]], align 8
770 // CHECK1-NEXT: store ptr [[T_VAR1]], ptr [[T_VAR1_ADDR]], align 8
771 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
772 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
773 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
774 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
775 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR1_ADDR]], align 8
776 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[T_VAR1_ADDR]], align 8
777 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
778 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
779 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 8
780 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 8
781 // CHECK1-NEXT: store ptr [[TMP6]], ptr [[_TMP1]], align 8
782 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
783 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
784 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
785 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
786 // CHECK1-NEXT: call void @.omp_initializer..2(ptr noundef [[T_VAR3]], ptr noundef [[TMP0]])
787 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP1]], align 8
788 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
789 // CHECK1-NEXT: [[ADD_PTR5:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
790 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR5]])
791 // CHECK1-NEXT: store ptr [[VAR4]], ptr [[_TMP6]], align 8
792 // CHECK1-NEXT: call void @.omp_initializer..6(ptr noundef [[VAR17]], ptr noundef [[TMP2]])
793 // CHECK1-NEXT: [[TMP8:%.*]] = load float, ptr @.init, align 4
794 // CHECK1-NEXT: store float [[TMP8]], ptr [[T_VAR18]], align 4
795 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
796 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
797 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP10]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
798 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
799 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP11]], 1
800 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
801 // CHECK1: cond.true:
802 // CHECK1-NEXT: br label [[COND_END:%.*]]
803 // CHECK1: cond.false:
804 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
805 // CHECK1-NEXT: br label [[COND_END]]
807 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ]
808 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
809 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
810 // CHECK1-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
811 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
812 // CHECK1: omp.inner.for.cond:
813 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
814 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
815 // CHECK1-NEXT: [[CMP9:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]]
816 // CHECK1-NEXT: br i1 [[CMP9]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
817 // CHECK1: omp.inner.for.cond.cleanup:
818 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
819 // CHECK1: omp.inner.for.body:
820 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
821 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP16]], 1
822 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
823 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
824 // CHECK1-NEXT: [[TMP17:%.*]] = load float, ptr [[T_VAR3]], align 4
825 // CHECK1-NEXT: [[CONV:%.*]] = fptosi float [[TMP17]] to i32
826 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[I]], align 4
827 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP18]] to i64
828 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP4]], i64 0, i64 [[IDXPROM]]
829 // CHECK1-NEXT: store i32 [[CONV]], ptr [[ARRAYIDX]], align 4
830 // CHECK1-NEXT: [[TMP19:%.*]] = load ptr, ptr [[_TMP6]], align 8
831 // CHECK1-NEXT: [[TMP20:%.*]] = load i32, ptr [[I]], align 4
832 // CHECK1-NEXT: [[IDXPROM10:%.*]] = sext i32 [[TMP20]] to i64
833 // CHECK1-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[TMP5]], i64 0, i64 [[IDXPROM10]]
834 // CHECK1-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX11]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP19]])
835 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
836 // CHECK1: omp.body.continue:
837 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
838 // CHECK1: omp.inner.for.inc:
839 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
840 // CHECK1-NEXT: [[ADD12:%.*]] = add nsw i32 [[TMP21]], 1
841 // CHECK1-NEXT: store i32 [[ADD12]], ptr [[DOTOMP_IV]], align 4
842 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
843 // CHECK1: omp.inner.for.end:
844 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
845 // CHECK1: omp.loop.exit:
846 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP10]])
847 // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
848 // CHECK1-NEXT: store ptr [[T_VAR3]], ptr [[TMP22]], align 8
849 // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
850 // CHECK1-NEXT: store ptr [[VAR4]], ptr [[TMP23]], align 8
851 // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
852 // CHECK1-NEXT: store ptr [[VAR17]], ptr [[TMP24]], align 8
853 // CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 3
854 // CHECK1-NEXT: store ptr [[T_VAR18]], ptr [[TMP25]], align 8
855 // CHECK1-NEXT: [[TMP26:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3:[0-9]+]], i32 [[TMP10]], i32 4, i64 32, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
856 // CHECK1-NEXT: switch i32 [[TMP26]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
857 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
858 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
860 // CHECK1: .omp.reduction.case1:
861 // CHECK1-NEXT: call void @.omp_combiner..1(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
862 // CHECK1-NEXT: [[ADD_PTR13:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
863 // CHECK1-NEXT: [[ADD_PTR14:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
864 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR13]], ptr noundef [[ADD_PTR14]])
865 // CHECK1-NEXT: call void @.omp_combiner..5(ptr noundef [[TMP2]], ptr noundef [[VAR17]])
866 // CHECK1-NEXT: call void @.omp_combiner..7(ptr noundef [[TMP3]], ptr noundef [[T_VAR18]])
867 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP10]], ptr @.gomp_critical_user_.reduction.var)
868 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
869 // CHECK1: .omp.reduction.case2:
870 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
871 // CHECK1-NEXT: call void @.omp_combiner..1(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
872 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
873 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
874 // CHECK1-NEXT: [[ADD_PTR15:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
875 // CHECK1-NEXT: [[ADD_PTR16:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
876 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR15]], ptr noundef [[ADD_PTR16]])
877 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
878 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
879 // CHECK1-NEXT: call void @.omp_combiner..5(ptr noundef [[TMP2]], ptr noundef [[VAR17]])
880 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
881 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
882 // CHECK1-NEXT: call void @.omp_combiner..7(ptr noundef [[TMP3]], ptr noundef [[T_VAR18]])
883 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP10]], ptr @.gomp_critical_user_.atomic_reduction.var)
884 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP10]], ptr @.gomp_critical_user_.reduction.var)
885 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
886 // CHECK1: .omp.reduction.default:
887 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR17]]) #[[ATTR4]]
888 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR4]]) #[[ATTR4]]
889 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4:[0-9]+]], i32 [[TMP10]])
890 // CHECK1-NEXT: ret void
893 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..1
894 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
895 // CHECK1-NEXT: entry:
896 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
897 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
898 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
899 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
900 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
901 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
902 // CHECK1-NEXT: [[TMP4:%.*]] = load float, ptr [[TMP2]], align 4
903 // CHECK1-NEXT: [[SUB:%.*]] = fsub float 2.220000e+02, [[TMP4]]
904 // CHECK1-NEXT: store float [[SUB]], ptr [[TMP3]], align 4
905 // CHECK1-NEXT: ret void
908 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..2
909 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
910 // CHECK1-NEXT: entry:
911 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
912 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
913 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
914 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
915 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
916 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
917 // CHECK1-NEXT: store float -1.000000e+00, ptr [[TMP3]], align 4
918 // CHECK1-NEXT: ret void
921 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..3
922 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
923 // CHECK1-NEXT: entry:
924 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
925 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
926 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
927 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
928 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
929 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
930 // CHECK1-NEXT: call void @_Z3redR6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP3]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP2]])
931 // CHECK1-NEXT: ret void
934 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..4
935 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
936 // CHECK1-NEXT: entry:
937 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
938 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
939 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
940 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
941 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
942 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
943 // CHECK1-NEXT: call void @_Z4initR6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP3]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP2]])
944 // CHECK1-NEXT: ret void
947 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..5
948 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
949 // CHECK1-NEXT: entry:
950 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
951 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
952 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
953 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
954 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
955 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
956 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[TMP2]], i32 0, i32 2
957 // CHECK1-NEXT: [[TMP4:%.*]] = load float, ptr [[F]], align 4
958 // CHECK1-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[TMP3]], i32 0, i32 2
959 // CHECK1-NEXT: [[TMP5:%.*]] = load float, ptr [[F2]], align 4
960 // CHECK1-NEXT: [[MUL:%.*]] = fmul float [[TMP5]], [[TMP4]]
961 // CHECK1-NEXT: store float [[MUL]], ptr [[F2]], align 4
962 // CHECK1-NEXT: ret void
965 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..6
966 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
967 // CHECK1-NEXT: entry:
968 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
969 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
970 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
971 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
972 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
973 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
974 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[TMP3]], i64 4
975 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[TMP2]], i64 4
976 // CHECK1-NEXT: call void @_Z5init1R6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[ADD_PTR]], ptr noundef nonnull align 4 dereferenceable(4) [[ADD_PTR2]])
977 // CHECK1-NEXT: ret void
980 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.omp.reduction.reduction_func
981 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8:[0-9]+]] {
982 // CHECK1-NEXT: entry:
983 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
984 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
985 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
986 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
987 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
988 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
989 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 0
990 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
991 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 0
992 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
993 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 1
994 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
995 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 1
996 // CHECK1-NEXT: [[TMP11:%.*]] = load ptr, ptr [[TMP10]], align 8
997 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 2
998 // CHECK1-NEXT: [[TMP13:%.*]] = load ptr, ptr [[TMP12]], align 8
999 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 2
1000 // CHECK1-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
1001 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 3
1002 // CHECK1-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
1003 // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 3
1004 // CHECK1-NEXT: [[TMP19:%.*]] = load ptr, ptr [[TMP18]], align 8
1005 // CHECK1-NEXT: call void @.omp_combiner..1(ptr noundef [[TMP7]], ptr noundef [[TMP5]])
1006 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[TMP11]], i64 4
1007 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i64 4
1008 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
1009 // CHECK1-NEXT: call void @.omp_combiner..5(ptr noundef [[TMP15]], ptr noundef [[TMP13]])
1010 // CHECK1-NEXT: call void @.omp_combiner..7(ptr noundef [[TMP19]], ptr noundef [[TMP17]])
1011 // CHECK1-NEXT: ret void
1014 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..7
1015 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
1016 // CHECK1-NEXT: entry:
1017 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1018 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1019 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1020 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1021 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1022 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1023 // CHECK1-NEXT: [[TMP4:%.*]] = load float, ptr [[TMP2]], align 4
1024 // CHECK1-NEXT: [[ADD:%.*]] = fadd float 5.550000e+02, [[TMP4]]
1025 // CHECK1-NEXT: store float [[ADD]], ptr [[TMP3]], align 4
1026 // CHECK1-NEXT: ret void
1029 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1030 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
1031 // CHECK1-NEXT: entry:
1032 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1033 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1034 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1035 // CHECK1-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]]) #[[ATTR4]]
1036 // CHECK1-NEXT: ret void
1039 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.8
1040 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[VLA:%.*]], i64 noundef [[VLA1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(480) [[ARRS:%.*]]) #[[ATTR2]] {
1041 // CHECK1-NEXT: entry:
1042 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1043 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1044 // CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1045 // CHECK1-NEXT: [[VLA_ADDR2:%.*]] = alloca i64, align 8
1046 // CHECK1-NEXT: [[ARR_ADDR:%.*]] = alloca ptr, align 8
1047 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1048 // CHECK1-NEXT: [[ARRS_ADDR:%.*]] = alloca ptr, align 8
1049 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1050 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
1051 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1052 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1053 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1054 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1055 // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
1056 // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
1057 // CHECK1-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
1058 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
1059 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [4 x ptr], align 8
1060 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1061 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1062 // CHECK1-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1063 // CHECK1-NEXT: store i64 [[VLA1]], ptr [[VLA_ADDR2]], align 8
1064 // CHECK1-NEXT: store ptr [[ARR]], ptr [[ARR_ADDR]], align 8
1065 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1066 // CHECK1-NEXT: store ptr [[ARRS]], ptr [[ARRS_ADDR]], align 8
1067 // CHECK1-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1068 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR2]], align 8
1069 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[ARR_ADDR]], align 8
1070 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1071 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[ARRS_ADDR]], align 8
1072 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1073 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1074 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1075 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1076 // CHECK1-NEXT: [[TMP5:%.*]] = mul nsw i64 1, [[TMP1]]
1077 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i64 [[TMP5]]
1078 // CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX]], i64 0
1079 // CHECK1-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP3]], i64 0, i64 1
1080 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[ARRAYIDX4]], align 4
1081 // CHECK1-NEXT: [[TMP7:%.*]] = sext i32 [[TMP6]] to i64
1082 // CHECK1-NEXT: [[LB_ADD_LEN:%.*]] = add nsw i64 -1, [[TMP7]]
1083 // CHECK1-NEXT: [[TMP8:%.*]] = mul nsw i64 1, [[TMP1]]
1084 // CHECK1-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i64 [[TMP8]]
1085 // CHECK1-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX5]], i64 [[LB_ADD_LEN]]
1086 // CHECK1-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[ARRAYIDX6]] to i64
1087 // CHECK1-NEXT: [[TMP10:%.*]] = ptrtoint ptr [[ARRAYIDX3]] to i64
1088 // CHECK1-NEXT: [[TMP11:%.*]] = sub i64 [[TMP9]], [[TMP10]]
1089 // CHECK1-NEXT: [[TMP12:%.*]] = sdiv exact i64 [[TMP11]], ptrtoint (ptr getelementptr (i32, ptr null, i32 1) to i64)
1090 // CHECK1-NEXT: [[TMP13:%.*]] = add nuw i64 [[TMP12]], 1
1091 // CHECK1-NEXT: [[TMP14:%.*]] = mul nuw i64 [[TMP13]], ptrtoint (ptr getelementptr (i32, ptr null, i32 1) to i64)
1092 // CHECK1-NEXT: [[TMP15:%.*]] = call ptr @llvm.stacksave.p0()
1093 // CHECK1-NEXT: store ptr [[TMP15]], ptr [[SAVED_STACK]], align 8
1094 // CHECK1-NEXT: [[VLA7:%.*]] = alloca i32, i64 [[TMP13]], align 16
1095 // CHECK1-NEXT: store i64 [[TMP13]], ptr [[__VLA_EXPR0]], align 8
1096 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr i32, ptr [[VLA7]], i64 [[TMP13]]
1097 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[VLA7]], [[TMP16]]
1098 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
1099 // CHECK1: omp.arrayinit.body:
1100 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[ARRAYIDX3]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1101 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[VLA7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT8:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1102 // CHECK1-NEXT: call void @.omp_initializer..10(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST]])
1103 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1104 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT8]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1105 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT8]], [[TMP16]]
1106 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
1107 // CHECK1: omp.arrayinit.done:
1108 // CHECK1-NEXT: [[TMP17:%.*]] = ptrtoint ptr [[TMP2]] to i64
1109 // CHECK1-NEXT: [[TMP18:%.*]] = ptrtoint ptr [[ARRAYIDX3]] to i64
1110 // CHECK1-NEXT: [[TMP19:%.*]] = sub i64 [[TMP17]], [[TMP18]]
1111 // CHECK1-NEXT: [[TMP20:%.*]] = sdiv exact i64 [[TMP19]], ptrtoint (ptr getelementptr (i32, ptr null, i32 1) to i64)
1112 // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr i32, ptr [[VLA7]], i64 [[TMP20]]
1113 // CHECK1-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[TMP4]], i64 0, i64 1
1114 // CHECK1-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[ARRAYIDX9]], i64 0, i64 0
1115 // CHECK1-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[ARRAYDECAY]], i64 1
1116 // CHECK1-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP3]], i64 0, i64 1
1117 // CHECK1-NEXT: [[TMP22:%.*]] = load i32, ptr [[ARRAYIDX11]], align 4
1118 // CHECK1-NEXT: [[TMP23:%.*]] = sext i32 [[TMP22]] to i64
1119 // CHECK1-NEXT: [[LB_ADD_LEN12:%.*]] = add nsw i64 0, [[TMP23]]
1120 // CHECK1-NEXT: [[ARRAYIDX13:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[TMP4]], i64 0, i64 [[LB_ADD_LEN12]]
1121 // CHECK1-NEXT: [[ARRAYDECAY14:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[ARRAYIDX13]], i64 0, i64 0
1122 // CHECK1-NEXT: [[ARRAYIDX15:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDECAY14]], i64 2
1123 // CHECK1-NEXT: [[TMP24:%.*]] = ptrtoint ptr [[ARRAYIDX15]] to i64
1124 // CHECK1-NEXT: [[TMP25:%.*]] = ptrtoint ptr [[ARRAYIDX10]] to i64
1125 // CHECK1-NEXT: [[TMP26:%.*]] = sub i64 [[TMP24]], [[TMP25]]
1126 // CHECK1-NEXT: [[TMP27:%.*]] = sdiv exact i64 [[TMP26]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1127 // CHECK1-NEXT: [[TMP28:%.*]] = add nuw i64 [[TMP27]], 1
1128 // CHECK1-NEXT: [[TMP29:%.*]] = mul nuw i64 [[TMP28]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1129 // CHECK1-NEXT: [[VLA16:%.*]] = alloca [[STRUCT_S_0]], i64 [[TMP28]], align 16
1130 // CHECK1-NEXT: store i64 [[TMP28]], ptr [[__VLA_EXPR1]], align 8
1131 // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VLA16]], i64 [[TMP28]]
1132 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY17:%.*]] = icmp eq ptr [[VLA16]], [[TMP30]]
1133 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY17]], label [[OMP_ARRAYINIT_DONE25:%.*]], label [[OMP_ARRAYINIT_BODY18:%.*]]
1134 // CHECK1: omp.arrayinit.body18:
1135 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST19:%.*]] = phi ptr [ [[ARRAYIDX10]], [[OMP_ARRAYINIT_DONE]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT22:%.*]], [[OMP_ARRAYINIT_BODY18]] ]
1136 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST20:%.*]] = phi ptr [ [[VLA16]], [[OMP_ARRAYINIT_DONE]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT23:%.*]], [[OMP_ARRAYINIT_BODY18]] ]
1137 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i64 4
1138 // CHECK1-NEXT: [[ADD_PTR21:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i64 4
1139 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR21]])
1140 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT22]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i32 1
1141 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT23]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i32 1
1142 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE24:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT23]], [[TMP30]]
1143 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE24]], label [[OMP_ARRAYINIT_DONE25]], label [[OMP_ARRAYINIT_BODY18]]
1144 // CHECK1: omp.arrayinit.done25:
1145 // CHECK1-NEXT: [[TMP31:%.*]] = ptrtoint ptr [[TMP4]] to i64
1146 // CHECK1-NEXT: [[TMP32:%.*]] = ptrtoint ptr [[ARRAYIDX10]] to i64
1147 // CHECK1-NEXT: [[TMP33:%.*]] = sub i64 [[TMP31]], [[TMP32]]
1148 // CHECK1-NEXT: [[TMP34:%.*]] = sdiv exact i64 [[TMP33]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1149 // CHECK1-NEXT: [[TMP35:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VLA16]], i64 [[TMP34]]
1150 // CHECK1-NEXT: [[TMP36:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1151 // CHECK1-NEXT: [[TMP37:%.*]] = load i32, ptr [[TMP36]], align 4
1152 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP37]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1153 // CHECK1-NEXT: [[TMP38:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1154 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP38]], 9
1155 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1156 // CHECK1: cond.true:
1157 // CHECK1-NEXT: br label [[COND_END:%.*]]
1158 // CHECK1: cond.false:
1159 // CHECK1-NEXT: [[TMP39:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1160 // CHECK1-NEXT: br label [[COND_END]]
1161 // CHECK1: cond.end:
1162 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP39]], [[COND_FALSE]] ]
1163 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1164 // CHECK1-NEXT: [[TMP40:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1165 // CHECK1-NEXT: store i32 [[TMP40]], ptr [[DOTOMP_IV]], align 4
1166 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1167 // CHECK1: omp.inner.for.cond:
1168 // CHECK1-NEXT: [[TMP41:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1169 // CHECK1-NEXT: [[TMP42:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1170 // CHECK1-NEXT: [[CMP26:%.*]] = icmp sle i32 [[TMP41]], [[TMP42]]
1171 // CHECK1-NEXT: br i1 [[CMP26]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1172 // CHECK1: omp.inner.for.cond.cleanup:
1173 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1174 // CHECK1: omp.inner.for.body:
1175 // CHECK1-NEXT: [[TMP43:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1176 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP43]], 1
1177 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1178 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1179 // CHECK1-NEXT: [[TMP44:%.*]] = mul nsw i64 1, [[TMP1]]
1180 // CHECK1-NEXT: [[ARRAYIDX27:%.*]] = getelementptr inbounds i32, ptr [[TMP21]], i64 [[TMP44]]
1181 // CHECK1-NEXT: [[TMP45:%.*]] = load i32, ptr [[I]], align 4
1182 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP45]] to i64
1183 // CHECK1-NEXT: [[ARRAYIDX28:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX27]], i64 [[IDXPROM]]
1184 // CHECK1-NEXT: [[TMP46:%.*]] = load i32, ptr [[ARRAYIDX28]], align 4
1185 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP46]], 1
1186 // CHECK1-NEXT: store i32 [[INC]], ptr [[ARRAYIDX28]], align 4
1187 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1188 // CHECK1: omp.body.continue:
1189 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1190 // CHECK1: omp.inner.for.inc:
1191 // CHECK1-NEXT: [[TMP47:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1192 // CHECK1-NEXT: [[ADD29:%.*]] = add nsw i32 [[TMP47]], 1
1193 // CHECK1-NEXT: store i32 [[ADD29]], ptr [[DOTOMP_IV]], align 4
1194 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
1195 // CHECK1: omp.inner.for.end:
1196 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1197 // CHECK1: omp.loop.exit:
1198 // CHECK1-NEXT: [[TMP48:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1199 // CHECK1-NEXT: [[TMP49:%.*]] = load i32, ptr [[TMP48]], align 4
1200 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP49]])
1201 // CHECK1-NEXT: [[TMP50:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
1202 // CHECK1-NEXT: store ptr [[VLA7]], ptr [[TMP50]], align 8
1203 // CHECK1-NEXT: [[TMP51:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
1204 // CHECK1-NEXT: [[TMP52:%.*]] = inttoptr i64 [[TMP13]] to ptr
1205 // CHECK1-NEXT: store ptr [[TMP52]], ptr [[TMP51]], align 8
1206 // CHECK1-NEXT: [[TMP53:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
1207 // CHECK1-NEXT: store ptr [[VLA16]], ptr [[TMP53]], align 8
1208 // CHECK1-NEXT: [[TMP54:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 3
1209 // CHECK1-NEXT: [[TMP55:%.*]] = inttoptr i64 [[TMP28]] to ptr
1210 // CHECK1-NEXT: store ptr [[TMP55]], ptr [[TMP54]], align 8
1211 // CHECK1-NEXT: [[TMP56:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1212 // CHECK1-NEXT: [[TMP57:%.*]] = load i32, ptr [[TMP56]], align 4
1213 // CHECK1-NEXT: [[TMP58:%.*]] = call i32 @__kmpc_reduce_nowait(ptr @[[GLOB3]], i32 [[TMP57]], i32 2, i64 32, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.8.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
1214 // CHECK1-NEXT: switch i32 [[TMP58]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
1215 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
1216 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
1218 // CHECK1: .omp.reduction.case1:
1219 // CHECK1-NEXT: [[TMP59:%.*]] = getelementptr i32, ptr [[ARRAYIDX3]], i64 [[TMP13]]
1220 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAYIDX3]], [[TMP59]]
1221 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE34:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1222 // CHECK1: omp.arraycpy.body:
1223 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST30:%.*]] = phi ptr [ [[VLA7]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1224 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST31:%.*]] = phi ptr [ [[ARRAYIDX3]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT32:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1225 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST31]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST30]])
1226 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT32]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST31]], i32 1
1227 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST30]], i32 1
1228 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE33:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT32]], [[TMP59]]
1229 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE33]], label [[OMP_ARRAYCPY_DONE34]], label [[OMP_ARRAYCPY_BODY]]
1230 // CHECK1: omp.arraycpy.done34:
1231 // CHECK1-NEXT: [[TMP60:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX10]], i64 [[TMP28]]
1232 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY35:%.*]] = icmp eq ptr [[ARRAYIDX10]], [[TMP60]]
1233 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY35]], label [[OMP_ARRAYCPY_DONE44:%.*]], label [[OMP_ARRAYCPY_BODY36:%.*]]
1234 // CHECK1: omp.arraycpy.body36:
1235 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST37:%.*]] = phi ptr [ [[VLA16]], [[OMP_ARRAYCPY_DONE34]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT42:%.*]], [[OMP_ARRAYCPY_BODY36]] ]
1236 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST38:%.*]] = phi ptr [ [[ARRAYIDX10]], [[OMP_ARRAYCPY_DONE34]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT41:%.*]], [[OMP_ARRAYCPY_BODY36]] ]
1237 // CHECK1-NEXT: [[ADD_PTR39:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST38]], i64 4
1238 // CHECK1-NEXT: [[ADD_PTR40:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST37]], i64 4
1239 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR39]], ptr noundef [[ADD_PTR40]])
1240 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT41]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST38]], i32 1
1241 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT42]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST37]], i32 1
1242 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE43:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT41]], [[TMP60]]
1243 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE43]], label [[OMP_ARRAYCPY_DONE44]], label [[OMP_ARRAYCPY_BODY36]]
1244 // CHECK1: omp.arraycpy.done44:
1245 // CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(ptr @[[GLOB3]], i32 [[TMP57]], ptr @.gomp_critical_user_.reduction.var)
1246 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1247 // CHECK1: .omp.reduction.case2:
1248 // CHECK1-NEXT: [[TMP61:%.*]] = getelementptr i32, ptr [[ARRAYIDX3]], i64 [[TMP13]]
1249 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY45:%.*]] = icmp eq ptr [[ARRAYIDX3]], [[TMP61]]
1250 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY45]], label [[OMP_ARRAYCPY_DONE52:%.*]], label [[OMP_ARRAYCPY_BODY46:%.*]]
1251 // CHECK1: omp.arraycpy.body46:
1252 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST47:%.*]] = phi ptr [ [[VLA7]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT50:%.*]], [[OMP_ARRAYCPY_BODY46]] ]
1253 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST48:%.*]] = phi ptr [ [[ARRAYIDX3]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT49:%.*]], [[OMP_ARRAYCPY_BODY46]] ]
1254 // CHECK1-NEXT: [[TMP62:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1255 // CHECK1-NEXT: [[TMP63:%.*]] = load i32, ptr [[TMP62]], align 4
1256 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP63]], ptr @.gomp_critical_user_.atomic_reduction.var)
1257 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST48]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST47]])
1258 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP63]], ptr @.gomp_critical_user_.atomic_reduction.var)
1259 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT49]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST48]], i32 1
1260 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT50]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST47]], i32 1
1261 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE51:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT49]], [[TMP61]]
1262 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE51]], label [[OMP_ARRAYCPY_DONE52]], label [[OMP_ARRAYCPY_BODY46]]
1263 // CHECK1: omp.arraycpy.done52:
1264 // CHECK1-NEXT: [[TMP64:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX10]], i64 [[TMP28]]
1265 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY53:%.*]] = icmp eq ptr [[ARRAYIDX10]], [[TMP64]]
1266 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY53]], label [[OMP_ARRAYCPY_DONE62:%.*]], label [[OMP_ARRAYCPY_BODY54:%.*]]
1267 // CHECK1: omp.arraycpy.body54:
1268 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST55:%.*]] = phi ptr [ [[VLA16]], [[OMP_ARRAYCPY_DONE52]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT60:%.*]], [[OMP_ARRAYCPY_BODY54]] ]
1269 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST56:%.*]] = phi ptr [ [[ARRAYIDX10]], [[OMP_ARRAYCPY_DONE52]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT59:%.*]], [[OMP_ARRAYCPY_BODY54]] ]
1270 // CHECK1-NEXT: [[TMP65:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1271 // CHECK1-NEXT: [[TMP66:%.*]] = load i32, ptr [[TMP65]], align 4
1272 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP66]], ptr @.gomp_critical_user_.atomic_reduction.var)
1273 // CHECK1-NEXT: [[ADD_PTR57:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST56]], i64 4
1274 // CHECK1-NEXT: [[ADD_PTR58:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST55]], i64 4
1275 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR57]], ptr noundef [[ADD_PTR58]])
1276 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP66]], ptr @.gomp_critical_user_.atomic_reduction.var)
1277 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT59]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST56]], i32 1
1278 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT60]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST55]], i32 1
1279 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE61:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT59]], [[TMP64]]
1280 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE61]], label [[OMP_ARRAYCPY_DONE62]], label [[OMP_ARRAYCPY_BODY54]]
1281 // CHECK1: omp.arraycpy.done62:
1282 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1283 // CHECK1: .omp.reduction.default:
1284 // CHECK1-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[VLA16]], i64 [[TMP28]]
1285 // CHECK1-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[VLA16]], [[TMP67]]
1286 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE63:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
1287 // CHECK1: arraydestroy.body:
1288 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP67]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1289 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1290 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1291 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[VLA16]]
1292 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE63]], label [[ARRAYDESTROY_BODY]]
1293 // CHECK1: arraydestroy.done63:
1294 // CHECK1-NEXT: [[TMP68:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
1295 // CHECK1-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP68]])
1296 // CHECK1-NEXT: ret void
1299 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..9
1300 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
1301 // CHECK1-NEXT: entry:
1302 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1303 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1304 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1305 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1306 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1307 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1308 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP2]], align 4
1309 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 555, [[TMP4]]
1310 // CHECK1-NEXT: store i32 [[MUL]], ptr [[TMP3]], align 4
1311 // CHECK1-NEXT: ret void
1314 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..10
1315 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
1316 // CHECK1-NEXT: entry:
1317 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1318 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1319 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1320 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1321 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1322 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1323 // CHECK1-NEXT: store i32 888, ptr [[TMP3]], align 4
1324 // CHECK1-NEXT: ret void
1327 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.8.omp.reduction.reduction_func
1328 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
1329 // CHECK1-NEXT: entry:
1330 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1331 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1332 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1333 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1334 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1335 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1336 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 0
1337 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1338 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 0
1339 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1340 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 1
1341 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
1342 // CHECK1-NEXT: [[TMP10:%.*]] = ptrtoint ptr [[TMP9]] to i64
1343 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 2
1344 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1345 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 2
1346 // CHECK1-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
1347 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 3
1348 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
1349 // CHECK1-NEXT: [[TMP17:%.*]] = ptrtoint ptr [[TMP16]] to i64
1350 // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr i32, ptr [[TMP7]], i64 [[TMP10]]
1351 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP18]]
1352 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE2:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1353 // CHECK1: omp.arraycpy.body:
1354 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1355 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1356 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST]])
1357 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1358 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1359 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP18]]
1360 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE2]], label [[OMP_ARRAYCPY_BODY]]
1361 // CHECK1: omp.arraycpy.done2:
1362 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP14]], i64 [[TMP17]]
1363 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY3:%.*]] = icmp eq ptr [[TMP14]], [[TMP19]]
1364 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY3]], label [[OMP_ARRAYCPY_DONE11:%.*]], label [[OMP_ARRAYCPY_BODY4:%.*]]
1365 // CHECK1: omp.arraycpy.body4:
1366 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST5:%.*]] = phi ptr [ [[TMP12]], [[OMP_ARRAYCPY_DONE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT9:%.*]], [[OMP_ARRAYCPY_BODY4]] ]
1367 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST6:%.*]] = phi ptr [ [[TMP14]], [[OMP_ARRAYCPY_DONE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT8:%.*]], [[OMP_ARRAYCPY_BODY4]] ]
1368 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST6]], i64 4
1369 // CHECK1-NEXT: [[ADD_PTR7:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST5]], i64 4
1370 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR7]])
1371 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT8]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST6]], i32 1
1372 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT9]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST5]], i32 1
1373 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE10:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT8]], [[TMP19]]
1374 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE10]], label [[OMP_ARRAYCPY_DONE11]], label [[OMP_ARRAYCPY_BODY4]]
1375 // CHECK1: omp.arraycpy.done11:
1376 // CHECK1-NEXT: ret void
1379 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.11
1380 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[VLA:%.*]], i64 noundef [[VLA1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(480) [[ARRS:%.*]]) #[[ATTR2]] {
1381 // CHECK1-NEXT: entry:
1382 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1383 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1384 // CHECK1-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1385 // CHECK1-NEXT: [[VLA_ADDR2:%.*]] = alloca i64, align 8
1386 // CHECK1-NEXT: [[ARR_ADDR:%.*]] = alloca ptr, align 8
1387 // CHECK1-NEXT: [[ARRS_ADDR:%.*]] = alloca ptr, align 8
1388 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1389 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
1390 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1391 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1392 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1393 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1394 // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
1395 // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
1396 // CHECK1-NEXT: [[ARRS5:%.*]] = alloca [10 x [4 x %struct.S.0]], align 16
1397 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
1398 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [3 x ptr], align 8
1399 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1400 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1401 // CHECK1-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1402 // CHECK1-NEXT: store i64 [[VLA1]], ptr [[VLA_ADDR2]], align 8
1403 // CHECK1-NEXT: store ptr [[ARR]], ptr [[ARR_ADDR]], align 8
1404 // CHECK1-NEXT: store ptr [[ARRS]], ptr [[ARRS_ADDR]], align 8
1405 // CHECK1-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1406 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR2]], align 8
1407 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[ARR_ADDR]], align 8
1408 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[ARRS_ADDR]], align 8
1409 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1410 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1411 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1412 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1413 // CHECK1-NEXT: [[TMP4:%.*]] = mul nuw i64 [[TMP0]], [[TMP1]]
1414 // CHECK1-NEXT: [[TMP5:%.*]] = mul nuw i64 [[TMP4]], 4
1415 // CHECK1-NEXT: [[TMP6:%.*]] = udiv exact i64 [[TMP5]], ptrtoint (ptr getelementptr (i32, ptr null, i32 1) to i64)
1416 // CHECK1-NEXT: [[TMP7:%.*]] = call ptr @llvm.stacksave.p0()
1417 // CHECK1-NEXT: store ptr [[TMP7]], ptr [[SAVED_STACK]], align 8
1418 // CHECK1-NEXT: [[VLA3:%.*]] = alloca i32, i64 [[TMP6]], align 16
1419 // CHECK1-NEXT: store i64 [[TMP6]], ptr [[__VLA_EXPR0]], align 8
1420 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr i32, ptr [[VLA3]], i64 [[TMP6]]
1421 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[VLA3]], [[TMP8]]
1422 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
1423 // CHECK1: omp.arrayinit.body:
1424 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1425 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[VLA3]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT4:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1426 // CHECK1-NEXT: call void @.omp_initializer..10(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST]])
1427 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1428 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT4]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1429 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT4]], [[TMP8]]
1430 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
1431 // CHECK1: omp.arrayinit.done:
1432 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS5]], i32 0, i32 0, i32 0
1433 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[ARRAY_BEGIN]], i64 40
1434 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY6:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP9]]
1435 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY6]], label [[OMP_ARRAYINIT_DONE14:%.*]], label [[OMP_ARRAYINIT_BODY7:%.*]]
1436 // CHECK1: omp.arrayinit.body7:
1437 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST8:%.*]] = phi ptr [ [[TMP3]], [[OMP_ARRAYINIT_DONE]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT11:%.*]], [[OMP_ARRAYINIT_BODY7]] ]
1438 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST9:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[OMP_ARRAYINIT_DONE]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT12:%.*]], [[OMP_ARRAYINIT_BODY7]] ]
1439 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST9]], i64 4
1440 // CHECK1-NEXT: [[ADD_PTR10:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST8]], i64 4
1441 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR10]])
1442 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT11]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST8]], i32 1
1443 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT12]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST9]], i32 1
1444 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE13:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT12]], [[TMP9]]
1445 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE13]], label [[OMP_ARRAYINIT_DONE14]], label [[OMP_ARRAYINIT_BODY7]]
1446 // CHECK1: omp.arrayinit.done14:
1447 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1448 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
1449 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP11]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1450 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1451 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP12]], 9
1452 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1453 // CHECK1: cond.true:
1454 // CHECK1-NEXT: br label [[COND_END:%.*]]
1455 // CHECK1: cond.false:
1456 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1457 // CHECK1-NEXT: br label [[COND_END]]
1458 // CHECK1: cond.end:
1459 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP13]], [[COND_FALSE]] ]
1460 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1461 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1462 // CHECK1-NEXT: store i32 [[TMP14]], ptr [[DOTOMP_IV]], align 4
1463 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1464 // CHECK1: omp.inner.for.cond:
1465 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1466 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1467 // CHECK1-NEXT: [[CMP15:%.*]] = icmp sle i32 [[TMP15]], [[TMP16]]
1468 // CHECK1-NEXT: br i1 [[CMP15]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1469 // CHECK1: omp.inner.for.cond.cleanup:
1470 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1471 // CHECK1: omp.inner.for.body:
1472 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1473 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP17]], 1
1474 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1475 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1476 // CHECK1-NEXT: [[TMP18:%.*]] = mul nsw i64 1, [[TMP1]]
1477 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[VLA3]], i64 [[TMP18]]
1478 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[I]], align 4
1479 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP19]] to i64
1480 // CHECK1-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX]], i64 [[IDXPROM]]
1481 // CHECK1-NEXT: [[TMP20:%.*]] = load i32, ptr [[ARRAYIDX16]], align 4
1482 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP20]], 1
1483 // CHECK1-NEXT: store i32 [[INC]], ptr [[ARRAYIDX16]], align 4
1484 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1485 // CHECK1: omp.body.continue:
1486 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1487 // CHECK1: omp.inner.for.inc:
1488 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1489 // CHECK1-NEXT: [[ADD17:%.*]] = add nsw i32 [[TMP21]], 1
1490 // CHECK1-NEXT: store i32 [[ADD17]], ptr [[DOTOMP_IV]], align 4
1491 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
1492 // CHECK1: omp.inner.for.end:
1493 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1494 // CHECK1: omp.loop.exit:
1495 // CHECK1-NEXT: [[TMP22:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1496 // CHECK1-NEXT: [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4
1497 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP23]])
1498 // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
1499 // CHECK1-NEXT: store ptr [[VLA3]], ptr [[TMP24]], align 8
1500 // CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
1501 // CHECK1-NEXT: [[TMP26:%.*]] = inttoptr i64 [[TMP6]] to ptr
1502 // CHECK1-NEXT: store ptr [[TMP26]], ptr [[TMP25]], align 8
1503 // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
1504 // CHECK1-NEXT: store ptr [[ARRS5]], ptr [[TMP27]], align 8
1505 // CHECK1-NEXT: [[TMP28:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1506 // CHECK1-NEXT: [[TMP29:%.*]] = load i32, ptr [[TMP28]], align 4
1507 // CHECK1-NEXT: [[TMP30:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP29]], i32 2, i64 24, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.11.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
1508 // CHECK1-NEXT: switch i32 [[TMP30]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
1509 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
1510 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
1512 // CHECK1: .omp.reduction.case1:
1513 // CHECK1-NEXT: [[TMP31:%.*]] = getelementptr i32, ptr [[TMP2]], i64 [[TMP6]]
1514 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP2]], [[TMP31]]
1515 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE22:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1516 // CHECK1: omp.arraycpy.body:
1517 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST18:%.*]] = phi ptr [ [[VLA3]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1518 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST19:%.*]] = phi ptr [ [[TMP2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT20:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1519 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST19]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST18]])
1520 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT20]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST19]], i32 1
1521 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST18]], i32 1
1522 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE21:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT20]], [[TMP31]]
1523 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE21]], label [[OMP_ARRAYCPY_DONE22]], label [[OMP_ARRAYCPY_BODY]]
1524 // CHECK1: omp.arraycpy.done22:
1525 // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[TMP3]], i64 40
1526 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY23:%.*]] = icmp eq ptr [[TMP3]], [[TMP32]]
1527 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY23]], label [[OMP_ARRAYCPY_DONE32:%.*]], label [[OMP_ARRAYCPY_BODY24:%.*]]
1528 // CHECK1: omp.arraycpy.body24:
1529 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST25:%.*]] = phi ptr [ [[ARRS5]], [[OMP_ARRAYCPY_DONE22]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT30:%.*]], [[OMP_ARRAYCPY_BODY24]] ]
1530 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST26:%.*]] = phi ptr [ [[TMP3]], [[OMP_ARRAYCPY_DONE22]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT29:%.*]], [[OMP_ARRAYCPY_BODY24]] ]
1531 // CHECK1-NEXT: [[ADD_PTR27:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST26]], i64 4
1532 // CHECK1-NEXT: [[ADD_PTR28:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST25]], i64 4
1533 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR27]], ptr noundef [[ADD_PTR28]])
1534 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT29]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST26]], i32 1
1535 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT30]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST25]], i32 1
1536 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE31:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT29]], [[TMP32]]
1537 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE31]], label [[OMP_ARRAYCPY_DONE32]], label [[OMP_ARRAYCPY_BODY24]]
1538 // CHECK1: omp.arraycpy.done32:
1539 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP29]], ptr @.gomp_critical_user_.reduction.var)
1540 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1541 // CHECK1: .omp.reduction.case2:
1542 // CHECK1-NEXT: [[TMP33:%.*]] = getelementptr i32, ptr [[TMP2]], i64 [[TMP6]]
1543 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY33:%.*]] = icmp eq ptr [[TMP2]], [[TMP33]]
1544 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY33]], label [[OMP_ARRAYCPY_DONE40:%.*]], label [[OMP_ARRAYCPY_BODY34:%.*]]
1545 // CHECK1: omp.arraycpy.body34:
1546 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST35:%.*]] = phi ptr [ [[VLA3]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT38:%.*]], [[OMP_ARRAYCPY_BODY34]] ]
1547 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST36:%.*]] = phi ptr [ [[TMP2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT37:%.*]], [[OMP_ARRAYCPY_BODY34]] ]
1548 // CHECK1-NEXT: [[TMP34:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1549 // CHECK1-NEXT: [[TMP35:%.*]] = load i32, ptr [[TMP34]], align 4
1550 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP35]], ptr @.gomp_critical_user_.atomic_reduction.var)
1551 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST36]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST35]])
1552 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP35]], ptr @.gomp_critical_user_.atomic_reduction.var)
1553 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT37]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST36]], i32 1
1554 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT38]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST35]], i32 1
1555 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE39:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT37]], [[TMP33]]
1556 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE39]], label [[OMP_ARRAYCPY_DONE40]], label [[OMP_ARRAYCPY_BODY34]]
1557 // CHECK1: omp.arraycpy.done40:
1558 // CHECK1-NEXT: [[TMP36:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[TMP3]], i64 40
1559 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY41:%.*]] = icmp eq ptr [[TMP3]], [[TMP36]]
1560 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY41]], label [[OMP_ARRAYCPY_DONE50:%.*]], label [[OMP_ARRAYCPY_BODY42:%.*]]
1561 // CHECK1: omp.arraycpy.body42:
1562 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST43:%.*]] = phi ptr [ [[ARRS5]], [[OMP_ARRAYCPY_DONE40]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT48:%.*]], [[OMP_ARRAYCPY_BODY42]] ]
1563 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST44:%.*]] = phi ptr [ [[TMP3]], [[OMP_ARRAYCPY_DONE40]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT47:%.*]], [[OMP_ARRAYCPY_BODY42]] ]
1564 // CHECK1-NEXT: [[TMP37:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1565 // CHECK1-NEXT: [[TMP38:%.*]] = load i32, ptr [[TMP37]], align 4
1566 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP38]], ptr @.gomp_critical_user_.atomic_reduction.var)
1567 // CHECK1-NEXT: [[ADD_PTR45:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST44]], i64 4
1568 // CHECK1-NEXT: [[ADD_PTR46:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST43]], i64 4
1569 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR45]], ptr noundef [[ADD_PTR46]])
1570 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP38]], ptr @.gomp_critical_user_.atomic_reduction.var)
1571 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT47]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST44]], i32 1
1572 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT48]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST43]], i32 1
1573 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE49:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT47]], [[TMP36]]
1574 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE49]], label [[OMP_ARRAYCPY_DONE50]], label [[OMP_ARRAYCPY_BODY42]]
1575 // CHECK1: omp.arraycpy.done50:
1576 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP29]], ptr @.gomp_critical_user_.reduction.var)
1577 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1578 // CHECK1: .omp.reduction.default:
1579 // CHECK1-NEXT: [[ARRAY_BEGIN51:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS5]], i32 0, i32 0, i32 0
1580 // CHECK1-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN51]], i64 40
1581 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1582 // CHECK1: arraydestroy.body:
1583 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP39]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1584 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1585 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1586 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN51]]
1587 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE52:%.*]], label [[ARRAYDESTROY_BODY]]
1588 // CHECK1: arraydestroy.done52:
1589 // CHECK1-NEXT: [[TMP40:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
1590 // CHECK1-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP40]])
1591 // CHECK1-NEXT: [[TMP41:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1592 // CHECK1-NEXT: [[TMP42:%.*]] = load i32, ptr [[TMP41]], align 4
1593 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP42]])
1594 // CHECK1-NEXT: ret void
1597 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.11.omp.reduction.reduction_func
1598 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
1599 // CHECK1-NEXT: entry:
1600 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1601 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1602 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1603 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1604 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1605 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1606 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
1607 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1608 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
1609 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1610 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
1611 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
1612 // CHECK1-NEXT: [[TMP10:%.*]] = ptrtoint ptr [[TMP9]] to i64
1613 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
1614 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1615 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
1616 // CHECK1-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
1617 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr i32, ptr [[TMP7]], i64 [[TMP10]]
1618 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP15]]
1619 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE2:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1620 // CHECK1: omp.arraycpy.body:
1621 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1622 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1623 // CHECK1-NEXT: call void @.omp_combiner..9(ptr noundef [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef [[OMP_ARRAYCPY_SRCELEMENTPAST]])
1624 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1625 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr i32, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1626 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP15]]
1627 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE2]], label [[OMP_ARRAYCPY_BODY]]
1628 // CHECK1: omp.arraycpy.done2:
1629 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP14]], i64 40
1630 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY3:%.*]] = icmp eq ptr [[TMP14]], [[TMP16]]
1631 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY3]], label [[OMP_ARRAYCPY_DONE11:%.*]], label [[OMP_ARRAYCPY_BODY4:%.*]]
1632 // CHECK1: omp.arraycpy.body4:
1633 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST5:%.*]] = phi ptr [ [[TMP12]], [[OMP_ARRAYCPY_DONE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT9:%.*]], [[OMP_ARRAYCPY_BODY4]] ]
1634 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST6:%.*]] = phi ptr [ [[TMP14]], [[OMP_ARRAYCPY_DONE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT8:%.*]], [[OMP_ARRAYCPY_BODY4]] ]
1635 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST6]], i64 4
1636 // CHECK1-NEXT: [[ADD_PTR7:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST5]], i64 4
1637 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR7]])
1638 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT8]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST6]], i32 1
1639 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT9]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST5]], i32 1
1640 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE10:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT8]], [[TMP16]]
1641 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE10]], label [[OMP_ARRAYCPY_DONE11]], label [[OMP_ARRAYCPY_BODY4]]
1642 // CHECK1: omp.arraycpy.done11:
1643 // CHECK1-NEXT: ret void
1646 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.12
1647 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 8 dereferenceable(8) [[VAR2:%.*]]) #[[ATTR2]] {
1648 // CHECK1-NEXT: entry:
1649 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1650 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1651 // CHECK1-NEXT: [[VAR2_ADDR:%.*]] = alloca ptr, align 8
1652 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1653 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
1654 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1655 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1656 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1657 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1658 // CHECK1-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
1659 // CHECK1-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
1660 // CHECK1-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
1661 // CHECK1-NEXT: [[_TMP7:%.*]] = alloca ptr, align 8
1662 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
1663 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [2 x ptr], align 8
1664 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1665 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1666 // CHECK1-NEXT: store ptr [[VAR2]], ptr [[VAR2_ADDR]], align 8
1667 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR2_ADDR]], align 8
1668 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1669 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1670 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1671 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1672 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
1673 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds ptr, ptr [[TMP1]], i64 0
1674 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[ARRAYIDX]], align 8
1675 // CHECK1-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[TMP2]], i64 1
1676 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP0]], align 8
1677 // CHECK1-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds ptr, ptr [[TMP3]], i64 4
1678 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[ARRAYIDX2]], align 8
1679 // CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[TMP4]], i64 6
1680 // CHECK1-NEXT: [[TMP5:%.*]] = ptrtoint ptr [[ARRAYIDX3]] to i64
1681 // CHECK1-NEXT: [[TMP6:%.*]] = ptrtoint ptr [[ARRAYIDX1]] to i64
1682 // CHECK1-NEXT: [[TMP7:%.*]] = sub i64 [[TMP5]], [[TMP6]]
1683 // CHECK1-NEXT: [[TMP8:%.*]] = sdiv exact i64 [[TMP7]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1684 // CHECK1-NEXT: [[TMP9:%.*]] = add nuw i64 [[TMP8]], 1
1685 // CHECK1-NEXT: [[TMP10:%.*]] = mul nuw i64 [[TMP9]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1686 // CHECK1-NEXT: [[TMP11:%.*]] = call ptr @llvm.stacksave.p0()
1687 // CHECK1-NEXT: store ptr [[TMP11]], ptr [[SAVED_STACK]], align 8
1688 // CHECK1-NEXT: [[VLA:%.*]] = alloca [[STRUCT_S_0]], i64 [[TMP9]], align 16
1689 // CHECK1-NEXT: store i64 [[TMP9]], ptr [[__VLA_EXPR0]], align 8
1690 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VLA]], i64 [[TMP9]]
1691 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[VLA]], [[TMP12]]
1692 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
1693 // CHECK1: omp.arrayinit.body:
1694 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[ARRAYIDX1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1695 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[VLA]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT5:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1696 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
1697 // CHECK1-NEXT: [[ADD_PTR4:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
1698 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR4]])
1699 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1700 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT5]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1701 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT5]], [[TMP12]]
1702 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
1703 // CHECK1: omp.arrayinit.done:
1704 // CHECK1-NEXT: [[TMP13:%.*]] = load ptr, ptr [[TMP0]], align 8
1705 // CHECK1-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
1706 // CHECK1-NEXT: [[TMP15:%.*]] = ptrtoint ptr [[TMP14]] to i64
1707 // CHECK1-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[ARRAYIDX1]] to i64
1708 // CHECK1-NEXT: [[TMP17:%.*]] = sub i64 [[TMP15]], [[TMP16]]
1709 // CHECK1-NEXT: [[TMP18:%.*]] = sdiv exact i64 [[TMP17]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1710 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VLA]], i64 [[TMP18]]
1711 // CHECK1-NEXT: store ptr [[_TMP7]], ptr [[_TMP6]], align 8
1712 // CHECK1-NEXT: store ptr [[TMP19]], ptr [[_TMP7]], align 8
1713 // CHECK1-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1714 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
1715 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP21]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1716 // CHECK1-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1717 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP22]], 9
1718 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1719 // CHECK1: cond.true:
1720 // CHECK1-NEXT: br label [[COND_END:%.*]]
1721 // CHECK1: cond.false:
1722 // CHECK1-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1723 // CHECK1-NEXT: br label [[COND_END]]
1724 // CHECK1: cond.end:
1725 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP23]], [[COND_FALSE]] ]
1726 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1727 // CHECK1-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1728 // CHECK1-NEXT: store i32 [[TMP24]], ptr [[DOTOMP_IV]], align 4
1729 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1730 // CHECK1: omp.inner.for.cond:
1731 // CHECK1-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1732 // CHECK1-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1733 // CHECK1-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP25]], [[TMP26]]
1734 // CHECK1-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1735 // CHECK1: omp.inner.for.cond.cleanup:
1736 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1737 // CHECK1: omp.inner.for.body:
1738 // CHECK1-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1739 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP27]], 1
1740 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1741 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1742 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1743 // CHECK1: omp.body.continue:
1744 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1745 // CHECK1: omp.inner.for.inc:
1746 // CHECK1-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1747 // CHECK1-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP28]], 1
1748 // CHECK1-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
1749 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
1750 // CHECK1: omp.inner.for.end:
1751 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1752 // CHECK1: omp.loop.exit:
1753 // CHECK1-NEXT: [[TMP29:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1754 // CHECK1-NEXT: [[TMP30:%.*]] = load i32, ptr [[TMP29]], align 4
1755 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP30]])
1756 // CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
1757 // CHECK1-NEXT: store ptr [[VLA]], ptr [[TMP31]], align 8
1758 // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
1759 // CHECK1-NEXT: [[TMP33:%.*]] = inttoptr i64 [[TMP9]] to ptr
1760 // CHECK1-NEXT: store ptr [[TMP33]], ptr [[TMP32]], align 8
1761 // CHECK1-NEXT: [[TMP34:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1762 // CHECK1-NEXT: [[TMP35:%.*]] = load i32, ptr [[TMP34]], align 4
1763 // CHECK1-NEXT: [[TMP36:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP35]], i32 1, i64 16, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.12.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
1764 // CHECK1-NEXT: switch i32 [[TMP36]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
1765 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
1766 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
1768 // CHECK1: .omp.reduction.case1:
1769 // CHECK1-NEXT: [[TMP37:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX1]], i64 [[TMP9]]
1770 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAYIDX1]], [[TMP37]]
1771 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE16:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1772 // CHECK1: omp.arraycpy.body:
1773 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST10:%.*]] = phi ptr [ [[VLA]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1774 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST11:%.*]] = phi ptr [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT14:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1775 // CHECK1-NEXT: [[ADD_PTR12:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i64 4
1776 // CHECK1-NEXT: [[ADD_PTR13:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST10]], i64 4
1777 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR12]], ptr noundef [[ADD_PTR13]])
1778 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT14]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i32 1
1779 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST10]], i32 1
1780 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE15:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT14]], [[TMP37]]
1781 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE15]], label [[OMP_ARRAYCPY_DONE16]], label [[OMP_ARRAYCPY_BODY]]
1782 // CHECK1: omp.arraycpy.done16:
1783 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP35]], ptr @.gomp_critical_user_.reduction.var)
1784 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1785 // CHECK1: .omp.reduction.case2:
1786 // CHECK1-NEXT: [[TMP38:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX1]], i64 [[TMP9]]
1787 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY17:%.*]] = icmp eq ptr [[ARRAYIDX1]], [[TMP38]]
1788 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY17]], label [[OMP_ARRAYCPY_DONE26:%.*]], label [[OMP_ARRAYCPY_BODY18:%.*]]
1789 // CHECK1: omp.arraycpy.body18:
1790 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST19:%.*]] = phi ptr [ [[VLA]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT24:%.*]], [[OMP_ARRAYCPY_BODY18]] ]
1791 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST20:%.*]] = phi ptr [ [[ARRAYIDX1]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT23:%.*]], [[OMP_ARRAYCPY_BODY18]] ]
1792 // CHECK1-NEXT: [[TMP39:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1793 // CHECK1-NEXT: [[TMP40:%.*]] = load i32, ptr [[TMP39]], align 4
1794 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP40]], ptr @.gomp_critical_user_.atomic_reduction.var)
1795 // CHECK1-NEXT: [[ADD_PTR21:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i64 4
1796 // CHECK1-NEXT: [[ADD_PTR22:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i64 4
1797 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR21]], ptr noundef [[ADD_PTR22]])
1798 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP40]], ptr @.gomp_critical_user_.atomic_reduction.var)
1799 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT23]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i32 1
1800 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT24]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i32 1
1801 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE25:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT23]], [[TMP38]]
1802 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE25]], label [[OMP_ARRAYCPY_DONE26]], label [[OMP_ARRAYCPY_BODY18]]
1803 // CHECK1: omp.arraycpy.done26:
1804 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP35]], ptr @.gomp_critical_user_.reduction.var)
1805 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1806 // CHECK1: .omp.reduction.default:
1807 // CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[VLA]], i64 [[TMP9]]
1808 // CHECK1-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[VLA]], [[TMP41]]
1809 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE27:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
1810 // CHECK1: arraydestroy.body:
1811 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP41]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1812 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1813 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1814 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[VLA]]
1815 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE27]], label [[ARRAYDESTROY_BODY]]
1816 // CHECK1: arraydestroy.done27:
1817 // CHECK1-NEXT: [[TMP42:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
1818 // CHECK1-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP42]])
1819 // CHECK1-NEXT: [[TMP43:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1820 // CHECK1-NEXT: [[TMP44:%.*]] = load i32, ptr [[TMP43]], align 4
1821 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP44]])
1822 // CHECK1-NEXT: ret void
1825 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.12.omp.reduction.reduction_func
1826 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
1827 // CHECK1-NEXT: entry:
1828 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1829 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1830 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1831 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1832 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1833 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1834 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP3]], i64 0, i64 0
1835 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1836 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP2]], i64 0, i64 0
1837 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1838 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP2]], i64 0, i64 1
1839 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
1840 // CHECK1-NEXT: [[TMP10:%.*]] = ptrtoint ptr [[TMP9]] to i64
1841 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP7]], i64 [[TMP10]]
1842 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP11]]
1843 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1844 // CHECK1: omp.arraycpy.body:
1845 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1846 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1847 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
1848 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
1849 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
1850 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1851 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1852 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP11]]
1853 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
1854 // CHECK1: omp.arraycpy.done3:
1855 // CHECK1-NEXT: ret void
1858 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.13
1859 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(60) [[VVAR2:%.*]]) #[[ATTR2]] {
1860 // CHECK1-NEXT: entry:
1861 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1862 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1863 // CHECK1-NEXT: [[VVAR2_ADDR:%.*]] = alloca ptr, align 8
1864 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1865 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
1866 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1867 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1868 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1869 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1870 // CHECK1-NEXT: [[VVAR22:%.*]] = alloca [5 x %struct.S.0], align 16
1871 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
1872 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x ptr], align 8
1873 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1874 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1875 // CHECK1-NEXT: store ptr [[VVAR2]], ptr [[VVAR2_ADDR]], align 8
1876 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VVAR2_ADDR]], align 8
1877 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1878 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
1879 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1880 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1881 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[TMP0]], i64 0, i64 0
1882 // CHECK1-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[TMP0]], i64 0, i64 4
1883 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR22]], i32 0, i32 0
1884 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[ARRAY_BEGIN]], i64 5
1885 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP1]]
1886 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
1887 // CHECK1: omp.arrayinit.body:
1888 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[ARRAYIDX]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1889 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT4:%.*]], [[OMP_ARRAYINIT_BODY]] ]
1890 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
1891 // CHECK1-NEXT: [[ADD_PTR3:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
1892 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR3]])
1893 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1894 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT4]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1895 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT4]], [[TMP1]]
1896 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
1897 // CHECK1: omp.arrayinit.done:
1898 // CHECK1-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[TMP0]] to i64
1899 // CHECK1-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
1900 // CHECK1-NEXT: [[TMP4:%.*]] = sub i64 [[TMP2]], [[TMP3]]
1901 // CHECK1-NEXT: [[TMP5:%.*]] = sdiv exact i64 [[TMP4]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
1902 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VVAR22]], i64 [[TMP5]]
1903 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1904 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1905 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP8]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1906 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1907 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP9]], 9
1908 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1909 // CHECK1: cond.true:
1910 // CHECK1-NEXT: br label [[COND_END:%.*]]
1911 // CHECK1: cond.false:
1912 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1913 // CHECK1-NEXT: br label [[COND_END]]
1914 // CHECK1: cond.end:
1915 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP10]], [[COND_FALSE]] ]
1916 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1917 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1918 // CHECK1-NEXT: store i32 [[TMP11]], ptr [[DOTOMP_IV]], align 4
1919 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1920 // CHECK1: omp.inner.for.cond:
1921 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1922 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1923 // CHECK1-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP12]], [[TMP13]]
1924 // CHECK1-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1925 // CHECK1: omp.inner.for.cond.cleanup:
1926 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1927 // CHECK1: omp.inner.for.body:
1928 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1929 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP14]], 1
1930 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1931 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1932 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1933 // CHECK1: omp.body.continue:
1934 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1935 // CHECK1: omp.inner.for.inc:
1936 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1937 // CHECK1-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP15]], 1
1938 // CHECK1-NEXT: store i32 [[ADD6]], ptr [[DOTOMP_IV]], align 4
1939 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
1940 // CHECK1: omp.inner.for.end:
1941 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1942 // CHECK1: omp.loop.exit:
1943 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1944 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
1945 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP17]])
1946 // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
1947 // CHECK1-NEXT: store ptr [[VVAR22]], ptr [[TMP18]], align 8
1948 // CHECK1-NEXT: [[TMP19:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1949 // CHECK1-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP19]], align 4
1950 // CHECK1-NEXT: [[TMP21:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP20]], i32 1, i64 8, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.13.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
1951 // CHECK1-NEXT: switch i32 [[TMP21]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
1952 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
1953 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
1955 // CHECK1: .omp.reduction.case1:
1956 // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX]], i64 5
1957 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP22]]
1958 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE13:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1959 // CHECK1: omp.arraycpy.body:
1960 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST7:%.*]] = phi ptr [ [[VVAR22]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1961 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST8:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT11:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1962 // CHECK1-NEXT: [[ADD_PTR9:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST8]], i64 4
1963 // CHECK1-NEXT: [[ADD_PTR10:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST7]], i64 4
1964 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR9]], ptr noundef [[ADD_PTR10]])
1965 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT11]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST8]], i32 1
1966 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST7]], i32 1
1967 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE12:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT11]], [[TMP22]]
1968 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE12]], label [[OMP_ARRAYCPY_DONE13]], label [[OMP_ARRAYCPY_BODY]]
1969 // CHECK1: omp.arraycpy.done13:
1970 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP20]], ptr @.gomp_critical_user_.reduction.var)
1971 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1972 // CHECK1: .omp.reduction.case2:
1973 // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX]], i64 5
1974 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY14:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP23]]
1975 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY14]], label [[OMP_ARRAYCPY_DONE23:%.*]], label [[OMP_ARRAYCPY_BODY15:%.*]]
1976 // CHECK1: omp.arraycpy.body15:
1977 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST16:%.*]] = phi ptr [ [[VVAR22]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT21:%.*]], [[OMP_ARRAYCPY_BODY15]] ]
1978 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST17:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT20:%.*]], [[OMP_ARRAYCPY_BODY15]] ]
1979 // CHECK1-NEXT: [[TMP24:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1980 // CHECK1-NEXT: [[TMP25:%.*]] = load i32, ptr [[TMP24]], align 4
1981 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP25]], ptr @.gomp_critical_user_.atomic_reduction.var)
1982 // CHECK1-NEXT: [[ADD_PTR18:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST17]], i64 4
1983 // CHECK1-NEXT: [[ADD_PTR19:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST16]], i64 4
1984 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR18]], ptr noundef [[ADD_PTR19]])
1985 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP25]], ptr @.gomp_critical_user_.atomic_reduction.var)
1986 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT20]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST17]], i32 1
1987 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT21]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST16]], i32 1
1988 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE22:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT20]], [[TMP23]]
1989 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE22]], label [[OMP_ARRAYCPY_DONE23]], label [[OMP_ARRAYCPY_BODY15]]
1990 // CHECK1: omp.arraycpy.done23:
1991 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP20]], ptr @.gomp_critical_user_.reduction.var)
1992 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
1993 // CHECK1: .omp.reduction.default:
1994 // CHECK1-NEXT: [[ARRAY_BEGIN24:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR22]], i32 0, i32 0
1995 // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN24]], i64 5
1996 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1997 // CHECK1: arraydestroy.body:
1998 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP26]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1999 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2000 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2001 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN24]]
2002 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE25:%.*]], label [[ARRAYDESTROY_BODY]]
2003 // CHECK1: arraydestroy.done25:
2004 // CHECK1-NEXT: [[TMP27:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2005 // CHECK1-NEXT: [[TMP28:%.*]] = load i32, ptr [[TMP27]], align 4
2006 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP28]])
2007 // CHECK1-NEXT: ret void
2010 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.13.omp.reduction.reduction_func
2011 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
2012 // CHECK1-NEXT: entry:
2013 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2014 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2015 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2016 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2017 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2018 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2019 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2020 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2021 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2022 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2023 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP7]], i64 5
2024 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP8]]
2025 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2026 // CHECK1: omp.arraycpy.body:
2027 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2028 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2029 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2030 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2031 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
2032 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2033 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2034 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
2035 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
2036 // CHECK1: omp.arraycpy.done3:
2037 // CHECK1-NEXT: ret void
2040 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.14
2041 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(48) [[VAR3:%.*]]) #[[ATTR2]] {
2042 // CHECK1-NEXT: entry:
2043 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2044 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2045 // CHECK1-NEXT: [[VAR3_ADDR:%.*]] = alloca ptr, align 8
2046 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2047 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2048 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2049 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
2050 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2051 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2052 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2053 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2054 // CHECK1-NEXT: [[VAR34:%.*]] = alloca [2 x %struct.S.0], align 16
2055 // CHECK1-NEXT: [[_TMP7:%.*]] = alloca ptr, align 8
2056 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
2057 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x ptr], align 8
2058 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2059 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2060 // CHECK1-NEXT: store ptr [[VAR3]], ptr [[VAR3_ADDR]], align 8
2061 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR3_ADDR]], align 8
2062 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
2063 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2064 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
2065 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2066 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2067 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2068 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2069 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
2070 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[TMP2]], i64 0, i64 1
2071 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[_TMP1]], align 8
2072 // CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[TMP3]], i64 0, i64 2
2073 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[VAR34]], i32 0, i32 0
2074 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[ARRAY_BEGIN]], i64 2
2075 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP4]]
2076 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
2077 // CHECK1: omp.arrayinit.body:
2078 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[ARRAYIDX]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2079 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT6:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2080 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2081 // CHECK1-NEXT: [[ADD_PTR5:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2082 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR5]])
2083 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2084 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT6]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2085 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT6]], [[TMP4]]
2086 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
2087 // CHECK1: omp.arrayinit.done:
2088 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP1]], align 8
2089 // CHECK1-NEXT: [[TMP6:%.*]] = ptrtoint ptr [[TMP5]] to i64
2090 // CHECK1-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
2091 // CHECK1-NEXT: [[TMP8:%.*]] = sub i64 [[TMP6]], [[TMP7]]
2092 // CHECK1-NEXT: [[TMP9:%.*]] = sdiv exact i64 [[TMP8]], ptrtoint (ptr getelementptr ([[STRUCT_S_0]], ptr null, i32 1) to i64)
2093 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[VAR34]], i64 [[TMP9]]
2094 // CHECK1-NEXT: store ptr [[TMP10]], ptr [[_TMP7]], align 8
2095 // CHECK1-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2096 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
2097 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP12]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2098 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2099 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP13]], 9
2100 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2101 // CHECK1: cond.true:
2102 // CHECK1-NEXT: br label [[COND_END:%.*]]
2103 // CHECK1: cond.false:
2104 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2105 // CHECK1-NEXT: br label [[COND_END]]
2106 // CHECK1: cond.end:
2107 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
2108 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2109 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2110 // CHECK1-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
2111 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2112 // CHECK1: omp.inner.for.cond:
2113 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2114 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2115 // CHECK1-NEXT: [[CMP8:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
2116 // CHECK1-NEXT: br i1 [[CMP8]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2117 // CHECK1: omp.inner.for.cond.cleanup:
2118 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2119 // CHECK1: omp.inner.for.body:
2120 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2121 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
2122 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2123 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2124 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2125 // CHECK1: omp.body.continue:
2126 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2127 // CHECK1: omp.inner.for.inc:
2128 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2129 // CHECK1-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP19]], 1
2130 // CHECK1-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4
2131 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
2132 // CHECK1: omp.inner.for.end:
2133 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2134 // CHECK1: omp.loop.exit:
2135 // CHECK1-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2136 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
2137 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP21]])
2138 // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
2139 // CHECK1-NEXT: store ptr [[VAR34]], ptr [[TMP22]], align 8
2140 // CHECK1-NEXT: [[TMP23:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2141 // CHECK1-NEXT: [[TMP24:%.*]] = load i32, ptr [[TMP23]], align 4
2142 // CHECK1-NEXT: [[TMP25:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP24]], i32 1, i64 8, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.14.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
2143 // CHECK1-NEXT: switch i32 [[TMP25]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
2144 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
2145 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
2147 // CHECK1: .omp.reduction.case1:
2148 // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX]], i64 2
2149 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP26]]
2150 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE16:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2151 // CHECK1: omp.arraycpy.body:
2152 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST10:%.*]] = phi ptr [ [[VAR34]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2153 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST11:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT14:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2154 // CHECK1-NEXT: [[ADD_PTR12:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i64 4
2155 // CHECK1-NEXT: [[ADD_PTR13:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST10]], i64 4
2156 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR12]], ptr noundef [[ADD_PTR13]])
2157 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT14]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST11]], i32 1
2158 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST10]], i32 1
2159 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE15:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT14]], [[TMP26]]
2160 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE15]], label [[OMP_ARRAYCPY_DONE16]], label [[OMP_ARRAYCPY_BODY]]
2161 // CHECK1: omp.arraycpy.done16:
2162 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP24]], ptr @.gomp_critical_user_.reduction.var)
2163 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2164 // CHECK1: .omp.reduction.case2:
2165 // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[ARRAYIDX]], i64 2
2166 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY17:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP27]]
2167 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY17]], label [[OMP_ARRAYCPY_DONE26:%.*]], label [[OMP_ARRAYCPY_BODY18:%.*]]
2168 // CHECK1: omp.arraycpy.body18:
2169 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST19:%.*]] = phi ptr [ [[VAR34]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT24:%.*]], [[OMP_ARRAYCPY_BODY18]] ]
2170 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST20:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT23:%.*]], [[OMP_ARRAYCPY_BODY18]] ]
2171 // CHECK1-NEXT: [[TMP28:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2172 // CHECK1-NEXT: [[TMP29:%.*]] = load i32, ptr [[TMP28]], align 4
2173 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP29]], ptr @.gomp_critical_user_.atomic_reduction.var)
2174 // CHECK1-NEXT: [[ADD_PTR21:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i64 4
2175 // CHECK1-NEXT: [[ADD_PTR22:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i64 4
2176 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR21]], ptr noundef [[ADD_PTR22]])
2177 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP29]], ptr @.gomp_critical_user_.atomic_reduction.var)
2178 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT23]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST20]], i32 1
2179 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT24]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST19]], i32 1
2180 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE25:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT23]], [[TMP27]]
2181 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE25]], label [[OMP_ARRAYCPY_DONE26]], label [[OMP_ARRAYCPY_BODY18]]
2182 // CHECK1: omp.arraycpy.done26:
2183 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP24]], ptr @.gomp_critical_user_.reduction.var)
2184 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2185 // CHECK1: .omp.reduction.default:
2186 // CHECK1-NEXT: [[ARRAY_BEGIN27:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[VAR34]], i32 0, i32 0
2187 // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN27]], i64 2
2188 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2189 // CHECK1: arraydestroy.body:
2190 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP30]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2191 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2192 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2193 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN27]]
2194 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE28:%.*]], label [[ARRAYDESTROY_BODY]]
2195 // CHECK1: arraydestroy.done28:
2196 // CHECK1-NEXT: [[TMP31:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2197 // CHECK1-NEXT: [[TMP32:%.*]] = load i32, ptr [[TMP31]], align 4
2198 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP32]])
2199 // CHECK1-NEXT: ret void
2202 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.14.omp.reduction.reduction_func
2203 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
2204 // CHECK1-NEXT: entry:
2205 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2206 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2207 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2208 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2209 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2210 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2211 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2212 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2213 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2214 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2215 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP7]], i64 2
2216 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP8]]
2217 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2218 // CHECK1: omp.arraycpy.body:
2219 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2220 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2221 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2222 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2223 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
2224 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2225 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2226 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
2227 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
2228 // CHECK1: omp.arraycpy.done3:
2229 // CHECK1-NEXT: ret void
2232 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.15
2233 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(48) [[VAR3:%.*]]) #[[ATTR2]] {
2234 // CHECK1-NEXT: entry:
2235 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2236 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2237 // CHECK1-NEXT: [[VAR3_ADDR:%.*]] = alloca ptr, align 8
2238 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2239 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2240 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2241 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
2242 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2243 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2244 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2245 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2246 // CHECK1-NEXT: [[_TMP5:%.*]] = alloca ptr, align 8
2247 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
2248 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x ptr], align 8
2249 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2250 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2251 // CHECK1-NEXT: store ptr [[VAR3]], ptr [[VAR3_ADDR]], align 8
2252 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR3_ADDR]], align 8
2253 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
2254 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2255 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
2256 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2257 // CHECK1-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2258 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2259 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2260 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
2261 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2262 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2263 // CHECK1-NEXT: [[DOTVAR3__VOID_ADDR:%.*]] = call ptr @__kmpc_alloc(i32 [[TMP4]], i64 48, ptr inttoptr (i64 6 to ptr))
2264 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[DOTVAR3__VOID_ADDR]], i32 0, i32 0
2265 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[ARRAY_BEGIN]], i64 4
2266 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP5]]
2267 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
2268 // CHECK1: omp.arrayinit.body:
2269 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2270 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT4:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2271 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2272 // CHECK1-NEXT: [[ADD_PTR3:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2273 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR3]])
2274 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2275 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT4]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2276 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT4]], [[TMP5]]
2277 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
2278 // CHECK1: omp.arrayinit.done:
2279 // CHECK1-NEXT: store ptr [[DOTVAR3__VOID_ADDR]], ptr [[_TMP5]], align 8
2280 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP4]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2281 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2282 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP6]], 9
2283 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2284 // CHECK1: cond.true:
2285 // CHECK1-NEXT: br label [[COND_END:%.*]]
2286 // CHECK1: cond.false:
2287 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2288 // CHECK1-NEXT: br label [[COND_END]]
2289 // CHECK1: cond.end:
2290 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP7]], [[COND_FALSE]] ]
2291 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2292 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2293 // CHECK1-NEXT: store i32 [[TMP8]], ptr [[DOTOMP_IV]], align 4
2294 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2295 // CHECK1: omp.inner.for.cond:
2296 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2297 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2298 // CHECK1-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP9]], [[TMP10]]
2299 // CHECK1-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2300 // CHECK1: omp.inner.for.cond.cleanup:
2301 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2302 // CHECK1: omp.inner.for.body:
2303 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2304 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP11]], 1
2305 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2306 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2307 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2308 // CHECK1: omp.body.continue:
2309 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2310 // CHECK1: omp.inner.for.inc:
2311 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2312 // CHECK1-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP12]], 1
2313 // CHECK1-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
2314 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
2315 // CHECK1: omp.inner.for.end:
2316 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2317 // CHECK1: omp.loop.exit:
2318 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
2319 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
2320 // CHECK1-NEXT: store ptr [[DOTVAR3__VOID_ADDR]], ptr [[TMP13]], align 8
2321 // CHECK1-NEXT: [[TMP14:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP4]], i32 1, i64 8, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @main.omp_outlined.15.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
2322 // CHECK1-NEXT: switch i32 [[TMP14]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
2323 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
2324 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
2326 // CHECK1: .omp.reduction.case1:
2327 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[TMP2]], i64 4
2328 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP2]], [[TMP15]]
2329 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE14:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2330 // CHECK1: omp.arraycpy.body:
2331 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST8:%.*]] = phi ptr [ [[DOTVAR3__VOID_ADDR]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2332 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST9:%.*]] = phi ptr [ [[TMP2]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT12:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2333 // CHECK1-NEXT: [[ADD_PTR10:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST9]], i64 4
2334 // CHECK1-NEXT: [[ADD_PTR11:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST8]], i64 4
2335 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR10]], ptr noundef [[ADD_PTR11]])
2336 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT12]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST9]], i32 1
2337 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST8]], i32 1
2338 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE13:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT12]], [[TMP15]]
2339 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE13]], label [[OMP_ARRAYCPY_DONE14]], label [[OMP_ARRAYCPY_BODY]]
2340 // CHECK1: omp.arraycpy.done14:
2341 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP4]], ptr @.gomp_critical_user_.reduction.var)
2342 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2343 // CHECK1: .omp.reduction.case2:
2344 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr [[STRUCT_S_0]], ptr [[TMP2]], i64 4
2345 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY15:%.*]] = icmp eq ptr [[TMP2]], [[TMP16]]
2346 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY15]], label [[OMP_ARRAYCPY_DONE24:%.*]], label [[OMP_ARRAYCPY_BODY16:%.*]]
2347 // CHECK1: omp.arraycpy.body16:
2348 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST17:%.*]] = phi ptr [ [[DOTVAR3__VOID_ADDR]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT22:%.*]], [[OMP_ARRAYCPY_BODY16]] ]
2349 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST18:%.*]] = phi ptr [ [[TMP2]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT21:%.*]], [[OMP_ARRAYCPY_BODY16]] ]
2350 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP4]], ptr @.gomp_critical_user_.atomic_reduction.var)
2351 // CHECK1-NEXT: [[ADD_PTR19:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST18]], i64 4
2352 // CHECK1-NEXT: [[ADD_PTR20:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST17]], i64 4
2353 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR19]], ptr noundef [[ADD_PTR20]])
2354 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP4]], ptr @.gomp_critical_user_.atomic_reduction.var)
2355 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT21]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST18]], i32 1
2356 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT22]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST17]], i32 1
2357 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE23:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT21]], [[TMP16]]
2358 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE23]], label [[OMP_ARRAYCPY_DONE24]], label [[OMP_ARRAYCPY_BODY16]]
2359 // CHECK1: omp.arraycpy.done24:
2360 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP4]], ptr @.gomp_critical_user_.reduction.var)
2361 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2362 // CHECK1: .omp.reduction.default:
2363 // CHECK1-NEXT: [[ARRAY_BEGIN25:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[DOTVAR3__VOID_ADDR]], i32 0, i32 0
2364 // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN25]], i64 4
2365 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2366 // CHECK1: arraydestroy.body:
2367 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP17]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2368 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2369 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2370 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN25]]
2371 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE26:%.*]], label [[ARRAYDESTROY_BODY]]
2372 // CHECK1: arraydestroy.done26:
2373 // CHECK1-NEXT: call void @__kmpc_free(i32 [[TMP4]], ptr [[DOTVAR3__VOID_ADDR]], ptr inttoptr (i64 6 to ptr))
2374 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP4]])
2375 // CHECK1-NEXT: ret void
2378 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.15.omp.reduction.reduction_func
2379 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
2380 // CHECK1-NEXT: entry:
2381 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2382 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2383 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2384 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2385 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2386 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2387 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2388 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2389 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2390 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2391 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S_0:%.*]], ptr [[TMP7]], i64 4
2392 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP8]]
2393 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2394 // CHECK1: omp.arraycpy.body:
2395 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2396 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2397 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2398 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2399 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
2400 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2401 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2402 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
2403 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
2404 // CHECK1: omp.arraycpy.done3:
2405 // CHECK1-NEXT: ret void
2408 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v
2409 // CHECK1-SAME: () #[[ATTR0]] {
2410 // CHECK1-NEXT: entry:
2411 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2412 // CHECK1-NEXT: [[T:%.*]] = alloca i32, align 4
2413 // CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2414 // CHECK1-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
2415 // CHECK1-NEXT: [[T_VAR1:%.*]] = alloca i32, align 4
2416 // CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
2417 // CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 16
2418 // CHECK1-NEXT: [[VAR:%.*]] = alloca ptr, align 8
2419 // CHECK1-NEXT: [[VAR1:%.*]] = alloca [[STRUCT_S]], align 4
2420 // CHECK1-NEXT: [[ARR:%.*]] = alloca [42 x %struct.S], align 16
2421 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]])
2422 // CHECK1-NEXT: store i32 0, ptr [[T_VAR]], align 4
2423 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiLi42EET_v.vec, i64 8, i1 false)
2424 // CHECK1-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
2425 // CHECK1-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_BEGIN]], i32 noundef 1)
2426 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
2427 // CHECK1-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
2428 // CHECK1-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
2429 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]])
2430 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[ARR]], i32 0, i32 0
2431 // CHECK1-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 42
2432 // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2433 // CHECK1: arrayctor.loop:
2434 // CHECK1-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2435 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR]])
2436 // CHECK1-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
2437 // CHECK1-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2438 // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2439 // CHECK1: arrayctor.cont:
2440 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
2441 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 6, ptr @_Z5tmainIiLi42EET_v.omp_outlined, ptr [[T_VAR]], ptr [[TMP0]], ptr [[VAR1]], ptr [[T_VAR1]], ptr [[VEC]], ptr [[S_ARR]])
2442 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[VAR]], align 8
2443 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_Z5tmainIiLi42EET_v.omp_outlined.22, ptr [[T_VAR]], ptr [[VEC]], ptr [[S_ARR]], ptr [[TMP1]])
2444 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR]], align 8
2445 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @_Z5tmainIiLi42EET_v.omp_outlined.25, ptr [[ARR]], ptr [[VEC]], ptr [[T_VAR]], ptr [[S_ARR]], ptr [[TMP2]])
2446 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
2447 // CHECK1-NEXT: [[ARRAY_BEGIN1:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[ARR]], i32 0, i32 0
2448 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN1]], i64 42
2449 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2450 // CHECK1: arraydestroy.body:
2451 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP3]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2452 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2453 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2454 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN1]]
2455 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
2456 // CHECK1: arraydestroy.done2:
2457 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]]) #[[ATTR4]]
2458 // CHECK1-NEXT: [[ARRAY_BEGIN3:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
2459 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN3]], i64 2
2460 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY4:%.*]]
2461 // CHECK1: arraydestroy.body4:
2462 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST5:%.*]] = phi ptr [ [[TMP4]], [[ARRAYDESTROY_DONE2]] ], [ [[ARRAYDESTROY_ELEMENT6:%.*]], [[ARRAYDESTROY_BODY4]] ]
2463 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT6]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST5]], i64 -1
2464 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT6]]) #[[ATTR4]]
2465 // CHECK1-NEXT: [[ARRAYDESTROY_DONE7:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT6]], [[ARRAY_BEGIN3]]
2466 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE7]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY4]]
2467 // CHECK1: arraydestroy.done8:
2468 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]]) #[[ATTR4]]
2469 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[RETVAL]], align 4
2470 // CHECK1-NEXT: ret i32 [[TMP5]]
2473 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
2474 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
2475 // CHECK1-NEXT: entry:
2476 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2477 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2478 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2479 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
2480 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 2
2481 // CHECK1-NEXT: [[TMP1:%.*]] = load volatile double, ptr @g, align 8
2482 // CHECK1-NEXT: [[CONV:%.*]] = fptrunc double [[TMP1]] to float
2483 // CHECK1-NEXT: store float [[CONV]], ptr [[F]], align 4
2484 // CHECK1-NEXT: ret void
2487 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
2488 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
2489 // CHECK1-NEXT: entry:
2490 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2491 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
2492 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2493 // CHECK1-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
2494 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2495 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
2496 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 2
2497 // CHECK1-NEXT: [[TMP1:%.*]] = load float, ptr [[A_ADDR]], align 4
2498 // CHECK1-NEXT: [[CONV:%.*]] = fpext float [[TMP1]] to double
2499 // CHECK1-NEXT: [[TMP2:%.*]] = load volatile double, ptr @g, align 8
2500 // CHECK1-NEXT: [[ADD:%.*]] = fadd double [[CONV]], [[TMP2]]
2501 // CHECK1-NEXT: [[CONV2:%.*]] = fptrunc double [[ADD]] to float
2502 // CHECK1-NEXT: store float [[CONV2]], ptr [[F]], align 4
2503 // CHECK1-NEXT: ret void
2506 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
2507 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
2508 // CHECK1-NEXT: entry:
2509 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2510 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2511 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2512 // CHECK1-NEXT: ret void
2515 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
2516 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
2517 // CHECK1-NEXT: entry:
2518 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2519 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2520 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2521 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2522 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2523 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2524 // CHECK1-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], i32 noundef [[TMP0]])
2525 // CHECK1-NEXT: ret void
2528 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined
2529 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR1:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(24) [[S_ARR:%.*]]) #[[ATTR2]] {
2530 // CHECK1-NEXT: entry:
2531 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2532 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2533 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
2534 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
2535 // CHECK1-NEXT: [[VAR1_ADDR:%.*]] = alloca ptr, align 8
2536 // CHECK1-NEXT: [[T_VAR1_ADDR:%.*]] = alloca ptr, align 8
2537 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
2538 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
2539 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2540 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2541 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2542 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
2543 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2544 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2545 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2546 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2547 // CHECK1-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
2548 // CHECK1-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2549 // CHECK1-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
2550 // CHECK1-NEXT: [[VAR17:%.*]] = alloca [[STRUCT_S]], align 4
2551 // CHECK1-NEXT: [[T_VAR18:%.*]] = alloca i32, align 4
2552 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
2553 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [4 x ptr], align 8
2554 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2555 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2556 // CHECK1-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
2557 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
2558 // CHECK1-NEXT: store ptr [[VAR1]], ptr [[VAR1_ADDR]], align 8
2559 // CHECK1-NEXT: store ptr [[T_VAR1]], ptr [[T_VAR1_ADDR]], align 8
2560 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
2561 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
2562 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
2563 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
2564 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR1_ADDR]], align 8
2565 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[T_VAR1_ADDR]], align 8
2566 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
2567 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
2568 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[TMP]], align 8
2569 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP]], align 8
2570 // CHECK1-NEXT: store ptr [[TMP6]], ptr [[_TMP1]], align 8
2571 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2572 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2573 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2574 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2575 // CHECK1-NEXT: call void @.omp_initializer..17(ptr noundef [[T_VAR3]], ptr noundef [[TMP0]])
2576 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP1]], align 8
2577 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
2578 // CHECK1-NEXT: [[ADD_PTR5:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
2579 // CHECK1-NEXT: call void @.omp_initializer..4(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR5]])
2580 // CHECK1-NEXT: store ptr [[VAR4]], ptr [[_TMP6]], align 8
2581 // CHECK1-NEXT: call void @.omp_initializer..19(ptr noundef [[VAR17]], ptr noundef [[TMP2]])
2582 // CHECK1-NEXT: call void @.omp_initializer..21(ptr noundef [[T_VAR18]], ptr noundef [[TMP3]])
2583 // CHECK1-NEXT: [[TMP8:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2584 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP8]], align 4
2585 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP9]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2586 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2587 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP10]], 1
2588 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2589 // CHECK1: cond.true:
2590 // CHECK1-NEXT: br label [[COND_END:%.*]]
2591 // CHECK1: cond.false:
2592 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2593 // CHECK1-NEXT: br label [[COND_END]]
2594 // CHECK1: cond.end:
2595 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP11]], [[COND_FALSE]] ]
2596 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2597 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2598 // CHECK1-NEXT: store i32 [[TMP12]], ptr [[DOTOMP_IV]], align 4
2599 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2600 // CHECK1: omp.inner.for.cond:
2601 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2602 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2603 // CHECK1-NEXT: [[CMP9:%.*]] = icmp sle i32 [[TMP13]], [[TMP14]]
2604 // CHECK1-NEXT: br i1 [[CMP9]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2605 // CHECK1: omp.inner.for.cond.cleanup:
2606 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2607 // CHECK1: omp.inner.for.body:
2608 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2609 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP15]], 1
2610 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2611 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2612 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[T_VAR3]], align 4
2613 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[I]], align 4
2614 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP17]] to i64
2615 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP4]], i64 0, i64 [[IDXPROM]]
2616 // CHECK1-NEXT: store i32 [[TMP16]], ptr [[ARRAYIDX]], align 4
2617 // CHECK1-NEXT: [[TMP18:%.*]] = load ptr, ptr [[_TMP6]], align 8
2618 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[I]], align 4
2619 // CHECK1-NEXT: [[IDXPROM10:%.*]] = sext i32 [[TMP19]] to i64
2620 // CHECK1-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP5]], i64 0, i64 [[IDXPROM10]]
2621 // CHECK1-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX11]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP18]])
2622 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2623 // CHECK1: omp.body.continue:
2624 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2625 // CHECK1: omp.inner.for.inc:
2626 // CHECK1-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2627 // CHECK1-NEXT: [[ADD12:%.*]] = add nsw i32 [[TMP20]], 1
2628 // CHECK1-NEXT: store i32 [[ADD12]], ptr [[DOTOMP_IV]], align 4
2629 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
2630 // CHECK1: omp.inner.for.end:
2631 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2632 // CHECK1: omp.loop.exit:
2633 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP9]])
2634 // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
2635 // CHECK1-NEXT: store ptr [[T_VAR3]], ptr [[TMP21]], align 8
2636 // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 1
2637 // CHECK1-NEXT: store ptr [[VAR4]], ptr [[TMP22]], align 8
2638 // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 2
2639 // CHECK1-NEXT: store ptr [[VAR17]], ptr [[TMP23]], align 8
2640 // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 3
2641 // CHECK1-NEXT: store ptr [[T_VAR18]], ptr [[TMP24]], align 8
2642 // CHECK1-NEXT: [[TMP25:%.*]] = call i32 @__kmpc_reduce_nowait(ptr @[[GLOB3]], i32 [[TMP9]], i32 4, i64 32, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @_Z5tmainIiLi42EET_v.omp_outlined.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
2643 // CHECK1-NEXT: switch i32 [[TMP25]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
2644 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
2645 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
2647 // CHECK1: .omp.reduction.case1:
2648 // CHECK1-NEXT: call void @.omp_combiner..16(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
2649 // CHECK1-NEXT: [[ADD_PTR13:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
2650 // CHECK1-NEXT: [[ADD_PTR14:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
2651 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR13]], ptr noundef [[ADD_PTR14]])
2652 // CHECK1-NEXT: call void @.omp_combiner..18(ptr noundef [[TMP2]], ptr noundef [[VAR17]])
2653 // CHECK1-NEXT: call void @.omp_combiner..20(ptr noundef [[TMP3]], ptr noundef [[T_VAR18]])
2654 // CHECK1-NEXT: call void @__kmpc_end_reduce_nowait(ptr @[[GLOB3]], i32 [[TMP9]], ptr @.gomp_critical_user_.reduction.var)
2655 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2656 // CHECK1: .omp.reduction.case2:
2657 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2658 // CHECK1-NEXT: call void @.omp_combiner..16(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
2659 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2660 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2661 // CHECK1-NEXT: [[ADD_PTR15:%.*]] = getelementptr inbounds i8, ptr [[TMP7]], i64 4
2662 // CHECK1-NEXT: [[ADD_PTR16:%.*]] = getelementptr inbounds i8, ptr [[VAR4]], i64 4
2663 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR15]], ptr noundef [[ADD_PTR16]])
2664 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2665 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2666 // CHECK1-NEXT: call void @.omp_combiner..18(ptr noundef [[TMP2]], ptr noundef [[VAR17]])
2667 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2668 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2669 // CHECK1-NEXT: call void @.omp_combiner..20(ptr noundef [[TMP3]], ptr noundef [[T_VAR18]])
2670 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP9]], ptr @.gomp_critical_user_.atomic_reduction.var)
2671 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2672 // CHECK1: .omp.reduction.default:
2673 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR17]]) #[[ATTR4]]
2674 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR4]]) #[[ATTR4]]
2675 // CHECK1-NEXT: ret void
2678 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..16
2679 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2680 // CHECK1-NEXT: entry:
2681 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2682 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2683 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2684 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2685 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2686 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2687 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP2]], align 4
2688 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 1513, [[TMP4]]
2689 // CHECK1-NEXT: store i32 [[ADD]], ptr [[TMP3]], align 4
2690 // CHECK1-NEXT: ret void
2693 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..17
2694 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2695 // CHECK1-NEXT: entry:
2696 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2697 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2698 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2699 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2700 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2701 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2702 // CHECK1-NEXT: store i32 321, ptr [[TMP3]], align 4
2703 // CHECK1-NEXT: ret void
2706 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..18
2707 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2708 // CHECK1-NEXT: entry:
2709 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2710 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2711 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2712 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2713 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2714 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2715 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[TMP2]], i32 0, i32 2
2716 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[F]], align 4
2717 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 17, [[TMP4]]
2718 // CHECK1-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[TMP3]], i32 0, i32 2
2719 // CHECK1-NEXT: store i32 [[MUL]], ptr [[F2]], align 4
2720 // CHECK1-NEXT: ret void
2723 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..19
2724 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2725 // CHECK1-NEXT: entry:
2726 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2727 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2728 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2729 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2730 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2731 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2732 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[TMP3]], i64 4
2733 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[TMP2]], i64 4
2734 // CHECK1-NEXT: call void @_Z5init2R6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[ADD_PTR]], ptr noundef nonnull align 4 dereferenceable(4) [[ADD_PTR2]])
2735 // CHECK1-NEXT: ret void
2738 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..20
2739 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2740 // CHECK1-NEXT: entry:
2741 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2742 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2743 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2744 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2745 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2746 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2747 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP2]], align 4
2748 // CHECK1-NEXT: [[SUB:%.*]] = sub nsw i32 47, [[TMP4]]
2749 // CHECK1-NEXT: store i32 [[SUB]], ptr [[TMP3]], align 4
2750 // CHECK1-NEXT: ret void
2753 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..21
2754 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2755 // CHECK1-NEXT: entry:
2756 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2757 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2758 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2759 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2760 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2761 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2762 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP2]], align 4
2763 // CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 432, [[TMP4]]
2764 // CHECK1-NEXT: store i32 [[DIV]], ptr [[TMP3]], align 4
2765 // CHECK1-NEXT: ret void
2768 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined.omp.reduction.reduction_func
2769 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
2770 // CHECK1-NEXT: entry:
2771 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2772 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2773 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2774 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2775 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2776 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2777 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 0
2778 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2779 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 0
2780 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2781 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 1
2782 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
2783 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 1
2784 // CHECK1-NEXT: [[TMP11:%.*]] = load ptr, ptr [[TMP10]], align 8
2785 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 2
2786 // CHECK1-NEXT: [[TMP13:%.*]] = load ptr, ptr [[TMP12]], align 8
2787 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 2
2788 // CHECK1-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
2789 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP3]], i64 0, i64 3
2790 // CHECK1-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
2791 // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [4 x ptr], ptr [[TMP2]], i64 0, i64 3
2792 // CHECK1-NEXT: [[TMP19:%.*]] = load ptr, ptr [[TMP18]], align 8
2793 // CHECK1-NEXT: call void @.omp_combiner..16(ptr noundef [[TMP7]], ptr noundef [[TMP5]])
2794 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[TMP11]], i64 4
2795 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[TMP9]], i64 4
2796 // CHECK1-NEXT: call void @.omp_combiner..3(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
2797 // CHECK1-NEXT: call void @.omp_combiner..18(ptr noundef [[TMP15]], ptr noundef [[TMP13]])
2798 // CHECK1-NEXT: call void @.omp_combiner..20(ptr noundef [[TMP19]], ptr noundef [[TMP17]])
2799 // CHECK1-NEXT: ret void
2802 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined.22
2803 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(24) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR:%.*]]) #[[ATTR2]] {
2804 // CHECK1-NEXT: entry:
2805 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2806 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2807 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
2808 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
2809 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
2810 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
2811 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2812 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2813 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2814 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
2815 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2816 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2817 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2818 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2819 // CHECK1-NEXT: [[T_VAR3:%.*]] = alloca i32, align 4
2820 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
2821 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x ptr], align 8
2822 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2823 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2824 // CHECK1-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
2825 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
2826 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
2827 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
2828 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
2829 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
2830 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
2831 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
2832 // CHECK1-NEXT: store ptr [[TMP3]], ptr [[TMP]], align 8
2833 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[TMP]], align 8
2834 // CHECK1-NEXT: store ptr [[TMP4]], ptr [[_TMP1]], align 8
2835 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2836 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2837 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2838 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2839 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr @.init.23, align 4
2840 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[T_VAR3]], align 4
2841 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2842 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
2843 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP7]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2844 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2845 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP8]], 1
2846 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2847 // CHECK1: cond.true:
2848 // CHECK1-NEXT: br label [[COND_END:%.*]]
2849 // CHECK1: cond.false:
2850 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2851 // CHECK1-NEXT: br label [[COND_END]]
2852 // CHECK1: cond.end:
2853 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP9]], [[COND_FALSE]] ]
2854 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2855 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2856 // CHECK1-NEXT: store i32 [[TMP10]], ptr [[DOTOMP_IV]], align 4
2857 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2858 // CHECK1: omp.inner.for.cond:
2859 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2860 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2861 // CHECK1-NEXT: [[CMP4:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
2862 // CHECK1-NEXT: br i1 [[CMP4]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2863 // CHECK1: omp.inner.for.body:
2864 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2865 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP13]], 1
2866 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2867 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2868 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[T_VAR3]], align 4
2869 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[I]], align 4
2870 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP15]] to i64
2871 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP1]], i64 0, i64 [[IDXPROM]]
2872 // CHECK1-NEXT: store i32 [[TMP14]], ptr [[ARRAYIDX]], align 4
2873 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP1]], align 8
2874 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[I]], align 4
2875 // CHECK1-NEXT: [[IDXPROM5:%.*]] = sext i32 [[TMP17]] to i64
2876 // CHECK1-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP2]], i64 0, i64 [[IDXPROM5]]
2877 // CHECK1-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX6]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP16]])
2878 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2879 // CHECK1: omp.body.continue:
2880 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2881 // CHECK1: omp.inner.for.inc:
2882 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2883 // CHECK1-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP18]], 1
2884 // CHECK1-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
2885 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
2886 // CHECK1: omp.inner.for.end:
2887 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2888 // CHECK1: omp.loop.exit:
2889 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP7]])
2890 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
2891 // CHECK1-NEXT: store ptr [[T_VAR3]], ptr [[TMP19]], align 8
2892 // CHECK1-NEXT: [[TMP20:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP7]], i32 1, i64 8, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @_Z5tmainIiLi42EET_v.omp_outlined.22.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
2893 // CHECK1-NEXT: switch i32 [[TMP20]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
2894 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
2895 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
2897 // CHECK1: .omp.reduction.case1:
2898 // CHECK1-NEXT: call void @.omp_combiner..24(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
2899 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP7]], ptr @.gomp_critical_user_.reduction.var)
2900 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2901 // CHECK1: .omp.reduction.case2:
2902 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP7]], ptr @.gomp_critical_user_.atomic_reduction.var)
2903 // CHECK1-NEXT: call void @.omp_combiner..24(ptr noundef [[TMP0]], ptr noundef [[T_VAR3]])
2904 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP7]], ptr @.gomp_critical_user_.atomic_reduction.var)
2905 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP7]], ptr @.gomp_critical_user_.reduction.var)
2906 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
2907 // CHECK1: .omp.reduction.default:
2908 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP7]])
2909 // CHECK1-NEXT: ret void
2912 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined.22.omp.reduction.reduction_func
2913 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
2914 // CHECK1-NEXT: entry:
2915 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2916 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2917 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2918 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2919 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2920 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2921 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2922 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2923 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2924 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2925 // CHECK1-NEXT: call void @.omp_combiner..24(ptr noundef [[TMP7]], ptr noundef [[TMP5]])
2926 // CHECK1-NEXT: ret void
2929 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..24
2930 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
2931 // CHECK1-NEXT: entry:
2932 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2933 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2934 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2935 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2936 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2937 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2938 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP2]], align 4
2939 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 17, [[TMP4]]
2940 // CHECK1-NEXT: store i32 [[MUL]], ptr [[TMP3]], align 4
2941 // CHECK1-NEXT: ret void
2944 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined.25
2945 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(504) [[ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[T_VAR:%.*]], ptr noundef nonnull align 4 dereferenceable(24) [[S_ARR:%.*]], ptr noundef nonnull align 4 dereferenceable(12) [[VAR:%.*]]) #[[ATTR2]] {
2946 // CHECK1-NEXT: entry:
2947 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2948 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2949 // CHECK1-NEXT: [[ARR_ADDR:%.*]] = alloca ptr, align 8
2950 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
2951 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca ptr, align 8
2952 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
2953 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
2954 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2955 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2956 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2957 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
2958 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2959 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2960 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2961 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2962 // CHECK1-NEXT: [[ARR4:%.*]] = alloca [40 x %struct.S], align 16
2963 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
2964 // CHECK1-NEXT: [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x ptr], align 8
2965 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2966 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2967 // CHECK1-NEXT: store ptr [[ARR]], ptr [[ARR_ADDR]], align 8
2968 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
2969 // CHECK1-NEXT: store ptr [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
2970 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
2971 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
2972 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[ARR_ADDR]], align 8
2973 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
2974 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[T_VAR_ADDR]], align 8
2975 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
2976 // CHECK1-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
2977 // CHECK1-NEXT: store ptr [[TMP4]], ptr [[TMP]], align 8
2978 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 8
2979 // CHECK1-NEXT: store ptr [[TMP5]], ptr [[_TMP1]], align 8
2980 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2981 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2982 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2983 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2984 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[TMP0]], i64 0, i64 1
2985 // CHECK1-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[TMP0]], i64 0, i64 40
2986 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [40 x %struct.S], ptr [[ARR4]], i32 0, i32 0
2987 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr [[STRUCT_S:%.*]], ptr [[ARRAY_BEGIN]], i64 40
2988 // CHECK1-NEXT: [[OMP_ARRAYINIT_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP6]]
2989 // CHECK1-NEXT: br i1 [[OMP_ARRAYINIT_ISEMPTY]], label [[OMP_ARRAYINIT_DONE:%.*]], label [[OMP_ARRAYINIT_BODY:%.*]]
2990 // CHECK1: omp.arrayinit.body:
2991 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[ARRAYIDX]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2992 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT6:%.*]], [[OMP_ARRAYINIT_BODY]] ]
2993 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
2994 // CHECK1-NEXT: [[ADD_PTR5:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
2995 // CHECK1-NEXT: call void @.omp_initializer..27(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR5]])
2996 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2997 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT6]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2998 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT6]], [[TMP6]]
2999 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYINIT_DONE]], label [[OMP_ARRAYINIT_BODY]]
3000 // CHECK1: omp.arrayinit.done:
3001 // CHECK1-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP0]] to i64
3002 // CHECK1-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[ARRAYIDX]] to i64
3003 // CHECK1-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
3004 // CHECK1-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (ptr getelementptr ([[STRUCT_S]], ptr null, i32 1) to i64)
3005 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr [[STRUCT_S]], ptr [[ARR4]], i64 [[TMP10]]
3006 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3007 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
3008 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP13]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3009 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3010 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP14]], 1
3011 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3012 // CHECK1: cond.true:
3013 // CHECK1-NEXT: br label [[COND_END:%.*]]
3014 // CHECK1: cond.false:
3015 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3016 // CHECK1-NEXT: br label [[COND_END]]
3017 // CHECK1: cond.end:
3018 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP15]], [[COND_FALSE]] ]
3019 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
3020 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3021 // CHECK1-NEXT: store i32 [[TMP16]], ptr [[DOTOMP_IV]], align 4
3022 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3023 // CHECK1: omp.inner.for.cond:
3024 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3025 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3026 // CHECK1-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP17]], [[TMP18]]
3027 // CHECK1-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
3028 // CHECK1: omp.inner.for.cond.cleanup:
3029 // CHECK1-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
3030 // CHECK1: omp.inner.for.body:
3031 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3032 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP19]], 1
3033 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3034 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
3035 // CHECK1-NEXT: [[TMP20:%.*]] = load i32, ptr [[TMP2]], align 4
3036 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[I]], align 4
3037 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP21]] to i64
3038 // CHECK1-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x i32], ptr [[TMP1]], i64 0, i64 [[IDXPROM]]
3039 // CHECK1-NEXT: store i32 [[TMP20]], ptr [[ARRAYIDX8]], align 4
3040 // CHECK1-NEXT: [[TMP22:%.*]] = load ptr, ptr [[_TMP1]], align 8
3041 // CHECK1-NEXT: [[TMP23:%.*]] = load i32, ptr [[I]], align 4
3042 // CHECK1-NEXT: [[IDXPROM9:%.*]] = sext i32 [[TMP23]] to i64
3043 // CHECK1-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[TMP3]], i64 0, i64 [[IDXPROM9]]
3044 // CHECK1-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX10]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP22]])
3045 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3046 // CHECK1: omp.body.continue:
3047 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3048 // CHECK1: omp.inner.for.inc:
3049 // CHECK1-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3050 // CHECK1-NEXT: [[ADD11:%.*]] = add nsw i32 [[TMP24]], 1
3051 // CHECK1-NEXT: store i32 [[ADD11]], ptr [[DOTOMP_IV]], align 4
3052 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
3053 // CHECK1: omp.inner.for.end:
3054 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3055 // CHECK1: omp.loop.exit:
3056 // CHECK1-NEXT: [[TMP25:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3057 // CHECK1-NEXT: [[TMP26:%.*]] = load i32, ptr [[TMP25]], align 4
3058 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP26]])
3059 // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
3060 // CHECK1-NEXT: store ptr [[ARR4]], ptr [[TMP27]], align 8
3061 // CHECK1-NEXT: [[TMP28:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3062 // CHECK1-NEXT: [[TMP29:%.*]] = load i32, ptr [[TMP28]], align 4
3063 // CHECK1-NEXT: [[TMP30:%.*]] = call i32 @__kmpc_reduce(ptr @[[GLOB3]], i32 [[TMP29]], i32 1, i64 8, ptr [[DOTOMP_REDUCTION_RED_LIST]], ptr @_Z5tmainIiLi42EET_v.omp_outlined.25.omp.reduction.reduction_func, ptr @.gomp_critical_user_.reduction.var)
3064 // CHECK1-NEXT: switch i32 [[TMP30]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
3065 // CHECK1-NEXT: i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
3066 // CHECK1-NEXT: i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
3068 // CHECK1: .omp.reduction.case1:
3069 // CHECK1-NEXT: [[TMP31:%.*]] = getelementptr [[STRUCT_S]], ptr [[ARRAYIDX]], i64 40
3070 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP31]]
3071 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE18:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
3072 // CHECK1: omp.arraycpy.body:
3073 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST12:%.*]] = phi ptr [ [[ARR4]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
3074 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST13:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE1]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT16:%.*]], [[OMP_ARRAYCPY_BODY]] ]
3075 // CHECK1-NEXT: [[ADD_PTR14:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST13]], i64 4
3076 // CHECK1-NEXT: [[ADD_PTR15:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST12]], i64 4
3077 // CHECK1-NEXT: call void @.omp_combiner..26(ptr noundef [[ADD_PTR14]], ptr noundef [[ADD_PTR15]])
3078 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT16]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST13]], i32 1
3079 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST12]], i32 1
3080 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE17:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT16]], [[TMP31]]
3081 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE17]], label [[OMP_ARRAYCPY_DONE18]], label [[OMP_ARRAYCPY_BODY]]
3082 // CHECK1: omp.arraycpy.done18:
3083 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP29]], ptr @.gomp_critical_user_.reduction.var)
3084 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
3085 // CHECK1: .omp.reduction.case2:
3086 // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr [[STRUCT_S]], ptr [[ARRAYIDX]], i64 40
3087 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY19:%.*]] = icmp eq ptr [[ARRAYIDX]], [[TMP32]]
3088 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY19]], label [[OMP_ARRAYCPY_DONE28:%.*]], label [[OMP_ARRAYCPY_BODY20:%.*]]
3089 // CHECK1: omp.arraycpy.body20:
3090 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST21:%.*]] = phi ptr [ [[ARR4]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT26:%.*]], [[OMP_ARRAYCPY_BODY20]] ]
3091 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST22:%.*]] = phi ptr [ [[ARRAYIDX]], [[DOTOMP_REDUCTION_CASE2]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT25:%.*]], [[OMP_ARRAYCPY_BODY20]] ]
3092 // CHECK1-NEXT: [[TMP33:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3093 // CHECK1-NEXT: [[TMP34:%.*]] = load i32, ptr [[TMP33]], align 4
3094 // CHECK1-NEXT: call void @__kmpc_critical(ptr @[[GLOB1]], i32 [[TMP34]], ptr @.gomp_critical_user_.atomic_reduction.var)
3095 // CHECK1-NEXT: [[ADD_PTR23:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i64 4
3096 // CHECK1-NEXT: [[ADD_PTR24:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i64 4
3097 // CHECK1-NEXT: call void @.omp_combiner..26(ptr noundef [[ADD_PTR23]], ptr noundef [[ADD_PTR24]])
3098 // CHECK1-NEXT: call void @__kmpc_end_critical(ptr @[[GLOB1]], i32 [[TMP34]], ptr @.gomp_critical_user_.atomic_reduction.var)
3099 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT25]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST22]], i32 1
3100 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT26]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST21]], i32 1
3101 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE27:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT25]], [[TMP32]]
3102 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE27]], label [[OMP_ARRAYCPY_DONE28]], label [[OMP_ARRAYCPY_BODY20]]
3103 // CHECK1: omp.arraycpy.done28:
3104 // CHECK1-NEXT: call void @__kmpc_end_reduce(ptr @[[GLOB3]], i32 [[TMP29]], ptr @.gomp_critical_user_.reduction.var)
3105 // CHECK1-NEXT: br label [[DOTOMP_REDUCTION_DEFAULT]]
3106 // CHECK1: .omp.reduction.default:
3107 // CHECK1-NEXT: [[ARRAY_BEGIN29:%.*]] = getelementptr inbounds [40 x %struct.S], ptr [[ARR4]], i32 0, i32 0
3108 // CHECK1-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN29]], i64 40
3109 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
3110 // CHECK1: arraydestroy.body:
3111 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP35]], [[DOTOMP_REDUCTION_DEFAULT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
3112 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
3113 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
3114 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN29]]
3115 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE30:%.*]], label [[ARRAYDESTROY_BODY]]
3116 // CHECK1: arraydestroy.done30:
3117 // CHECK1-NEXT: [[TMP36:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
3118 // CHECK1-NEXT: [[TMP37:%.*]] = load i32, ptr [[TMP36]], align 4
3119 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB4]], i32 [[TMP37]])
3120 // CHECK1-NEXT: ret void
3123 // CHECK1-LABEL: define {{[^@]+}}@.omp_combiner..26
3124 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
3125 // CHECK1-NEXT: entry:
3126 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3127 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3128 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3129 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3130 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3131 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3132 // CHECK1-NEXT: call void @_Z8red_plusR6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP3]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP2]])
3133 // CHECK1-NEXT: ret void
3136 // CHECK1-LABEL: define {{[^@]+}}@.omp_initializer..27
3137 // CHECK1-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR3]] {
3138 // CHECK1-NEXT: entry:
3139 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3140 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3141 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3142 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3143 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3144 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3145 // CHECK1-NEXT: call void @_Z9init_plusR6BaseS1RKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP3]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP2]])
3146 // CHECK1-NEXT: ret void
3149 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v.omp_outlined.25.omp.reduction.reduction_func
3150 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR8]] {
3151 // CHECK1-NEXT: entry:
3152 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3153 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3154 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3155 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3156 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3157 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3158 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
3159 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
3160 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
3161 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
3162 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr [[STRUCT_S:%.*]], ptr [[TMP7]], i64 40
3163 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP7]], [[TMP8]]
3164 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
3165 // CHECK1: omp.arraycpy.body:
3166 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
3167 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP7]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
3168 // CHECK1-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i64 4
3169 // CHECK1-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i64 4
3170 // CHECK1-NEXT: call void @.omp_combiner..26(ptr noundef [[ADD_PTR]], ptr noundef [[ADD_PTR2]])
3171 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
3172 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
3173 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP8]]
3174 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
3175 // CHECK1: omp.arraycpy.done3:
3176 // CHECK1-NEXT: ret void
3179 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
3180 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3181 // CHECK1-NEXT: entry:
3182 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3183 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3184 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3185 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
3186 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3187 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
3188 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 2
3189 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[A_ADDR]], align 4
3190 // CHECK1-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to double
3191 // CHECK1-NEXT: [[TMP2:%.*]] = load volatile double, ptr @g, align 8
3192 // CHECK1-NEXT: [[ADD:%.*]] = fadd double [[CONV]], [[TMP2]]
3193 // CHECK1-NEXT: [[CONV2:%.*]] = fptosi double [[ADD]] to i32
3194 // CHECK1-NEXT: store i32 [[CONV2]], ptr [[F]], align 4
3195 // CHECK1-NEXT: ret void
3198 // CHECK3-LABEL: define {{[^@]+}}@_Z4bazzv
3199 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
3200 // CHECK3-NEXT: entry:
3201 // CHECK3-NEXT: [[S:%.*]] = alloca [[STRUCT_S:%.*]], align 4
3202 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
3203 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3204 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
3205 // CHECK3-NEXT: [[S1:%.*]] = alloca [[STRUCT_S]], align 4
3206 // CHECK3-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S]])
3207 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IV]], align 4
3208 // CHECK3-NEXT: call void @.omp_initializer.(ptr noundef [[S1]], ptr noundef [[S]])
3209 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3210 // CHECK3: omp.inner.for.cond:
3211 // CHECK3-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2:![0-9]+]]
3212 // CHECK3-NEXT: [[CMP:%.*]] = icmp slt i32 [[TMP0]], 10
3213 // CHECK3-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
3214 // CHECK3: omp.inner.for.cond.cleanup:
3215 // CHECK3-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
3216 // CHECK3: omp.inner.for.body:
3217 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
3218 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP1]], 1
3219 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3220 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP2]]
3221 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3222 // CHECK3: omp.body.continue:
3223 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3224 // CHECK3: omp.inner.for.inc:
3225 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
3226 // CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP2]], 1
3227 // CHECK3-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
3228 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP3:![0-9]+]]
3229 // CHECK3: omp.inner.for.end:
3230 // CHECK3-NEXT: store i32 10, ptr [[I]], align 4
3231 // CHECK3-NEXT: call void @.omp_combiner.(ptr noundef [[S]], ptr noundef [[S1]])
3232 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S1]]) #[[ATTR7:[0-9]+]]
3233 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[S]]) #[[ATTR7]]
3234 // CHECK3-NEXT: ret void
3237 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
3238 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] align 2 {
3239 // CHECK3-NEXT: entry:
3240 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3241 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3242 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3243 // CHECK3-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]])
3244 // CHECK3-NEXT: ret void
3247 // CHECK3-LABEL: define {{[^@]+}}@.omp_combiner.
3248 // CHECK3-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR2:[0-9]+]] {
3249 // CHECK3-NEXT: entry:
3250 // CHECK3-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3251 // CHECK3-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3252 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3253 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3254 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3255 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3256 // CHECK3-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[TMP2]], i32 0, i32 2
3257 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[F]], align 4
3258 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 17, [[TMP4]]
3259 // CHECK3-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[TMP3]], i32 0, i32 2
3260 // CHECK3-NEXT: store i32 [[MUL]], ptr [[F2]], align 4
3261 // CHECK3-NEXT: ret void
3264 // CHECK3-LABEL: define {{[^@]+}}@.omp_initializer.
3265 // CHECK3-SAME: (ptr noalias noundef [[TMP0:%.*]], ptr noalias noundef [[TMP1:%.*]]) #[[ATTR2]] {
3266 // CHECK3-NEXT: entry:
3267 // CHECK3-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3268 // CHECK3-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3269 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3270 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3271 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3272 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3273 // CHECK3-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TMP3]])
3274 // CHECK3-NEXT: ret void
3277 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
3278 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3279 // CHECK3-NEXT: entry:
3280 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3281 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3282 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3283 // CHECK3-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]]) #[[ATTR7]]
3284 // CHECK3-NEXT: ret void
3287 // CHECK3-LABEL: define {{[^@]+}}@main
3288 // CHECK3-SAME: () #[[ATTR3:[0-9]+]] {
3289 // CHECK3-NEXT: entry:
3290 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
3291 // CHECK3-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
3292 // CHECK3-NEXT: [[T_VAR:%.*]] = alloca float, align 4
3293 // CHECK3-NEXT: [[T_VAR1:%.*]] = alloca float, align 4
3294 // CHECK3-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
3295 // CHECK3-NEXT: [[S_ARR:%.*]] = alloca [4 x %struct.S.0], align 16
3296 // CHECK3-NEXT: [[VAR:%.*]] = alloca ptr, align 8
3297 // CHECK3-NEXT: [[VAR1:%.*]] = alloca [[STRUCT_S_0]], align 4
3298 // CHECK3-NEXT: [[ARRS:%.*]] = alloca [10 x [4 x %struct.S.0]], align 16
3299 // CHECK3-NEXT: [[VAR2:%.*]] = alloca ptr, align 8
3300 // CHECK3-NEXT: [[VVAR2:%.*]] = alloca [5 x %struct.S.0], align 16
3301 // CHECK3-NEXT: [[VAR3:%.*]] = alloca ptr, align 8
3302 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3303 // CHECK3-NEXT: [[_TMP10:%.*]] = alloca ptr, align 8
3304 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
3305 // CHECK3-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
3306 // CHECK3-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
3307 // CHECK3-NEXT: [[I15:%.*]] = alloca i32, align 4
3308 // CHECK3-NEXT: [[I26:%.*]] = alloca i32, align 4
3309 // CHECK3-NEXT: [[I37:%.*]] = alloca i32, align 4
3310 // CHECK3-NEXT: [[I44:%.*]] = alloca i32, align 4
3311 // CHECK3-NEXT: [[_TMP51:%.*]] = alloca ptr, align 8
3312 // CHECK3-NEXT: [[_TMP52:%.*]] = alloca ptr, align 8
3313 // CHECK3-NEXT: [[I53:%.*]] = alloca i32, align 4
3314 // CHECK3-NEXT: [[_TMP60:%.*]] = alloca ptr, align 8
3315 // CHECK3-NEXT: [[_TMP61:%.*]] = alloca ptr, align 8
3316 // CHECK3-NEXT: [[I62:%.*]] = alloca i32, align 4
3317 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
3318 // CHECK3-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]])
3319 // CHECK3-NEXT: store float 0.000000e+00, ptr [[T_VAR]], align 4
3320 // CHECK3-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
3321 // CHECK3-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
3322 // CHECK3-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
3323 // CHECK3-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
3324 // CHECK3-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
3325 // CHECK3-NEXT: [[ARRAYINIT_ELEMENT1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_ELEMENT]], i64 1
3326 // CHECK3-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT1]], float noundef 3.000000e+00)
3327 // CHECK3-NEXT: [[ARRAYINIT_ELEMENT2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_ELEMENT1]], i64 1
3328 // CHECK3-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT2]], float noundef 4.000000e+00)
3329 // CHECK3-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
3330 // CHECK3-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]])
3331 // CHECK3-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS]], i32 0, i32 0, i32 0
3332 // CHECK3-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 40
3333 // CHECK3-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
3334 // CHECK3: arrayctor.loop:
3335 // CHECK3-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
3336 // CHECK3-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR]])
3337 // CHECK3-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
3338 // CHECK3-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
3339 // CHECK3-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
3340 // CHECK3: arrayctor.cont:
3341 // CHECK3-NEXT: [[CALL:%.*]] = call noundef ptr @_Z3foov()
3342 // CHECK3-NEXT: store ptr [[CALL]], ptr [[VAR2]], align 8
3343 // CHECK3-NEXT: [[ARRAY_BEGIN3:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR2]], i32 0, i32 0
3344 // CHECK3-NEXT: [[ARRAYCTOR_END4:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN3]], i64 5
3345 // CHECK3-NEXT: br label [[ARRAYCTOR_LOOP5:%.*]]
3346 // CHECK3: arrayctor.loop5:
3347 // CHECK3-NEXT: [[ARRAYCTOR_CUR6:%.*]] = phi ptr [ [[ARRAY_BEGIN3]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYCTOR_NEXT7:%.*]], [[ARRAYCTOR_LOOP5]] ]
3348 // CHECK3-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR6]])
3349 // CHECK3-NEXT: [[ARRAYCTOR_NEXT7]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR6]], i64 1
3350 // CHECK3-NEXT: [[ARRAYCTOR_DONE8:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT7]], [[ARRAYCTOR_END4]]
3351 // CHECK3-NEXT: br i1 [[ARRAYCTOR_DONE8]], label [[ARRAYCTOR_CONT9:%.*]], label [[ARRAYCTOR_LOOP5]]
3352 // CHECK3: arrayctor.cont9:
3353 // CHECK3-NEXT: store ptr [[S_ARR]], ptr [[VAR3]], align 8
3354 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
3355 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
3356 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
3357 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[_TMP10]], align 8
3358 // CHECK3-NEXT: store i32 0, ptr [[I]], align 4
3359 // CHECK3-NEXT: br label [[FOR_COND:%.*]]
3360 // CHECK3: for.cond:
3361 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[I]], align 4
3362 // CHECK3-NEXT: [[CMP:%.*]] = icmp slt i32 [[TMP2]], 2
3363 // CHECK3-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
3364 // CHECK3: for.body:
3365 // CHECK3-NEXT: [[TMP3:%.*]] = load float, ptr [[T_VAR]], align 4
3366 // CHECK3-NEXT: [[CONV:%.*]] = fptosi float [[TMP3]] to i32
3367 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[I]], align 4
3368 // CHECK3-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64
3369 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM]]
3370 // CHECK3-NEXT: store i32 [[CONV]], ptr [[ARRAYIDX]], align 4
3371 // CHECK3-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP10]], align 8
3372 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[I]], align 4
3373 // CHECK3-NEXT: [[IDXPROM11:%.*]] = sext i32 [[TMP6]] to i64
3374 // CHECK3-NEXT: [[ARRAYIDX12:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 [[IDXPROM11]]
3375 // CHECK3-NEXT: [[CALL13:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIfEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX12]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP5]])
3376 // CHECK3-NEXT: br label [[FOR_INC:%.*]]
3378 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4
3379 // CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
3380 // CHECK3-NEXT: store i32 [[INC]], ptr [[I]], align 4
3381 // CHECK3-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP6:![0-9]+]]
3383 // CHECK3-NEXT: [[ARRAYIDX14:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 1
3384 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[ARRAYIDX14]], align 4
3385 // CHECK3-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
3386 // CHECK3-NEXT: [[TMP10:%.*]] = call ptr @llvm.stacksave.p0()
3387 // CHECK3-NEXT: store ptr [[TMP10]], ptr [[SAVED_STACK]], align 8
3388 // CHECK3-NEXT: [[TMP11:%.*]] = mul nuw i64 10, [[TMP9]]
3389 // CHECK3-NEXT: [[VLA:%.*]] = alloca i32, i64 [[TMP11]], align 16
3390 // CHECK3-NEXT: store i64 [[TMP9]], ptr [[__VLA_EXPR0]], align 8
3391 // CHECK3-NEXT: store i32 0, ptr [[I15]], align 4
3392 // CHECK3-NEXT: br label [[FOR_COND16:%.*]]
3393 // CHECK3: for.cond16:
3394 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[I15]], align 4
3395 // CHECK3-NEXT: [[CMP17:%.*]] = icmp slt i32 [[TMP12]], 10
3396 // CHECK3-NEXT: br i1 [[CMP17]], label [[FOR_BODY18:%.*]], label [[FOR_END25:%.*]]
3397 // CHECK3: for.body18:
3398 // CHECK3-NEXT: [[TMP13:%.*]] = mul nsw i64 1, [[TMP9]]
3399 // CHECK3-NEXT: [[ARRAYIDX19:%.*]] = getelementptr inbounds i32, ptr [[VLA]], i64 [[TMP13]]
3400 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[I15]], align 4
3401 // CHECK3-NEXT: [[IDXPROM20:%.*]] = sext i32 [[TMP14]] to i64
3402 // CHECK3-NEXT: [[ARRAYIDX21:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX19]], i64 [[IDXPROM20]]
3403 // CHECK3-NEXT: [[TMP15:%.*]] = load i32, ptr [[ARRAYIDX21]], align 4
3404 // CHECK3-NEXT: [[INC22:%.*]] = add nsw i32 [[TMP15]], 1
3405 // CHECK3-NEXT: store i32 [[INC22]], ptr [[ARRAYIDX21]], align 4
3406 // CHECK3-NEXT: br label [[FOR_INC23:%.*]]
3407 // CHECK3: for.inc23:
3408 // CHECK3-NEXT: [[TMP16:%.*]] = load i32, ptr [[I15]], align 4
3409 // CHECK3-NEXT: [[INC24:%.*]] = add nsw i32 [[TMP16]], 1
3410 // CHECK3-NEXT: store i32 [[INC24]], ptr [[I15]], align 4
3411 // CHECK3-NEXT: br label [[FOR_COND16]], !llvm.loop [[LOOP8:![0-9]+]]
3412 // CHECK3: for.end25:
3413 // CHECK3-NEXT: store i32 0, ptr [[I26]], align 4
3414 // CHECK3-NEXT: br label [[FOR_COND27:%.*]]
3415 // CHECK3: for.cond27:
3416 // CHECK3-NEXT: [[TMP17:%.*]] = load i32, ptr [[I26]], align 4
3417 // CHECK3-NEXT: [[CMP28:%.*]] = icmp slt i32 [[TMP17]], 10
3418 // CHECK3-NEXT: br i1 [[CMP28]], label [[FOR_BODY29:%.*]], label [[FOR_END36:%.*]]
3419 // CHECK3: for.body29:
3420 // CHECK3-NEXT: [[TMP18:%.*]] = mul nsw i64 1, [[TMP9]]
3421 // CHECK3-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds i32, ptr [[VLA]], i64 [[TMP18]]
3422 // CHECK3-NEXT: [[TMP19:%.*]] = load i32, ptr [[I26]], align 4
3423 // CHECK3-NEXT: [[IDXPROM31:%.*]] = sext i32 [[TMP19]] to i64
3424 // CHECK3-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds i32, ptr [[ARRAYIDX30]], i64 [[IDXPROM31]]
3425 // CHECK3-NEXT: [[TMP20:%.*]] = load i32, ptr [[ARRAYIDX32]], align 4
3426 // CHECK3-NEXT: [[INC33:%.*]] = add nsw i32 [[TMP20]], 1
3427 // CHECK3-NEXT: store i32 [[INC33]], ptr [[ARRAYIDX32]], align 4
3428 // CHECK3-NEXT: br label [[FOR_INC34:%.*]]
3429 // CHECK3: for.inc34:
3430 // CHECK3-NEXT: [[TMP21:%.*]] = load i32, ptr [[I26]], align 4
3431 // CHECK3-NEXT: [[INC35:%.*]] = add nsw i32 [[TMP21]], 1
3432 // CHECK3-NEXT: store i32 [[INC35]], ptr [[I26]], align 4
3433 // CHECK3-NEXT: br label [[FOR_COND27]], !llvm.loop [[LOOP9:![0-9]+]]
3434 // CHECK3: for.end36:
3435 // CHECK3-NEXT: store i32 0, ptr [[I37]], align 4
3436 // CHECK3-NEXT: br label [[FOR_COND38:%.*]]
3437 // CHECK3: for.cond38:
3438 // CHECK3-NEXT: [[TMP22:%.*]] = load i32, ptr [[I37]], align 4
3439 // CHECK3-NEXT: [[CMP39:%.*]] = icmp slt i32 [[TMP22]], 10
3440 // CHECK3-NEXT: br i1 [[CMP39]], label [[FOR_BODY40:%.*]], label [[FOR_END43:%.*]]
3441 // CHECK3: for.body40:
3442 // CHECK3-NEXT: br label [[FOR_INC41:%.*]]
3443 // CHECK3: for.inc41:
3444 // CHECK3-NEXT: [[TMP23:%.*]] = load i32, ptr [[I37]], align 4
3445 // CHECK3-NEXT: [[INC42:%.*]] = add nsw i32 [[TMP23]], 1
3446 // CHECK3-NEXT: store i32 [[INC42]], ptr [[I37]], align 4
3447 // CHECK3-NEXT: br label [[FOR_COND38]], !llvm.loop [[LOOP10:![0-9]+]]
3448 // CHECK3: for.end43:
3449 // CHECK3-NEXT: store i32 0, ptr [[I44]], align 4
3450 // CHECK3-NEXT: br label [[FOR_COND45:%.*]]
3451 // CHECK3: for.cond45:
3452 // CHECK3-NEXT: [[TMP24:%.*]] = load i32, ptr [[I44]], align 4
3453 // CHECK3-NEXT: [[CMP46:%.*]] = icmp slt i32 [[TMP24]], 10
3454 // CHECK3-NEXT: br i1 [[CMP46]], label [[FOR_BODY47:%.*]], label [[FOR_END50:%.*]]
3455 // CHECK3: for.body47:
3456 // CHECK3-NEXT: br label [[FOR_INC48:%.*]]
3457 // CHECK3: for.inc48:
3458 // CHECK3-NEXT: [[TMP25:%.*]] = load i32, ptr [[I44]], align 4
3459 // CHECK3-NEXT: [[INC49:%.*]] = add nsw i32 [[TMP25]], 1
3460 // CHECK3-NEXT: store i32 [[INC49]], ptr [[I44]], align 4
3461 // CHECK3-NEXT: br label [[FOR_COND45]], !llvm.loop [[LOOP11:![0-9]+]]
3462 // CHECK3: for.end50:
3463 // CHECK3-NEXT: [[TMP26:%.*]] = load ptr, ptr [[VAR3]], align 8
3464 // CHECK3-NEXT: store ptr [[TMP26]], ptr [[_TMP51]], align 8
3465 // CHECK3-NEXT: [[TMP27:%.*]] = load ptr, ptr [[_TMP51]], align 8
3466 // CHECK3-NEXT: store ptr [[TMP27]], ptr [[_TMP52]], align 8
3467 // CHECK3-NEXT: store i32 0, ptr [[I53]], align 4
3468 // CHECK3-NEXT: br label [[FOR_COND54:%.*]]
3469 // CHECK3: for.cond54:
3470 // CHECK3-NEXT: [[TMP28:%.*]] = load i32, ptr [[I53]], align 4
3471 // CHECK3-NEXT: [[CMP55:%.*]] = icmp slt i32 [[TMP28]], 10
3472 // CHECK3-NEXT: br i1 [[CMP55]], label [[FOR_BODY56:%.*]], label [[FOR_END59:%.*]]
3473 // CHECK3: for.body56:
3474 // CHECK3-NEXT: br label [[FOR_INC57:%.*]]
3475 // CHECK3: for.inc57:
3476 // CHECK3-NEXT: [[TMP29:%.*]] = load i32, ptr [[I53]], align 4
3477 // CHECK3-NEXT: [[INC58:%.*]] = add nsw i32 [[TMP29]], 1
3478 // CHECK3-NEXT: store i32 [[INC58]], ptr [[I53]], align 4
3479 // CHECK3-NEXT: br label [[FOR_COND54]], !llvm.loop [[LOOP12:![0-9]+]]
3480 // CHECK3: for.end59:
3481 // CHECK3-NEXT: [[TMP30:%.*]] = load ptr, ptr [[VAR3]], align 8
3482 // CHECK3-NEXT: store ptr [[TMP30]], ptr [[_TMP60]], align 8
3483 // CHECK3-NEXT: [[TMP31:%.*]] = load ptr, ptr [[_TMP60]], align 8
3484 // CHECK3-NEXT: store ptr [[TMP31]], ptr [[_TMP61]], align 8
3485 // CHECK3-NEXT: store i32 0, ptr [[I62]], align 4
3486 // CHECK3-NEXT: br label [[FOR_COND63:%.*]]
3487 // CHECK3: for.cond63:
3488 // CHECK3-NEXT: [[TMP32:%.*]] = load i32, ptr [[I62]], align 4
3489 // CHECK3-NEXT: [[CMP64:%.*]] = icmp slt i32 [[TMP32]], 10
3490 // CHECK3-NEXT: br i1 [[CMP64]], label [[FOR_BODY65:%.*]], label [[FOR_END68:%.*]]
3491 // CHECK3: for.body65:
3492 // CHECK3-NEXT: br label [[FOR_INC66:%.*]]
3493 // CHECK3: for.inc66:
3494 // CHECK3-NEXT: [[TMP33:%.*]] = load i32, ptr [[I62]], align 4
3495 // CHECK3-NEXT: [[INC67:%.*]] = add nsw i32 [[TMP33]], 1
3496 // CHECK3-NEXT: store i32 [[INC67]], ptr [[I62]], align 4
3497 // CHECK3-NEXT: br label [[FOR_COND63]], !llvm.loop [[LOOP13:![0-9]+]]
3498 // CHECK3: for.end68:
3499 // CHECK3-NEXT: [[CALL69:%.*]] = call noundef i32 @_Z5tmainIiLi42EET_v()
3500 // CHECK3-NEXT: store i32 [[CALL69]], ptr [[RETVAL]], align 4
3501 // CHECK3-NEXT: [[TMP34:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
3502 // CHECK3-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP34]])
3503 // CHECK3-NEXT: [[ARRAY_BEGIN70:%.*]] = getelementptr inbounds [5 x %struct.S.0], ptr [[VVAR2]], i32 0, i32 0
3504 // CHECK3-NEXT: [[TMP35:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN70]], i64 5
3505 // CHECK3-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
3506 // CHECK3: arraydestroy.body:
3507 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP35]], [[FOR_END68]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
3508 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
3509 // CHECK3-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR7]]
3510 // CHECK3-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN70]]
3511 // CHECK3-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE71:%.*]], label [[ARRAYDESTROY_BODY]]
3512 // CHECK3: arraydestroy.done71:
3513 // CHECK3-NEXT: [[ARRAY_BEGIN72:%.*]] = getelementptr inbounds [10 x [4 x %struct.S.0]], ptr [[ARRS]], i32 0, i32 0, i32 0
3514 // CHECK3-NEXT: [[TMP36:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN72]], i64 40
3515 // CHECK3-NEXT: br label [[ARRAYDESTROY_BODY73:%.*]]
3516 // CHECK3: arraydestroy.body73:
3517 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENTPAST74:%.*]] = phi ptr [ [[TMP36]], [[ARRAYDESTROY_DONE71]] ], [ [[ARRAYDESTROY_ELEMENT75:%.*]], [[ARRAYDESTROY_BODY73]] ]
3518 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENT75]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST74]], i64 -1
3519 // CHECK3-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT75]]) #[[ATTR7]]
3520 // CHECK3-NEXT: [[ARRAYDESTROY_DONE76:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT75]], [[ARRAY_BEGIN72]]
3521 // CHECK3-NEXT: br i1 [[ARRAYDESTROY_DONE76]], label [[ARRAYDESTROY_DONE77:%.*]], label [[ARRAYDESTROY_BODY73]]
3522 // CHECK3: arraydestroy.done77:
3523 // CHECK3-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]]) #[[ATTR7]]
3524 // CHECK3-NEXT: [[ARRAY_BEGIN78:%.*]] = getelementptr inbounds [4 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
3525 // CHECK3-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN78]], i64 4
3526 // CHECK3-NEXT: br label [[ARRAYDESTROY_BODY79:%.*]]
3527 // CHECK3: arraydestroy.body79:
3528 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENTPAST80:%.*]] = phi ptr [ [[TMP37]], [[ARRAYDESTROY_DONE77]] ], [ [[ARRAYDESTROY_ELEMENT81:%.*]], [[ARRAYDESTROY_BODY79]] ]
3529 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENT81]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST80]], i64 -1
3530 // CHECK3-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT81]]) #[[ATTR7]]
3531 // CHECK3-NEXT: [[ARRAYDESTROY_DONE82:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT81]], [[ARRAY_BEGIN78]]
3532 // CHECK3-NEXT: br i1 [[ARRAYDESTROY_DONE82]], label [[ARRAYDESTROY_DONE83:%.*]], label [[ARRAYDESTROY_BODY79]]
3533 // CHECK3: arraydestroy.done83:
3534 // CHECK3-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]]) #[[ATTR7]]
3535 // CHECK3-NEXT: [[TMP38:%.*]] = load i32, ptr [[RETVAL]], align 4
3536 // CHECK3-NEXT: ret i32 [[TMP38]]
3539 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
3540 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3541 // CHECK3-NEXT: entry:
3542 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3543 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3544 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3545 // CHECK3-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]])
3546 // CHECK3-NEXT: ret void
3549 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
3550 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3551 // CHECK3-NEXT: entry:
3552 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3553 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
3554 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3555 // CHECK3-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
3556 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3557 // CHECK3-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
3558 // CHECK3-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], float noundef [[TMP0]])
3559 // CHECK3-NEXT: ret void
3562 // CHECK3-LABEL: define {{[^@]+}}@_Z5tmainIiLi42EET_v
3563 // CHECK3-SAME: () #[[ATTR0]] {
3564 // CHECK3-NEXT: entry:
3565 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
3566 // CHECK3-NEXT: [[T:%.*]] = alloca i32, align 4
3567 // CHECK3-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
3568 // CHECK3-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
3569 // CHECK3-NEXT: [[T_VAR1:%.*]] = alloca i32, align 4
3570 // CHECK3-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
3571 // CHECK3-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 16
3572 // CHECK3-NEXT: [[VAR:%.*]] = alloca ptr, align 8
3573 // CHECK3-NEXT: [[VAR1:%.*]] = alloca [[STRUCT_S]], align 4
3574 // CHECK3-NEXT: [[ARR:%.*]] = alloca [42 x %struct.S], align 16
3575 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3576 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
3577 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
3578 // CHECK3-NEXT: [[_TMP4:%.*]] = alloca ptr, align 8
3579 // CHECK3-NEXT: [[_TMP5:%.*]] = alloca ptr, align 8
3580 // CHECK3-NEXT: [[I6:%.*]] = alloca i32, align 4
3581 // CHECK3-NEXT: [[_TMP18:%.*]] = alloca ptr, align 8
3582 // CHECK3-NEXT: [[_TMP19:%.*]] = alloca ptr, align 8
3583 // CHECK3-NEXT: [[I20:%.*]] = alloca i32, align 4
3584 // CHECK3-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]])
3585 // CHECK3-NEXT: store i32 0, ptr [[T_VAR]], align 4
3586 // CHECK3-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiLi42EET_v.vec, i64 8, i1 false)
3587 // CHECK3-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
3588 // CHECK3-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_BEGIN]], i32 noundef 1)
3589 // CHECK3-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
3590 // CHECK3-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
3591 // CHECK3-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
3592 // CHECK3-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]])
3593 // CHECK3-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[ARR]], i32 0, i32 0
3594 // CHECK3-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 42
3595 // CHECK3-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
3596 // CHECK3: arrayctor.loop:
3597 // CHECK3-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
3598 // CHECK3-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYCTOR_CUR]])
3599 // CHECK3-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
3600 // CHECK3-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
3601 // CHECK3-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
3602 // CHECK3: arrayctor.cont:
3603 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VAR]], align 8
3604 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[TMP]], align 8
3605 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
3606 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
3607 // CHECK3-NEXT: store i32 0, ptr [[I]], align 4
3608 // CHECK3-NEXT: br label [[FOR_COND:%.*]]
3609 // CHECK3: for.cond:
3610 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[I]], align 4
3611 // CHECK3-NEXT: [[CMP:%.*]] = icmp slt i32 [[TMP2]], 2
3612 // CHECK3-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
3613 // CHECK3: for.body:
3614 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR]], align 4
3615 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[I]], align 4
3616 // CHECK3-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP4]] to i64
3617 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM]]
3618 // CHECK3-NEXT: store i32 [[TMP3]], ptr [[ARRAYIDX]], align 4
3619 // CHECK3-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP1]], align 8
3620 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[I]], align 4
3621 // CHECK3-NEXT: [[IDXPROM2:%.*]] = sext i32 [[TMP6]] to i64
3622 // CHECK3-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 [[IDXPROM2]]
3623 // CHECK3-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX3]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP5]])
3624 // CHECK3-NEXT: br label [[FOR_INC:%.*]]
3626 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4
3627 // CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP7]], 1
3628 // CHECK3-NEXT: store i32 [[INC]], ptr [[I]], align 4
3629 // CHECK3-NEXT: br label [[FOR_COND]], !llvm.loop [[LOOP14:![0-9]+]]
3631 // CHECK3-NEXT: [[TMP8:%.*]] = load ptr, ptr [[VAR]], align 8
3632 // CHECK3-NEXT: store ptr [[TMP8]], ptr [[_TMP4]], align 8
3633 // CHECK3-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP4]], align 8
3634 // CHECK3-NEXT: store ptr [[TMP9]], ptr [[_TMP5]], align 8
3635 // CHECK3-NEXT: store i32 0, ptr [[I6]], align 4
3636 // CHECK3-NEXT: br label [[FOR_COND7:%.*]]
3637 // CHECK3: for.cond7:
3638 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[I6]], align 4
3639 // CHECK3-NEXT: [[CMP8:%.*]] = icmp slt i32 [[TMP10]], 2
3640 // CHECK3-NEXT: br i1 [[CMP8]], label [[FOR_BODY9:%.*]], label [[FOR_END17:%.*]]
3641 // CHECK3: for.body9:
3642 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[T_VAR]], align 4
3643 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[I6]], align 4
3644 // CHECK3-NEXT: [[IDXPROM10:%.*]] = sext i32 [[TMP12]] to i64
3645 // CHECK3-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM10]]
3646 // CHECK3-NEXT: store i32 [[TMP11]], ptr [[ARRAYIDX11]], align 4
3647 // CHECK3-NEXT: [[TMP13:%.*]] = load ptr, ptr [[_TMP5]], align 8
3648 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[I6]], align 4
3649 // CHECK3-NEXT: [[IDXPROM12:%.*]] = sext i32 [[TMP14]] to i64
3650 // CHECK3-NEXT: [[ARRAYIDX13:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 [[IDXPROM12]]
3651 // CHECK3-NEXT: [[CALL14:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX13]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP13]])
3652 // CHECK3-NEXT: br label [[FOR_INC15:%.*]]
3653 // CHECK3: for.inc15:
3654 // CHECK3-NEXT: [[TMP15:%.*]] = load i32, ptr [[I6]], align 4
3655 // CHECK3-NEXT: [[INC16:%.*]] = add nsw i32 [[TMP15]], 1
3656 // CHECK3-NEXT: store i32 [[INC16]], ptr [[I6]], align 4
3657 // CHECK3-NEXT: br label [[FOR_COND7]], !llvm.loop [[LOOP15:![0-9]+]]
3658 // CHECK3: for.end17:
3659 // CHECK3-NEXT: [[TMP16:%.*]] = load ptr, ptr [[VAR]], align 8
3660 // CHECK3-NEXT: store ptr [[TMP16]], ptr [[_TMP18]], align 8
3661 // CHECK3-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP18]], align 8
3662 // CHECK3-NEXT: store ptr [[TMP17]], ptr [[_TMP19]], align 8
3663 // CHECK3-NEXT: store i32 0, ptr [[I20]], align 4
3664 // CHECK3-NEXT: br label [[FOR_COND21:%.*]]
3665 // CHECK3: for.cond21:
3666 // CHECK3-NEXT: [[TMP18:%.*]] = load i32, ptr [[I20]], align 4
3667 // CHECK3-NEXT: [[CMP22:%.*]] = icmp slt i32 [[TMP18]], 2
3668 // CHECK3-NEXT: br i1 [[CMP22]], label [[FOR_BODY23:%.*]], label [[FOR_END31:%.*]]
3669 // CHECK3: for.body23:
3670 // CHECK3-NEXT: [[TMP19:%.*]] = load i32, ptr [[T_VAR]], align 4
3671 // CHECK3-NEXT: [[TMP20:%.*]] = load i32, ptr [[I20]], align 4
3672 // CHECK3-NEXT: [[IDXPROM24:%.*]] = sext i32 [[TMP20]] to i64
3673 // CHECK3-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM24]]
3674 // CHECK3-NEXT: store i32 [[TMP19]], ptr [[ARRAYIDX25]], align 4
3675 // CHECK3-NEXT: [[TMP21:%.*]] = load ptr, ptr [[_TMP19]], align 8
3676 // CHECK3-NEXT: [[TMP22:%.*]] = load i32, ptr [[I20]], align 4
3677 // CHECK3-NEXT: [[IDXPROM26:%.*]] = sext i32 [[TMP22]] to i64
3678 // CHECK3-NEXT: [[ARRAYIDX27:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 [[IDXPROM26]]
3679 // CHECK3-NEXT: [[CALL28:%.*]] = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN1SIiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYIDX27]], ptr noundef nonnull align 4 dereferenceable(12) [[TMP21]])
3680 // CHECK3-NEXT: br label [[FOR_INC29:%.*]]
3681 // CHECK3: for.inc29:
3682 // CHECK3-NEXT: [[TMP23:%.*]] = load i32, ptr [[I20]], align 4
3683 // CHECK3-NEXT: [[INC30:%.*]] = add nsw i32 [[TMP23]], 1
3684 // CHECK3-NEXT: store i32 [[INC30]], ptr [[I20]], align 4
3685 // CHECK3-NEXT: br label [[FOR_COND21]], !llvm.loop [[LOOP16:![0-9]+]]
3686 // CHECK3: for.end31:
3687 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
3688 // CHECK3-NEXT: [[ARRAY_BEGIN32:%.*]] = getelementptr inbounds [42 x %struct.S], ptr [[ARR]], i32 0, i32 0
3689 // CHECK3-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN32]], i64 42
3690 // CHECK3-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
3691 // CHECK3: arraydestroy.body:
3692 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[FOR_END31]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
3693 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
3694 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR7]]
3695 // CHECK3-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN32]]
3696 // CHECK3-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE33:%.*]], label [[ARRAYDESTROY_BODY]]
3697 // CHECK3: arraydestroy.done33:
3698 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[VAR1]]) #[[ATTR7]]
3699 // CHECK3-NEXT: [[ARRAY_BEGIN34:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
3700 // CHECK3-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN34]], i64 2
3701 // CHECK3-NEXT: br label [[ARRAYDESTROY_BODY35:%.*]]
3702 // CHECK3: arraydestroy.body35:
3703 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENTPAST36:%.*]] = phi ptr [ [[TMP25]], [[ARRAYDESTROY_DONE33]] ], [ [[ARRAYDESTROY_ELEMENT37:%.*]], [[ARRAYDESTROY_BODY35]] ]
3704 // CHECK3-NEXT: [[ARRAYDESTROY_ELEMENT37]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST36]], i64 -1
3705 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[ARRAYDESTROY_ELEMENT37]]) #[[ATTR7]]
3706 // CHECK3-NEXT: [[ARRAYDESTROY_DONE38:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT37]], [[ARRAY_BEGIN34]]
3707 // CHECK3-NEXT: br i1 [[ARRAYDESTROY_DONE38]], label [[ARRAYDESTROY_DONE39:%.*]], label [[ARRAYDESTROY_BODY35]]
3708 // CHECK3: arraydestroy.done39:
3709 // CHECK3-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(12) [[TEST]]) #[[ATTR7]]
3710 // CHECK3-NEXT: [[TMP26:%.*]] = load i32, ptr [[RETVAL]], align 4
3711 // CHECK3-NEXT: ret i32 [[TMP26]]
3714 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
3715 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3716 // CHECK3-NEXT: entry:
3717 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3718 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3719 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3720 // CHECK3-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]]) #[[ATTR7]]
3721 // CHECK3-NEXT: ret void
3724 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
3725 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3726 // CHECK3-NEXT: entry:
3727 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3728 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3729 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3730 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
3731 // CHECK3-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 2
3732 // CHECK3-NEXT: [[TMP1:%.*]] = load volatile double, ptr @g, align 8
3733 // CHECK3-NEXT: [[CONV:%.*]] = fptosi double [[TMP1]] to i32
3734 // CHECK3-NEXT: store i32 [[CONV]], ptr [[F]], align 4
3735 // CHECK3-NEXT: ret void
3738 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
3739 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3740 // CHECK3-NEXT: entry:
3741 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3742 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3743 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3744 // CHECK3-NEXT: ret void
3747 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
3748 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3749 // CHECK3-NEXT: entry:
3750 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3751 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3752 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3753 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
3754 // CHECK3-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 2
3755 // CHECK3-NEXT: [[TMP1:%.*]] = load volatile double, ptr @g, align 8
3756 // CHECK3-NEXT: [[CONV:%.*]] = fptrunc double [[TMP1]] to float
3757 // CHECK3-NEXT: store float [[CONV]], ptr [[F]], align 4
3758 // CHECK3-NEXT: ret void
3761 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
3762 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3763 // CHECK3-NEXT: entry:
3764 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3765 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3766 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3767 // CHECK3-NEXT: ret void
3770 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
3771 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3772 // CHECK3-NEXT: entry:
3773 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3774 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
3775 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3776 // CHECK3-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
3777 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3778 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
3779 // CHECK3-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 2
3780 // CHECK3-NEXT: [[TMP1:%.*]] = load float, ptr [[A_ADDR]], align 4
3781 // CHECK3-NEXT: [[CONV:%.*]] = fpext float [[TMP1]] to double
3782 // CHECK3-NEXT: [[TMP2:%.*]] = load volatile double, ptr @g, align 8
3783 // CHECK3-NEXT: [[ADD:%.*]] = fadd double [[CONV]], [[TMP2]]
3784 // CHECK3-NEXT: [[CONV2:%.*]] = fptrunc double [[ADD]] to float
3785 // CHECK3-NEXT: store float [[CONV2]], ptr [[F]], align 4
3786 // CHECK3-NEXT: ret void
3789 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
3790 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3791 // CHECK3-NEXT: entry:
3792 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3793 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3794 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3795 // CHECK3-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
3796 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3797 // CHECK3-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
3798 // CHECK3-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], i32 noundef [[TMP0]])
3799 // CHECK3-NEXT: ret void
3802 // CHECK3-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
3803 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] align 2 {
3804 // CHECK3-NEXT: entry:
3805 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3806 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
3807 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3808 // CHECK3-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
3809 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3810 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, ptr [[THIS1]], i64 4
3811 // CHECK3-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 2
3812 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[A_ADDR]], align 4
3813 // CHECK3-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to double
3814 // CHECK3-NEXT: [[TMP2:%.*]] = load volatile double, ptr @g, align 8
3815 // CHECK3-NEXT: [[ADD:%.*]] = fadd double [[CONV]], [[TMP2]]
3816 // CHECK3-NEXT: [[CONV2:%.*]] = fptosi double [[ADD]] to i32
3817 // CHECK3-NEXT: store i32 [[CONV2]], ptr [[F]], align 4
3818 // CHECK3-NEXT: ret void