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