[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / teams_distribute_parallel_for_dist_schedule_codegen.cpp
blobd359baf829a8fa80afd7f4744bad4ac1f56f0280
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 // expected-no-diagnostics
3 #ifndef HEADER
4 #define HEADER
6 // Test host codegen.
7 // RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1
8 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
9 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
10 // RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK3
11 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
12 // RUN: %clang_cc1 -DCK1 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK3
14 // RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
15 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
16 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
17 // RUN: %clang_cc1 -DCK1 -verify -Wno-vla -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
18 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
19 // RUN: %clang_cc1 -DCK1 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
20 #ifdef CK1
22 template <typename T, int X, long long Y>
23 struct SS{
24 T a[X];
25 float b;
26 int foo(void) {
28 #pragma omp target
29 #pragma omp teams distribute parallel for
30 for(int i = 0; i < X; i++) {
31 a[i] = (T)0;
33 #pragma omp target
34 #pragma omp teams distribute parallel for dist_schedule(static)
35 for(int i = 0; i < X; i++) {
36 a[i] = (T)0;
38 #pragma omp target
39 #pragma omp teams distribute parallel for dist_schedule(static, X/2)
40 for(int i = 0; i < X; i++) {
41 a[i] = (T)0;
53 return a[0];
57 int teams_template_struct(void) {
58 SS<int, 123, 456> V;
59 return V.foo();
62 #endif // CK1
64 // Test host codegen.
65 // RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK9
66 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
67 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK9
68 // RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK11
69 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
70 // RUN: %clang_cc1 -DCK2 -fopenmp -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK11
72 // RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
73 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
74 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
75 // RUN: %clang_cc1 -DCK2 -verify -Wno-vla -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
76 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
77 // RUN: %clang_cc1 -DCK2 -fopenmp-simd -x c++ -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
78 #ifdef CK2
80 template <typename T, int n>
81 int tmain(T argc) {
82 T a[n];
83 int m = 10;
84 #pragma omp target
85 #pragma omp teams distribute parallel for
86 for(int i = 0; i < n; i++) {
87 a[i] = (T)0;
89 #pragma omp target
90 #pragma omp teams distribute parallel for dist_schedule(static)
91 for(int i = 0; i < n; i++) {
92 a[i] = (T)0;
94 #pragma omp target
95 #pragma omp teams distribute parallel for dist_schedule(static, m)
96 for(int i = 0; i < n; i++) {
97 a[i] = (T)0;
99 return 0;
102 int main (int argc, char **argv) {
103 int n = 100;
104 int a[n];
105 int m = 10;
106 #pragma omp target
107 #pragma omp teams distribute parallel for
108 for(int i = 0; i < n; i++) {
109 a[i] = 0;
111 #pragma omp target
112 #pragma omp teams distribute parallel for dist_schedule(static)
113 for(int i = 0; i < n; i++) {
114 a[i] = 0;
116 #pragma omp target
117 #pragma omp teams distribute parallel for dist_schedule(static, m)
118 for(int i = 0; i < n; i++) {
119 a[i] = 0;
121 return tmain<int, 10>(argc);
144 #endif // CK2
145 #endif // #ifndef HEADER
146 // CHECK1-LABEL: define {{[^@]+}}@_Z21teams_template_structv
147 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
148 // CHECK1-NEXT: entry:
149 // CHECK1-NEXT: [[V:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
150 // CHECK1-NEXT: [[CALL:%.*]] = call noundef signext i32 @_ZN2SSIiLi123ELx456EE3fooEv(ptr noundef nonnull align 4 dereferenceable(496) [[V]])
151 // CHECK1-NEXT: ret i32 [[CALL]]
154 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSIiLi123ELx456EE3fooEv
155 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(496) [[THIS:%.*]]) #[[ATTR0]] comdat {
156 // CHECK1-NEXT: entry:
157 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
158 // CHECK1-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
159 // CHECK1-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
160 // CHECK1-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
161 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
162 // CHECK1-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
163 // CHECK1-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 8
164 // CHECK1-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 8
165 // CHECK1-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 8
166 // CHECK1-NEXT: [[_TMP6:%.*]] = alloca i32, align 4
167 // CHECK1-NEXT: [[KERNEL_ARGS7:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
168 // CHECK1-NEXT: [[DOTOFFLOAD_BASEPTRS11:%.*]] = alloca [1 x ptr], align 8
169 // CHECK1-NEXT: [[DOTOFFLOAD_PTRS12:%.*]] = alloca [1 x ptr], align 8
170 // CHECK1-NEXT: [[DOTOFFLOAD_MAPPERS13:%.*]] = alloca [1 x ptr], align 8
171 // CHECK1-NEXT: [[_TMP14:%.*]] = alloca i32, align 4
172 // CHECK1-NEXT: [[KERNEL_ARGS15:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
173 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
174 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
175 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
176 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
177 // CHECK1-NEXT: store ptr [[THIS1]], ptr [[TMP0]], align 8
178 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
179 // CHECK1-NEXT: store ptr [[A]], ptr [[TMP1]], align 8
180 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
181 // CHECK1-NEXT: store ptr null, ptr [[TMP2]], align 8
182 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
183 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
184 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
185 // CHECK1-NEXT: store i32 3, ptr [[TMP5]], align 4
186 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
187 // CHECK1-NEXT: store i32 1, ptr [[TMP6]], align 4
188 // CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
189 // CHECK1-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 8
190 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
191 // CHECK1-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 8
192 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
193 // CHECK1-NEXT: store ptr @.offload_sizes, ptr [[TMP9]], align 8
194 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
195 // CHECK1-NEXT: store ptr @.offload_maptypes, ptr [[TMP10]], align 8
196 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
197 // CHECK1-NEXT: store ptr null, ptr [[TMP11]], align 8
198 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
199 // CHECK1-NEXT: store ptr null, ptr [[TMP12]], align 8
200 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
201 // CHECK1-NEXT: store i64 123, ptr [[TMP13]], align 8
202 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
203 // CHECK1-NEXT: store i64 0, ptr [[TMP14]], align 8
204 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
205 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
206 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
207 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
208 // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
209 // CHECK1-NEXT: store i32 0, ptr [[TMP17]], align 4
210 // CHECK1-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.region_id, ptr [[KERNEL_ARGS]])
211 // CHECK1-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
212 // CHECK1-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
213 // CHECK1: omp_offload.failed:
214 // CHECK1-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28(ptr [[THIS1]]) #[[ATTR2:[0-9]+]]
215 // CHECK1-NEXT: br label [[OMP_OFFLOAD_CONT]]
216 // CHECK1: omp_offload.cont:
217 // CHECK1-NEXT: [[A2:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
218 // CHECK1-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
219 // CHECK1-NEXT: store ptr [[THIS1]], ptr [[TMP20]], align 8
220 // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
221 // CHECK1-NEXT: store ptr [[A2]], ptr [[TMP21]], align 8
222 // CHECK1-NEXT: [[TMP22:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i64 0, i64 0
223 // CHECK1-NEXT: store ptr null, ptr [[TMP22]], align 8
224 // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
225 // CHECK1-NEXT: [[TMP24:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
226 // CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 0
227 // CHECK1-NEXT: store i32 3, ptr [[TMP25]], align 4
228 // CHECK1-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 1
229 // CHECK1-NEXT: store i32 1, ptr [[TMP26]], align 4
230 // CHECK1-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 2
231 // CHECK1-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 8
232 // CHECK1-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 3
233 // CHECK1-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 8
234 // CHECK1-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 4
235 // CHECK1-NEXT: store ptr @.offload_sizes.1, ptr [[TMP29]], align 8
236 // CHECK1-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 5
237 // CHECK1-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP30]], align 8
238 // CHECK1-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 6
239 // CHECK1-NEXT: store ptr null, ptr [[TMP31]], align 8
240 // CHECK1-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 7
241 // CHECK1-NEXT: store ptr null, ptr [[TMP32]], align 8
242 // CHECK1-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 8
243 // CHECK1-NEXT: store i64 123, ptr [[TMP33]], align 8
244 // CHECK1-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 9
245 // CHECK1-NEXT: store i64 0, ptr [[TMP34]], align 8
246 // CHECK1-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 10
247 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
248 // CHECK1-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 11
249 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
250 // CHECK1-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 12
251 // CHECK1-NEXT: store i32 0, ptr [[TMP37]], align 4
252 // CHECK1-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.region_id, ptr [[KERNEL_ARGS7]])
253 // CHECK1-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
254 // CHECK1-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED8:%.*]], label [[OMP_OFFLOAD_CONT9:%.*]]
255 // CHECK1: omp_offload.failed8:
256 // CHECK1-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33(ptr [[THIS1]]) #[[ATTR2]]
257 // CHECK1-NEXT: br label [[OMP_OFFLOAD_CONT9]]
258 // CHECK1: omp_offload.cont9:
259 // CHECK1-NEXT: [[A10:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
260 // CHECK1-NEXT: [[TMP40:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS11]], i32 0, i32 0
261 // CHECK1-NEXT: store ptr [[THIS1]], ptr [[TMP40]], align 8
262 // CHECK1-NEXT: [[TMP41:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS12]], i32 0, i32 0
263 // CHECK1-NEXT: store ptr [[A10]], ptr [[TMP41]], align 8
264 // CHECK1-NEXT: [[TMP42:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS13]], i64 0, i64 0
265 // CHECK1-NEXT: store ptr null, ptr [[TMP42]], align 8
266 // CHECK1-NEXT: [[TMP43:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS11]], i32 0, i32 0
267 // CHECK1-NEXT: [[TMP44:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS12]], i32 0, i32 0
268 // CHECK1-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 0
269 // CHECK1-NEXT: store i32 3, ptr [[TMP45]], align 4
270 // CHECK1-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 1
271 // CHECK1-NEXT: store i32 1, ptr [[TMP46]], align 4
272 // CHECK1-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 2
273 // CHECK1-NEXT: store ptr [[TMP43]], ptr [[TMP47]], align 8
274 // CHECK1-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 3
275 // CHECK1-NEXT: store ptr [[TMP44]], ptr [[TMP48]], align 8
276 // CHECK1-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 4
277 // CHECK1-NEXT: store ptr @.offload_sizes.3, ptr [[TMP49]], align 8
278 // CHECK1-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 5
279 // CHECK1-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP50]], align 8
280 // CHECK1-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 6
281 // CHECK1-NEXT: store ptr null, ptr [[TMP51]], align 8
282 // CHECK1-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 7
283 // CHECK1-NEXT: store ptr null, ptr [[TMP52]], align 8
284 // CHECK1-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 8
285 // CHECK1-NEXT: store i64 123, ptr [[TMP53]], align 8
286 // CHECK1-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 9
287 // CHECK1-NEXT: store i64 0, ptr [[TMP54]], align 8
288 // CHECK1-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 10
289 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP55]], align 4
290 // CHECK1-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 11
291 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP56]], align 4
292 // CHECK1-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 12
293 // CHECK1-NEXT: store i32 0, ptr [[TMP57]], align 4
294 // CHECK1-NEXT: [[TMP58:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.region_id, ptr [[KERNEL_ARGS15]])
295 // CHECK1-NEXT: [[TMP59:%.*]] = icmp ne i32 [[TMP58]], 0
296 // CHECK1-NEXT: br i1 [[TMP59]], label [[OMP_OFFLOAD_FAILED16:%.*]], label [[OMP_OFFLOAD_CONT17:%.*]]
297 // CHECK1: omp_offload.failed16:
298 // CHECK1-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38(ptr [[THIS1]]) #[[ATTR2]]
299 // CHECK1-NEXT: br label [[OMP_OFFLOAD_CONT17]]
300 // CHECK1: omp_offload.cont17:
301 // CHECK1-NEXT: [[A18:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
302 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A18]], i64 0, i64 0
303 // CHECK1-NEXT: [[TMP60:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
304 // CHECK1-NEXT: ret i32 [[TMP60]]
307 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28
308 // CHECK1-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1:[0-9]+]] {
309 // CHECK1-NEXT: entry:
310 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
311 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
312 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
313 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined, ptr [[TMP0]])
314 // CHECK1-NEXT: ret void
317 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined
318 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
319 // CHECK1-NEXT: entry:
320 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
321 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
322 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
323 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
324 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
325 // CHECK1-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
326 // CHECK1-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
327 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
328 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
329 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
330 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
331 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
332 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
333 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
334 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
335 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
336 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
337 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
338 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
339 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
340 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
341 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
342 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
343 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
344 // CHECK1: cond.true:
345 // CHECK1-NEXT: br label [[COND_END:%.*]]
346 // CHECK1: cond.false:
347 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
348 // CHECK1-NEXT: br label [[COND_END]]
349 // CHECK1: cond.end:
350 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
351 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
352 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
353 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
354 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
355 // CHECK1: omp.inner.for.cond:
356 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
357 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
358 // CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
359 // CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
360 // CHECK1: omp.inner.for.body:
361 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
362 // CHECK1-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
363 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
364 // CHECK1-NEXT: [[TMP11:%.*]] = zext i32 [[TMP10]] to i64
365 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined.omp_outlined, i64 [[TMP9]], i64 [[TMP11]], ptr [[TMP0]])
366 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
367 // CHECK1: omp.inner.for.inc:
368 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
369 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
370 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
371 // CHECK1-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
372 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
373 // CHECK1: omp.inner.for.end:
374 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
375 // CHECK1: omp.loop.exit:
376 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
377 // CHECK1-NEXT: ret void
380 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined.omp_outlined
381 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
382 // CHECK1-NEXT: entry:
383 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
384 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
385 // CHECK1-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
386 // CHECK1-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
387 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
388 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
389 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
390 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
391 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
392 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
393 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
394 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
395 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
396 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
397 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
398 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
399 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
400 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
401 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
402 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
403 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
404 // CHECK1-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
405 // CHECK1-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
406 // CHECK1-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
407 // CHECK1-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
408 // CHECK1-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
409 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
410 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
411 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
412 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
413 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP4]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
414 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
415 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
416 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
417 // CHECK1: cond.true:
418 // CHECK1-NEXT: br label [[COND_END:%.*]]
419 // CHECK1: cond.false:
420 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
421 // CHECK1-NEXT: br label [[COND_END]]
422 // CHECK1: cond.end:
423 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
424 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
425 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
426 // CHECK1-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
427 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
428 // CHECK1: omp.inner.for.cond:
429 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
430 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
431 // CHECK1-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
432 // CHECK1-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
433 // CHECK1: omp.inner.for.body:
434 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
435 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
436 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
437 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
438 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
439 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
440 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
441 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i64 0, i64 [[IDXPROM]]
442 // CHECK1-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
443 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
444 // CHECK1: omp.body.continue:
445 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
446 // CHECK1: omp.inner.for.inc:
447 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
448 // CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
449 // CHECK1-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
450 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
451 // CHECK1: omp.inner.for.end:
452 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
453 // CHECK1: omp.loop.exit:
454 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
455 // CHECK1-NEXT: ret void
458 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33
459 // CHECK1-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
460 // CHECK1-NEXT: entry:
461 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
462 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
463 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
464 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined, ptr [[TMP0]])
465 // CHECK1-NEXT: ret void
468 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined
469 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
470 // CHECK1-NEXT: entry:
471 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
472 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
473 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
474 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
475 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
476 // CHECK1-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
477 // CHECK1-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
478 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
479 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
480 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
481 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
482 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
483 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
484 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
485 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
486 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
487 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
488 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
489 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
490 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
491 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
492 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
493 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
494 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
495 // CHECK1: cond.true:
496 // CHECK1-NEXT: br label [[COND_END:%.*]]
497 // CHECK1: cond.false:
498 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
499 // CHECK1-NEXT: br label [[COND_END]]
500 // CHECK1: cond.end:
501 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
502 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
503 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
504 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
505 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
506 // CHECK1: omp.inner.for.cond:
507 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
508 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
509 // CHECK1-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
510 // CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
511 // CHECK1: omp.inner.for.body:
512 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
513 // CHECK1-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
514 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
515 // CHECK1-NEXT: [[TMP11:%.*]] = zext i32 [[TMP10]] to i64
516 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined.omp_outlined, i64 [[TMP9]], i64 [[TMP11]], ptr [[TMP0]])
517 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
518 // CHECK1: omp.inner.for.inc:
519 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
520 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
521 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
522 // CHECK1-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
523 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
524 // CHECK1: omp.inner.for.end:
525 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
526 // CHECK1: omp.loop.exit:
527 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
528 // CHECK1-NEXT: ret void
531 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined.omp_outlined
532 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
533 // CHECK1-NEXT: entry:
534 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
535 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
536 // CHECK1-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
537 // CHECK1-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
538 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
539 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
540 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
541 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
542 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
543 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
544 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
545 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
546 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
547 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
548 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
549 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
550 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
551 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
552 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
553 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
554 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
555 // CHECK1-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
556 // CHECK1-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
557 // CHECK1-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
558 // CHECK1-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
559 // CHECK1-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
560 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
561 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
562 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
563 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
564 // 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)
565 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
566 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
567 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
568 // CHECK1: cond.true:
569 // CHECK1-NEXT: br label [[COND_END:%.*]]
570 // CHECK1: cond.false:
571 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
572 // CHECK1-NEXT: br label [[COND_END]]
573 // CHECK1: cond.end:
574 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
575 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
576 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
577 // CHECK1-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
578 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
579 // CHECK1: omp.inner.for.cond:
580 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
581 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
582 // CHECK1-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
583 // CHECK1-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
584 // CHECK1: omp.inner.for.body:
585 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
586 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
587 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
588 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
589 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
590 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
591 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
592 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i64 0, i64 [[IDXPROM]]
593 // CHECK1-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
594 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
595 // CHECK1: omp.body.continue:
596 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
597 // CHECK1: omp.inner.for.inc:
598 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
599 // CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
600 // CHECK1-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
601 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
602 // CHECK1: omp.inner.for.end:
603 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
604 // CHECK1: omp.loop.exit:
605 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
606 // CHECK1-NEXT: ret void
609 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38
610 // CHECK1-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
611 // CHECK1-NEXT: entry:
612 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
613 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
614 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
615 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined, ptr [[TMP0]])
616 // CHECK1-NEXT: ret void
619 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined
620 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
621 // CHECK1-NEXT: entry:
622 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
623 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
624 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
625 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
626 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
627 // CHECK1-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
628 // CHECK1-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
629 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
630 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
631 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
632 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
633 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
634 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
635 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
636 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
637 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
638 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
639 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
640 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
641 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
642 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 61)
643 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
644 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
645 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
646 // CHECK1: cond.true:
647 // CHECK1-NEXT: br label [[COND_END:%.*]]
648 // CHECK1: cond.false:
649 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
650 // CHECK1-NEXT: br label [[COND_END]]
651 // CHECK1: cond.end:
652 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
653 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
654 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
655 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
656 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
657 // CHECK1: omp.inner.for.cond:
658 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
659 // CHECK1-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP6]], 123
660 // CHECK1-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
661 // CHECK1: omp.inner.for.body:
662 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
663 // CHECK1-NEXT: [[TMP8:%.*]] = zext i32 [[TMP7]] to i64
664 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
665 // CHECK1-NEXT: [[TMP10:%.*]] = zext i32 [[TMP9]] to i64
666 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined.omp_outlined, i64 [[TMP8]], i64 [[TMP10]], ptr [[TMP0]])
667 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
668 // CHECK1: omp.inner.for.inc:
669 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
670 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
671 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
672 // CHECK1-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
673 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
674 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
675 // CHECK1-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
676 // CHECK1-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
677 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
678 // CHECK1-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
679 // CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP15]], [[TMP16]]
680 // CHECK1-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
681 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
682 // CHECK1-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP17]], 122
683 // CHECK1-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
684 // CHECK1: cond.true5:
685 // CHECK1-NEXT: br label [[COND_END7:%.*]]
686 // CHECK1: cond.false6:
687 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
688 // CHECK1-NEXT: br label [[COND_END7]]
689 // CHECK1: cond.end7:
690 // CHECK1-NEXT: [[COND8:%.*]] = phi i32 [ 122, [[COND_TRUE5]] ], [ [[TMP18]], [[COND_FALSE6]] ]
691 // CHECK1-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
692 // CHECK1-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
693 // CHECK1-NEXT: store i32 [[TMP19]], ptr [[DOTOMP_IV]], align 4
694 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
695 // CHECK1: omp.inner.for.end:
696 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
697 // CHECK1: omp.loop.exit:
698 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
699 // CHECK1-NEXT: ret void
702 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined.omp_outlined
703 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
704 // CHECK1-NEXT: entry:
705 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
706 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
707 // CHECK1-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
708 // CHECK1-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
709 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
710 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
711 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
712 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
713 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
714 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
715 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
716 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
717 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
718 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
719 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
720 // CHECK1-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
721 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
722 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
723 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
724 // CHECK1-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
725 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
726 // CHECK1-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
727 // CHECK1-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
728 // CHECK1-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
729 // CHECK1-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
730 // CHECK1-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
731 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
732 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
733 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
734 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
735 // 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)
736 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
737 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
738 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
739 // CHECK1: cond.true:
740 // CHECK1-NEXT: br label [[COND_END:%.*]]
741 // CHECK1: cond.false:
742 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
743 // CHECK1-NEXT: br label [[COND_END]]
744 // CHECK1: cond.end:
745 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
746 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
747 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
748 // CHECK1-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
749 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
750 // CHECK1: omp.inner.for.cond:
751 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
752 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
753 // CHECK1-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
754 // CHECK1-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
755 // CHECK1: omp.inner.for.body:
756 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
757 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
758 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
759 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4
760 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
761 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
762 // CHECK1-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
763 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i64 0, i64 [[IDXPROM]]
764 // CHECK1-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
765 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
766 // CHECK1: omp.body.continue:
767 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
768 // CHECK1: omp.inner.for.inc:
769 // CHECK1-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
770 // CHECK1-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
771 // CHECK1-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
772 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]]
773 // CHECK1: omp.inner.for.end:
774 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
775 // CHECK1: omp.loop.exit:
776 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
777 // CHECK1-NEXT: ret void
780 // CHECK3-LABEL: define {{[^@]+}}@_Z21teams_template_structv
781 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
782 // CHECK3-NEXT: entry:
783 // CHECK3-NEXT: [[V:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
784 // CHECK3-NEXT: [[CALL:%.*]] = call noundef i32 @_ZN2SSIiLi123ELx456EE3fooEv(ptr noundef nonnull align 4 dereferenceable(496) [[V]])
785 // CHECK3-NEXT: ret i32 [[CALL]]
788 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSIiLi123ELx456EE3fooEv
789 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(496) [[THIS:%.*]]) #[[ATTR0]] comdat align 2 {
790 // CHECK3-NEXT: entry:
791 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
792 // CHECK3-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
793 // CHECK3-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
794 // CHECK3-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
795 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
796 // CHECK3-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
797 // CHECK3-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 4
798 // CHECK3-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 4
799 // CHECK3-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 4
800 // CHECK3-NEXT: [[_TMP6:%.*]] = alloca i32, align 4
801 // CHECK3-NEXT: [[KERNEL_ARGS7:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
802 // CHECK3-NEXT: [[DOTOFFLOAD_BASEPTRS11:%.*]] = alloca [1 x ptr], align 4
803 // CHECK3-NEXT: [[DOTOFFLOAD_PTRS12:%.*]] = alloca [1 x ptr], align 4
804 // CHECK3-NEXT: [[DOTOFFLOAD_MAPPERS13:%.*]] = alloca [1 x ptr], align 4
805 // CHECK3-NEXT: [[_TMP14:%.*]] = alloca i32, align 4
806 // CHECK3-NEXT: [[KERNEL_ARGS15:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
807 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
808 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
809 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
810 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
811 // CHECK3-NEXT: store ptr [[THIS1]], ptr [[TMP0]], align 4
812 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
813 // CHECK3-NEXT: store ptr [[A]], ptr [[TMP1]], align 4
814 // CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
815 // CHECK3-NEXT: store ptr null, ptr [[TMP2]], align 4
816 // CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
817 // CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
818 // CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
819 // CHECK3-NEXT: store i32 3, ptr [[TMP5]], align 4
820 // CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
821 // CHECK3-NEXT: store i32 1, ptr [[TMP6]], align 4
822 // CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
823 // CHECK3-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 4
824 // CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
825 // CHECK3-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 4
826 // CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
827 // CHECK3-NEXT: store ptr @.offload_sizes, ptr [[TMP9]], align 4
828 // CHECK3-NEXT: [[TMP10:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
829 // CHECK3-NEXT: store ptr @.offload_maptypes, ptr [[TMP10]], align 4
830 // CHECK3-NEXT: [[TMP11:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
831 // CHECK3-NEXT: store ptr null, ptr [[TMP11]], align 4
832 // CHECK3-NEXT: [[TMP12:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
833 // CHECK3-NEXT: store ptr null, ptr [[TMP12]], align 4
834 // CHECK3-NEXT: [[TMP13:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
835 // CHECK3-NEXT: store i64 123, ptr [[TMP13]], align 8
836 // CHECK3-NEXT: [[TMP14:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
837 // CHECK3-NEXT: store i64 0, ptr [[TMP14]], align 8
838 // CHECK3-NEXT: [[TMP15:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
839 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
840 // CHECK3-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
841 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
842 // CHECK3-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
843 // CHECK3-NEXT: store i32 0, ptr [[TMP17]], align 4
844 // CHECK3-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.region_id, ptr [[KERNEL_ARGS]])
845 // CHECK3-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
846 // CHECK3-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
847 // CHECK3: omp_offload.failed:
848 // CHECK3-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28(ptr [[THIS1]]) #[[ATTR2:[0-9]+]]
849 // CHECK3-NEXT: br label [[OMP_OFFLOAD_CONT]]
850 // CHECK3: omp_offload.cont:
851 // CHECK3-NEXT: [[A2:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
852 // CHECK3-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
853 // CHECK3-NEXT: store ptr [[THIS1]], ptr [[TMP20]], align 4
854 // CHECK3-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
855 // CHECK3-NEXT: store ptr [[A2]], ptr [[TMP21]], align 4
856 // CHECK3-NEXT: [[TMP22:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i32 0, i32 0
857 // CHECK3-NEXT: store ptr null, ptr [[TMP22]], align 4
858 // CHECK3-NEXT: [[TMP23:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
859 // CHECK3-NEXT: [[TMP24:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
860 // CHECK3-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 0
861 // CHECK3-NEXT: store i32 3, ptr [[TMP25]], align 4
862 // CHECK3-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 1
863 // CHECK3-NEXT: store i32 1, ptr [[TMP26]], align 4
864 // CHECK3-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 2
865 // CHECK3-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 4
866 // CHECK3-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 3
867 // CHECK3-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 4
868 // CHECK3-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 4
869 // CHECK3-NEXT: store ptr @.offload_sizes.1, ptr [[TMP29]], align 4
870 // CHECK3-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 5
871 // CHECK3-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP30]], align 4
872 // CHECK3-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 6
873 // CHECK3-NEXT: store ptr null, ptr [[TMP31]], align 4
874 // CHECK3-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 7
875 // CHECK3-NEXT: store ptr null, ptr [[TMP32]], align 4
876 // CHECK3-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 8
877 // CHECK3-NEXT: store i64 123, ptr [[TMP33]], align 8
878 // CHECK3-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 9
879 // CHECK3-NEXT: store i64 0, ptr [[TMP34]], align 8
880 // CHECK3-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 10
881 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
882 // CHECK3-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 11
883 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
884 // CHECK3-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS7]], i32 0, i32 12
885 // CHECK3-NEXT: store i32 0, ptr [[TMP37]], align 4
886 // CHECK3-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.region_id, ptr [[KERNEL_ARGS7]])
887 // CHECK3-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
888 // CHECK3-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED8:%.*]], label [[OMP_OFFLOAD_CONT9:%.*]]
889 // CHECK3: omp_offload.failed8:
890 // CHECK3-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33(ptr [[THIS1]]) #[[ATTR2]]
891 // CHECK3-NEXT: br label [[OMP_OFFLOAD_CONT9]]
892 // CHECK3: omp_offload.cont9:
893 // CHECK3-NEXT: [[A10:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
894 // CHECK3-NEXT: [[TMP40:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS11]], i32 0, i32 0
895 // CHECK3-NEXT: store ptr [[THIS1]], ptr [[TMP40]], align 4
896 // CHECK3-NEXT: [[TMP41:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS12]], i32 0, i32 0
897 // CHECK3-NEXT: store ptr [[A10]], ptr [[TMP41]], align 4
898 // CHECK3-NEXT: [[TMP42:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS13]], i32 0, i32 0
899 // CHECK3-NEXT: store ptr null, ptr [[TMP42]], align 4
900 // CHECK3-NEXT: [[TMP43:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS11]], i32 0, i32 0
901 // CHECK3-NEXT: [[TMP44:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS12]], i32 0, i32 0
902 // CHECK3-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 0
903 // CHECK3-NEXT: store i32 3, ptr [[TMP45]], align 4
904 // CHECK3-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 1
905 // CHECK3-NEXT: store i32 1, ptr [[TMP46]], align 4
906 // CHECK3-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 2
907 // CHECK3-NEXT: store ptr [[TMP43]], ptr [[TMP47]], align 4
908 // CHECK3-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 3
909 // CHECK3-NEXT: store ptr [[TMP44]], ptr [[TMP48]], align 4
910 // CHECK3-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 4
911 // CHECK3-NEXT: store ptr @.offload_sizes.3, ptr [[TMP49]], align 4
912 // CHECK3-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 5
913 // CHECK3-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP50]], align 4
914 // CHECK3-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 6
915 // CHECK3-NEXT: store ptr null, ptr [[TMP51]], align 4
916 // CHECK3-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 7
917 // CHECK3-NEXT: store ptr null, ptr [[TMP52]], align 4
918 // CHECK3-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 8
919 // CHECK3-NEXT: store i64 123, ptr [[TMP53]], align 8
920 // CHECK3-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 9
921 // CHECK3-NEXT: store i64 0, ptr [[TMP54]], align 8
922 // CHECK3-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 10
923 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP55]], align 4
924 // CHECK3-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 11
925 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP56]], align 4
926 // CHECK3-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 12
927 // CHECK3-NEXT: store i32 0, ptr [[TMP57]], align 4
928 // CHECK3-NEXT: [[TMP58:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.region_id, ptr [[KERNEL_ARGS15]])
929 // CHECK3-NEXT: [[TMP59:%.*]] = icmp ne i32 [[TMP58]], 0
930 // CHECK3-NEXT: br i1 [[TMP59]], label [[OMP_OFFLOAD_FAILED16:%.*]], label [[OMP_OFFLOAD_CONT17:%.*]]
931 // CHECK3: omp_offload.failed16:
932 // CHECK3-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38(ptr [[THIS1]]) #[[ATTR2]]
933 // CHECK3-NEXT: br label [[OMP_OFFLOAD_CONT17]]
934 // CHECK3: omp_offload.cont17:
935 // CHECK3-NEXT: [[A18:%.*]] = getelementptr inbounds nuw [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
936 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A18]], i32 0, i32 0
937 // CHECK3-NEXT: [[TMP60:%.*]] = load i32, ptr [[ARRAYIDX]], align 4
938 // CHECK3-NEXT: ret i32 [[TMP60]]
941 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28
942 // CHECK3-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1:[0-9]+]] {
943 // CHECK3-NEXT: entry:
944 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
945 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
946 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
947 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined, ptr [[TMP0]])
948 // CHECK3-NEXT: ret void
951 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined
952 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
953 // CHECK3-NEXT: entry:
954 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
955 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
956 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
957 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
958 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
959 // CHECK3-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
960 // CHECK3-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
961 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
962 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
963 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
964 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
965 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
966 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
967 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
968 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
969 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
970 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
971 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
972 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
973 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
974 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
975 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
976 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
977 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
978 // CHECK3: cond.true:
979 // CHECK3-NEXT: br label [[COND_END:%.*]]
980 // CHECK3: cond.false:
981 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
982 // CHECK3-NEXT: br label [[COND_END]]
983 // CHECK3: cond.end:
984 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
985 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
986 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
987 // CHECK3-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
988 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
989 // CHECK3: omp.inner.for.cond:
990 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
991 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
992 // CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
993 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
994 // CHECK3: omp.inner.for.body:
995 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
996 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
997 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined.omp_outlined, i32 [[TMP8]], i32 [[TMP9]], ptr [[TMP0]])
998 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
999 // CHECK3: omp.inner.for.inc:
1000 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1001 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1002 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
1003 // CHECK3-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1004 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1005 // CHECK3: omp.inner.for.end:
1006 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1007 // CHECK3: omp.loop.exit:
1008 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
1009 // CHECK3-NEXT: ret void
1012 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l28.omp_outlined.omp_outlined
1013 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1014 // CHECK3-NEXT: entry:
1015 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1016 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1017 // CHECK3-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
1018 // CHECK3-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
1019 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1020 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1021 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
1022 // CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1023 // CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1024 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1025 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1026 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
1027 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1028 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1029 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1030 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1031 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1032 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1033 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1034 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
1035 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1036 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1037 // CHECK3-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
1038 // CHECK3-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
1039 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1040 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1041 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1042 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1043 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2:[0-9]+]], i32 [[TMP4]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1044 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1045 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
1046 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1047 // CHECK3: cond.true:
1048 // CHECK3-NEXT: br label [[COND_END:%.*]]
1049 // CHECK3: cond.false:
1050 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1051 // CHECK3-NEXT: br label [[COND_END]]
1052 // CHECK3: cond.end:
1053 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
1054 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1055 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1056 // CHECK3-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1057 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1058 // CHECK3: omp.inner.for.cond:
1059 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1060 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1061 // CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1062 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1063 // CHECK3: omp.inner.for.body:
1064 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1065 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1066 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1067 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1068 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
1069 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
1070 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i32 0, i32 [[TMP11]]
1071 // CHECK3-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
1072 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1073 // CHECK3: omp.body.continue:
1074 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1075 // CHECK3: omp.inner.for.inc:
1076 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1077 // CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
1078 // CHECK3-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
1079 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1080 // CHECK3: omp.inner.for.end:
1081 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1082 // CHECK3: omp.loop.exit:
1083 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
1084 // CHECK3-NEXT: ret void
1087 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33
1088 // CHECK3-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1089 // CHECK3-NEXT: entry:
1090 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1091 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1092 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1093 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined, ptr [[TMP0]])
1094 // CHECK3-NEXT: ret void
1097 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined
1098 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1099 // CHECK3-NEXT: entry:
1100 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1101 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1102 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1103 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1104 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
1105 // CHECK3-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1106 // CHECK3-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1107 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1108 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1109 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
1110 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1111 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1112 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1113 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1114 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1115 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
1116 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1117 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1118 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1119 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1120 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1121 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1122 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
1123 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1124 // CHECK3: cond.true:
1125 // CHECK3-NEXT: br label [[COND_END:%.*]]
1126 // CHECK3: cond.false:
1127 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1128 // CHECK3-NEXT: br label [[COND_END]]
1129 // CHECK3: cond.end:
1130 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
1131 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1132 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1133 // CHECK3-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
1134 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1135 // CHECK3: omp.inner.for.cond:
1136 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1137 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1138 // CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
1139 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1140 // CHECK3: omp.inner.for.body:
1141 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1142 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1143 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined.omp_outlined, i32 [[TMP8]], i32 [[TMP9]], ptr [[TMP0]])
1144 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1145 // CHECK3: omp.inner.for.inc:
1146 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1147 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1148 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
1149 // CHECK3-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1150 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1151 // CHECK3: omp.inner.for.end:
1152 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1153 // CHECK3: omp.loop.exit:
1154 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
1155 // CHECK3-NEXT: ret void
1158 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l33.omp_outlined.omp_outlined
1159 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1160 // CHECK3-NEXT: entry:
1161 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1162 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1163 // CHECK3-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
1164 // CHECK3-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
1165 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1166 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1167 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
1168 // CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1169 // CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1170 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1171 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1172 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
1173 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1174 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1175 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1176 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1177 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1178 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1179 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1180 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
1181 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1182 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1183 // CHECK3-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
1184 // CHECK3-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
1185 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1186 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1187 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1188 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1189 // CHECK3-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)
1190 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1191 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
1192 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1193 // CHECK3: cond.true:
1194 // CHECK3-NEXT: br label [[COND_END:%.*]]
1195 // CHECK3: cond.false:
1196 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1197 // CHECK3-NEXT: br label [[COND_END]]
1198 // CHECK3: cond.end:
1199 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
1200 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1201 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1202 // CHECK3-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1203 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1204 // CHECK3: omp.inner.for.cond:
1205 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1206 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1207 // CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1208 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1209 // CHECK3: omp.inner.for.body:
1210 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1211 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1212 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1213 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1214 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
1215 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
1216 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i32 0, i32 [[TMP11]]
1217 // CHECK3-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
1218 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1219 // CHECK3: omp.body.continue:
1220 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1221 // CHECK3: omp.inner.for.inc:
1222 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1223 // CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
1224 // CHECK3-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
1225 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1226 // CHECK3: omp.inner.for.end:
1227 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1228 // CHECK3: omp.loop.exit:
1229 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
1230 // CHECK3-NEXT: ret void
1233 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38
1234 // CHECK3-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1235 // CHECK3-NEXT: entry:
1236 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1237 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1238 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1239 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined, ptr [[TMP0]])
1240 // CHECK3-NEXT: ret void
1243 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined
1244 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1245 // CHECK3-NEXT: entry:
1246 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1247 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1248 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1249 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1250 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
1251 // CHECK3-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1252 // CHECK3-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1253 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1254 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1255 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
1256 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1257 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1258 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1259 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1260 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1261 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_COMB_UB]], align 4
1262 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1263 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1264 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1265 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1266 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 61)
1267 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1268 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 122
1269 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1270 // CHECK3: cond.true:
1271 // CHECK3-NEXT: br label [[COND_END:%.*]]
1272 // CHECK3: cond.false:
1273 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1274 // CHECK3-NEXT: br label [[COND_END]]
1275 // CHECK3: cond.end:
1276 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
1277 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1278 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1279 // CHECK3-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
1280 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1281 // CHECK3: omp.inner.for.cond:
1282 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1283 // CHECK3-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP6]], 123
1284 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1285 // CHECK3: omp.inner.for.body:
1286 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1287 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1288 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined.omp_outlined, i32 [[TMP7]], i32 [[TMP8]], ptr [[TMP0]])
1289 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1290 // CHECK3: omp.inner.for.inc:
1291 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1292 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1293 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP9]], [[TMP10]]
1294 // CHECK3-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1295 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1296 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1297 // CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP11]], [[TMP12]]
1298 // CHECK3-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
1299 // CHECK3-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1300 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1301 // CHECK3-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP13]], [[TMP14]]
1302 // CHECK3-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
1303 // CHECK3-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1304 // CHECK3-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP15]], 122
1305 // CHECK3-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
1306 // CHECK3: cond.true5:
1307 // CHECK3-NEXT: br label [[COND_END7:%.*]]
1308 // CHECK3: cond.false6:
1309 // CHECK3-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1310 // CHECK3-NEXT: br label [[COND_END7]]
1311 // CHECK3: cond.end7:
1312 // CHECK3-NEXT: [[COND8:%.*]] = phi i32 [ 122, [[COND_TRUE5]] ], [ [[TMP16]], [[COND_FALSE6]] ]
1313 // CHECK3-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
1314 // CHECK3-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1315 // CHECK3-NEXT: store i32 [[TMP17]], ptr [[DOTOMP_IV]], align 4
1316 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1317 // CHECK3: omp.inner.for.end:
1318 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1319 // CHECK3: omp.loop.exit:
1320 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
1321 // CHECK3-NEXT: ret void
1324 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSIiLi123ELx456EE3fooEv_l38.omp_outlined.omp_outlined
1325 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
1326 // CHECK3-NEXT: entry:
1327 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1328 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1329 // CHECK3-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
1330 // CHECK3-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
1331 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1332 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1333 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
1334 // CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1335 // CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1336 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1337 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1338 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
1339 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1340 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1341 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1342 // CHECK3-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1343 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1344 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1345 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1346 // CHECK3-NEXT: store i32 122, ptr [[DOTOMP_UB]], align 4
1347 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
1348 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
1349 // CHECK3-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
1350 // CHECK3-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
1351 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1352 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1353 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1354 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1355 // CHECK3-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)
1356 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1357 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 122
1358 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1359 // CHECK3: cond.true:
1360 // CHECK3-NEXT: br label [[COND_END:%.*]]
1361 // CHECK3: cond.false:
1362 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1363 // CHECK3-NEXT: br label [[COND_END]]
1364 // CHECK3: cond.end:
1365 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 122, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
1366 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1367 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1368 // CHECK3-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
1369 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1370 // CHECK3: omp.inner.for.cond:
1371 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1372 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1373 // CHECK3-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
1374 // CHECK3-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1375 // CHECK3: omp.inner.for.body:
1376 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1377 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
1378 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1379 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4
1380 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_SS:%.*]], ptr [[TMP0]], i32 0, i32 0
1381 // CHECK3-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
1382 // CHECK3-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [123 x i32], ptr [[A]], i32 0, i32 [[TMP11]]
1383 // CHECK3-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
1384 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1385 // CHECK3: omp.body.continue:
1386 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1387 // CHECK3: omp.inner.for.inc:
1388 // CHECK3-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1389 // CHECK3-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
1390 // CHECK3-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
1391 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]]
1392 // CHECK3: omp.inner.for.end:
1393 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1394 // CHECK3: omp.loop.exit:
1395 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
1396 // CHECK3-NEXT: ret void
1399 // CHECK9-LABEL: define {{[^@]+}}@main
1400 // CHECK9-SAME: (i32 noundef signext [[ARGC:%.*]], ptr noundef [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] {
1401 // CHECK9-NEXT: entry:
1402 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1403 // CHECK9-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
1404 // CHECK9-NEXT: [[ARGV_ADDR:%.*]] = alloca ptr, align 8
1405 // CHECK9-NEXT: [[N:%.*]] = alloca i32, align 4
1406 // CHECK9-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
1407 // CHECK9-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
1408 // CHECK9-NEXT: [[M:%.*]] = alloca i32, align 4
1409 // CHECK9-NEXT: [[N_CASTED:%.*]] = alloca i64, align 8
1410 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 8
1411 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 8
1412 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 8
1413 // CHECK9-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 8
1414 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
1415 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
1416 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
1417 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1418 // CHECK9-NEXT: [[N_CASTED3:%.*]] = alloca i64, align 8
1419 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS4:%.*]] = alloca [3 x ptr], align 8
1420 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS5:%.*]] = alloca [3 x ptr], align 8
1421 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS6:%.*]] = alloca [3 x ptr], align 8
1422 // CHECK9-NEXT: [[DOTOFFLOAD_SIZES7:%.*]] = alloca [3 x i64], align 8
1423 // CHECK9-NEXT: [[_TMP8:%.*]] = alloca i32, align 4
1424 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_9:%.*]] = alloca i32, align 4
1425 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_10:%.*]] = alloca i32, align 4
1426 // CHECK9-NEXT: [[KERNEL_ARGS15:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1427 // CHECK9-NEXT: [[M_CASTED:%.*]] = alloca i64, align 8
1428 // CHECK9-NEXT: [[N_CASTED18:%.*]] = alloca i64, align 8
1429 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS19:%.*]] = alloca [4 x ptr], align 8
1430 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS20:%.*]] = alloca [4 x ptr], align 8
1431 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS21:%.*]] = alloca [4 x ptr], align 8
1432 // CHECK9-NEXT: [[DOTOFFLOAD_SIZES22:%.*]] = alloca [4 x i64], align 8
1433 // CHECK9-NEXT: [[_TMP23:%.*]] = alloca i32, align 4
1434 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_24:%.*]] = alloca i32, align 4
1435 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_25:%.*]] = alloca i32, align 4
1436 // CHECK9-NEXT: [[KERNEL_ARGS30:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1437 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
1438 // CHECK9-NEXT: store i32 [[ARGC]], ptr [[ARGC_ADDR]], align 4
1439 // CHECK9-NEXT: store ptr [[ARGV]], ptr [[ARGV_ADDR]], align 8
1440 // CHECK9-NEXT: store i32 100, ptr [[N]], align 4
1441 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[N]], align 4
1442 // CHECK9-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64
1443 // CHECK9-NEXT: [[TMP2:%.*]] = call ptr @llvm.stacksave.p0()
1444 // CHECK9-NEXT: store ptr [[TMP2]], ptr [[SAVED_STACK]], align 8
1445 // CHECK9-NEXT: [[VLA:%.*]] = alloca i32, i64 [[TMP1]], align 4
1446 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[__VLA_EXPR0]], align 8
1447 // CHECK9-NEXT: store i32 10, ptr [[M]], align 4
1448 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[N]], align 4
1449 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[N_CASTED]], align 4
1450 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[N_CASTED]], align 8
1451 // CHECK9-NEXT: [[TMP5:%.*]] = mul nuw i64 [[TMP1]], 4
1452 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes, i64 24, i1 false)
1453 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1454 // CHECK9-NEXT: store i64 [[TMP4]], ptr [[TMP6]], align 8
1455 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1456 // CHECK9-NEXT: store i64 [[TMP4]], ptr [[TMP7]], align 8
1457 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
1458 // CHECK9-NEXT: store ptr null, ptr [[TMP8]], align 8
1459 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1460 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP9]], align 8
1461 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1462 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP10]], align 8
1463 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
1464 // CHECK9-NEXT: store ptr null, ptr [[TMP11]], align 8
1465 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1466 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP12]], align 8
1467 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1468 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP13]], align 8
1469 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 2
1470 // CHECK9-NEXT: store i64 [[TMP5]], ptr [[TMP14]], align 8
1471 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
1472 // CHECK9-NEXT: store ptr null, ptr [[TMP15]], align 8
1473 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1474 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1475 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1476 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[N]], align 4
1477 // CHECK9-NEXT: store i32 [[TMP19]], ptr [[DOTCAPTURE_EXPR_]], align 4
1478 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1479 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP20]], 0
1480 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
1481 // CHECK9-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
1482 // CHECK9-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
1483 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1484 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP21]], 1
1485 // CHECK9-NEXT: [[TMP22:%.*]] = zext i32 [[ADD]] to i64
1486 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1487 // CHECK9-NEXT: store i32 3, ptr [[TMP23]], align 4
1488 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1489 // CHECK9-NEXT: store i32 3, ptr [[TMP24]], align 4
1490 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1491 // CHECK9-NEXT: store ptr [[TMP16]], ptr [[TMP25]], align 8
1492 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1493 // CHECK9-NEXT: store ptr [[TMP17]], ptr [[TMP26]], align 8
1494 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1495 // CHECK9-NEXT: store ptr [[TMP18]], ptr [[TMP27]], align 8
1496 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1497 // CHECK9-NEXT: store ptr @.offload_maptypes, ptr [[TMP28]], align 8
1498 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1499 // CHECK9-NEXT: store ptr null, ptr [[TMP29]], align 8
1500 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1501 // CHECK9-NEXT: store ptr null, ptr [[TMP30]], align 8
1502 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1503 // CHECK9-NEXT: store i64 [[TMP22]], ptr [[TMP31]], align 8
1504 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1505 // CHECK9-NEXT: store i64 0, ptr [[TMP32]], align 8
1506 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1507 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP33]], align 4
1508 // CHECK9-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1509 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP34]], align 4
1510 // CHECK9-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1511 // CHECK9-NEXT: store i32 0, ptr [[TMP35]], align 4
1512 // CHECK9-NEXT: [[TMP36:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.region_id, ptr [[KERNEL_ARGS]])
1513 // CHECK9-NEXT: [[TMP37:%.*]] = icmp ne i32 [[TMP36]], 0
1514 // CHECK9-NEXT: br i1 [[TMP37]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1515 // CHECK9: omp_offload.failed:
1516 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106(i64 [[TMP4]], i64 [[TMP1]], ptr [[VLA]]) #[[ATTR3:[0-9]+]]
1517 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
1518 // CHECK9: omp_offload.cont:
1519 // CHECK9-NEXT: [[TMP38:%.*]] = load i32, ptr [[N]], align 4
1520 // CHECK9-NEXT: store i32 [[TMP38]], ptr [[N_CASTED3]], align 4
1521 // CHECK9-NEXT: [[TMP39:%.*]] = load i64, ptr [[N_CASTED3]], align 8
1522 // CHECK9-NEXT: [[TMP40:%.*]] = mul nuw i64 [[TMP1]], 4
1523 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES7]], ptr align 8 @.offload_sizes.1, i64 24, i1 false)
1524 // CHECK9-NEXT: [[TMP41:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 0
1525 // CHECK9-NEXT: store i64 [[TMP39]], ptr [[TMP41]], align 8
1526 // CHECK9-NEXT: [[TMP42:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 0
1527 // CHECK9-NEXT: store i64 [[TMP39]], ptr [[TMP42]], align 8
1528 // CHECK9-NEXT: [[TMP43:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i64 0, i64 0
1529 // CHECK9-NEXT: store ptr null, ptr [[TMP43]], align 8
1530 // CHECK9-NEXT: [[TMP44:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 1
1531 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP44]], align 8
1532 // CHECK9-NEXT: [[TMP45:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 1
1533 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP45]], align 8
1534 // CHECK9-NEXT: [[TMP46:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i64 0, i64 1
1535 // CHECK9-NEXT: store ptr null, ptr [[TMP46]], align 8
1536 // CHECK9-NEXT: [[TMP47:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 2
1537 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP47]], align 8
1538 // CHECK9-NEXT: [[TMP48:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 2
1539 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP48]], align 8
1540 // CHECK9-NEXT: [[TMP49:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES7]], i32 0, i32 2
1541 // CHECK9-NEXT: store i64 [[TMP40]], ptr [[TMP49]], align 8
1542 // CHECK9-NEXT: [[TMP50:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i64 0, i64 2
1543 // CHECK9-NEXT: store ptr null, ptr [[TMP50]], align 8
1544 // CHECK9-NEXT: [[TMP51:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 0
1545 // CHECK9-NEXT: [[TMP52:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 0
1546 // CHECK9-NEXT: [[TMP53:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES7]], i32 0, i32 0
1547 // CHECK9-NEXT: [[TMP54:%.*]] = load i32, ptr [[N]], align 4
1548 // CHECK9-NEXT: store i32 [[TMP54]], ptr [[DOTCAPTURE_EXPR_9]], align 4
1549 // CHECK9-NEXT: [[TMP55:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_9]], align 4
1550 // CHECK9-NEXT: [[SUB11:%.*]] = sub nsw i32 [[TMP55]], 0
1551 // CHECK9-NEXT: [[DIV12:%.*]] = sdiv i32 [[SUB11]], 1
1552 // CHECK9-NEXT: [[SUB13:%.*]] = sub nsw i32 [[DIV12]], 1
1553 // CHECK9-NEXT: store i32 [[SUB13]], ptr [[DOTCAPTURE_EXPR_10]], align 4
1554 // CHECK9-NEXT: [[TMP56:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_10]], align 4
1555 // CHECK9-NEXT: [[ADD14:%.*]] = add nsw i32 [[TMP56]], 1
1556 // CHECK9-NEXT: [[TMP57:%.*]] = zext i32 [[ADD14]] to i64
1557 // CHECK9-NEXT: [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 0
1558 // CHECK9-NEXT: store i32 3, ptr [[TMP58]], align 4
1559 // CHECK9-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 1
1560 // CHECK9-NEXT: store i32 3, ptr [[TMP59]], align 4
1561 // CHECK9-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 2
1562 // CHECK9-NEXT: store ptr [[TMP51]], ptr [[TMP60]], align 8
1563 // CHECK9-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 3
1564 // CHECK9-NEXT: store ptr [[TMP52]], ptr [[TMP61]], align 8
1565 // CHECK9-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 4
1566 // CHECK9-NEXT: store ptr [[TMP53]], ptr [[TMP62]], align 8
1567 // CHECK9-NEXT: [[TMP63:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 5
1568 // CHECK9-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP63]], align 8
1569 // CHECK9-NEXT: [[TMP64:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 6
1570 // CHECK9-NEXT: store ptr null, ptr [[TMP64]], align 8
1571 // CHECK9-NEXT: [[TMP65:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 7
1572 // CHECK9-NEXT: store ptr null, ptr [[TMP65]], align 8
1573 // CHECK9-NEXT: [[TMP66:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 8
1574 // CHECK9-NEXT: store i64 [[TMP57]], ptr [[TMP66]], align 8
1575 // CHECK9-NEXT: [[TMP67:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 9
1576 // CHECK9-NEXT: store i64 0, ptr [[TMP67]], align 8
1577 // CHECK9-NEXT: [[TMP68:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 10
1578 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP68]], align 4
1579 // CHECK9-NEXT: [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 11
1580 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP69]], align 4
1581 // CHECK9-NEXT: [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 12
1582 // CHECK9-NEXT: store i32 0, ptr [[TMP70]], align 4
1583 // CHECK9-NEXT: [[TMP71:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.region_id, ptr [[KERNEL_ARGS15]])
1584 // CHECK9-NEXT: [[TMP72:%.*]] = icmp ne i32 [[TMP71]], 0
1585 // CHECK9-NEXT: br i1 [[TMP72]], label [[OMP_OFFLOAD_FAILED16:%.*]], label [[OMP_OFFLOAD_CONT17:%.*]]
1586 // CHECK9: omp_offload.failed16:
1587 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111(i64 [[TMP39]], i64 [[TMP1]], ptr [[VLA]]) #[[ATTR3]]
1588 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT17]]
1589 // CHECK9: omp_offload.cont17:
1590 // CHECK9-NEXT: [[TMP73:%.*]] = load i32, ptr [[M]], align 4
1591 // CHECK9-NEXT: store i32 [[TMP73]], ptr [[M_CASTED]], align 4
1592 // CHECK9-NEXT: [[TMP74:%.*]] = load i64, ptr [[M_CASTED]], align 8
1593 // CHECK9-NEXT: [[TMP75:%.*]] = load i32, ptr [[N]], align 4
1594 // CHECK9-NEXT: store i32 [[TMP75]], ptr [[N_CASTED18]], align 4
1595 // CHECK9-NEXT: [[TMP76:%.*]] = load i64, ptr [[N_CASTED18]], align 8
1596 // CHECK9-NEXT: [[TMP77:%.*]] = mul nuw i64 [[TMP1]], 4
1597 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES22]], ptr align 8 @.offload_sizes.3, i64 32, i1 false)
1598 // CHECK9-NEXT: [[TMP78:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 0
1599 // CHECK9-NEXT: store i64 [[TMP74]], ptr [[TMP78]], align 8
1600 // CHECK9-NEXT: [[TMP79:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 0
1601 // CHECK9-NEXT: store i64 [[TMP74]], ptr [[TMP79]], align 8
1602 // CHECK9-NEXT: [[TMP80:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i64 0, i64 0
1603 // CHECK9-NEXT: store ptr null, ptr [[TMP80]], align 8
1604 // CHECK9-NEXT: [[TMP81:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 1
1605 // CHECK9-NEXT: store i64 [[TMP76]], ptr [[TMP81]], align 8
1606 // CHECK9-NEXT: [[TMP82:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 1
1607 // CHECK9-NEXT: store i64 [[TMP76]], ptr [[TMP82]], align 8
1608 // CHECK9-NEXT: [[TMP83:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i64 0, i64 1
1609 // CHECK9-NEXT: store ptr null, ptr [[TMP83]], align 8
1610 // CHECK9-NEXT: [[TMP84:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 2
1611 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP84]], align 8
1612 // CHECK9-NEXT: [[TMP85:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 2
1613 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP85]], align 8
1614 // CHECK9-NEXT: [[TMP86:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i64 0, i64 2
1615 // CHECK9-NEXT: store ptr null, ptr [[TMP86]], align 8
1616 // CHECK9-NEXT: [[TMP87:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 3
1617 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP87]], align 8
1618 // CHECK9-NEXT: [[TMP88:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 3
1619 // CHECK9-NEXT: store ptr [[VLA]], ptr [[TMP88]], align 8
1620 // CHECK9-NEXT: [[TMP89:%.*]] = getelementptr inbounds [4 x i64], ptr [[DOTOFFLOAD_SIZES22]], i32 0, i32 3
1621 // CHECK9-NEXT: store i64 [[TMP77]], ptr [[TMP89]], align 8
1622 // CHECK9-NEXT: [[TMP90:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i64 0, i64 3
1623 // CHECK9-NEXT: store ptr null, ptr [[TMP90]], align 8
1624 // CHECK9-NEXT: [[TMP91:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 0
1625 // CHECK9-NEXT: [[TMP92:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 0
1626 // CHECK9-NEXT: [[TMP93:%.*]] = getelementptr inbounds [4 x i64], ptr [[DOTOFFLOAD_SIZES22]], i32 0, i32 0
1627 // CHECK9-NEXT: [[TMP94:%.*]] = load i32, ptr [[N]], align 4
1628 // CHECK9-NEXT: store i32 [[TMP94]], ptr [[DOTCAPTURE_EXPR_24]], align 4
1629 // CHECK9-NEXT: [[TMP95:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_24]], align 4
1630 // CHECK9-NEXT: [[SUB26:%.*]] = sub nsw i32 [[TMP95]], 0
1631 // CHECK9-NEXT: [[DIV27:%.*]] = sdiv i32 [[SUB26]], 1
1632 // CHECK9-NEXT: [[SUB28:%.*]] = sub nsw i32 [[DIV27]], 1
1633 // CHECK9-NEXT: store i32 [[SUB28]], ptr [[DOTCAPTURE_EXPR_25]], align 4
1634 // CHECK9-NEXT: [[TMP96:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_25]], align 4
1635 // CHECK9-NEXT: [[ADD29:%.*]] = add nsw i32 [[TMP96]], 1
1636 // CHECK9-NEXT: [[TMP97:%.*]] = zext i32 [[ADD29]] to i64
1637 // CHECK9-NEXT: [[TMP98:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 0
1638 // CHECK9-NEXT: store i32 3, ptr [[TMP98]], align 4
1639 // CHECK9-NEXT: [[TMP99:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 1
1640 // CHECK9-NEXT: store i32 4, ptr [[TMP99]], align 4
1641 // CHECK9-NEXT: [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 2
1642 // CHECK9-NEXT: store ptr [[TMP91]], ptr [[TMP100]], align 8
1643 // CHECK9-NEXT: [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 3
1644 // CHECK9-NEXT: store ptr [[TMP92]], ptr [[TMP101]], align 8
1645 // CHECK9-NEXT: [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 4
1646 // CHECK9-NEXT: store ptr [[TMP93]], ptr [[TMP102]], align 8
1647 // CHECK9-NEXT: [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 5
1648 // CHECK9-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP103]], align 8
1649 // CHECK9-NEXT: [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 6
1650 // CHECK9-NEXT: store ptr null, ptr [[TMP104]], align 8
1651 // CHECK9-NEXT: [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 7
1652 // CHECK9-NEXT: store ptr null, ptr [[TMP105]], align 8
1653 // CHECK9-NEXT: [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 8
1654 // CHECK9-NEXT: store i64 [[TMP97]], ptr [[TMP106]], align 8
1655 // CHECK9-NEXT: [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 9
1656 // CHECK9-NEXT: store i64 0, ptr [[TMP107]], align 8
1657 // CHECK9-NEXT: [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 10
1658 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP108]], align 4
1659 // CHECK9-NEXT: [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 11
1660 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP109]], align 4
1661 // CHECK9-NEXT: [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 12
1662 // CHECK9-NEXT: store i32 0, ptr [[TMP110]], align 4
1663 // CHECK9-NEXT: [[TMP111:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.region_id, ptr [[KERNEL_ARGS30]])
1664 // CHECK9-NEXT: [[TMP112:%.*]] = icmp ne i32 [[TMP111]], 0
1665 // CHECK9-NEXT: br i1 [[TMP112]], label [[OMP_OFFLOAD_FAILED31:%.*]], label [[OMP_OFFLOAD_CONT32:%.*]]
1666 // CHECK9: omp_offload.failed31:
1667 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116(i64 [[TMP74]], i64 [[TMP76]], i64 [[TMP1]], ptr [[VLA]]) #[[ATTR3]]
1668 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT32]]
1669 // CHECK9: omp_offload.cont32:
1670 // CHECK9-NEXT: [[TMP113:%.*]] = load i32, ptr [[ARGC_ADDR]], align 4
1671 // CHECK9-NEXT: [[CALL:%.*]] = call noundef signext i32 @_Z5tmainIiLi10EEiT_(i32 noundef signext [[TMP113]])
1672 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1673 // CHECK9-NEXT: [[TMP114:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
1674 // CHECK9-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP114]])
1675 // CHECK9-NEXT: [[TMP115:%.*]] = load i32, ptr [[RETVAL]], align 4
1676 // CHECK9-NEXT: ret i32 [[TMP115]]
1679 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106
1680 // CHECK9-SAME: (i64 noundef [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] {
1681 // CHECK9-NEXT: entry:
1682 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
1683 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1684 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1685 // CHECK9-NEXT: store i64 [[N]], ptr [[N_ADDR]], align 8
1686 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1687 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1688 // CHECK9-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1689 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1690 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined, ptr [[N_ADDR]], i64 [[TMP0]], ptr [[TMP1]])
1691 // CHECK9-NEXT: ret void
1694 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined
1695 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
1696 // CHECK9-NEXT: entry:
1697 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1698 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1699 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
1700 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1701 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1702 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1703 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
1704 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
1705 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
1706 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1707 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1708 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1709 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1710 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1711 // CHECK9-NEXT: [[I3:%.*]] = alloca i32, align 4
1712 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1713 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1714 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
1715 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1716 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1717 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
1718 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1719 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1720 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
1721 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
1722 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1723 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
1724 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
1725 // CHECK9-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
1726 // CHECK9-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
1727 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
1728 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1729 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
1730 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
1731 // CHECK9: omp.precond.then:
1732 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1733 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1734 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
1735 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1736 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1737 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1738 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1739 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP8]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1740 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1741 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1742 // CHECK9-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP9]], [[TMP10]]
1743 // CHECK9-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1744 // CHECK9: cond.true:
1745 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1746 // CHECK9-NEXT: br label [[COND_END:%.*]]
1747 // CHECK9: cond.false:
1748 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1749 // CHECK9-NEXT: br label [[COND_END]]
1750 // CHECK9: cond.end:
1751 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP11]], [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ]
1752 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1753 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1754 // CHECK9-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
1755 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1756 // CHECK9: omp.inner.for.cond:
1757 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1758 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1759 // CHECK9-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]]
1760 // CHECK9-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1761 // CHECK9: omp.inner.for.body:
1762 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1763 // CHECK9-NEXT: [[TMP17:%.*]] = zext i32 [[TMP16]] to i64
1764 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1765 // CHECK9-NEXT: [[TMP19:%.*]] = zext i32 [[TMP18]] to i64
1766 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined, i64 [[TMP17]], i64 [[TMP19]], ptr [[TMP0]], i64 [[TMP1]], ptr [[TMP2]])
1767 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1768 // CHECK9: omp.inner.for.inc:
1769 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1770 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1771 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP20]], [[TMP21]]
1772 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1773 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1774 // CHECK9: omp.inner.for.end:
1775 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1776 // CHECK9: omp.loop.exit:
1777 // CHECK9-NEXT: [[TMP22:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1778 // CHECK9-NEXT: [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4
1779 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP23]])
1780 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
1781 // CHECK9: omp.precond.end:
1782 // CHECK9-NEXT: ret void
1785 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined
1786 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
1787 // CHECK9-NEXT: entry:
1788 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1789 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1790 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
1791 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
1792 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
1793 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1794 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1795 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1796 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
1797 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
1798 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
1799 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1800 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1801 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1802 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1803 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1804 // CHECK9-NEXT: [[I4:%.*]] = alloca i32, align 4
1805 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1806 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1807 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1808 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1809 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
1810 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1811 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1812 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
1813 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1814 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1815 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
1816 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
1817 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1818 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
1819 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
1820 // CHECK9-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
1821 // CHECK9-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
1822 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
1823 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1824 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
1825 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
1826 // CHECK9: omp.precond.then:
1827 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1828 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1829 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
1830 // CHECK9-NEXT: [[TMP7:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
1831 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP7]] to i32
1832 // CHECK9-NEXT: [[TMP8:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
1833 // CHECK9-NEXT: [[CONV3:%.*]] = trunc i64 [[TMP8]] to i32
1834 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
1835 // CHECK9-NEXT: store i32 [[CONV3]], ptr [[DOTOMP_UB]], align 4
1836 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1837 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1838 // CHECK9-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1839 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
1840 // CHECK9-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)
1841 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1842 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1843 // CHECK9-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
1844 // CHECK9-NEXT: br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1845 // CHECK9: cond.true:
1846 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1847 // CHECK9-NEXT: br label [[COND_END:%.*]]
1848 // CHECK9: cond.false:
1849 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1850 // CHECK9-NEXT: br label [[COND_END]]
1851 // CHECK9: cond.end:
1852 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
1853 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1854 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1855 // CHECK9-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
1856 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1857 // CHECK9: omp.inner.for.cond:
1858 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1859 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1860 // CHECK9-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
1861 // CHECK9-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1862 // CHECK9: omp.inner.for.body:
1863 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1864 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
1865 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1866 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I4]], align 4
1867 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[I4]], align 4
1868 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP19]] to i64
1869 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i64 [[IDXPROM]]
1870 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
1871 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1872 // CHECK9: omp.body.continue:
1873 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1874 // CHECK9: omp.inner.for.inc:
1875 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1876 // CHECK9-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP20]], 1
1877 // CHECK9-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
1878 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1879 // CHECK9: omp.inner.for.end:
1880 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1881 // CHECK9: omp.loop.exit:
1882 // CHECK9-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1883 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
1884 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
1885 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
1886 // CHECK9: omp.precond.end:
1887 // CHECK9-NEXT: ret void
1890 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111
1891 // CHECK9-SAME: (i64 noundef [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
1892 // CHECK9-NEXT: entry:
1893 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
1894 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1895 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1896 // CHECK9-NEXT: store i64 [[N]], ptr [[N_ADDR]], align 8
1897 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1898 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1899 // CHECK9-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1900 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1901 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined, ptr [[N_ADDR]], i64 [[TMP0]], ptr [[TMP1]])
1902 // CHECK9-NEXT: ret void
1905 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined
1906 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
1907 // CHECK9-NEXT: entry:
1908 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1909 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1910 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
1911 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1912 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1913 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1914 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
1915 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
1916 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
1917 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
1918 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
1919 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
1920 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1921 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1922 // CHECK9-NEXT: [[I3:%.*]] = alloca i32, align 4
1923 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1924 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1925 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
1926 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1927 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1928 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
1929 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1930 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1931 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
1932 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
1933 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1934 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
1935 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
1936 // CHECK9-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
1937 // CHECK9-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
1938 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
1939 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
1940 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
1941 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
1942 // CHECK9: omp.precond.then:
1943 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
1944 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1945 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
1946 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1947 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1948 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1949 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1950 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP8]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1951 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1952 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1953 // CHECK9-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP9]], [[TMP10]]
1954 // CHECK9-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1955 // CHECK9: cond.true:
1956 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
1957 // CHECK9-NEXT: br label [[COND_END:%.*]]
1958 // CHECK9: cond.false:
1959 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1960 // CHECK9-NEXT: br label [[COND_END]]
1961 // CHECK9: cond.end:
1962 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP11]], [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ]
1963 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
1964 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1965 // CHECK9-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
1966 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1967 // CHECK9: omp.inner.for.cond:
1968 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1969 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1970 // CHECK9-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]]
1971 // CHECK9-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1972 // CHECK9: omp.inner.for.body:
1973 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
1974 // CHECK9-NEXT: [[TMP17:%.*]] = zext i32 [[TMP16]] to i64
1975 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
1976 // CHECK9-NEXT: [[TMP19:%.*]] = zext i32 [[TMP18]] to i64
1977 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined.omp_outlined, i64 [[TMP17]], i64 [[TMP19]], ptr [[TMP0]], i64 [[TMP1]], ptr [[TMP2]])
1978 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1979 // CHECK9: omp.inner.for.inc:
1980 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
1981 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
1982 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP20]], [[TMP21]]
1983 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
1984 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
1985 // CHECK9: omp.inner.for.end:
1986 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1987 // CHECK9: omp.loop.exit:
1988 // CHECK9-NEXT: [[TMP22:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1989 // CHECK9-NEXT: [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4
1990 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP23]])
1991 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
1992 // CHECK9: omp.precond.end:
1993 // CHECK9-NEXT: ret void
1996 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined.omp_outlined
1997 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
1998 // CHECK9-NEXT: entry:
1999 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2000 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2001 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2002 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2003 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2004 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2005 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2006 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2007 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2008 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
2009 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
2010 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2011 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2012 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2013 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2014 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2015 // CHECK9-NEXT: [[I4:%.*]] = alloca i32, align 4
2016 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2017 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2018 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2019 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2020 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2021 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2022 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2023 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2024 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2025 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2026 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
2027 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
2028 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
2029 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
2030 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
2031 // CHECK9-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
2032 // CHECK9-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
2033 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
2034 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
2035 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
2036 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
2037 // CHECK9: omp.precond.then:
2038 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2039 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2040 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
2041 // CHECK9-NEXT: [[TMP7:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2042 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP7]] to i32
2043 // CHECK9-NEXT: [[TMP8:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2044 // CHECK9-NEXT: [[CONV3:%.*]] = trunc i64 [[TMP8]] to i32
2045 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2046 // CHECK9-NEXT: store i32 [[CONV3]], ptr [[DOTOMP_UB]], align 4
2047 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2048 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2049 // CHECK9-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2050 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
2051 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP10]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2052 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2053 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2054 // CHECK9-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
2055 // CHECK9-NEXT: br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2056 // CHECK9: cond.true:
2057 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2058 // CHECK9-NEXT: br label [[COND_END:%.*]]
2059 // CHECK9: cond.false:
2060 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2061 // CHECK9-NEXT: br label [[COND_END]]
2062 // CHECK9: cond.end:
2063 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
2064 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2065 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2066 // CHECK9-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
2067 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2068 // CHECK9: omp.inner.for.cond:
2069 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2070 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2071 // CHECK9-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
2072 // CHECK9-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2073 // CHECK9: omp.inner.for.body:
2074 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2075 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
2076 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2077 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I4]], align 4
2078 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[I4]], align 4
2079 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP19]] to i64
2080 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i64 [[IDXPROM]]
2081 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
2082 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2083 // CHECK9: omp.body.continue:
2084 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2085 // CHECK9: omp.inner.for.inc:
2086 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2087 // CHECK9-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP20]], 1
2088 // CHECK9-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
2089 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2090 // CHECK9: omp.inner.for.end:
2091 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2092 // CHECK9: omp.loop.exit:
2093 // CHECK9-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2094 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
2095 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
2096 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
2097 // CHECK9: omp.precond.end:
2098 // CHECK9-NEXT: ret void
2101 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116
2102 // CHECK9-SAME: (i64 noundef [[M:%.*]], i64 noundef [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
2103 // CHECK9-NEXT: entry:
2104 // CHECK9-NEXT: [[M_ADDR:%.*]] = alloca i64, align 8
2105 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
2106 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2107 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2108 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
2109 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
2110 // CHECK9-NEXT: store i64 [[M]], ptr [[M_ADDR]], align 8
2111 // CHECK9-NEXT: store i64 [[N]], ptr [[N_ADDR]], align 8
2112 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2113 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2114 // CHECK9-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2115 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2116 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[M_ADDR]], align 4
2117 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[DOTCAPTURE_EXPR_]], align 4
2118 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
2119 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
2120 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8
2121 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined, ptr [[N_ADDR]], i64 [[TMP0]], ptr [[TMP1]], i64 [[TMP4]])
2122 // CHECK9-NEXT: ret void
2125 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined
2126 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
2127 // CHECK9-NEXT: entry:
2128 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2129 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2130 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2131 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2132 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2133 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
2134 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2135 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2136 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
2137 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_2:%.*]] = alloca i32, align 4
2138 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2139 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2140 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2141 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2142 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2143 // CHECK9-NEXT: [[I4:%.*]] = alloca i32, align 4
2144 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
2145 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2146 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2147 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2148 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2149 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2150 // CHECK9-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
2151 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2152 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2153 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2154 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
2155 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_1]], align 4
2156 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2157 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
2158 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
2159 // CHECK9-NEXT: [[SUB3:%.*]] = sub nsw i32 [[DIV]], 1
2160 // CHECK9-NEXT: store i32 [[SUB3]], ptr [[DOTCAPTURE_EXPR_2]], align 4
2161 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
2162 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2163 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
2164 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
2165 // CHECK9: omp.precond.then:
2166 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2167 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2168 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
2169 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2170 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2171 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
2172 // CHECK9-NEXT: [[TMP8:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2173 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP8]], align 4
2174 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP9]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[TMP7]])
2175 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2176 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2177 // CHECK9-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP10]], [[TMP11]]
2178 // CHECK9-NEXT: br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2179 // CHECK9: cond.true:
2180 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2181 // CHECK9-NEXT: br label [[COND_END:%.*]]
2182 // CHECK9: cond.false:
2183 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2184 // CHECK9-NEXT: br label [[COND_END]]
2185 // CHECK9: cond.end:
2186 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP12]], [[COND_TRUE]] ], [ [[TMP13]], [[COND_FALSE]] ]
2187 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2188 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2189 // CHECK9-NEXT: store i32 [[TMP14]], ptr [[DOTOMP_IV]], align 4
2190 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2191 // CHECK9: omp.inner.for.cond:
2192 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2193 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2194 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP16]], 1
2195 // CHECK9-NEXT: [[CMP6:%.*]] = icmp slt i32 [[TMP15]], [[ADD]]
2196 // CHECK9-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2197 // CHECK9: omp.inner.for.body:
2198 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2199 // CHECK9-NEXT: [[TMP18:%.*]] = zext i32 [[TMP17]] to i64
2200 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2201 // CHECK9-NEXT: [[TMP20:%.*]] = zext i32 [[TMP19]] to i64
2202 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
2203 // CHECK9-NEXT: store i32 [[TMP21]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
2204 // CHECK9-NEXT: [[TMP22:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8
2205 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined.omp_outlined, i64 [[TMP18]], i64 [[TMP20]], ptr [[TMP0]], i64 [[TMP1]], ptr [[TMP2]], i64 [[TMP22]])
2206 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2207 // CHECK9: omp.inner.for.inc:
2208 // CHECK9-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2209 // CHECK9-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2210 // CHECK9-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
2211 // CHECK9-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
2212 // CHECK9-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2213 // CHECK9-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2214 // CHECK9-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP25]], [[TMP26]]
2215 // CHECK9-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_COMB_LB]], align 4
2216 // CHECK9-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2217 // CHECK9-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2218 // CHECK9-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP27]], [[TMP28]]
2219 // CHECK9-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_COMB_UB]], align 4
2220 // CHECK9-NEXT: [[TMP29:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2221 // CHECK9-NEXT: [[TMP30:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2222 // CHECK9-NEXT: [[CMP10:%.*]] = icmp sgt i32 [[TMP29]], [[TMP30]]
2223 // CHECK9-NEXT: br i1 [[CMP10]], label [[COND_TRUE11:%.*]], label [[COND_FALSE12:%.*]]
2224 // CHECK9: cond.true11:
2225 // CHECK9-NEXT: [[TMP31:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2226 // CHECK9-NEXT: br label [[COND_END13:%.*]]
2227 // CHECK9: cond.false12:
2228 // CHECK9-NEXT: [[TMP32:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2229 // CHECK9-NEXT: br label [[COND_END13]]
2230 // CHECK9: cond.end13:
2231 // CHECK9-NEXT: [[COND14:%.*]] = phi i32 [ [[TMP31]], [[COND_TRUE11]] ], [ [[TMP32]], [[COND_FALSE12]] ]
2232 // CHECK9-NEXT: store i32 [[COND14]], ptr [[DOTOMP_COMB_UB]], align 4
2233 // CHECK9-NEXT: [[TMP33:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2234 // CHECK9-NEXT: store i32 [[TMP33]], ptr [[DOTOMP_IV]], align 4
2235 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2236 // CHECK9: omp.inner.for.end:
2237 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2238 // CHECK9: omp.loop.exit:
2239 // CHECK9-NEXT: [[TMP34:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2240 // CHECK9-NEXT: [[TMP35:%.*]] = load i32, ptr [[TMP34]], align 4
2241 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP35]])
2242 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
2243 // CHECK9: omp.precond.end:
2244 // CHECK9-NEXT: ret void
2247 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined.omp_outlined
2248 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i64 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
2249 // CHECK9-NEXT: entry:
2250 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2251 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2252 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2253 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2254 // CHECK9-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2255 // CHECK9-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2256 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2257 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
2258 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2259 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2260 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
2261 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_2:%.*]] = alloca i32, align 4
2262 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2263 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2264 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2265 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2266 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2267 // CHECK9-NEXT: [[I5:%.*]] = alloca i32, align 4
2268 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2269 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2270 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2271 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2272 // CHECK9-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2273 // CHECK9-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2274 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2275 // CHECK9-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
2276 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2277 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2278 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2279 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
2280 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_1]], align 4
2281 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2282 // CHECK9-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
2283 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
2284 // CHECK9-NEXT: [[SUB3:%.*]] = sub nsw i32 [[DIV]], 1
2285 // CHECK9-NEXT: store i32 [[SUB3]], ptr [[DOTCAPTURE_EXPR_2]], align 4
2286 // CHECK9-NEXT: store i32 0, ptr [[I]], align 4
2287 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
2288 // CHECK9-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
2289 // CHECK9-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
2290 // CHECK9: omp.precond.then:
2291 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2292 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2293 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
2294 // CHECK9-NEXT: [[TMP7:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2295 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP7]] to i32
2296 // CHECK9-NEXT: [[TMP8:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2297 // CHECK9-NEXT: [[CONV4:%.*]] = trunc i64 [[TMP8]] to i32
2298 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2299 // CHECK9-NEXT: store i32 [[CONV4]], ptr [[DOTOMP_UB]], align 4
2300 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2301 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2302 // CHECK9-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2303 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
2304 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP10]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2305 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2306 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2307 // CHECK9-NEXT: [[CMP6:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
2308 // CHECK9-NEXT: br i1 [[CMP6]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2309 // CHECK9: cond.true:
2310 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
2311 // CHECK9-NEXT: br label [[COND_END:%.*]]
2312 // CHECK9: cond.false:
2313 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2314 // CHECK9-NEXT: br label [[COND_END]]
2315 // CHECK9: cond.end:
2316 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
2317 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2318 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2319 // CHECK9-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
2320 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2321 // CHECK9: omp.inner.for.cond:
2322 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2323 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2324 // CHECK9-NEXT: [[CMP7:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
2325 // CHECK9-NEXT: br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2326 // CHECK9: omp.inner.for.body:
2327 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2328 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
2329 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2330 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I5]], align 4
2331 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[I5]], align 4
2332 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP19]] to i64
2333 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i64 [[IDXPROM]]
2334 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
2335 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2336 // CHECK9: omp.body.continue:
2337 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2338 // CHECK9: omp.inner.for.inc:
2339 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2340 // CHECK9-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP20]], 1
2341 // CHECK9-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_IV]], align 4
2342 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2343 // CHECK9: omp.inner.for.end:
2344 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2345 // CHECK9: omp.loop.exit:
2346 // CHECK9-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2347 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
2348 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
2349 // CHECK9-NEXT: br label [[OMP_PRECOND_END]]
2350 // CHECK9: omp.precond.end:
2351 // CHECK9-NEXT: ret void
2354 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiLi10EEiT_
2355 // CHECK9-SAME: (i32 noundef signext [[ARGC:%.*]]) #[[ATTR5:[0-9]+]] comdat {
2356 // CHECK9-NEXT: entry:
2357 // CHECK9-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
2358 // CHECK9-NEXT: [[A:%.*]] = alloca [10 x i32], align 4
2359 // CHECK9-NEXT: [[M:%.*]] = alloca i32, align 4
2360 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
2361 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
2362 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
2363 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2364 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
2365 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS1:%.*]] = alloca [1 x ptr], align 8
2366 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS2:%.*]] = alloca [1 x ptr], align 8
2367 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS3:%.*]] = alloca [1 x ptr], align 8
2368 // CHECK9-NEXT: [[_TMP4:%.*]] = alloca i32, align 4
2369 // CHECK9-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
2370 // CHECK9-NEXT: [[M_CASTED:%.*]] = alloca i64, align 8
2371 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS8:%.*]] = alloca [2 x ptr], align 8
2372 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS9:%.*]] = alloca [2 x ptr], align 8
2373 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS10:%.*]] = alloca [2 x ptr], align 8
2374 // CHECK9-NEXT: [[_TMP11:%.*]] = alloca i32, align 4
2375 // CHECK9-NEXT: [[KERNEL_ARGS12:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
2376 // CHECK9-NEXT: store i32 [[ARGC]], ptr [[ARGC_ADDR]], align 4
2377 // CHECK9-NEXT: store i32 10, ptr [[M]], align 4
2378 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2379 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP0]], align 8
2380 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2381 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP1]], align 8
2382 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
2383 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
2384 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2385 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2386 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
2387 // CHECK9-NEXT: store i32 3, ptr [[TMP5]], align 4
2388 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
2389 // CHECK9-NEXT: store i32 1, ptr [[TMP6]], align 4
2390 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
2391 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 8
2392 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
2393 // CHECK9-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 8
2394 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
2395 // CHECK9-NEXT: store ptr @.offload_sizes.5, ptr [[TMP9]], align 8
2396 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
2397 // CHECK9-NEXT: store ptr @.offload_maptypes.6, ptr [[TMP10]], align 8
2398 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
2399 // CHECK9-NEXT: store ptr null, ptr [[TMP11]], align 8
2400 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
2401 // CHECK9-NEXT: store ptr null, ptr [[TMP12]], align 8
2402 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
2403 // CHECK9-NEXT: store i64 10, ptr [[TMP13]], align 8
2404 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
2405 // CHECK9-NEXT: store i64 0, ptr [[TMP14]], align 8
2406 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
2407 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
2408 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
2409 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
2410 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
2411 // CHECK9-NEXT: store i32 0, ptr [[TMP17]], align 4
2412 // CHECK9-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.region_id, ptr [[KERNEL_ARGS]])
2413 // CHECK9-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
2414 // CHECK9-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
2415 // CHECK9: omp_offload.failed:
2416 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84(ptr [[A]]) #[[ATTR3]]
2417 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
2418 // CHECK9: omp_offload.cont:
2419 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS1]], i32 0, i32 0
2420 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP20]], align 8
2421 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS2]], i32 0, i32 0
2422 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP21]], align 8
2423 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS3]], i64 0, i64 0
2424 // CHECK9-NEXT: store ptr null, ptr [[TMP22]], align 8
2425 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS1]], i32 0, i32 0
2426 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS2]], i32 0, i32 0
2427 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
2428 // CHECK9-NEXT: store i32 3, ptr [[TMP25]], align 4
2429 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
2430 // CHECK9-NEXT: store i32 1, ptr [[TMP26]], align 4
2431 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
2432 // CHECK9-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 8
2433 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
2434 // CHECK9-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 8
2435 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
2436 // CHECK9-NEXT: store ptr @.offload_sizes.7, ptr [[TMP29]], align 8
2437 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
2438 // CHECK9-NEXT: store ptr @.offload_maptypes.8, ptr [[TMP30]], align 8
2439 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
2440 // CHECK9-NEXT: store ptr null, ptr [[TMP31]], align 8
2441 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
2442 // CHECK9-NEXT: store ptr null, ptr [[TMP32]], align 8
2443 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
2444 // CHECK9-NEXT: store i64 10, ptr [[TMP33]], align 8
2445 // CHECK9-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
2446 // CHECK9-NEXT: store i64 0, ptr [[TMP34]], align 8
2447 // CHECK9-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
2448 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
2449 // CHECK9-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
2450 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
2451 // CHECK9-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
2452 // CHECK9-NEXT: store i32 0, ptr [[TMP37]], align 4
2453 // CHECK9-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.region_id, ptr [[KERNEL_ARGS5]])
2454 // CHECK9-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
2455 // CHECK9-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
2456 // CHECK9: omp_offload.failed6:
2457 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89(ptr [[A]]) #[[ATTR3]]
2458 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT7]]
2459 // CHECK9: omp_offload.cont7:
2460 // CHECK9-NEXT: [[TMP40:%.*]] = load i32, ptr [[M]], align 4
2461 // CHECK9-NEXT: store i32 [[TMP40]], ptr [[M_CASTED]], align 4
2462 // CHECK9-NEXT: [[TMP41:%.*]] = load i64, ptr [[M_CASTED]], align 8
2463 // CHECK9-NEXT: [[TMP42:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 0
2464 // CHECK9-NEXT: store i64 [[TMP41]], ptr [[TMP42]], align 8
2465 // CHECK9-NEXT: [[TMP43:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 0
2466 // CHECK9-NEXT: store i64 [[TMP41]], ptr [[TMP43]], align 8
2467 // CHECK9-NEXT: [[TMP44:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_MAPPERS10]], i64 0, i64 0
2468 // CHECK9-NEXT: store ptr null, ptr [[TMP44]], align 8
2469 // CHECK9-NEXT: [[TMP45:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 1
2470 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP45]], align 8
2471 // CHECK9-NEXT: [[TMP46:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 1
2472 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP46]], align 8
2473 // CHECK9-NEXT: [[TMP47:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_MAPPERS10]], i64 0, i64 1
2474 // CHECK9-NEXT: store ptr null, ptr [[TMP47]], align 8
2475 // CHECK9-NEXT: [[TMP48:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 0
2476 // CHECK9-NEXT: [[TMP49:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 0
2477 // CHECK9-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 0
2478 // CHECK9-NEXT: store i32 3, ptr [[TMP50]], align 4
2479 // CHECK9-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 1
2480 // CHECK9-NEXT: store i32 2, ptr [[TMP51]], align 4
2481 // CHECK9-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 2
2482 // CHECK9-NEXT: store ptr [[TMP48]], ptr [[TMP52]], align 8
2483 // CHECK9-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 3
2484 // CHECK9-NEXT: store ptr [[TMP49]], ptr [[TMP53]], align 8
2485 // CHECK9-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 4
2486 // CHECK9-NEXT: store ptr @.offload_sizes.9, ptr [[TMP54]], align 8
2487 // CHECK9-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 5
2488 // CHECK9-NEXT: store ptr @.offload_maptypes.10, ptr [[TMP55]], align 8
2489 // CHECK9-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 6
2490 // CHECK9-NEXT: store ptr null, ptr [[TMP56]], align 8
2491 // CHECK9-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 7
2492 // CHECK9-NEXT: store ptr null, ptr [[TMP57]], align 8
2493 // CHECK9-NEXT: [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 8
2494 // CHECK9-NEXT: store i64 10, ptr [[TMP58]], align 8
2495 // CHECK9-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 9
2496 // CHECK9-NEXT: store i64 0, ptr [[TMP59]], align 8
2497 // CHECK9-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 10
2498 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP60]], align 4
2499 // CHECK9-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 11
2500 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP61]], align 4
2501 // CHECK9-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 12
2502 // CHECK9-NEXT: store i32 0, ptr [[TMP62]], align 4
2503 // CHECK9-NEXT: [[TMP63:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.region_id, ptr [[KERNEL_ARGS12]])
2504 // CHECK9-NEXT: [[TMP64:%.*]] = icmp ne i32 [[TMP63]], 0
2505 // CHECK9-NEXT: br i1 [[TMP64]], label [[OMP_OFFLOAD_FAILED13:%.*]], label [[OMP_OFFLOAD_CONT14:%.*]]
2506 // CHECK9: omp_offload.failed13:
2507 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94(i64 [[TMP41]], ptr [[A]]) #[[ATTR3]]
2508 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT14]]
2509 // CHECK9: omp_offload.cont14:
2510 // CHECK9-NEXT: ret i32 0
2513 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84
2514 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2515 // CHECK9-NEXT: entry:
2516 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2517 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2518 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2519 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined, ptr [[TMP0]])
2520 // CHECK9-NEXT: ret void
2523 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined
2524 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2525 // CHECK9-NEXT: entry:
2526 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2527 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2528 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2529 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2530 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2531 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2532 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2533 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2534 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2535 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2536 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2537 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2538 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2539 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2540 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2541 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2542 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2543 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2544 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2545 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
2546 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2547 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2548 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
2549 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2550 // CHECK9: cond.true:
2551 // CHECK9-NEXT: br label [[COND_END:%.*]]
2552 // CHECK9: cond.false:
2553 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2554 // CHECK9-NEXT: br label [[COND_END]]
2555 // CHECK9: cond.end:
2556 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
2557 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2558 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2559 // CHECK9-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
2560 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2561 // CHECK9: omp.inner.for.cond:
2562 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2563 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2564 // CHECK9-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
2565 // CHECK9-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2566 // CHECK9: omp.inner.for.body:
2567 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2568 // CHECK9-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2569 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2570 // CHECK9-NEXT: [[TMP11:%.*]] = zext i32 [[TMP10]] to i64
2571 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined.omp_outlined, i64 [[TMP9]], i64 [[TMP11]], ptr [[TMP0]])
2572 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2573 // CHECK9: omp.inner.for.inc:
2574 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2575 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2576 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
2577 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2578 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2579 // CHECK9: omp.inner.for.end:
2580 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2581 // CHECK9: omp.loop.exit:
2582 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
2583 // CHECK9-NEXT: ret void
2586 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined.omp_outlined
2587 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2588 // CHECK9-NEXT: entry:
2589 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2590 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2591 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2592 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2593 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2594 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2595 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2596 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2597 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2598 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2599 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2600 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2601 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2602 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2603 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2604 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2605 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2606 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2607 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2608 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2609 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2610 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
2611 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2612 // CHECK9-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
2613 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2614 // CHECK9-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2615 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2616 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2617 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2618 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2619 // CHECK9-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)
2620 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2621 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
2622 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2623 // CHECK9: cond.true:
2624 // CHECK9-NEXT: br label [[COND_END:%.*]]
2625 // CHECK9: cond.false:
2626 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2627 // CHECK9-NEXT: br label [[COND_END]]
2628 // CHECK9: cond.end:
2629 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
2630 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2631 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2632 // CHECK9-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2633 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2634 // CHECK9: omp.inner.for.cond:
2635 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2636 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2637 // CHECK9-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2638 // CHECK9-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2639 // CHECK9: omp.inner.for.body:
2640 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2641 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2642 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2643 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2644 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
2645 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
2646 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i64 0, i64 [[IDXPROM]]
2647 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
2648 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2649 // CHECK9: omp.body.continue:
2650 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2651 // CHECK9: omp.inner.for.inc:
2652 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2653 // CHECK9-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
2654 // CHECK9-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
2655 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2656 // CHECK9: omp.inner.for.end:
2657 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2658 // CHECK9: omp.loop.exit:
2659 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
2660 // CHECK9-NEXT: ret void
2663 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89
2664 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2665 // CHECK9-NEXT: entry:
2666 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2667 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2668 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2669 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined, ptr [[TMP0]])
2670 // CHECK9-NEXT: ret void
2673 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined
2674 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2675 // CHECK9-NEXT: entry:
2676 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2677 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2678 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2679 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2680 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2681 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2682 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2683 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2684 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2685 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2686 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2687 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2688 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2689 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2690 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2691 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2692 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2693 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2694 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2695 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
2696 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
2697 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2698 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
2699 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2700 // CHECK9: cond.true:
2701 // CHECK9-NEXT: br label [[COND_END:%.*]]
2702 // CHECK9: cond.false:
2703 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2704 // CHECK9-NEXT: br label [[COND_END]]
2705 // CHECK9: cond.end:
2706 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
2707 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2708 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2709 // CHECK9-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
2710 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2711 // CHECK9: omp.inner.for.cond:
2712 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2713 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2714 // CHECK9-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
2715 // CHECK9-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2716 // CHECK9: omp.inner.for.body:
2717 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2718 // CHECK9-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2719 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2720 // CHECK9-NEXT: [[TMP11:%.*]] = zext i32 [[TMP10]] to i64
2721 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined.omp_outlined, i64 [[TMP9]], i64 [[TMP11]], ptr [[TMP0]])
2722 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2723 // CHECK9: omp.inner.for.inc:
2724 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2725 // CHECK9-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2726 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
2727 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2728 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2729 // CHECK9: omp.inner.for.end:
2730 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2731 // CHECK9: omp.loop.exit:
2732 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
2733 // CHECK9-NEXT: ret void
2736 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined.omp_outlined
2737 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2738 // CHECK9-NEXT: entry:
2739 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2740 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2741 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2742 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2743 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2744 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2745 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2746 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2747 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2748 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2749 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2750 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2751 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2752 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2753 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2754 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2755 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2756 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2757 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2758 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2759 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2760 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
2761 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2762 // CHECK9-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
2763 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2764 // CHECK9-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2765 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2766 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2767 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2768 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2769 // CHECK9-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)
2770 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2771 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
2772 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2773 // CHECK9: cond.true:
2774 // CHECK9-NEXT: br label [[COND_END:%.*]]
2775 // CHECK9: cond.false:
2776 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2777 // CHECK9-NEXT: br label [[COND_END]]
2778 // CHECK9: cond.end:
2779 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
2780 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2781 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2782 // CHECK9-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2783 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2784 // CHECK9: omp.inner.for.cond:
2785 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2786 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2787 // CHECK9-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2788 // CHECK9-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2789 // CHECK9: omp.inner.for.body:
2790 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2791 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2792 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2793 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2794 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
2795 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
2796 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i64 0, i64 [[IDXPROM]]
2797 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
2798 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2799 // CHECK9: omp.body.continue:
2800 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2801 // CHECK9: omp.inner.for.inc:
2802 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2803 // CHECK9-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
2804 // CHECK9-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
2805 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2806 // CHECK9: omp.inner.for.end:
2807 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2808 // CHECK9: omp.loop.exit:
2809 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
2810 // CHECK9-NEXT: ret void
2813 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94
2814 // CHECK9-SAME: (i64 noundef [[M:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
2815 // CHECK9-NEXT: entry:
2816 // CHECK9-NEXT: [[M_ADDR:%.*]] = alloca i64, align 8
2817 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2818 // CHECK9-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
2819 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
2820 // CHECK9-NEXT: store i64 [[M]], ptr [[M_ADDR]], align 8
2821 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2822 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2823 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[M_ADDR]], align 4
2824 // CHECK9-NEXT: store i32 [[TMP1]], ptr [[DOTCAPTURE_EXPR_]], align 4
2825 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
2826 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
2827 // CHECK9-NEXT: [[TMP3:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8
2828 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 2, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined, ptr [[TMP0]], i64 [[TMP3]])
2829 // CHECK9-NEXT: ret void
2832 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined
2833 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
2834 // CHECK9-NEXT: entry:
2835 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2836 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2837 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2838 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
2839 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2840 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2841 // CHECK9-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
2842 // CHECK9-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
2843 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2844 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2845 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2846 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8
2847 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2848 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2849 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2850 // CHECK9-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
2851 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2852 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
2853 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
2854 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2855 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2856 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
2857 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2858 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2859 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP3]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[TMP1]])
2860 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2861 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
2862 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2863 // CHECK9: cond.true:
2864 // CHECK9-NEXT: br label [[COND_END:%.*]]
2865 // CHECK9: cond.false:
2866 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2867 // CHECK9-NEXT: br label [[COND_END]]
2868 // CHECK9: cond.end:
2869 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
2870 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
2871 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2872 // CHECK9-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
2873 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2874 // CHECK9: omp.inner.for.cond:
2875 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2876 // CHECK9-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP7]], 10
2877 // CHECK9-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2878 // CHECK9: omp.inner.for.body:
2879 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2880 // CHECK9-NEXT: [[TMP9:%.*]] = zext i32 [[TMP8]] to i64
2881 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2882 // CHECK9-NEXT: [[TMP11:%.*]] = zext i32 [[TMP10]] to i64
2883 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
2884 // CHECK9-NEXT: store i32 [[TMP12]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
2885 // CHECK9-NEXT: [[TMP13:%.*]] = load i64, ptr [[DOTCAPTURE_EXPR__CASTED]], align 8
2886 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined.omp_outlined, i64 [[TMP9]], i64 [[TMP11]], ptr [[TMP0]], i64 [[TMP13]])
2887 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2888 // CHECK9: omp.inner.for.inc:
2889 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2890 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2891 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
2892 // CHECK9-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
2893 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2894 // CHECK9-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2895 // CHECK9-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
2896 // CHECK9-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
2897 // CHECK9-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2898 // CHECK9-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
2899 // CHECK9-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
2900 // CHECK9-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
2901 // CHECK9-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2902 // CHECK9-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP20]], 9
2903 // CHECK9-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
2904 // CHECK9: cond.true5:
2905 // CHECK9-NEXT: br label [[COND_END7:%.*]]
2906 // CHECK9: cond.false6:
2907 // CHECK9-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
2908 // CHECK9-NEXT: br label [[COND_END7]]
2909 // CHECK9: cond.end7:
2910 // CHECK9-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP21]], [[COND_FALSE6]] ]
2911 // CHECK9-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
2912 // CHECK9-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
2913 // CHECK9-NEXT: store i32 [[TMP22]], ptr [[DOTOMP_IV]], align 4
2914 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2915 // CHECK9: omp.inner.for.end:
2916 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2917 // CHECK9: omp.loop.exit:
2918 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP3]])
2919 // CHECK9-NEXT: ret void
2922 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined.omp_outlined
2923 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i64 noundef [[DOTPREVIOUS_LB_:%.*]], i64 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]], i64 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
2924 // CHECK9-NEXT: entry:
2925 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2926 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2927 // CHECK9-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i64, align 8
2928 // CHECK9-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i64, align 8
2929 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2930 // CHECK9-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
2931 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2932 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
2933 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2934 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2935 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
2936 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
2937 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
2938 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2939 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2940 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2941 // CHECK9-NEXT: store i64 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2942 // CHECK9-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2943 // CHECK9-NEXT: store i64 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 8
2944 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2945 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2946 // CHECK9-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
2947 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[DOTPREVIOUS_LB__ADDR]], align 8
2948 // CHECK9-NEXT: [[CONV:%.*]] = trunc i64 [[TMP1]] to i32
2949 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[DOTPREVIOUS_UB__ADDR]], align 8
2950 // CHECK9-NEXT: [[CONV1:%.*]] = trunc i64 [[TMP2]] to i32
2951 // CHECK9-NEXT: store i32 [[CONV]], ptr [[DOTOMP_LB]], align 4
2952 // CHECK9-NEXT: store i32 [[CONV1]], ptr [[DOTOMP_UB]], align 4
2953 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
2954 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
2955 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2956 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2957 // CHECK9-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)
2958 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2959 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
2960 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
2961 // CHECK9: cond.true:
2962 // CHECK9-NEXT: br label [[COND_END:%.*]]
2963 // CHECK9: cond.false:
2964 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2965 // CHECK9-NEXT: br label [[COND_END]]
2966 // CHECK9: cond.end:
2967 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
2968 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
2969 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2970 // CHECK9-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
2971 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2972 // CHECK9: omp.inner.for.cond:
2973 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2974 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
2975 // CHECK9-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
2976 // CHECK9-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
2977 // CHECK9: omp.inner.for.body:
2978 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2979 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
2980 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2981 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4
2982 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
2983 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP11]] to i64
2984 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i64 0, i64 [[IDXPROM]]
2985 // CHECK9-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
2986 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2987 // CHECK9: omp.body.continue:
2988 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2989 // CHECK9: omp.inner.for.inc:
2990 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
2991 // CHECK9-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP12]], 1
2992 // CHECK9-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4
2993 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]]
2994 // CHECK9: omp.inner.for.end:
2995 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
2996 // CHECK9: omp.loop.exit:
2997 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
2998 // CHECK9-NEXT: ret void
3001 // CHECK11-LABEL: define {{[^@]+}}@main
3002 // CHECK11-SAME: (i32 noundef [[ARGC:%.*]], ptr noundef [[ARGV:%.*]]) #[[ATTR0:[0-9]+]] {
3003 // CHECK11-NEXT: entry:
3004 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
3005 // CHECK11-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
3006 // CHECK11-NEXT: [[ARGV_ADDR:%.*]] = alloca ptr, align 4
3007 // CHECK11-NEXT: [[N:%.*]] = alloca i32, align 4
3008 // CHECK11-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 4
3009 // CHECK11-NEXT: [[__VLA_EXPR0:%.*]] = alloca i32, align 4
3010 // CHECK11-NEXT: [[M:%.*]] = alloca i32, align 4
3011 // CHECK11-NEXT: [[N_CASTED:%.*]] = alloca i32, align 4
3012 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 4
3013 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 4
3014 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 4
3015 // CHECK11-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 4
3016 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3017 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3018 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3019 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
3020 // CHECK11-NEXT: [[N_CASTED3:%.*]] = alloca i32, align 4
3021 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS4:%.*]] = alloca [3 x ptr], align 4
3022 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS5:%.*]] = alloca [3 x ptr], align 4
3023 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS6:%.*]] = alloca [3 x ptr], align 4
3024 // CHECK11-NEXT: [[DOTOFFLOAD_SIZES7:%.*]] = alloca [3 x i64], align 4
3025 // CHECK11-NEXT: [[_TMP8:%.*]] = alloca i32, align 4
3026 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_9:%.*]] = alloca i32, align 4
3027 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_10:%.*]] = alloca i32, align 4
3028 // CHECK11-NEXT: [[KERNEL_ARGS15:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
3029 // CHECK11-NEXT: [[M_CASTED:%.*]] = alloca i32, align 4
3030 // CHECK11-NEXT: [[N_CASTED18:%.*]] = alloca i32, align 4
3031 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS19:%.*]] = alloca [4 x ptr], align 4
3032 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS20:%.*]] = alloca [4 x ptr], align 4
3033 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS21:%.*]] = alloca [4 x ptr], align 4
3034 // CHECK11-NEXT: [[DOTOFFLOAD_SIZES22:%.*]] = alloca [4 x i64], align 4
3035 // CHECK11-NEXT: [[_TMP23:%.*]] = alloca i32, align 4
3036 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_24:%.*]] = alloca i32, align 4
3037 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_25:%.*]] = alloca i32, align 4
3038 // CHECK11-NEXT: [[KERNEL_ARGS30:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
3039 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
3040 // CHECK11-NEXT: store i32 [[ARGC]], ptr [[ARGC_ADDR]], align 4
3041 // CHECK11-NEXT: store ptr [[ARGV]], ptr [[ARGV_ADDR]], align 4
3042 // CHECK11-NEXT: store i32 100, ptr [[N]], align 4
3043 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[N]], align 4
3044 // CHECK11-NEXT: [[TMP1:%.*]] = call ptr @llvm.stacksave.p0()
3045 // CHECK11-NEXT: store ptr [[TMP1]], ptr [[SAVED_STACK]], align 4
3046 // CHECK11-NEXT: [[VLA:%.*]] = alloca i32, i32 [[TMP0]], align 4
3047 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[__VLA_EXPR0]], align 4
3048 // CHECK11-NEXT: store i32 10, ptr [[M]], align 4
3049 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[N]], align 4
3050 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[N_CASTED]], align 4
3051 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[N_CASTED]], align 4
3052 // CHECK11-NEXT: [[TMP4:%.*]] = mul nuw i32 [[TMP0]], 4
3053 // CHECK11-NEXT: [[TMP5:%.*]] = sext i32 [[TMP4]] to i64
3054 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes, i32 24, i1 false)
3055 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
3056 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[TMP6]], align 4
3057 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
3058 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[TMP7]], align 4
3059 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
3060 // CHECK11-NEXT: store ptr null, ptr [[TMP8]], align 4
3061 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
3062 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP9]], align 4
3063 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
3064 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP10]], align 4
3065 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
3066 // CHECK11-NEXT: store ptr null, ptr [[TMP11]], align 4
3067 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
3068 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP12]], align 4
3069 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
3070 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP13]], align 4
3071 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 2
3072 // CHECK11-NEXT: store i64 [[TMP5]], ptr [[TMP14]], align 4
3073 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
3074 // CHECK11-NEXT: store ptr null, ptr [[TMP15]], align 4
3075 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
3076 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
3077 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
3078 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[N]], align 4
3079 // CHECK11-NEXT: store i32 [[TMP19]], ptr [[DOTCAPTURE_EXPR_]], align 4
3080 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3081 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP20]], 0
3082 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3083 // CHECK11-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
3084 // CHECK11-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3085 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3086 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP21]], 1
3087 // CHECK11-NEXT: [[TMP22:%.*]] = zext i32 [[ADD]] to i64
3088 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
3089 // CHECK11-NEXT: store i32 3, ptr [[TMP23]], align 4
3090 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
3091 // CHECK11-NEXT: store i32 3, ptr [[TMP24]], align 4
3092 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
3093 // CHECK11-NEXT: store ptr [[TMP16]], ptr [[TMP25]], align 4
3094 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
3095 // CHECK11-NEXT: store ptr [[TMP17]], ptr [[TMP26]], align 4
3096 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
3097 // CHECK11-NEXT: store ptr [[TMP18]], ptr [[TMP27]], align 4
3098 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
3099 // CHECK11-NEXT: store ptr @.offload_maptypes, ptr [[TMP28]], align 4
3100 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
3101 // CHECK11-NEXT: store ptr null, ptr [[TMP29]], align 4
3102 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
3103 // CHECK11-NEXT: store ptr null, ptr [[TMP30]], align 4
3104 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
3105 // CHECK11-NEXT: store i64 [[TMP22]], ptr [[TMP31]], align 8
3106 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
3107 // CHECK11-NEXT: store i64 0, ptr [[TMP32]], align 8
3108 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
3109 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP33]], align 4
3110 // CHECK11-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
3111 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP34]], align 4
3112 // CHECK11-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
3113 // CHECK11-NEXT: store i32 0, ptr [[TMP35]], align 4
3114 // CHECK11-NEXT: [[TMP36:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.region_id, ptr [[KERNEL_ARGS]])
3115 // CHECK11-NEXT: [[TMP37:%.*]] = icmp ne i32 [[TMP36]], 0
3116 // CHECK11-NEXT: br i1 [[TMP37]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
3117 // CHECK11: omp_offload.failed:
3118 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106(i32 [[TMP3]], i32 [[TMP0]], ptr [[VLA]]) #[[ATTR3:[0-9]+]]
3119 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
3120 // CHECK11: omp_offload.cont:
3121 // CHECK11-NEXT: [[TMP38:%.*]] = load i32, ptr [[N]], align 4
3122 // CHECK11-NEXT: store i32 [[TMP38]], ptr [[N_CASTED3]], align 4
3123 // CHECK11-NEXT: [[TMP39:%.*]] = load i32, ptr [[N_CASTED3]], align 4
3124 // CHECK11-NEXT: [[TMP40:%.*]] = mul nuw i32 [[TMP0]], 4
3125 // CHECK11-NEXT: [[TMP41:%.*]] = sext i32 [[TMP40]] to i64
3126 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES7]], ptr align 4 @.offload_sizes.1, i32 24, i1 false)
3127 // CHECK11-NEXT: [[TMP42:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 0
3128 // CHECK11-NEXT: store i32 [[TMP39]], ptr [[TMP42]], align 4
3129 // CHECK11-NEXT: [[TMP43:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 0
3130 // CHECK11-NEXT: store i32 [[TMP39]], ptr [[TMP43]], align 4
3131 // CHECK11-NEXT: [[TMP44:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i32 0, i32 0
3132 // CHECK11-NEXT: store ptr null, ptr [[TMP44]], align 4
3133 // CHECK11-NEXT: [[TMP45:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 1
3134 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP45]], align 4
3135 // CHECK11-NEXT: [[TMP46:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 1
3136 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP46]], align 4
3137 // CHECK11-NEXT: [[TMP47:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i32 0, i32 1
3138 // CHECK11-NEXT: store ptr null, ptr [[TMP47]], align 4
3139 // CHECK11-NEXT: [[TMP48:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 2
3140 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP48]], align 4
3141 // CHECK11-NEXT: [[TMP49:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 2
3142 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP49]], align 4
3143 // CHECK11-NEXT: [[TMP50:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES7]], i32 0, i32 2
3144 // CHECK11-NEXT: store i64 [[TMP41]], ptr [[TMP50]], align 4
3145 // CHECK11-NEXT: [[TMP51:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS6]], i32 0, i32 2
3146 // CHECK11-NEXT: store ptr null, ptr [[TMP51]], align 4
3147 // CHECK11-NEXT: [[TMP52:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS4]], i32 0, i32 0
3148 // CHECK11-NEXT: [[TMP53:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS5]], i32 0, i32 0
3149 // CHECK11-NEXT: [[TMP54:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES7]], i32 0, i32 0
3150 // CHECK11-NEXT: [[TMP55:%.*]] = load i32, ptr [[N]], align 4
3151 // CHECK11-NEXT: store i32 [[TMP55]], ptr [[DOTCAPTURE_EXPR_9]], align 4
3152 // CHECK11-NEXT: [[TMP56:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_9]], align 4
3153 // CHECK11-NEXT: [[SUB11:%.*]] = sub nsw i32 [[TMP56]], 0
3154 // CHECK11-NEXT: [[DIV12:%.*]] = sdiv i32 [[SUB11]], 1
3155 // CHECK11-NEXT: [[SUB13:%.*]] = sub nsw i32 [[DIV12]], 1
3156 // CHECK11-NEXT: store i32 [[SUB13]], ptr [[DOTCAPTURE_EXPR_10]], align 4
3157 // CHECK11-NEXT: [[TMP57:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_10]], align 4
3158 // CHECK11-NEXT: [[ADD14:%.*]] = add nsw i32 [[TMP57]], 1
3159 // CHECK11-NEXT: [[TMP58:%.*]] = zext i32 [[ADD14]] to i64
3160 // CHECK11-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 0
3161 // CHECK11-NEXT: store i32 3, ptr [[TMP59]], align 4
3162 // CHECK11-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 1
3163 // CHECK11-NEXT: store i32 3, ptr [[TMP60]], align 4
3164 // CHECK11-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 2
3165 // CHECK11-NEXT: store ptr [[TMP52]], ptr [[TMP61]], align 4
3166 // CHECK11-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 3
3167 // CHECK11-NEXT: store ptr [[TMP53]], ptr [[TMP62]], align 4
3168 // CHECK11-NEXT: [[TMP63:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 4
3169 // CHECK11-NEXT: store ptr [[TMP54]], ptr [[TMP63]], align 4
3170 // CHECK11-NEXT: [[TMP64:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 5
3171 // CHECK11-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP64]], align 4
3172 // CHECK11-NEXT: [[TMP65:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 6
3173 // CHECK11-NEXT: store ptr null, ptr [[TMP65]], align 4
3174 // CHECK11-NEXT: [[TMP66:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 7
3175 // CHECK11-NEXT: store ptr null, ptr [[TMP66]], align 4
3176 // CHECK11-NEXT: [[TMP67:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 8
3177 // CHECK11-NEXT: store i64 [[TMP58]], ptr [[TMP67]], align 8
3178 // CHECK11-NEXT: [[TMP68:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 9
3179 // CHECK11-NEXT: store i64 0, ptr [[TMP68]], align 8
3180 // CHECK11-NEXT: [[TMP69:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 10
3181 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP69]], align 4
3182 // CHECK11-NEXT: [[TMP70:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 11
3183 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP70]], align 4
3184 // CHECK11-NEXT: [[TMP71:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS15]], i32 0, i32 12
3185 // CHECK11-NEXT: store i32 0, ptr [[TMP71]], align 4
3186 // CHECK11-NEXT: [[TMP72:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.region_id, ptr [[KERNEL_ARGS15]])
3187 // CHECK11-NEXT: [[TMP73:%.*]] = icmp ne i32 [[TMP72]], 0
3188 // CHECK11-NEXT: br i1 [[TMP73]], label [[OMP_OFFLOAD_FAILED16:%.*]], label [[OMP_OFFLOAD_CONT17:%.*]]
3189 // CHECK11: omp_offload.failed16:
3190 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111(i32 [[TMP39]], i32 [[TMP0]], ptr [[VLA]]) #[[ATTR3]]
3191 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT17]]
3192 // CHECK11: omp_offload.cont17:
3193 // CHECK11-NEXT: [[TMP74:%.*]] = load i32, ptr [[M]], align 4
3194 // CHECK11-NEXT: store i32 [[TMP74]], ptr [[M_CASTED]], align 4
3195 // CHECK11-NEXT: [[TMP75:%.*]] = load i32, ptr [[M_CASTED]], align 4
3196 // CHECK11-NEXT: [[TMP76:%.*]] = load i32, ptr [[N]], align 4
3197 // CHECK11-NEXT: store i32 [[TMP76]], ptr [[N_CASTED18]], align 4
3198 // CHECK11-NEXT: [[TMP77:%.*]] = load i32, ptr [[N_CASTED18]], align 4
3199 // CHECK11-NEXT: [[TMP78:%.*]] = mul nuw i32 [[TMP0]], 4
3200 // CHECK11-NEXT: [[TMP79:%.*]] = sext i32 [[TMP78]] to i64
3201 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES22]], ptr align 4 @.offload_sizes.3, i32 32, i1 false)
3202 // CHECK11-NEXT: [[TMP80:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 0
3203 // CHECK11-NEXT: store i32 [[TMP75]], ptr [[TMP80]], align 4
3204 // CHECK11-NEXT: [[TMP81:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 0
3205 // CHECK11-NEXT: store i32 [[TMP75]], ptr [[TMP81]], align 4
3206 // CHECK11-NEXT: [[TMP82:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i32 0, i32 0
3207 // CHECK11-NEXT: store ptr null, ptr [[TMP82]], align 4
3208 // CHECK11-NEXT: [[TMP83:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 1
3209 // CHECK11-NEXT: store i32 [[TMP77]], ptr [[TMP83]], align 4
3210 // CHECK11-NEXT: [[TMP84:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 1
3211 // CHECK11-NEXT: store i32 [[TMP77]], ptr [[TMP84]], align 4
3212 // CHECK11-NEXT: [[TMP85:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i32 0, i32 1
3213 // CHECK11-NEXT: store ptr null, ptr [[TMP85]], align 4
3214 // CHECK11-NEXT: [[TMP86:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 2
3215 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP86]], align 4
3216 // CHECK11-NEXT: [[TMP87:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 2
3217 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[TMP87]], align 4
3218 // CHECK11-NEXT: [[TMP88:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i32 0, i32 2
3219 // CHECK11-NEXT: store ptr null, ptr [[TMP88]], align 4
3220 // CHECK11-NEXT: [[TMP89:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 3
3221 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP89]], align 4
3222 // CHECK11-NEXT: [[TMP90:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 3
3223 // CHECK11-NEXT: store ptr [[VLA]], ptr [[TMP90]], align 4
3224 // CHECK11-NEXT: [[TMP91:%.*]] = getelementptr inbounds [4 x i64], ptr [[DOTOFFLOAD_SIZES22]], i32 0, i32 3
3225 // CHECK11-NEXT: store i64 [[TMP79]], ptr [[TMP91]], align 4
3226 // CHECK11-NEXT: [[TMP92:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS21]], i32 0, i32 3
3227 // CHECK11-NEXT: store ptr null, ptr [[TMP92]], align 4
3228 // CHECK11-NEXT: [[TMP93:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS19]], i32 0, i32 0
3229 // CHECK11-NEXT: [[TMP94:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS20]], i32 0, i32 0
3230 // CHECK11-NEXT: [[TMP95:%.*]] = getelementptr inbounds [4 x i64], ptr [[DOTOFFLOAD_SIZES22]], i32 0, i32 0
3231 // CHECK11-NEXT: [[TMP96:%.*]] = load i32, ptr [[N]], align 4
3232 // CHECK11-NEXT: store i32 [[TMP96]], ptr [[DOTCAPTURE_EXPR_24]], align 4
3233 // CHECK11-NEXT: [[TMP97:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_24]], align 4
3234 // CHECK11-NEXT: [[SUB26:%.*]] = sub nsw i32 [[TMP97]], 0
3235 // CHECK11-NEXT: [[DIV27:%.*]] = sdiv i32 [[SUB26]], 1
3236 // CHECK11-NEXT: [[SUB28:%.*]] = sub nsw i32 [[DIV27]], 1
3237 // CHECK11-NEXT: store i32 [[SUB28]], ptr [[DOTCAPTURE_EXPR_25]], align 4
3238 // CHECK11-NEXT: [[TMP98:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_25]], align 4
3239 // CHECK11-NEXT: [[ADD29:%.*]] = add nsw i32 [[TMP98]], 1
3240 // CHECK11-NEXT: [[TMP99:%.*]] = zext i32 [[ADD29]] to i64
3241 // CHECK11-NEXT: [[TMP100:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 0
3242 // CHECK11-NEXT: store i32 3, ptr [[TMP100]], align 4
3243 // CHECK11-NEXT: [[TMP101:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 1
3244 // CHECK11-NEXT: store i32 4, ptr [[TMP101]], align 4
3245 // CHECK11-NEXT: [[TMP102:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 2
3246 // CHECK11-NEXT: store ptr [[TMP93]], ptr [[TMP102]], align 4
3247 // CHECK11-NEXT: [[TMP103:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 3
3248 // CHECK11-NEXT: store ptr [[TMP94]], ptr [[TMP103]], align 4
3249 // CHECK11-NEXT: [[TMP104:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 4
3250 // CHECK11-NEXT: store ptr [[TMP95]], ptr [[TMP104]], align 4
3251 // CHECK11-NEXT: [[TMP105:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 5
3252 // CHECK11-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP105]], align 4
3253 // CHECK11-NEXT: [[TMP106:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 6
3254 // CHECK11-NEXT: store ptr null, ptr [[TMP106]], align 4
3255 // CHECK11-NEXT: [[TMP107:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 7
3256 // CHECK11-NEXT: store ptr null, ptr [[TMP107]], align 4
3257 // CHECK11-NEXT: [[TMP108:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 8
3258 // CHECK11-NEXT: store i64 [[TMP99]], ptr [[TMP108]], align 8
3259 // CHECK11-NEXT: [[TMP109:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 9
3260 // CHECK11-NEXT: store i64 0, ptr [[TMP109]], align 8
3261 // CHECK11-NEXT: [[TMP110:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 10
3262 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP110]], align 4
3263 // CHECK11-NEXT: [[TMP111:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 11
3264 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP111]], align 4
3265 // CHECK11-NEXT: [[TMP112:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS30]], i32 0, i32 12
3266 // CHECK11-NEXT: store i32 0, ptr [[TMP112]], align 4
3267 // CHECK11-NEXT: [[TMP113:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.region_id, ptr [[KERNEL_ARGS30]])
3268 // CHECK11-NEXT: [[TMP114:%.*]] = icmp ne i32 [[TMP113]], 0
3269 // CHECK11-NEXT: br i1 [[TMP114]], label [[OMP_OFFLOAD_FAILED31:%.*]], label [[OMP_OFFLOAD_CONT32:%.*]]
3270 // CHECK11: omp_offload.failed31:
3271 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116(i32 [[TMP75]], i32 [[TMP77]], i32 [[TMP0]], ptr [[VLA]]) #[[ATTR3]]
3272 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT32]]
3273 // CHECK11: omp_offload.cont32:
3274 // CHECK11-NEXT: [[TMP115:%.*]] = load i32, ptr [[ARGC_ADDR]], align 4
3275 // CHECK11-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIiLi10EEiT_(i32 noundef [[TMP115]])
3276 // CHECK11-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
3277 // CHECK11-NEXT: [[TMP116:%.*]] = load ptr, ptr [[SAVED_STACK]], align 4
3278 // CHECK11-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP116]])
3279 // CHECK11-NEXT: [[TMP117:%.*]] = load i32, ptr [[RETVAL]], align 4
3280 // CHECK11-NEXT: ret i32 [[TMP117]]
3283 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106
3284 // CHECK11-SAME: (i32 noundef [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2:[0-9]+]] {
3285 // CHECK11-NEXT: entry:
3286 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
3287 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3288 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3289 // CHECK11-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
3290 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3291 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3292 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3293 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3294 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined, ptr [[N_ADDR]], i32 [[TMP0]], ptr [[TMP1]])
3295 // CHECK11-NEXT: ret void
3298 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined
3299 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3300 // CHECK11-NEXT: entry:
3301 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3302 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3303 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3304 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3305 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3306 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3307 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3308 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3309 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3310 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3311 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3312 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3313 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3314 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3315 // CHECK11-NEXT: [[I3:%.*]] = alloca i32, align 4
3316 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3317 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3318 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3319 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3320 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3321 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3322 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3323 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3324 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3325 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
3326 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3327 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3328 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3329 // CHECK11-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
3330 // CHECK11-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3331 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3332 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3333 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3334 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3335 // CHECK11: omp.precond.then:
3336 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3337 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3338 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
3339 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3340 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3341 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3342 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
3343 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP8]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3344 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3345 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3346 // CHECK11-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP9]], [[TMP10]]
3347 // CHECK11-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3348 // CHECK11: cond.true:
3349 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3350 // CHECK11-NEXT: br label [[COND_END:%.*]]
3351 // CHECK11: cond.false:
3352 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3353 // CHECK11-NEXT: br label [[COND_END]]
3354 // CHECK11: cond.end:
3355 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP11]], [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ]
3356 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3357 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3358 // CHECK11-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
3359 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3360 // CHECK11: omp.inner.for.cond:
3361 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3362 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3363 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]]
3364 // CHECK11-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3365 // CHECK11: omp.inner.for.body:
3366 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3367 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3368 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined, i32 [[TMP16]], i32 [[TMP17]], ptr [[TMP0]], i32 [[TMP1]], ptr [[TMP2]])
3369 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3370 // CHECK11: omp.inner.for.inc:
3371 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3372 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3373 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3374 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
3375 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3376 // CHECK11: omp.inner.for.end:
3377 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3378 // CHECK11: omp.loop.exit:
3379 // CHECK11-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3380 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
3381 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP21]])
3382 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3383 // CHECK11: omp.precond.end:
3384 // CHECK11-NEXT: ret void
3387 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l106.omp_outlined.omp_outlined
3388 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3389 // CHECK11-NEXT: entry:
3390 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3391 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3392 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
3393 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
3394 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3395 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3396 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3397 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3398 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3399 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3400 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3401 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3402 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3403 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3404 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3405 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3406 // CHECK11-NEXT: [[I3:%.*]] = alloca i32, align 4
3407 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3408 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3409 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3410 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3411 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3412 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3413 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3414 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3415 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3416 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3417 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3418 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
3419 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3420 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3421 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3422 // CHECK11-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
3423 // CHECK11-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3424 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3425 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3426 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3427 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3428 // CHECK11: omp.precond.then:
3429 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3430 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3431 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
3432 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3433 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3434 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_LB]], align 4
3435 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[DOTOMP_UB]], align 4
3436 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3437 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3438 // CHECK11-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3439 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
3440 // CHECK11-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)
3441 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3442 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3443 // CHECK11-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
3444 // CHECK11-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3445 // CHECK11: cond.true:
3446 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3447 // CHECK11-NEXT: br label [[COND_END:%.*]]
3448 // CHECK11: cond.false:
3449 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3450 // CHECK11-NEXT: br label [[COND_END]]
3451 // CHECK11: cond.end:
3452 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
3453 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
3454 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3455 // CHECK11-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
3456 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3457 // CHECK11: omp.inner.for.cond:
3458 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3459 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3460 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
3461 // CHECK11-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3462 // CHECK11: omp.inner.for.body:
3463 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3464 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
3465 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3466 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I3]], align 4
3467 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[I3]], align 4
3468 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 [[TMP19]]
3469 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
3470 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3471 // CHECK11: omp.body.continue:
3472 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3473 // CHECK11: omp.inner.for.inc:
3474 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3475 // CHECK11-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP20]], 1
3476 // CHECK11-NEXT: store i32 [[ADD6]], ptr [[DOTOMP_IV]], align 4
3477 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3478 // CHECK11: omp.inner.for.end:
3479 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3480 // CHECK11: omp.loop.exit:
3481 // CHECK11-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3482 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
3483 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
3484 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3485 // CHECK11: omp.precond.end:
3486 // CHECK11-NEXT: ret void
3489 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111
3490 // CHECK11-SAME: (i32 noundef [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3491 // CHECK11-NEXT: entry:
3492 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
3493 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3494 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3495 // CHECK11-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
3496 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3497 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3498 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3499 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3500 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined, ptr [[N_ADDR]], i32 [[TMP0]], ptr [[TMP1]])
3501 // CHECK11-NEXT: ret void
3504 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined
3505 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3506 // CHECK11-NEXT: entry:
3507 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3508 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3509 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3510 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3511 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3512 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3513 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3514 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3515 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3516 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3517 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3518 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3519 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3520 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3521 // CHECK11-NEXT: [[I3:%.*]] = alloca i32, align 4
3522 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3523 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3524 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3525 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3526 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3527 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3528 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3529 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3530 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3531 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
3532 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3533 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3534 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3535 // CHECK11-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
3536 // CHECK11-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3537 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3538 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3539 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3540 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3541 // CHECK11: omp.precond.then:
3542 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3543 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3544 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
3545 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3546 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3547 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3548 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
3549 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP8]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3550 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3551 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3552 // CHECK11-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP9]], [[TMP10]]
3553 // CHECK11-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3554 // CHECK11: cond.true:
3555 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3556 // CHECK11-NEXT: br label [[COND_END:%.*]]
3557 // CHECK11: cond.false:
3558 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3559 // CHECK11-NEXT: br label [[COND_END]]
3560 // CHECK11: cond.end:
3561 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP11]], [[COND_TRUE]] ], [ [[TMP12]], [[COND_FALSE]] ]
3562 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3563 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3564 // CHECK11-NEXT: store i32 [[TMP13]], ptr [[DOTOMP_IV]], align 4
3565 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3566 // CHECK11: omp.inner.for.cond:
3567 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3568 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3569 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP14]], [[TMP15]]
3570 // CHECK11-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3571 // CHECK11: omp.inner.for.body:
3572 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3573 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3574 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined.omp_outlined, i32 [[TMP16]], i32 [[TMP17]], ptr [[TMP0]], i32 [[TMP1]], ptr [[TMP2]])
3575 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3576 // CHECK11: omp.inner.for.inc:
3577 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3578 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3579 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP18]], [[TMP19]]
3580 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
3581 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3582 // CHECK11: omp.inner.for.end:
3583 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3584 // CHECK11: omp.loop.exit:
3585 // CHECK11-NEXT: [[TMP20:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3586 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
3587 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP21]])
3588 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3589 // CHECK11: omp.precond.end:
3590 // CHECK11-NEXT: ret void
3593 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l111.omp_outlined.omp_outlined
3594 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3595 // CHECK11-NEXT: entry:
3596 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3597 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3598 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
3599 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
3600 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3601 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3602 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3603 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3604 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3605 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3606 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3607 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3608 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3609 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3610 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3611 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3612 // CHECK11-NEXT: [[I3:%.*]] = alloca i32, align 4
3613 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3614 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3615 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3616 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3617 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3618 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3619 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3620 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3621 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3622 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3623 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3624 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_]], align 4
3625 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3626 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3627 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3628 // CHECK11-NEXT: [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
3629 // CHECK11-NEXT: store i32 [[SUB2]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3630 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3631 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3632 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3633 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3634 // CHECK11: omp.precond.then:
3635 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3636 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3637 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
3638 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3639 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3640 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_LB]], align 4
3641 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[DOTOMP_UB]], align 4
3642 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3643 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3644 // CHECK11-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3645 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
3646 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP10]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3647 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3648 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3649 // CHECK11-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
3650 // CHECK11-NEXT: br i1 [[CMP4]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3651 // CHECK11: cond.true:
3652 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3653 // CHECK11-NEXT: br label [[COND_END:%.*]]
3654 // CHECK11: cond.false:
3655 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3656 // CHECK11-NEXT: br label [[COND_END]]
3657 // CHECK11: cond.end:
3658 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
3659 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
3660 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3661 // CHECK11-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
3662 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3663 // CHECK11: omp.inner.for.cond:
3664 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3665 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3666 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
3667 // CHECK11-NEXT: br i1 [[CMP5]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3668 // CHECK11: omp.inner.for.body:
3669 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3670 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
3671 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3672 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I3]], align 4
3673 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[I3]], align 4
3674 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 [[TMP19]]
3675 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
3676 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3677 // CHECK11: omp.body.continue:
3678 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3679 // CHECK11: omp.inner.for.inc:
3680 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3681 // CHECK11-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP20]], 1
3682 // CHECK11-NEXT: store i32 [[ADD6]], ptr [[DOTOMP_IV]], align 4
3683 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3684 // CHECK11: omp.inner.for.end:
3685 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3686 // CHECK11: omp.loop.exit:
3687 // CHECK11-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3688 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
3689 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
3690 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3691 // CHECK11: omp.precond.end:
3692 // CHECK11-NEXT: ret void
3695 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116
3696 // CHECK11-SAME: (i32 noundef [[M:%.*]], i32 noundef [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR2]] {
3697 // CHECK11-NEXT: entry:
3698 // CHECK11-NEXT: [[M_ADDR:%.*]] = alloca i32, align 4
3699 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
3700 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3701 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3702 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
3703 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
3704 // CHECK11-NEXT: store i32 [[M]], ptr [[M_ADDR]], align 4
3705 // CHECK11-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
3706 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3707 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3708 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3709 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3710 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[M_ADDR]], align 4
3711 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[DOTCAPTURE_EXPR_]], align 4
3712 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
3713 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
3714 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
3715 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined, ptr [[N_ADDR]], i32 [[TMP0]], ptr [[TMP1]], i32 [[TMP4]])
3716 // CHECK11-NEXT: ret void
3719 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined
3720 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
3721 // CHECK11-NEXT: entry:
3722 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3723 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3724 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3725 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3726 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3727 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
3728 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3729 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3730 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3731 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_2:%.*]] = alloca i32, align 4
3732 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3733 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
3734 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
3735 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3736 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3737 // CHECK11-NEXT: [[I4:%.*]] = alloca i32, align 4
3738 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
3739 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3740 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3741 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3742 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3743 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3744 // CHECK11-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
3745 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3746 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3747 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3748 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3749 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3750 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3751 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3752 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3753 // CHECK11-NEXT: [[SUB3:%.*]] = sub nsw i32 [[DIV]], 1
3754 // CHECK11-NEXT: store i32 [[SUB3]], ptr [[DOTCAPTURE_EXPR_2]], align 4
3755 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3756 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3757 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3758 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3759 // CHECK11: omp.precond.then:
3760 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
3761 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3762 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_COMB_UB]], align 4
3763 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3764 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3765 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
3766 // CHECK11-NEXT: [[TMP8:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3767 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[TMP8]], align 4
3768 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP9]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[TMP7]])
3769 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3770 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3771 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP10]], [[TMP11]]
3772 // CHECK11-NEXT: br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3773 // CHECK11: cond.true:
3774 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3775 // CHECK11-NEXT: br label [[COND_END:%.*]]
3776 // CHECK11: cond.false:
3777 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3778 // CHECK11-NEXT: br label [[COND_END]]
3779 // CHECK11: cond.end:
3780 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP12]], [[COND_TRUE]] ], [ [[TMP13]], [[COND_FALSE]] ]
3781 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
3782 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3783 // CHECK11-NEXT: store i32 [[TMP14]], ptr [[DOTOMP_IV]], align 4
3784 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3785 // CHECK11: omp.inner.for.cond:
3786 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3787 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3788 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP16]], 1
3789 // CHECK11-NEXT: [[CMP6:%.*]] = icmp slt i32 [[TMP15]], [[ADD]]
3790 // CHECK11-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3791 // CHECK11: omp.inner.for.body:
3792 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3793 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3794 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
3795 // CHECK11-NEXT: store i32 [[TMP19]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
3796 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
3797 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 6, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined.omp_outlined, i32 [[TMP17]], i32 [[TMP18]], ptr [[TMP0]], i32 [[TMP1]], ptr [[TMP2]], i32 [[TMP20]])
3798 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3799 // CHECK11: omp.inner.for.inc:
3800 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3801 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3802 // CHECK11-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]
3803 // CHECK11-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
3804 // CHECK11-NEXT: [[TMP23:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3805 // CHECK11-NEXT: [[TMP24:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3806 // CHECK11-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
3807 // CHECK11-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_COMB_LB]], align 4
3808 // CHECK11-NEXT: [[TMP25:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3809 // CHECK11-NEXT: [[TMP26:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
3810 // CHECK11-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP25]], [[TMP26]]
3811 // CHECK11-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_COMB_UB]], align 4
3812 // CHECK11-NEXT: [[TMP27:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3813 // CHECK11-NEXT: [[TMP28:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3814 // CHECK11-NEXT: [[CMP10:%.*]] = icmp sgt i32 [[TMP27]], [[TMP28]]
3815 // CHECK11-NEXT: br i1 [[CMP10]], label [[COND_TRUE11:%.*]], label [[COND_FALSE12:%.*]]
3816 // CHECK11: cond.true11:
3817 // CHECK11-NEXT: [[TMP29:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3818 // CHECK11-NEXT: br label [[COND_END13:%.*]]
3819 // CHECK11: cond.false12:
3820 // CHECK11-NEXT: [[TMP30:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
3821 // CHECK11-NEXT: br label [[COND_END13]]
3822 // CHECK11: cond.end13:
3823 // CHECK11-NEXT: [[COND14:%.*]] = phi i32 [ [[TMP29]], [[COND_TRUE11]] ], [ [[TMP30]], [[COND_FALSE12]] ]
3824 // CHECK11-NEXT: store i32 [[COND14]], ptr [[DOTOMP_COMB_UB]], align 4
3825 // CHECK11-NEXT: [[TMP31:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
3826 // CHECK11-NEXT: store i32 [[TMP31]], ptr [[DOTOMP_IV]], align 4
3827 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3828 // CHECK11: omp.inner.for.end:
3829 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3830 // CHECK11: omp.loop.exit:
3831 // CHECK11-NEXT: [[TMP32:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3832 // CHECK11-NEXT: [[TMP33:%.*]] = load i32, ptr [[TMP32]], align 4
3833 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP33]])
3834 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3835 // CHECK11: omp.precond.end:
3836 // CHECK11-NEXT: ret void
3839 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined.omp_outlined
3840 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[N:%.*]], i32 noundef [[VLA:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
3841 // CHECK11-NEXT: entry:
3842 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
3843 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
3844 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
3845 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
3846 // CHECK11-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
3847 // CHECK11-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
3848 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
3849 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
3850 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
3851 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3852 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
3853 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_2:%.*]] = alloca i32, align 4
3854 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
3855 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
3856 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
3857 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
3858 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
3859 // CHECK11-NEXT: [[I4:%.*]] = alloca i32, align 4
3860 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
3861 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
3862 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3863 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3864 // CHECK11-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
3865 // CHECK11-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
3866 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
3867 // CHECK11-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
3868 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
3869 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
3870 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A_ADDR]], align 4
3871 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP0]], align 4
3872 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[DOTCAPTURE_EXPR_1]], align 4
3873 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3874 // CHECK11-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP4]], 0
3875 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[SUB]], 1
3876 // CHECK11-NEXT: [[SUB3:%.*]] = sub nsw i32 [[DIV]], 1
3877 // CHECK11-NEXT: store i32 [[SUB3]], ptr [[DOTCAPTURE_EXPR_2]], align 4
3878 // CHECK11-NEXT: store i32 0, ptr [[I]], align 4
3879 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_1]], align 4
3880 // CHECK11-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP5]]
3881 // CHECK11-NEXT: br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
3882 // CHECK11: omp.precond.then:
3883 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
3884 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3885 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_UB]], align 4
3886 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
3887 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
3888 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_LB]], align 4
3889 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[DOTOMP_UB]], align 4
3890 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
3891 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
3892 // CHECK11-NEXT: [[TMP9:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3893 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
3894 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB2]], i32 [[TMP10]], i32 34, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
3895 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3896 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3897 // CHECK11-NEXT: [[CMP5:%.*]] = icmp sgt i32 [[TMP11]], [[TMP12]]
3898 // CHECK11-NEXT: br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
3899 // CHECK11: cond.true:
3900 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_2]], align 4
3901 // CHECK11-NEXT: br label [[COND_END:%.*]]
3902 // CHECK11: cond.false:
3903 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3904 // CHECK11-NEXT: br label [[COND_END]]
3905 // CHECK11: cond.end:
3906 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ [[TMP13]], [[COND_TRUE]] ], [ [[TMP14]], [[COND_FALSE]] ]
3907 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
3908 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
3909 // CHECK11-NEXT: store i32 [[TMP15]], ptr [[DOTOMP_IV]], align 4
3910 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
3911 // CHECK11: omp.inner.for.cond:
3912 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3913 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
3914 // CHECK11-NEXT: [[CMP6:%.*]] = icmp sle i32 [[TMP16]], [[TMP17]]
3915 // CHECK11-NEXT: br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
3916 // CHECK11: omp.inner.for.body:
3917 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3918 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP18]], 1
3919 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
3920 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I4]], align 4
3921 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[I4]], align 4
3922 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 [[TMP19]]
3923 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
3924 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
3925 // CHECK11: omp.body.continue:
3926 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
3927 // CHECK11: omp.inner.for.inc:
3928 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
3929 // CHECK11-NEXT: [[ADD7:%.*]] = add nsw i32 [[TMP20]], 1
3930 // CHECK11-NEXT: store i32 [[ADD7]], ptr [[DOTOMP_IV]], align 4
3931 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
3932 // CHECK11: omp.inner.for.end:
3933 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
3934 // CHECK11: omp.loop.exit:
3935 // CHECK11-NEXT: [[TMP21:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
3936 // CHECK11-NEXT: [[TMP22:%.*]] = load i32, ptr [[TMP21]], align 4
3937 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP22]])
3938 // CHECK11-NEXT: br label [[OMP_PRECOND_END]]
3939 // CHECK11: omp.precond.end:
3940 // CHECK11-NEXT: ret void
3943 // CHECK11-LABEL: define {{[^@]+}}@_Z5tmainIiLi10EEiT_
3944 // CHECK11-SAME: (i32 noundef [[ARGC:%.*]]) #[[ATTR5:[0-9]+]] comdat {
3945 // CHECK11-NEXT: entry:
3946 // CHECK11-NEXT: [[ARGC_ADDR:%.*]] = alloca i32, align 4
3947 // CHECK11-NEXT: [[A:%.*]] = alloca [10 x i32], align 4
3948 // CHECK11-NEXT: [[M:%.*]] = alloca i32, align 4
3949 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
3950 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
3951 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
3952 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
3953 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
3954 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS1:%.*]] = alloca [1 x ptr], align 4
3955 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS2:%.*]] = alloca [1 x ptr], align 4
3956 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS3:%.*]] = alloca [1 x ptr], align 4
3957 // CHECK11-NEXT: [[_TMP4:%.*]] = alloca i32, align 4
3958 // CHECK11-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
3959 // CHECK11-NEXT: [[M_CASTED:%.*]] = alloca i32, align 4
3960 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS8:%.*]] = alloca [2 x ptr], align 4
3961 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS9:%.*]] = alloca [2 x ptr], align 4
3962 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS10:%.*]] = alloca [2 x ptr], align 4
3963 // CHECK11-NEXT: [[_TMP11:%.*]] = alloca i32, align 4
3964 // CHECK11-NEXT: [[KERNEL_ARGS12:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
3965 // CHECK11-NEXT: store i32 [[ARGC]], ptr [[ARGC_ADDR]], align 4
3966 // CHECK11-NEXT: store i32 10, ptr [[M]], align 4
3967 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
3968 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP0]], align 4
3969 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
3970 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP1]], align 4
3971 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
3972 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
3973 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
3974 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
3975 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
3976 // CHECK11-NEXT: store i32 3, ptr [[TMP5]], align 4
3977 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
3978 // CHECK11-NEXT: store i32 1, ptr [[TMP6]], align 4
3979 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
3980 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 4
3981 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
3982 // CHECK11-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 4
3983 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
3984 // CHECK11-NEXT: store ptr @.offload_sizes.5, ptr [[TMP9]], align 4
3985 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
3986 // CHECK11-NEXT: store ptr @.offload_maptypes.6, ptr [[TMP10]], align 4
3987 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
3988 // CHECK11-NEXT: store ptr null, ptr [[TMP11]], align 4
3989 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
3990 // CHECK11-NEXT: store ptr null, ptr [[TMP12]], align 4
3991 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
3992 // CHECK11-NEXT: store i64 10, ptr [[TMP13]], align 8
3993 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
3994 // CHECK11-NEXT: store i64 0, ptr [[TMP14]], align 8
3995 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
3996 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
3997 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
3998 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
3999 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
4000 // CHECK11-NEXT: store i32 0, ptr [[TMP17]], align 4
4001 // CHECK11-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.region_id, ptr [[KERNEL_ARGS]])
4002 // CHECK11-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
4003 // CHECK11-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
4004 // CHECK11: omp_offload.failed:
4005 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84(ptr [[A]]) #[[ATTR3]]
4006 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
4007 // CHECK11: omp_offload.cont:
4008 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS1]], i32 0, i32 0
4009 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP20]], align 4
4010 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS2]], i32 0, i32 0
4011 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP21]], align 4
4012 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS3]], i32 0, i32 0
4013 // CHECK11-NEXT: store ptr null, ptr [[TMP22]], align 4
4014 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS1]], i32 0, i32 0
4015 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS2]], i32 0, i32 0
4016 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
4017 // CHECK11-NEXT: store i32 3, ptr [[TMP25]], align 4
4018 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
4019 // CHECK11-NEXT: store i32 1, ptr [[TMP26]], align 4
4020 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
4021 // CHECK11-NEXT: store ptr [[TMP23]], ptr [[TMP27]], align 4
4022 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
4023 // CHECK11-NEXT: store ptr [[TMP24]], ptr [[TMP28]], align 4
4024 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
4025 // CHECK11-NEXT: store ptr @.offload_sizes.7, ptr [[TMP29]], align 4
4026 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
4027 // CHECK11-NEXT: store ptr @.offload_maptypes.8, ptr [[TMP30]], align 4
4028 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
4029 // CHECK11-NEXT: store ptr null, ptr [[TMP31]], align 4
4030 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
4031 // CHECK11-NEXT: store ptr null, ptr [[TMP32]], align 4
4032 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
4033 // CHECK11-NEXT: store i64 10, ptr [[TMP33]], align 8
4034 // CHECK11-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
4035 // CHECK11-NEXT: store i64 0, ptr [[TMP34]], align 8
4036 // CHECK11-NEXT: [[TMP35:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
4037 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP35]], align 4
4038 // CHECK11-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
4039 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP36]], align 4
4040 // CHECK11-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
4041 // CHECK11-NEXT: store i32 0, ptr [[TMP37]], align 4
4042 // CHECK11-NEXT: [[TMP38:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.region_id, ptr [[KERNEL_ARGS5]])
4043 // CHECK11-NEXT: [[TMP39:%.*]] = icmp ne i32 [[TMP38]], 0
4044 // CHECK11-NEXT: br i1 [[TMP39]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
4045 // CHECK11: omp_offload.failed6:
4046 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89(ptr [[A]]) #[[ATTR3]]
4047 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT7]]
4048 // CHECK11: omp_offload.cont7:
4049 // CHECK11-NEXT: [[TMP40:%.*]] = load i32, ptr [[M]], align 4
4050 // CHECK11-NEXT: store i32 [[TMP40]], ptr [[M_CASTED]], align 4
4051 // CHECK11-NEXT: [[TMP41:%.*]] = load i32, ptr [[M_CASTED]], align 4
4052 // CHECK11-NEXT: [[TMP42:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 0
4053 // CHECK11-NEXT: store i32 [[TMP41]], ptr [[TMP42]], align 4
4054 // CHECK11-NEXT: [[TMP43:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 0
4055 // CHECK11-NEXT: store i32 [[TMP41]], ptr [[TMP43]], align 4
4056 // CHECK11-NEXT: [[TMP44:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_MAPPERS10]], i32 0, i32 0
4057 // CHECK11-NEXT: store ptr null, ptr [[TMP44]], align 4
4058 // CHECK11-NEXT: [[TMP45:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 1
4059 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP45]], align 4
4060 // CHECK11-NEXT: [[TMP46:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 1
4061 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP46]], align 4
4062 // CHECK11-NEXT: [[TMP47:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_MAPPERS10]], i32 0, i32 1
4063 // CHECK11-NEXT: store ptr null, ptr [[TMP47]], align 4
4064 // CHECK11-NEXT: [[TMP48:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_BASEPTRS8]], i32 0, i32 0
4065 // CHECK11-NEXT: [[TMP49:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOFFLOAD_PTRS9]], i32 0, i32 0
4066 // CHECK11-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 0
4067 // CHECK11-NEXT: store i32 3, ptr [[TMP50]], align 4
4068 // CHECK11-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 1
4069 // CHECK11-NEXT: store i32 2, ptr [[TMP51]], align 4
4070 // CHECK11-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 2
4071 // CHECK11-NEXT: store ptr [[TMP48]], ptr [[TMP52]], align 4
4072 // CHECK11-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 3
4073 // CHECK11-NEXT: store ptr [[TMP49]], ptr [[TMP53]], align 4
4074 // CHECK11-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 4
4075 // CHECK11-NEXT: store ptr @.offload_sizes.9, ptr [[TMP54]], align 4
4076 // CHECK11-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 5
4077 // CHECK11-NEXT: store ptr @.offload_maptypes.10, ptr [[TMP55]], align 4
4078 // CHECK11-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 6
4079 // CHECK11-NEXT: store ptr null, ptr [[TMP56]], align 4
4080 // CHECK11-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 7
4081 // CHECK11-NEXT: store ptr null, ptr [[TMP57]], align 4
4082 // CHECK11-NEXT: [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 8
4083 // CHECK11-NEXT: store i64 10, ptr [[TMP58]], align 8
4084 // CHECK11-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 9
4085 // CHECK11-NEXT: store i64 0, ptr [[TMP59]], align 8
4086 // CHECK11-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 10
4087 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP60]], align 4
4088 // CHECK11-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 11
4089 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP61]], align 4
4090 // CHECK11-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS12]], i32 0, i32 12
4091 // CHECK11-NEXT: store i32 0, ptr [[TMP62]], align 4
4092 // CHECK11-NEXT: [[TMP63:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB3]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.region_id, ptr [[KERNEL_ARGS12]])
4093 // CHECK11-NEXT: [[TMP64:%.*]] = icmp ne i32 [[TMP63]], 0
4094 // CHECK11-NEXT: br i1 [[TMP64]], label [[OMP_OFFLOAD_FAILED13:%.*]], label [[OMP_OFFLOAD_CONT14:%.*]]
4095 // CHECK11: omp_offload.failed13:
4096 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94(i32 [[TMP41]], ptr [[A]]) #[[ATTR3]]
4097 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT14]]
4098 // CHECK11: omp_offload.cont14:
4099 // CHECK11-NEXT: ret i32 0
4102 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84
4103 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4104 // CHECK11-NEXT: entry:
4105 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4106 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4107 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4108 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined, ptr [[TMP0]])
4109 // CHECK11-NEXT: ret void
4112 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined
4113 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4114 // CHECK11-NEXT: entry:
4115 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4116 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4117 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4118 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4119 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4120 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4121 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4122 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4123 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4124 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4125 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4126 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4127 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4128 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4129 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4130 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4131 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4132 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4133 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4134 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
4135 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
4136 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4137 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
4138 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4139 // CHECK11: cond.true:
4140 // CHECK11-NEXT: br label [[COND_END:%.*]]
4141 // CHECK11: cond.false:
4142 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4143 // CHECK11-NEXT: br label [[COND_END]]
4144 // CHECK11: cond.end:
4145 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
4146 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4147 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4148 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
4149 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4150 // CHECK11: omp.inner.for.cond:
4151 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4152 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4153 // CHECK11-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
4154 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4155 // CHECK11: omp.inner.for.body:
4156 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4157 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4158 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined.omp_outlined, i32 [[TMP8]], i32 [[TMP9]], ptr [[TMP0]])
4159 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4160 // CHECK11: omp.inner.for.inc:
4161 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4162 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4163 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
4164 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4165 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4166 // CHECK11: omp.inner.for.end:
4167 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4168 // CHECK11: omp.loop.exit:
4169 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
4170 // CHECK11-NEXT: ret void
4173 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l84.omp_outlined.omp_outlined
4174 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4175 // CHECK11-NEXT: entry:
4176 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4177 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4178 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
4179 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
4180 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4181 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4182 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4183 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4184 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4185 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4186 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4187 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4188 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4189 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4190 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4191 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4192 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4193 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4194 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4195 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4196 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4197 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4198 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
4199 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
4200 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4201 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4202 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4203 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
4204 // CHECK11-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)
4205 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4206 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
4207 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4208 // CHECK11: cond.true:
4209 // CHECK11-NEXT: br label [[COND_END:%.*]]
4210 // CHECK11: cond.false:
4211 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4212 // CHECK11-NEXT: br label [[COND_END]]
4213 // CHECK11: cond.end:
4214 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
4215 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
4216 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4217 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4218 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4219 // CHECK11: omp.inner.for.cond:
4220 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4221 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4222 // CHECK11-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4223 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4224 // CHECK11: omp.inner.for.body:
4225 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4226 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4227 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4228 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4229 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
4230 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i32 0, i32 [[TMP11]]
4231 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
4232 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4233 // CHECK11: omp.body.continue:
4234 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4235 // CHECK11: omp.inner.for.inc:
4236 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4237 // CHECK11-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
4238 // CHECK11-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
4239 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4240 // CHECK11: omp.inner.for.end:
4241 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4242 // CHECK11: omp.loop.exit:
4243 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
4244 // CHECK11-NEXT: ret void
4247 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89
4248 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4249 // CHECK11-NEXT: entry:
4250 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4251 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4252 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4253 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined, ptr [[TMP0]])
4254 // CHECK11-NEXT: ret void
4257 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined
4258 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4259 // CHECK11-NEXT: entry:
4260 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4261 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4262 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4263 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4264 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4265 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4266 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4267 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4268 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4269 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4270 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4271 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4272 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4273 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4274 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4275 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4276 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4277 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4278 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4279 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
4280 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
4281 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4282 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 9
4283 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4284 // CHECK11: cond.true:
4285 // CHECK11-NEXT: br label [[COND_END:%.*]]
4286 // CHECK11: cond.false:
4287 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4288 // CHECK11-NEXT: br label [[COND_END]]
4289 // CHECK11: cond.end:
4290 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
4291 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4292 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4293 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
4294 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4295 // CHECK11: omp.inner.for.cond:
4296 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4297 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4298 // CHECK11-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
4299 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4300 // CHECK11: omp.inner.for.body:
4301 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4302 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4303 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 3, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined.omp_outlined, i32 [[TMP8]], i32 [[TMP9]], ptr [[TMP0]])
4304 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4305 // CHECK11: omp.inner.for.inc:
4306 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4307 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4308 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP10]], [[TMP11]]
4309 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4310 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4311 // CHECK11: omp.inner.for.end:
4312 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4313 // CHECK11: omp.loop.exit:
4314 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
4315 // CHECK11-NEXT: ret void
4318 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l89.omp_outlined.omp_outlined
4319 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4320 // CHECK11-NEXT: entry:
4321 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4322 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4323 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
4324 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
4325 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4326 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4327 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4328 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4329 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4330 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4331 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4332 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4333 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4334 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4335 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4336 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4337 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4338 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4339 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4340 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4341 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4342 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4343 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
4344 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
4345 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4346 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4347 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4348 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
4349 // CHECK11-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)
4350 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4351 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
4352 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4353 // CHECK11: cond.true:
4354 // CHECK11-NEXT: br label [[COND_END:%.*]]
4355 // CHECK11: cond.false:
4356 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4357 // CHECK11-NEXT: br label [[COND_END]]
4358 // CHECK11: cond.end:
4359 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
4360 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
4361 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4362 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4363 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4364 // CHECK11: omp.inner.for.cond:
4365 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4366 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4367 // CHECK11-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4368 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4369 // CHECK11: omp.inner.for.body:
4370 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4371 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4372 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4373 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4374 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
4375 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i32 0, i32 [[TMP11]]
4376 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
4377 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4378 // CHECK11: omp.body.continue:
4379 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4380 // CHECK11: omp.inner.for.inc:
4381 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4382 // CHECK11-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
4383 // CHECK11-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
4384 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4385 // CHECK11: omp.inner.for.end:
4386 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4387 // CHECK11: omp.loop.exit:
4388 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
4389 // CHECK11-NEXT: ret void
4392 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94
4393 // CHECK11-SAME: (i32 noundef [[M:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]]) #[[ATTR2]] {
4394 // CHECK11-NEXT: entry:
4395 // CHECK11-NEXT: [[M_ADDR:%.*]] = alloca i32, align 4
4396 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4397 // CHECK11-NEXT: [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
4398 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
4399 // CHECK11-NEXT: store i32 [[M]], ptr [[M_ADDR]], align 4
4400 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4401 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4402 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[M_ADDR]], align 4
4403 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[DOTCAPTURE_EXPR_]], align 4
4404 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR_]], align 4
4405 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
4406 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
4407 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB3]], i32 2, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined, ptr [[TMP0]], i32 [[TMP3]])
4408 // CHECK11-NEXT: ret void
4411 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined
4412 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
4413 // CHECK11-NEXT: entry:
4414 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4415 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4416 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4417 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
4418 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4419 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4420 // CHECK11-NEXT: [[DOTOMP_COMB_LB:%.*]] = alloca i32, align 4
4421 // CHECK11-NEXT: [[DOTOMP_COMB_UB:%.*]] = alloca i32, align 4
4422 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4423 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4424 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4425 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i32, align 4
4426 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4427 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4428 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4429 // CHECK11-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
4430 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4431 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_COMB_LB]], align 4
4432 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_COMB_UB]], align 4
4433 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4434 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4435 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
4436 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4437 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
4438 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP3]], i32 91, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_COMB_LB]], ptr [[DOTOMP_COMB_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 [[TMP1]])
4439 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4440 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP4]], 9
4441 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4442 // CHECK11: cond.true:
4443 // CHECK11-NEXT: br label [[COND_END:%.*]]
4444 // CHECK11: cond.false:
4445 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4446 // CHECK11-NEXT: br label [[COND_END]]
4447 // CHECK11: cond.end:
4448 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP5]], [[COND_FALSE]] ]
4449 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_COMB_UB]], align 4
4450 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4451 // CHECK11-NEXT: store i32 [[TMP6]], ptr [[DOTOMP_IV]], align 4
4452 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4453 // CHECK11: omp.inner.for.cond:
4454 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4455 // CHECK11-NEXT: [[CMP1:%.*]] = icmp slt i32 [[TMP7]], 10
4456 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4457 // CHECK11: omp.inner.for.body:
4458 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4459 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4460 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
4461 // CHECK11-NEXT: store i32 [[TMP10]], ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
4462 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTCAPTURE_EXPR__CASTED]], align 4
4463 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB3]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined.omp_outlined, i32 [[TMP8]], i32 [[TMP9]], ptr [[TMP0]], i32 [[TMP11]])
4464 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4465 // CHECK11: omp.inner.for.inc:
4466 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4467 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4468 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
4469 // CHECK11-NEXT: store i32 [[ADD]], ptr [[DOTOMP_IV]], align 4
4470 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4471 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4472 // CHECK11-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP14]], [[TMP15]]
4473 // CHECK11-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_COMB_LB]], align 4
4474 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4475 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_STRIDE]], align 4
4476 // CHECK11-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]
4477 // CHECK11-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_COMB_UB]], align 4
4478 // CHECK11-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4479 // CHECK11-NEXT: [[CMP4:%.*]] = icmp sgt i32 [[TMP18]], 9
4480 // CHECK11-NEXT: br i1 [[CMP4]], label [[COND_TRUE5:%.*]], label [[COND_FALSE6:%.*]]
4481 // CHECK11: cond.true5:
4482 // CHECK11-NEXT: br label [[COND_END7:%.*]]
4483 // CHECK11: cond.false6:
4484 // CHECK11-NEXT: [[TMP19:%.*]] = load i32, ptr [[DOTOMP_COMB_UB]], align 4
4485 // CHECK11-NEXT: br label [[COND_END7]]
4486 // CHECK11: cond.end7:
4487 // CHECK11-NEXT: [[COND8:%.*]] = phi i32 [ 9, [[COND_TRUE5]] ], [ [[TMP19]], [[COND_FALSE6]] ]
4488 // CHECK11-NEXT: store i32 [[COND8]], ptr [[DOTOMP_COMB_UB]], align 4
4489 // CHECK11-NEXT: [[TMP20:%.*]] = load i32, ptr [[DOTOMP_COMB_LB]], align 4
4490 // CHECK11-NEXT: store i32 [[TMP20]], ptr [[DOTOMP_IV]], align 4
4491 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4492 // CHECK11: omp.inner.for.end:
4493 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4494 // CHECK11: omp.loop.exit:
4495 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP3]])
4496 // CHECK11-NEXT: ret void
4499 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiLi10EEiT__l94.omp_outlined.omp_outlined
4500 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], i32 noundef [[DOTPREVIOUS_LB_:%.*]], i32 noundef [[DOTPREVIOUS_UB_:%.*]], ptr noundef nonnull align 4 dereferenceable(40) [[A:%.*]], i32 noundef [[DOTCAPTURE_EXPR_:%.*]]) #[[ATTR2]] {
4501 // CHECK11-NEXT: entry:
4502 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
4503 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
4504 // CHECK11-NEXT: [[DOTPREVIOUS_LB__ADDR:%.*]] = alloca i32, align 4
4505 // CHECK11-NEXT: [[DOTPREVIOUS_UB__ADDR:%.*]] = alloca i32, align 4
4506 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
4507 // CHECK11-NEXT: [[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i32, align 4
4508 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
4509 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
4510 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
4511 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
4512 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
4513 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
4514 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
4515 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
4516 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
4517 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_LB_]], ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4518 // CHECK11-NEXT: store i32 [[DOTPREVIOUS_UB_]], ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4519 // CHECK11-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
4520 // CHECK11-NEXT: store i32 [[DOTCAPTURE_EXPR_]], ptr [[DOTCAPTURE_EXPR__ADDR]], align 4
4521 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
4522 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
4523 // CHECK11-NEXT: store i32 9, ptr [[DOTOMP_UB]], align 4
4524 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTPREVIOUS_LB__ADDR]], align 4
4525 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTPREVIOUS_UB__ADDR]], align 4
4526 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[DOTOMP_LB]], align 4
4527 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[DOTOMP_UB]], align 4
4528 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
4529 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
4530 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
4531 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
4532 // CHECK11-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)
4533 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4534 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP5]], 9
4535 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
4536 // CHECK11: cond.true:
4537 // CHECK11-NEXT: br label [[COND_END:%.*]]
4538 // CHECK11: cond.false:
4539 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4540 // CHECK11-NEXT: br label [[COND_END]]
4541 // CHECK11: cond.end:
4542 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 9, [[COND_TRUE]] ], [ [[TMP6]], [[COND_FALSE]] ]
4543 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
4544 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
4545 // CHECK11-NEXT: store i32 [[TMP7]], ptr [[DOTOMP_IV]], align 4
4546 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
4547 // CHECK11: omp.inner.for.cond:
4548 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4549 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
4550 // CHECK11-NEXT: [[CMP1:%.*]] = icmp sle i32 [[TMP8]], [[TMP9]]
4551 // CHECK11-NEXT: br i1 [[CMP1]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
4552 // CHECK11: omp.inner.for.body:
4553 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4554 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP10]], 1
4555 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
4556 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4
4557 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4
4558 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i32], ptr [[TMP0]], i32 0, i32 [[TMP11]]
4559 // CHECK11-NEXT: store i32 0, ptr [[ARRAYIDX]], align 4
4560 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
4561 // CHECK11: omp.body.continue:
4562 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
4563 // CHECK11: omp.inner.for.inc:
4564 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4
4565 // CHECK11-NEXT: [[ADD2:%.*]] = add nsw i32 [[TMP12]], 1
4566 // CHECK11-NEXT: store i32 [[ADD2]], ptr [[DOTOMP_IV]], align 4
4567 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]]
4568 // CHECK11: omp.inner.for.end:
4569 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
4570 // CHECK11: omp.loop.exit:
4571 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB2]], i32 [[TMP4]])
4572 // CHECK11-NEXT: ret void