1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _
2 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
4 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
5 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK3
6 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
7 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK3
9 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK5
10 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
11 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK5
12 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK7
13 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
14 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK7
16 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK9
17 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
18 // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK9
19 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK11
20 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
21 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK11
23 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK13
24 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
25 // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK13
26 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK15
27 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
28 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK15
29 // expected-no-diagnostics
38 operator T() { return T(); }
47 S
<T
> s_arr
[] = {1, 2};
51 #pragma omp distribute simd private(t_var, vec, s_arr, s_arr, var, var)
52 for (int i
= 0; i
< 2; ++i
) {
62 volatile double &g1
= g
;
70 #pragma omp distribute simd private(g, g1, svar, sfvar)
71 for (int i
= 0; i
< 2; ++i
) {
90 S
<float> s_arr
[] = {1, 2};
95 #pragma omp distribute simd private(t_var, vec, s_arr, s_arr, var, var, svar)
96 for (int i
= 0; i
< 2; ++i
) {
104 #pragma omp distribute simd
105 for (i
= 0; i
< 2; ++i
) {
118 // CHECK1-LABEL: define {{[^@]+}}@main
119 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
120 // CHECK1-NEXT: entry:
121 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
122 // CHECK1-NEXT: [[G:%.*]] = alloca double, align 8
123 // CHECK1-NEXT: [[G1:%.*]] = alloca ptr, align 8
124 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
125 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
126 // CHECK1-NEXT: store ptr [[G]], ptr [[G1]], align 8
127 // CHECK1-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
128 // CHECK1-NEXT: ret i32 0
131 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68
132 // CHECK1-SAME: () #[[ATTR2:[0-9]+]] {
133 // CHECK1-NEXT: entry:
134 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2:[0-9]+]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68.omp_outlined)
135 // CHECK1-NEXT: ret void
138 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68.omp_outlined
139 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR2]] {
140 // CHECK1-NEXT: entry:
141 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
142 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
143 // CHECK1-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
144 // CHECK1-NEXT: [[TMP:%.*]] = alloca i32, align 4
145 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
146 // CHECK1-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
147 // CHECK1-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
148 // CHECK1-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
149 // CHECK1-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
150 // CHECK1-NEXT: [[G:%.*]] = alloca double, align 8
151 // CHECK1-NEXT: [[G1:%.*]] = alloca double, align 8
152 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
153 // CHECK1-NEXT: [[SVAR:%.*]] = alloca i32, align 4
154 // CHECK1-NEXT: [[SFVAR:%.*]] = alloca float, align 4
155 // CHECK1-NEXT: [[I:%.*]] = alloca i32, align 4
156 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
157 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
158 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
159 // CHECK1-NEXT: store ptr undef, ptr [[_TMP1]], align 8
160 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
161 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
162 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
163 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
164 // CHECK1-NEXT: store ptr [[G1]], ptr [[_TMP2]], align 8
165 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
166 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
167 // CHECK1-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
168 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
169 // CHECK1-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
170 // CHECK1-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
171 // CHECK1: cond.true:
172 // CHECK1-NEXT: br label [[COND_END:%.*]]
173 // CHECK1: cond.false:
174 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
175 // CHECK1-NEXT: br label [[COND_END]]
177 // CHECK1-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
178 // CHECK1-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
179 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
180 // CHECK1-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
181 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
182 // CHECK1: omp.inner.for.cond:
183 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP4:![0-9]+]]
184 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP4]]
185 // CHECK1-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
186 // CHECK1-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
187 // CHECK1: omp.inner.for.body:
188 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP4]]
189 // CHECK1-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
190 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
191 // CHECK1-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP4]]
192 // CHECK1-NEXT: store double 1.000000e+00, ptr [[G]], align 8, !llvm.access.group [[ACC_GRP4]]
193 // CHECK1-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP2]], align 8, !llvm.access.group [[ACC_GRP4]]
194 // CHECK1-NEXT: store volatile double 1.000000e+00, ptr [[TMP8]], align 8, !llvm.access.group [[ACC_GRP4]]
195 // CHECK1-NEXT: store i32 3, ptr [[SVAR]], align 4, !llvm.access.group [[ACC_GRP4]]
196 // CHECK1-NEXT: store float 4.000000e+00, ptr [[SFVAR]], align 4, !llvm.access.group [[ACC_GRP4]]
197 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
198 // CHECK1-NEXT: store ptr [[G]], ptr [[TMP9]], align 8, !llvm.access.group [[ACC_GRP4]]
199 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
200 // CHECK1-NEXT: [[TMP11:%.*]] = load ptr, ptr [[_TMP2]], align 8, !llvm.access.group [[ACC_GRP4]]
201 // CHECK1-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 8, !llvm.access.group [[ACC_GRP4]]
202 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
203 // CHECK1-NEXT: store ptr [[SVAR]], ptr [[TMP12]], align 8, !llvm.access.group [[ACC_GRP4]]
204 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
205 // CHECK1-NEXT: store ptr [[SFVAR]], ptr [[TMP13]], align 8, !llvm.access.group [[ACC_GRP4]]
206 // CHECK1-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]]), !llvm.access.group [[ACC_GRP4]]
207 // CHECK1-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
208 // CHECK1: omp.body.continue:
209 // CHECK1-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
210 // CHECK1: omp.inner.for.inc:
211 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP4]]
212 // CHECK1-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP14]], 1
213 // CHECK1-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP4]]
214 // CHECK1-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP5:![0-9]+]]
215 // CHECK1: omp.inner.for.end:
216 // CHECK1-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
217 // CHECK1: omp.loop.exit:
218 // CHECK1-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP1]])
219 // CHECK1-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
220 // CHECK1-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
221 // CHECK1-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
222 // CHECK1: .omp.final.then:
223 // CHECK1-NEXT: store i32 2, ptr [[I]], align 4
224 // CHECK1-NEXT: br label [[DOTOMP_FINAL_DONE]]
225 // CHECK1: .omp.final.done:
226 // CHECK1-NEXT: ret void
229 // CHECK1-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
230 // CHECK1-SAME: () #[[ATTR4:[0-9]+]] {
231 // CHECK1-NEXT: entry:
232 // CHECK1-NEXT: call void @__tgt_register_requires(i64 1)
233 // CHECK1-NEXT: ret void
236 // CHECK3-LABEL: define {{[^@]+}}@main
237 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
238 // CHECK3-NEXT: entry:
239 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
240 // CHECK3-NEXT: [[G:%.*]] = alloca double, align 8
241 // CHECK3-NEXT: [[G1:%.*]] = alloca ptr, align 4
242 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
243 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
244 // CHECK3-NEXT: store ptr [[G]], ptr [[G1]], align 4
245 // CHECK3-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
246 // CHECK3-NEXT: ret i32 0
249 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68
250 // CHECK3-SAME: () #[[ATTR2:[0-9]+]] {
251 // CHECK3-NEXT: entry:
252 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2:[0-9]+]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68.omp_outlined)
253 // CHECK3-NEXT: ret void
256 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l68.omp_outlined
257 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR2]] {
258 // CHECK3-NEXT: entry:
259 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
260 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
261 // CHECK3-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
262 // CHECK3-NEXT: [[TMP:%.*]] = alloca i32, align 4
263 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
264 // CHECK3-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
265 // CHECK3-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
266 // CHECK3-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
267 // CHECK3-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
268 // CHECK3-NEXT: [[G:%.*]] = alloca double, align 8
269 // CHECK3-NEXT: [[G1:%.*]] = alloca double, align 8
270 // CHECK3-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
271 // CHECK3-NEXT: [[SVAR:%.*]] = alloca i32, align 4
272 // CHECK3-NEXT: [[SFVAR:%.*]] = alloca float, align 4
273 // CHECK3-NEXT: [[I:%.*]] = alloca i32, align 4
274 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
275 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
276 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
277 // CHECK3-NEXT: store ptr undef, ptr [[_TMP1]], align 4
278 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
279 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
280 // CHECK3-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
281 // CHECK3-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
282 // CHECK3-NEXT: store ptr [[G1]], ptr [[_TMP2]], align 4
283 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
284 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
285 // CHECK3-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
286 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
287 // CHECK3-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
288 // CHECK3-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
289 // CHECK3: cond.true:
290 // CHECK3-NEXT: br label [[COND_END:%.*]]
291 // CHECK3: cond.false:
292 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
293 // CHECK3-NEXT: br label [[COND_END]]
295 // CHECK3-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
296 // CHECK3-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
297 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
298 // CHECK3-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
299 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
300 // CHECK3: omp.inner.for.cond:
301 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP5:![0-9]+]]
302 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP5]]
303 // CHECK3-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
304 // CHECK3-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
305 // CHECK3: omp.inner.for.body:
306 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP5]]
307 // CHECK3-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
308 // CHECK3-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
309 // CHECK3-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP5]]
310 // CHECK3-NEXT: store double 1.000000e+00, ptr [[G]], align 8, !llvm.access.group [[ACC_GRP5]]
311 // CHECK3-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP2]], align 4, !llvm.access.group [[ACC_GRP5]]
312 // CHECK3-NEXT: store volatile double 1.000000e+00, ptr [[TMP8]], align 4, !llvm.access.group [[ACC_GRP5]]
313 // CHECK3-NEXT: store i32 3, ptr [[SVAR]], align 4, !llvm.access.group [[ACC_GRP5]]
314 // CHECK3-NEXT: store float 4.000000e+00, ptr [[SFVAR]], align 4, !llvm.access.group [[ACC_GRP5]]
315 // CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
316 // CHECK3-NEXT: store ptr [[G]], ptr [[TMP9]], align 4, !llvm.access.group [[ACC_GRP5]]
317 // CHECK3-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
318 // CHECK3-NEXT: [[TMP11:%.*]] = load ptr, ptr [[_TMP2]], align 4, !llvm.access.group [[ACC_GRP5]]
319 // CHECK3-NEXT: store ptr [[TMP11]], ptr [[TMP10]], align 4, !llvm.access.group [[ACC_GRP5]]
320 // CHECK3-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
321 // CHECK3-NEXT: store ptr [[SVAR]], ptr [[TMP12]], align 4, !llvm.access.group [[ACC_GRP5]]
322 // CHECK3-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
323 // CHECK3-NEXT: store ptr [[SFVAR]], ptr [[TMP13]], align 4, !llvm.access.group [[ACC_GRP5]]
324 // CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 4 dereferenceable(16) [[REF_TMP]]), !llvm.access.group [[ACC_GRP5]]
325 // CHECK3-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
326 // CHECK3: omp.body.continue:
327 // CHECK3-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
328 // CHECK3: omp.inner.for.inc:
329 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP5]]
330 // CHECK3-NEXT: [[ADD4:%.*]] = add nsw i32 [[TMP14]], 1
331 // CHECK3-NEXT: store i32 [[ADD4]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP5]]
332 // CHECK3-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP6:![0-9]+]]
333 // CHECK3: omp.inner.for.end:
334 // CHECK3-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
335 // CHECK3: omp.loop.exit:
336 // CHECK3-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP1]])
337 // CHECK3-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
338 // CHECK3-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
339 // CHECK3-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
340 // CHECK3: .omp.final.then:
341 // CHECK3-NEXT: store i32 2, ptr [[I]], align 4
342 // CHECK3-NEXT: br label [[DOTOMP_FINAL_DONE]]
343 // CHECK3: .omp.final.done:
344 // CHECK3-NEXT: ret void
347 // CHECK3-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
348 // CHECK3-SAME: () #[[ATTR4:[0-9]+]] {
349 // CHECK3-NEXT: entry:
350 // CHECK3-NEXT: call void @__tgt_register_requires(i64 1)
351 // CHECK3-NEXT: ret void
354 // CHECK5-LABEL: define {{[^@]+}}@main
355 // CHECK5-SAME: () #[[ATTR0:[0-9]+]] {
356 // CHECK5-NEXT: entry:
357 // CHECK5-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
358 // CHECK5-NEXT: [[G:%.*]] = alloca double, align 8
359 // CHECK5-NEXT: [[G1:%.*]] = alloca ptr, align 8
360 // CHECK5-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
361 // CHECK5-NEXT: store i32 0, ptr [[RETVAL]], align 4
362 // CHECK5-NEXT: store ptr [[G]], ptr [[G1]], align 8
363 // CHECK5-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
364 // CHECK5-NEXT: ret i32 0
367 // CHECK7-LABEL: define {{[^@]+}}@main
368 // CHECK7-SAME: () #[[ATTR0:[0-9]+]] {
369 // CHECK7-NEXT: entry:
370 // CHECK7-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
371 // CHECK7-NEXT: [[G:%.*]] = alloca double, align 8
372 // CHECK7-NEXT: [[G1:%.*]] = alloca ptr, align 4
373 // CHECK7-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
374 // CHECK7-NEXT: store i32 0, ptr [[RETVAL]], align 4
375 // CHECK7-NEXT: store ptr [[G]], ptr [[G1]], align 4
376 // CHECK7-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
377 // CHECK7-NEXT: ret i32 0
380 // CHECK9-LABEL: define {{[^@]+}}@main
381 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
382 // CHECK9-NEXT: entry:
383 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
384 // CHECK9-NEXT: [[G:%.*]] = alloca double, align 8
385 // CHECK9-NEXT: [[G1:%.*]] = alloca ptr, align 8
386 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
387 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
388 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
389 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
390 // CHECK9-NEXT: [[VAR:%.*]] = alloca ptr, align 8
391 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
392 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
393 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
394 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
395 // CHECK9-NEXT: [[I_CASTED:%.*]] = alloca i64, align 8
396 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
397 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
398 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
399 // CHECK9-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
400 // CHECK9-NEXT: [[KERNEL_ARGS3:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
401 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
402 // CHECK9-NEXT: store ptr [[G]], ptr [[G1]], align 8
403 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
404 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
405 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
406 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
407 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
408 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
409 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
410 // CHECK9-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
411 // CHECK9-NEXT: store ptr undef, ptr [[_TMP1]], align 8
412 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
413 // CHECK9-NEXT: store i32 2, ptr [[TMP0]], align 4
414 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
415 // CHECK9-NEXT: store i32 0, ptr [[TMP1]], align 4
416 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
417 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
418 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
419 // CHECK9-NEXT: store ptr null, ptr [[TMP3]], align 8
420 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
421 // CHECK9-NEXT: store ptr null, ptr [[TMP4]], align 8
422 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
423 // CHECK9-NEXT: store ptr null, ptr [[TMP5]], align 8
424 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
425 // CHECK9-NEXT: store ptr null, ptr [[TMP6]], align 8
426 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
427 // CHECK9-NEXT: store ptr null, ptr [[TMP7]], align 8
428 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
429 // CHECK9-NEXT: store i64 2, ptr [[TMP8]], align 8
430 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
431 // CHECK9-NEXT: store i64 0, ptr [[TMP9]], align 8
432 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
433 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
434 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
435 // CHECK9-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP11]], align 4
436 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
437 // CHECK9-NEXT: store i32 0, ptr [[TMP12]], align 4
438 // CHECK9-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2:[0-9]+]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.region_id, ptr [[KERNEL_ARGS]])
439 // CHECK9-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
440 // CHECK9-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
441 // CHECK9: omp_offload.failed:
442 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93() #[[ATTR4:[0-9]+]]
443 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
444 // CHECK9: omp_offload.cont:
445 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[I]], align 4
446 // CHECK9-NEXT: store i32 [[TMP15]], ptr [[I_CASTED]], align 4
447 // CHECK9-NEXT: [[TMP16:%.*]] = load i64, ptr [[I_CASTED]], align 8
448 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
449 // CHECK9-NEXT: store i64 [[TMP16]], ptr [[TMP17]], align 8
450 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
451 // CHECK9-NEXT: store i64 [[TMP16]], ptr [[TMP18]], align 8
452 // CHECK9-NEXT: [[TMP19:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
453 // CHECK9-NEXT: store ptr null, ptr [[TMP19]], align 8
454 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
455 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
456 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 0
457 // CHECK9-NEXT: store i32 2, ptr [[TMP22]], align 4
458 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 1
459 // CHECK9-NEXT: store i32 1, ptr [[TMP23]], align 4
460 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 2
461 // CHECK9-NEXT: store ptr [[TMP20]], ptr [[TMP24]], align 8
462 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 3
463 // CHECK9-NEXT: store ptr [[TMP21]], ptr [[TMP25]], align 8
464 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 4
465 // CHECK9-NEXT: store ptr @.offload_sizes, ptr [[TMP26]], align 8
466 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 5
467 // CHECK9-NEXT: store ptr @.offload_maptypes, ptr [[TMP27]], align 8
468 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 6
469 // CHECK9-NEXT: store ptr null, ptr [[TMP28]], align 8
470 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 7
471 // CHECK9-NEXT: store ptr null, ptr [[TMP29]], align 8
472 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 8
473 // CHECK9-NEXT: store i64 2, ptr [[TMP30]], align 8
474 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 9
475 // CHECK9-NEXT: store i64 0, ptr [[TMP31]], align 8
476 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 10
477 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP32]], align 4
478 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 11
479 // CHECK9-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP33]], align 4
480 // CHECK9-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 12
481 // CHECK9-NEXT: store i32 0, ptr [[TMP34]], align 4
482 // CHECK9-NEXT: [[TMP35:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.region_id, ptr [[KERNEL_ARGS3]])
483 // CHECK9-NEXT: [[TMP36:%.*]] = icmp ne i32 [[TMP35]], 0
484 // CHECK9-NEXT: br i1 [[TMP36]], label [[OMP_OFFLOAD_FAILED4:%.*]], label [[OMP_OFFLOAD_CONT5:%.*]]
485 // CHECK9: omp_offload.failed4:
486 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102(i64 [[TMP16]]) #[[ATTR4]]
487 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT5]]
488 // CHECK9: omp_offload.cont5:
489 // CHECK9-NEXT: [[CALL:%.*]] = call noundef signext i32 @_Z5tmainIiET_v()
490 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
491 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
492 // CHECK9-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
493 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
494 // CHECK9: arraydestroy.body:
495 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP37]], [[OMP_OFFLOAD_CONT5]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
496 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
497 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
498 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
499 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE6:%.*]], label [[ARRAYDESTROY_BODY]]
500 // CHECK9: arraydestroy.done6:
501 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
502 // CHECK9-NEXT: [[TMP38:%.*]] = load i32, ptr [[RETVAL]], align 4
503 // CHECK9-NEXT: ret i32 [[TMP38]]
506 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
507 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
508 // CHECK9-NEXT: entry:
509 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
510 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
511 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
512 // CHECK9-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
513 // CHECK9-NEXT: ret void
516 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
517 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
518 // CHECK9-NEXT: entry:
519 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
520 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
521 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
522 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
523 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
524 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
525 // CHECK9-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
526 // CHECK9-NEXT: ret void
529 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93
530 // CHECK9-SAME: () #[[ATTR3:[0-9]+]] {
531 // CHECK9-NEXT: entry:
532 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.omp_outlined)
533 // CHECK9-NEXT: ret void
536 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.omp_outlined
537 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] {
538 // CHECK9-NEXT: entry:
539 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
540 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
541 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
542 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
543 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
544 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
545 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
546 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
547 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
548 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
549 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
550 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
551 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S:%.*]], align 4
552 // CHECK9-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
553 // CHECK9-NEXT: [[SVAR:%.*]] = alloca i32, align 4
554 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
555 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
556 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
557 // CHECK9-NEXT: store ptr undef, ptr [[_TMP1]], align 8
558 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
559 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
560 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
561 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
562 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
563 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
564 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
565 // CHECK9: arrayctor.loop:
566 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
567 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
568 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
569 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
570 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
571 // CHECK9: arrayctor.cont:
572 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
573 // CHECK9-NEXT: store ptr [[VAR]], ptr [[_TMP2]], align 8
574 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
575 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
576 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
577 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
578 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
579 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
580 // CHECK9: cond.true:
581 // CHECK9-NEXT: br label [[COND_END:%.*]]
582 // CHECK9: cond.false:
583 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
584 // CHECK9-NEXT: br label [[COND_END]]
586 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
587 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
588 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
589 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
590 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
591 // CHECK9: omp.inner.for.cond:
592 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP6:![0-9]+]]
593 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP6]]
594 // CHECK9-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
595 // CHECK9-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
596 // CHECK9: omp.inner.for.cond.cleanup:
597 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
598 // CHECK9: omp.inner.for.body:
599 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP6]]
600 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
601 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
602 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP6]]
603 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[T_VAR]], align 4, !llvm.access.group [[ACC_GRP6]]
604 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP6]]
605 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP9]] to i64
606 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM]]
607 // CHECK9-NEXT: store i32 [[TMP8]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP6]]
608 // CHECK9-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP2]], align 8, !llvm.access.group [[ACC_GRP6]]
609 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP6]]
610 // CHECK9-NEXT: [[IDXPROM4:%.*]] = sext i32 [[TMP11]] to i64
611 // CHECK9-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 [[IDXPROM4]]
612 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX5]], ptr align 4 [[TMP10]], i64 4, i1 false), !llvm.access.group [[ACC_GRP6]]
613 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
614 // CHECK9: omp.body.continue:
615 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
616 // CHECK9: omp.inner.for.inc:
617 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP6]]
618 // CHECK9-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP12]], 1
619 // CHECK9-NEXT: store i32 [[ADD6]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP6]]
620 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP7:![0-9]+]]
621 // CHECK9: omp.inner.for.end:
622 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
623 // CHECK9: omp.loop.exit:
624 // CHECK9-NEXT: [[TMP13:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
625 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[TMP13]], align 4
626 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP14]])
627 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
628 // CHECK9-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
629 // CHECK9-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
630 // CHECK9: .omp.final.then:
631 // CHECK9-NEXT: store i32 2, ptr [[I]], align 4
632 // CHECK9-NEXT: br label [[DOTOMP_FINAL_DONE]]
633 // CHECK9: .omp.final.done:
634 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
635 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
636 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN7]], i64 2
637 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
638 // CHECK9: arraydestroy.body:
639 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP17]], [[DOTOMP_FINAL_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
640 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
641 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
642 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
643 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
644 // CHECK9: arraydestroy.done8:
645 // CHECK9-NEXT: ret void
648 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
649 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
650 // CHECK9-NEXT: entry:
651 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
652 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
653 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
654 // CHECK9-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
655 // CHECK9-NEXT: ret void
658 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102
659 // CHECK9-SAME: (i64 noundef [[I:%.*]]) #[[ATTR3]] {
660 // CHECK9-NEXT: entry:
661 // CHECK9-NEXT: [[I_ADDR:%.*]] = alloca i64, align 8
662 // CHECK9-NEXT: store i64 [[I]], ptr [[I_ADDR]], align 8
663 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.omp_outlined, ptr [[I_ADDR]])
664 // CHECK9-NEXT: ret void
667 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.omp_outlined
668 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR3]] {
669 // CHECK9-NEXT: entry:
670 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
671 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
672 // CHECK9-NEXT: [[I_ADDR:%.*]] = alloca ptr, align 8
673 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
674 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
675 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
676 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
677 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
678 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
679 // CHECK9-NEXT: [[I1:%.*]] = alloca i32, align 4
680 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
681 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
682 // CHECK9-NEXT: store ptr [[I]], ptr [[I_ADDR]], align 8
683 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[I_ADDR]], align 8
684 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
685 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
686 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
687 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
688 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
689 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
690 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
691 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
692 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 1
693 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
694 // CHECK9: cond.true:
695 // CHECK9-NEXT: br label [[COND_END:%.*]]
696 // CHECK9: cond.false:
697 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
698 // CHECK9-NEXT: br label [[COND_END]]
700 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
701 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
702 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
703 // CHECK9-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
704 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
705 // CHECK9: omp.inner.for.cond:
706 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP12:![0-9]+]]
707 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP12]]
708 // CHECK9-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
709 // CHECK9-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
710 // CHECK9: omp.inner.for.body:
711 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP12]]
712 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
713 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
714 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I1]], align 4, !llvm.access.group [[ACC_GRP12]]
715 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
716 // CHECK9: omp.body.continue:
717 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
718 // CHECK9: omp.inner.for.inc:
719 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP12]]
720 // CHECK9-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
721 // CHECK9-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP12]]
722 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP13:![0-9]+]]
723 // CHECK9: omp.inner.for.end:
724 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
725 // CHECK9: omp.loop.exit:
726 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
727 // CHECK9-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
728 // CHECK9-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
729 // CHECK9-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
730 // CHECK9: .omp.final.then:
731 // CHECK9-NEXT: store i32 2, ptr [[TMP0]], align 4
732 // CHECK9-NEXT: br label [[DOTOMP_FINAL_DONE]]
733 // CHECK9: .omp.final.done:
734 // CHECK9-NEXT: ret void
737 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
738 // CHECK9-SAME: () #[[ATTR5:[0-9]+]] comdat {
739 // CHECK9-NEXT: entry:
740 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
741 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
742 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
743 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
744 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
745 // CHECK9-NEXT: [[VAR:%.*]] = alloca ptr, align 8
746 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
747 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
748 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
749 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
750 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
751 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
752 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
753 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef signext 1)
754 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
755 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef signext 2)
756 // CHECK9-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
757 // CHECK9-NEXT: store ptr undef, ptr [[_TMP1]], align 8
758 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
759 // CHECK9-NEXT: store i32 2, ptr [[TMP0]], align 4
760 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
761 // CHECK9-NEXT: store i32 0, ptr [[TMP1]], align 4
762 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
763 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
764 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
765 // CHECK9-NEXT: store ptr null, ptr [[TMP3]], align 8
766 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
767 // CHECK9-NEXT: store ptr null, ptr [[TMP4]], align 8
768 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
769 // CHECK9-NEXT: store ptr null, ptr [[TMP5]], align 8
770 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
771 // CHECK9-NEXT: store ptr null, ptr [[TMP6]], align 8
772 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
773 // CHECK9-NEXT: store ptr null, ptr [[TMP7]], align 8
774 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
775 // CHECK9-NEXT: store i64 2, ptr [[TMP8]], align 8
776 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
777 // CHECK9-NEXT: store i64 0, ptr [[TMP9]], align 8
778 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
779 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
780 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
781 // CHECK9-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP11]], align 4
782 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
783 // CHECK9-NEXT: store i32 0, ptr [[TMP12]], align 4
784 // CHECK9-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.region_id, ptr [[KERNEL_ARGS]])
785 // CHECK9-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
786 // CHECK9-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
787 // CHECK9: omp_offload.failed:
788 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49() #[[ATTR4]]
789 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
790 // CHECK9: omp_offload.cont:
791 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
792 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
793 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
794 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
795 // CHECK9: arraydestroy.body:
796 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
797 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
798 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
799 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
800 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
801 // CHECK9: arraydestroy.done2:
802 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
803 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
804 // CHECK9-NEXT: ret i32 [[TMP16]]
807 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
808 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
809 // CHECK9-NEXT: entry:
810 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
811 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
812 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
813 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
814 // CHECK9-NEXT: store float 0.000000e+00, ptr [[F]], align 4
815 // CHECK9-NEXT: ret void
818 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
819 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
820 // CHECK9-NEXT: entry:
821 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
822 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
823 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
824 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
825 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
826 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
827 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
828 // CHECK9-NEXT: store float [[TMP0]], ptr [[F]], align 4
829 // CHECK9-NEXT: ret void
832 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
833 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
834 // CHECK9-NEXT: entry:
835 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
836 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
837 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
838 // CHECK9-NEXT: ret void
841 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
842 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
843 // CHECK9-NEXT: entry:
844 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
845 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
846 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
847 // CHECK9-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
848 // CHECK9-NEXT: ret void
851 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
852 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
853 // CHECK9-NEXT: entry:
854 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
855 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
856 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
857 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
858 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
859 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
860 // CHECK9-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef signext [[TMP0]])
861 // CHECK9-NEXT: ret void
864 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49
865 // CHECK9-SAME: () #[[ATTR3]] {
866 // CHECK9-NEXT: entry:
867 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined)
868 // CHECK9-NEXT: ret void
871 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined
872 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] {
873 // CHECK9-NEXT: entry:
874 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
875 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
876 // CHECK9-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
877 // CHECK9-NEXT: [[TMP:%.*]] = alloca i32, align 4
878 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
879 // CHECK9-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
880 // CHECK9-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
881 // CHECK9-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
882 // CHECK9-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
883 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
884 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
885 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
886 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
887 // CHECK9-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
888 // CHECK9-NEXT: [[I:%.*]] = alloca i32, align 4
889 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
890 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
891 // CHECK9-NEXT: store ptr undef, ptr [[_TMP1]], align 8
892 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
893 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
894 // CHECK9-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
895 // CHECK9-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
896 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
897 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
898 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
899 // CHECK9: arrayctor.loop:
900 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
901 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
902 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
903 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
904 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
905 // CHECK9: arrayctor.cont:
906 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
907 // CHECK9-NEXT: store ptr [[VAR]], ptr [[_TMP2]], align 8
908 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
909 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
910 // CHECK9-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
911 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
912 // CHECK9-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
913 // CHECK9-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
914 // CHECK9: cond.true:
915 // CHECK9-NEXT: br label [[COND_END:%.*]]
916 // CHECK9: cond.false:
917 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
918 // CHECK9-NEXT: br label [[COND_END]]
920 // CHECK9-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
921 // CHECK9-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
922 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
923 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
924 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
925 // CHECK9: omp.inner.for.cond:
926 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP15:![0-9]+]]
927 // CHECK9-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP15]]
928 // CHECK9-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
929 // CHECK9-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
930 // CHECK9: omp.inner.for.cond.cleanup:
931 // CHECK9-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
932 // CHECK9: omp.inner.for.body:
933 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP15]]
934 // CHECK9-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
935 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
936 // CHECK9-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP15]]
937 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[T_VAR]], align 4, !llvm.access.group [[ACC_GRP15]]
938 // CHECK9-NEXT: [[TMP9:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP15]]
939 // CHECK9-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP9]] to i64
940 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 [[IDXPROM]]
941 // CHECK9-NEXT: store i32 [[TMP8]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP15]]
942 // CHECK9-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP2]], align 8, !llvm.access.group [[ACC_GRP15]]
943 // CHECK9-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP15]]
944 // CHECK9-NEXT: [[IDXPROM4:%.*]] = sext i32 [[TMP11]] to i64
945 // CHECK9-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 [[IDXPROM4]]
946 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX5]], ptr align 4 [[TMP10]], i64 4, i1 false), !llvm.access.group [[ACC_GRP15]]
947 // CHECK9-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
948 // CHECK9: omp.body.continue:
949 // CHECK9-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
950 // CHECK9: omp.inner.for.inc:
951 // CHECK9-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP15]]
952 // CHECK9-NEXT: [[ADD6:%.*]] = add nsw i32 [[TMP12]], 1
953 // CHECK9-NEXT: store i32 [[ADD6]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP15]]
954 // CHECK9-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
955 // CHECK9: omp.inner.for.end:
956 // CHECK9-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
957 // CHECK9: omp.loop.exit:
958 // CHECK9-NEXT: [[TMP13:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
959 // CHECK9-NEXT: [[TMP14:%.*]] = load i32, ptr [[TMP13]], align 4
960 // CHECK9-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP14]])
961 // CHECK9-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
962 // CHECK9-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
963 // CHECK9-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
964 // CHECK9: .omp.final.then:
965 // CHECK9-NEXT: store i32 2, ptr [[I]], align 4
966 // CHECK9-NEXT: br label [[DOTOMP_FINAL_DONE]]
967 // CHECK9: .omp.final.done:
968 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
969 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
970 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN7]], i64 2
971 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
972 // CHECK9: arraydestroy.body:
973 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP17]], [[DOTOMP_FINAL_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
974 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
975 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
976 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
977 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
978 // CHECK9: arraydestroy.done8:
979 // CHECK9-NEXT: ret void
982 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
983 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
984 // CHECK9-NEXT: entry:
985 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
986 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
987 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
988 // CHECK9-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
989 // CHECK9-NEXT: ret void
992 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
993 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
994 // CHECK9-NEXT: entry:
995 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
996 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
997 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
998 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
999 // CHECK9-NEXT: store i32 0, ptr [[F]], align 4
1000 // CHECK9-NEXT: ret void
1003 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1004 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1005 // CHECK9-NEXT: entry:
1006 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1007 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1008 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1009 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1010 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1011 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1012 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1013 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1014 // CHECK9-NEXT: ret void
1017 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1018 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1019 // CHECK9-NEXT: entry:
1020 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1021 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1022 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1023 // CHECK9-NEXT: ret void
1026 // CHECK9-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1027 // CHECK9-SAME: () #[[ATTR6:[0-9]+]] {
1028 // CHECK9-NEXT: entry:
1029 // CHECK9-NEXT: call void @__tgt_register_requires(i64 1)
1030 // CHECK9-NEXT: ret void
1033 // CHECK11-LABEL: define {{[^@]+}}@main
1034 // CHECK11-SAME: () #[[ATTR0:[0-9]+]] {
1035 // CHECK11-NEXT: entry:
1036 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1037 // CHECK11-NEXT: [[G:%.*]] = alloca double, align 8
1038 // CHECK11-NEXT: [[G1:%.*]] = alloca ptr, align 4
1039 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1040 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1041 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1042 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1043 // CHECK11-NEXT: [[VAR:%.*]] = alloca ptr, align 4
1044 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
1045 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1046 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1047 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
1048 // CHECK11-NEXT: [[I_CASTED:%.*]] = alloca i32, align 4
1049 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
1050 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
1051 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
1052 // CHECK11-NEXT: [[_TMP2:%.*]] = alloca i32, align 4
1053 // CHECK11-NEXT: [[KERNEL_ARGS3:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1054 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1055 // CHECK11-NEXT: store ptr [[G]], ptr [[G1]], align 4
1056 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1057 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
1058 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
1059 // CHECK11-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1060 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
1061 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i32 1
1062 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
1063 // CHECK11-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
1064 // CHECK11-NEXT: store ptr undef, ptr [[_TMP1]], align 4
1065 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1066 // CHECK11-NEXT: store i32 2, ptr [[TMP0]], align 4
1067 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1068 // CHECK11-NEXT: store i32 0, ptr [[TMP1]], align 4
1069 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1070 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
1071 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1072 // CHECK11-NEXT: store ptr null, ptr [[TMP3]], align 4
1073 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1074 // CHECK11-NEXT: store ptr null, ptr [[TMP4]], align 4
1075 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1076 // CHECK11-NEXT: store ptr null, ptr [[TMP5]], align 4
1077 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1078 // CHECK11-NEXT: store ptr null, ptr [[TMP6]], align 4
1079 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1080 // CHECK11-NEXT: store ptr null, ptr [[TMP7]], align 4
1081 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1082 // CHECK11-NEXT: store i64 2, ptr [[TMP8]], align 8
1083 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1084 // CHECK11-NEXT: store i64 0, ptr [[TMP9]], align 8
1085 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1086 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
1087 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1088 // CHECK11-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP11]], align 4
1089 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1090 // CHECK11-NEXT: store i32 0, ptr [[TMP12]], align 4
1091 // CHECK11-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2:[0-9]+]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.region_id, ptr [[KERNEL_ARGS]])
1092 // CHECK11-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
1093 // CHECK11-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1094 // CHECK11: omp_offload.failed:
1095 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93() #[[ATTR4:[0-9]+]]
1096 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1097 // CHECK11: omp_offload.cont:
1098 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[I]], align 4
1099 // CHECK11-NEXT: store i32 [[TMP15]], ptr [[I_CASTED]], align 4
1100 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[I_CASTED]], align 4
1101 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1102 // CHECK11-NEXT: store i32 [[TMP16]], ptr [[TMP17]], align 4
1103 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1104 // CHECK11-NEXT: store i32 [[TMP16]], ptr [[TMP18]], align 4
1105 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1106 // CHECK11-NEXT: store ptr null, ptr [[TMP19]], align 4
1107 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1108 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1109 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 0
1110 // CHECK11-NEXT: store i32 2, ptr [[TMP22]], align 4
1111 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 1
1112 // CHECK11-NEXT: store i32 1, ptr [[TMP23]], align 4
1113 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 2
1114 // CHECK11-NEXT: store ptr [[TMP20]], ptr [[TMP24]], align 4
1115 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 3
1116 // CHECK11-NEXT: store ptr [[TMP21]], ptr [[TMP25]], align 4
1117 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 4
1118 // CHECK11-NEXT: store ptr @.offload_sizes, ptr [[TMP26]], align 4
1119 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 5
1120 // CHECK11-NEXT: store ptr @.offload_maptypes, ptr [[TMP27]], align 4
1121 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 6
1122 // CHECK11-NEXT: store ptr null, ptr [[TMP28]], align 4
1123 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 7
1124 // CHECK11-NEXT: store ptr null, ptr [[TMP29]], align 4
1125 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 8
1126 // CHECK11-NEXT: store i64 2, ptr [[TMP30]], align 8
1127 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 9
1128 // CHECK11-NEXT: store i64 0, ptr [[TMP31]], align 8
1129 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 10
1130 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP32]], align 4
1131 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 11
1132 // CHECK11-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP33]], align 4
1133 // CHECK11-NEXT: [[TMP34:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS3]], i32 0, i32 12
1134 // CHECK11-NEXT: store i32 0, ptr [[TMP34]], align 4
1135 // CHECK11-NEXT: [[TMP35:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.region_id, ptr [[KERNEL_ARGS3]])
1136 // CHECK11-NEXT: [[TMP36:%.*]] = icmp ne i32 [[TMP35]], 0
1137 // CHECK11-NEXT: br i1 [[TMP36]], label [[OMP_OFFLOAD_FAILED4:%.*]], label [[OMP_OFFLOAD_CONT5:%.*]]
1138 // CHECK11: omp_offload.failed4:
1139 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102(i32 [[TMP16]]) #[[ATTR4]]
1140 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT5]]
1141 // CHECK11: omp_offload.cont5:
1142 // CHECK11-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIiET_v()
1143 // CHECK11-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1144 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1145 // CHECK11-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1146 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1147 // CHECK11: arraydestroy.body:
1148 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP37]], [[OMP_OFFLOAD_CONT5]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1149 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1150 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1151 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1152 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE6:%.*]], label [[ARRAYDESTROY_BODY]]
1153 // CHECK11: arraydestroy.done6:
1154 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1155 // CHECK11-NEXT: [[TMP38:%.*]] = load i32, ptr [[RETVAL]], align 4
1156 // CHECK11-NEXT: ret i32 [[TMP38]]
1159 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1160 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1161 // CHECK11-NEXT: entry:
1162 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1163 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1164 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1165 // CHECK11-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1166 // CHECK11-NEXT: ret void
1169 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1170 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1171 // CHECK11-NEXT: entry:
1172 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1173 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1174 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1175 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1176 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1177 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1178 // CHECK11-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
1179 // CHECK11-NEXT: ret void
1182 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93
1183 // CHECK11-SAME: () #[[ATTR3:[0-9]+]] {
1184 // CHECK11-NEXT: entry:
1185 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.omp_outlined)
1186 // CHECK11-NEXT: ret void
1189 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l93.omp_outlined
1190 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] {
1191 // CHECK11-NEXT: entry:
1192 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1193 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1194 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1195 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
1196 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1197 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1198 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1199 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1200 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1201 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1202 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1203 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1204 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1205 // CHECK11-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
1206 // CHECK11-NEXT: [[SVAR:%.*]] = alloca i32, align 4
1207 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
1208 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1209 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1210 // CHECK11-NEXT: store ptr undef, ptr [[_TMP1]], align 4
1211 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1212 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1213 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1214 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1215 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1216 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1217 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1218 // CHECK11: arrayctor.loop:
1219 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1220 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1221 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i32 1
1222 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1223 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1224 // CHECK11: arrayctor.cont:
1225 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
1226 // CHECK11-NEXT: store ptr [[VAR]], ptr [[_TMP2]], align 4
1227 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1228 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1229 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1:[0-9]+]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1230 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1231 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
1232 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1233 // CHECK11: cond.true:
1234 // CHECK11-NEXT: br label [[COND_END:%.*]]
1235 // CHECK11: cond.false:
1236 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1237 // CHECK11-NEXT: br label [[COND_END]]
1238 // CHECK11: cond.end:
1239 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1240 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1241 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1242 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1243 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1244 // CHECK11: omp.inner.for.cond:
1245 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP7:![0-9]+]]
1246 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP7]]
1247 // CHECK11-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
1248 // CHECK11-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1249 // CHECK11: omp.inner.for.cond.cleanup:
1250 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1251 // CHECK11: omp.inner.for.body:
1252 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP7]]
1253 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
1254 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1255 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP7]]
1256 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[T_VAR]], align 4, !llvm.access.group [[ACC_GRP7]]
1257 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP7]]
1258 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i32 0, i32 [[TMP9]]
1259 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP7]]
1260 // CHECK11-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP2]], align 4, !llvm.access.group [[ACC_GRP7]]
1261 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP7]]
1262 // CHECK11-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 [[TMP11]]
1263 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX4]], ptr align 4 [[TMP10]], i32 4, i1 false), !llvm.access.group [[ACC_GRP7]]
1264 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1265 // CHECK11: omp.body.continue:
1266 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1267 // CHECK11: omp.inner.for.inc:
1268 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP7]]
1269 // CHECK11-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP12]], 1
1270 // CHECK11-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP7]]
1271 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP8:![0-9]+]]
1272 // CHECK11: omp.inner.for.end:
1273 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1274 // CHECK11: omp.loop.exit:
1275 // CHECK11-NEXT: [[TMP13:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1276 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[TMP13]], align 4
1277 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP14]])
1278 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1279 // CHECK11-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
1280 // CHECK11-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1281 // CHECK11: .omp.final.then:
1282 // CHECK11-NEXT: store i32 2, ptr [[I]], align 4
1283 // CHECK11-NEXT: br label [[DOTOMP_FINAL_DONE]]
1284 // CHECK11: .omp.final.done:
1285 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
1286 // CHECK11-NEXT: [[ARRAY_BEGIN6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1287 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN6]], i32 2
1288 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1289 // CHECK11: arraydestroy.body:
1290 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP17]], [[DOTOMP_FINAL_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1291 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1292 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1293 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN6]]
1294 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE7:%.*]], label [[ARRAYDESTROY_BODY]]
1295 // CHECK11: arraydestroy.done7:
1296 // CHECK11-NEXT: ret void
1299 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1300 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1301 // CHECK11-NEXT: entry:
1302 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1303 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1304 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1305 // CHECK11-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1306 // CHECK11-NEXT: ret void
1309 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102
1310 // CHECK11-SAME: (i32 noundef [[I:%.*]]) #[[ATTR3]] {
1311 // CHECK11-NEXT: entry:
1312 // CHECK11-NEXT: [[I_ADDR:%.*]] = alloca i32, align 4
1313 // CHECK11-NEXT: store i32 [[I]], ptr [[I_ADDR]], align 4
1314 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.omp_outlined, ptr [[I_ADDR]])
1315 // CHECK11-NEXT: ret void
1318 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l102.omp_outlined
1319 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[I:%.*]]) #[[ATTR3]] {
1320 // CHECK11-NEXT: entry:
1321 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1322 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1323 // CHECK11-NEXT: [[I_ADDR:%.*]] = alloca ptr, align 4
1324 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1325 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
1326 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1327 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1328 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1329 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1330 // CHECK11-NEXT: [[I1:%.*]] = alloca i32, align 4
1331 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1332 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1333 // CHECK11-NEXT: store ptr [[I]], ptr [[I_ADDR]], align 4
1334 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[I_ADDR]], align 4
1335 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1336 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1337 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1338 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1339 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1340 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1341 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP2]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1342 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1343 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP3]], 1
1344 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1345 // CHECK11: cond.true:
1346 // CHECK11-NEXT: br label [[COND_END:%.*]]
1347 // CHECK11: cond.false:
1348 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1349 // CHECK11-NEXT: br label [[COND_END]]
1350 // CHECK11: cond.end:
1351 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP4]], [[COND_FALSE]] ]
1352 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1353 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1354 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[DOTOMP_IV]], align 4
1355 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1356 // CHECK11: omp.inner.for.cond:
1357 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP13:![0-9]+]]
1358 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP13]]
1359 // CHECK11-NEXT: [[CMP2:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
1360 // CHECK11-NEXT: br i1 [[CMP2]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1361 // CHECK11: omp.inner.for.body:
1362 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP13]]
1363 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP8]], 1
1364 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1365 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I1]], align 4, !llvm.access.group [[ACC_GRP13]]
1366 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1367 // CHECK11: omp.body.continue:
1368 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1369 // CHECK11: omp.inner.for.inc:
1370 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP13]]
1371 // CHECK11-NEXT: [[ADD3:%.*]] = add nsw i32 [[TMP9]], 1
1372 // CHECK11-NEXT: store i32 [[ADD3]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP13]]
1373 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP14:![0-9]+]]
1374 // CHECK11: omp.inner.for.end:
1375 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1376 // CHECK11: omp.loop.exit:
1377 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP2]])
1378 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1379 // CHECK11-NEXT: [[TMP11:%.*]] = icmp ne i32 [[TMP10]], 0
1380 // CHECK11-NEXT: br i1 [[TMP11]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1381 // CHECK11: .omp.final.then:
1382 // CHECK11-NEXT: store i32 2, ptr [[TMP0]], align 4
1383 // CHECK11-NEXT: br label [[DOTOMP_FINAL_DONE]]
1384 // CHECK11: .omp.final.done:
1385 // CHECK11-NEXT: ret void
1388 // CHECK11-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1389 // CHECK11-SAME: () #[[ATTR5:[0-9]+]] comdat {
1390 // CHECK11-NEXT: entry:
1391 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1392 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1393 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1394 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1395 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
1396 // CHECK11-NEXT: [[VAR:%.*]] = alloca ptr, align 4
1397 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
1398 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1399 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1400 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1401 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
1402 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
1403 // CHECK11-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1404 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef 1)
1405 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i32 1
1406 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
1407 // CHECK11-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
1408 // CHECK11-NEXT: store ptr undef, ptr [[_TMP1]], align 4
1409 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1410 // CHECK11-NEXT: store i32 2, ptr [[TMP0]], align 4
1411 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1412 // CHECK11-NEXT: store i32 0, ptr [[TMP1]], align 4
1413 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1414 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
1415 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1416 // CHECK11-NEXT: store ptr null, ptr [[TMP3]], align 4
1417 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1418 // CHECK11-NEXT: store ptr null, ptr [[TMP4]], align 4
1419 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1420 // CHECK11-NEXT: store ptr null, ptr [[TMP5]], align 4
1421 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1422 // CHECK11-NEXT: store ptr null, ptr [[TMP6]], align 4
1423 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1424 // CHECK11-NEXT: store ptr null, ptr [[TMP7]], align 4
1425 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1426 // CHECK11-NEXT: store i64 2, ptr [[TMP8]], align 8
1427 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1428 // CHECK11-NEXT: store i64 0, ptr [[TMP9]], align 8
1429 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1430 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
1431 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1432 // CHECK11-NEXT: store [3 x i32] [i32 1, i32 0, i32 0], ptr [[TMP11]], align 4
1433 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1434 // CHECK11-NEXT: store i32 0, ptr [[TMP12]], align 4
1435 // CHECK11-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB2]], i64 -1, i32 0, i32 1, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.region_id, ptr [[KERNEL_ARGS]])
1436 // CHECK11-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
1437 // CHECK11-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1438 // CHECK11: omp_offload.failed:
1439 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49() #[[ATTR4]]
1440 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1441 // CHECK11: omp_offload.cont:
1442 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1443 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1444 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1445 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1446 // CHECK11: arraydestroy.body:
1447 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1448 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1449 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1450 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1451 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
1452 // CHECK11: arraydestroy.done2:
1453 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1454 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
1455 // CHECK11-NEXT: ret i32 [[TMP16]]
1458 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1459 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1460 // CHECK11-NEXT: entry:
1461 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1462 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1463 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1464 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1465 // CHECK11-NEXT: store float 0.000000e+00, ptr [[F]], align 4
1466 // CHECK11-NEXT: ret void
1469 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1470 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1471 // CHECK11-NEXT: entry:
1472 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1473 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1474 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1475 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1476 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1477 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1478 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1479 // CHECK11-NEXT: store float [[TMP0]], ptr [[F]], align 4
1480 // CHECK11-NEXT: ret void
1483 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1484 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1485 // CHECK11-NEXT: entry:
1486 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1487 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1488 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1489 // CHECK11-NEXT: ret void
1492 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1493 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1494 // CHECK11-NEXT: entry:
1495 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1496 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1497 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1498 // CHECK11-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1499 // CHECK11-NEXT: ret void
1502 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
1503 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1504 // CHECK11-NEXT: entry:
1505 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1506 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1507 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1508 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1509 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1510 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1511 // CHECK11-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
1512 // CHECK11-NEXT: ret void
1515 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49
1516 // CHECK11-SAME: () #[[ATTR3]] {
1517 // CHECK11-NEXT: entry:
1518 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB2]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined)
1519 // CHECK11-NEXT: ret void
1522 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l49.omp_outlined
1523 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR3]] {
1524 // CHECK11-NEXT: entry:
1525 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1526 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1527 // CHECK11-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1528 // CHECK11-NEXT: [[TMP:%.*]] = alloca i32, align 4
1529 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1530 // CHECK11-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1531 // CHECK11-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1532 // CHECK11-NEXT: [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1533 // CHECK11-NEXT: [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1534 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1535 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1536 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
1537 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1538 // CHECK11-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
1539 // CHECK11-NEXT: [[I:%.*]] = alloca i32, align 4
1540 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1541 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1542 // CHECK11-NEXT: store ptr undef, ptr [[_TMP1]], align 4
1543 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1544 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1545 // CHECK11-NEXT: store i32 1, ptr [[DOTOMP_STRIDE]], align 4
1546 // CHECK11-NEXT: store i32 0, ptr [[DOTOMP_IS_LAST]], align 4
1547 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1548 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1549 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1550 // CHECK11: arrayctor.loop:
1551 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1552 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1553 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i32 1
1554 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1555 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1556 // CHECK11: arrayctor.cont:
1557 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
1558 // CHECK11-NEXT: store ptr [[VAR]], ptr [[_TMP2]], align 4
1559 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1560 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1561 // CHECK11-NEXT: call void @__kmpc_for_static_init_4(ptr @[[GLOB1]], i32 [[TMP1]], i32 92, ptr [[DOTOMP_IS_LAST]], ptr [[DOTOMP_LB]], ptr [[DOTOMP_UB]], ptr [[DOTOMP_STRIDE]], i32 1, i32 1)
1562 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1563 // CHECK11-NEXT: [[CMP:%.*]] = icmp sgt i32 [[TMP2]], 1
1564 // CHECK11-NEXT: br i1 [[CMP]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1565 // CHECK11: cond.true:
1566 // CHECK11-NEXT: br label [[COND_END:%.*]]
1567 // CHECK11: cond.false:
1568 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4
1569 // CHECK11-NEXT: br label [[COND_END]]
1570 // CHECK11: cond.end:
1571 // CHECK11-NEXT: [[COND:%.*]] = phi i32 [ 1, [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
1572 // CHECK11-NEXT: store i32 [[COND]], ptr [[DOTOMP_UB]], align 4
1573 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1574 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[DOTOMP_IV]], align 4
1575 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1576 // CHECK11: omp.inner.for.cond:
1577 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP16:![0-9]+]]
1578 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP16]]
1579 // CHECK11-NEXT: [[CMP3:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
1580 // CHECK11-NEXT: br i1 [[CMP3]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1581 // CHECK11: omp.inner.for.cond.cleanup:
1582 // CHECK11-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1583 // CHECK11: omp.inner.for.body:
1584 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP16]]
1585 // CHECK11-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP7]], 1
1586 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1587 // CHECK11-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP16]]
1588 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[T_VAR]], align 4, !llvm.access.group [[ACC_GRP16]]
1589 // CHECK11-NEXT: [[TMP9:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP16]]
1590 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i32 0, i32 [[TMP9]]
1591 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP16]]
1592 // CHECK11-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP2]], align 4, !llvm.access.group [[ACC_GRP16]]
1593 // CHECK11-NEXT: [[TMP11:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP16]]
1594 // CHECK11-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 [[TMP11]]
1595 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX4]], ptr align 4 [[TMP10]], i32 4, i1 false), !llvm.access.group [[ACC_GRP16]]
1596 // CHECK11-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1597 // CHECK11: omp.body.continue:
1598 // CHECK11-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1599 // CHECK11: omp.inner.for.inc:
1600 // CHECK11-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP16]]
1601 // CHECK11-NEXT: [[ADD5:%.*]] = add nsw i32 [[TMP12]], 1
1602 // CHECK11-NEXT: store i32 [[ADD5]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP16]]
1603 // CHECK11-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP17:![0-9]+]]
1604 // CHECK11: omp.inner.for.end:
1605 // CHECK11-NEXT: br label [[OMP_LOOP_EXIT:%.*]]
1606 // CHECK11: omp.loop.exit:
1607 // CHECK11-NEXT: [[TMP13:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
1608 // CHECK11-NEXT: [[TMP14:%.*]] = load i32, ptr [[TMP13]], align 4
1609 // CHECK11-NEXT: call void @__kmpc_for_static_fini(ptr @[[GLOB1]], i32 [[TMP14]])
1610 // CHECK11-NEXT: [[TMP15:%.*]] = load i32, ptr [[DOTOMP_IS_LAST]], align 4
1611 // CHECK11-NEXT: [[TMP16:%.*]] = icmp ne i32 [[TMP15]], 0
1612 // CHECK11-NEXT: br i1 [[TMP16]], label [[DOTOMP_FINAL_THEN:%.*]], label [[DOTOMP_FINAL_DONE:%.*]]
1613 // CHECK11: .omp.final.then:
1614 // CHECK11-NEXT: store i32 2, ptr [[I]], align 4
1615 // CHECK11-NEXT: br label [[DOTOMP_FINAL_DONE]]
1616 // CHECK11: .omp.final.done:
1617 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
1618 // CHECK11-NEXT: [[ARRAY_BEGIN6:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1619 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN6]], i32 2
1620 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1621 // CHECK11: arraydestroy.body:
1622 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP17]], [[DOTOMP_FINAL_DONE]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1623 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1624 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1625 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN6]]
1626 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE7:%.*]], label [[ARRAYDESTROY_BODY]]
1627 // CHECK11: arraydestroy.done7:
1628 // CHECK11-NEXT: ret void
1631 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1632 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1633 // CHECK11-NEXT: entry:
1634 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1635 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1636 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1637 // CHECK11-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1638 // CHECK11-NEXT: ret void
1641 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
1642 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1643 // CHECK11-NEXT: entry:
1644 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1645 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1646 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1647 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1648 // CHECK11-NEXT: store i32 0, ptr [[F]], align 4
1649 // CHECK11-NEXT: ret void
1652 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1653 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1654 // CHECK11-NEXT: entry:
1655 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1656 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1657 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1658 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1659 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1660 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1661 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1662 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1663 // CHECK11-NEXT: ret void
1666 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1667 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1668 // CHECK11-NEXT: entry:
1669 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1670 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1671 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1672 // CHECK11-NEXT: ret void
1675 // CHECK11-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1676 // CHECK11-SAME: () #[[ATTR6:[0-9]+]] {
1677 // CHECK11-NEXT: entry:
1678 // CHECK11-NEXT: call void @__tgt_register_requires(i64 1)
1679 // CHECK11-NEXT: ret void
1682 // CHECK13-LABEL: define {{[^@]+}}@main
1683 // CHECK13-SAME: () #[[ATTR0:[0-9]+]] {
1684 // CHECK13-NEXT: entry:
1685 // CHECK13-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1686 // CHECK13-NEXT: [[G:%.*]] = alloca double, align 8
1687 // CHECK13-NEXT: [[G1:%.*]] = alloca ptr, align 8
1688 // CHECK13-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1689 // CHECK13-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1690 // CHECK13-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1691 // CHECK13-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1692 // CHECK13-NEXT: [[VAR:%.*]] = alloca ptr, align 8
1693 // CHECK13-NEXT: [[TMP:%.*]] = alloca i32, align 4
1694 // CHECK13-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1695 // CHECK13-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1696 // CHECK13-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1697 // CHECK13-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1698 // CHECK13-NEXT: [[I:%.*]] = alloca i32, align 4
1699 // CHECK13-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
1700 // CHECK13-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
1701 // CHECK13-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S], align 4
1702 // CHECK13-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S]], align 4
1703 // CHECK13-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
1704 // CHECK13-NEXT: [[SVAR:%.*]] = alloca i32, align 4
1705 // CHECK13-NEXT: [[I12:%.*]] = alloca i32, align 4
1706 // CHECK13-NEXT: [[_TMP13:%.*]] = alloca i32, align 4
1707 // CHECK13-NEXT: [[DOTOMP_LB14:%.*]] = alloca i32, align 4
1708 // CHECK13-NEXT: [[DOTOMP_UB15:%.*]] = alloca i32, align 4
1709 // CHECK13-NEXT: [[DOTOMP_IV16:%.*]] = alloca i32, align 4
1710 // CHECK13-NEXT: [[I17:%.*]] = alloca i32, align 4
1711 // CHECK13-NEXT: store i32 0, ptr [[RETVAL]], align 4
1712 // CHECK13-NEXT: store ptr [[G]], ptr [[G1]], align 8
1713 // CHECK13-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1714 // CHECK13-NEXT: store i32 0, ptr [[T_VAR]], align 4
1715 // CHECK13-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
1716 // CHECK13-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
1717 // CHECK13-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
1718 // CHECK13-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
1719 // CHECK13-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
1720 // CHECK13-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
1721 // CHECK13-NEXT: store ptr undef, ptr [[_TMP1]], align 8
1722 // CHECK13-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1723 // CHECK13-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1724 // CHECK13-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1725 // CHECK13-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_IV]], align 4
1726 // CHECK13-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
1727 // CHECK13-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
1728 // CHECK13-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1729 // CHECK13: arrayctor.loop:
1730 // CHECK13-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1731 // CHECK13-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1732 // CHECK13-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
1733 // CHECK13-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1734 // CHECK13-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1735 // CHECK13: arrayctor.cont:
1736 // CHECK13-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
1737 // CHECK13-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 8
1738 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1739 // CHECK13: omp.inner.for.cond:
1740 // CHECK13-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2:![0-9]+]]
1741 // CHECK13-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP2]]
1742 // CHECK13-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP1]], [[TMP2]]
1743 // CHECK13-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1744 // CHECK13: omp.inner.for.cond.cleanup:
1745 // CHECK13-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1746 // CHECK13: omp.inner.for.body:
1747 // CHECK13-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
1748 // CHECK13-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP3]], 1
1749 // CHECK13-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1750 // CHECK13-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP2]]
1751 // CHECK13-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR2]], align 4, !llvm.access.group [[ACC_GRP2]]
1752 // CHECK13-NEXT: [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP2]]
1753 // CHECK13-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP5]] to i64
1754 // CHECK13-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i64 0, i64 [[IDXPROM]]
1755 // CHECK13-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP2]]
1756 // CHECK13-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP6]], align 8, !llvm.access.group [[ACC_GRP2]]
1757 // CHECK13-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP2]]
1758 // CHECK13-NEXT: [[IDXPROM7:%.*]] = sext i32 [[TMP7]] to i64
1759 // CHECK13-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i64 0, i64 [[IDXPROM7]]
1760 // CHECK13-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX8]], ptr align 4 [[TMP6]], i64 4, i1 false), !llvm.access.group [[ACC_GRP2]]
1761 // CHECK13-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1762 // CHECK13: omp.body.continue:
1763 // CHECK13-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1764 // CHECK13: omp.inner.for.inc:
1765 // CHECK13-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
1766 // CHECK13-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP8]], 1
1767 // CHECK13-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP2]]
1768 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP3:![0-9]+]]
1769 // CHECK13: omp.inner.for.end:
1770 // CHECK13-NEXT: store i32 2, ptr [[I]], align 4
1771 // CHECK13-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4:[0-9]+]]
1772 // CHECK13-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
1773 // CHECK13-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN10]], i64 2
1774 // CHECK13-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1775 // CHECK13: arraydestroy.body:
1776 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP9]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1777 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1778 // CHECK13-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1779 // CHECK13-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
1780 // CHECK13-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
1781 // CHECK13: arraydestroy.done11:
1782 // CHECK13-NEXT: store i32 0, ptr [[DOTOMP_LB14]], align 4
1783 // CHECK13-NEXT: store i32 1, ptr [[DOTOMP_UB15]], align 4
1784 // CHECK13-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_LB14]], align 4
1785 // CHECK13-NEXT: store i32 [[TMP10]], ptr [[DOTOMP_IV16]], align 4
1786 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND18:%.*]]
1787 // CHECK13: omp.inner.for.cond18:
1788 // CHECK13-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV16]], align 4, !llvm.access.group [[ACC_GRP6:![0-9]+]]
1789 // CHECK13-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_UB15]], align 4, !llvm.access.group [[ACC_GRP6]]
1790 // CHECK13-NEXT: [[CMP19:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
1791 // CHECK13-NEXT: br i1 [[CMP19]], label [[OMP_INNER_FOR_BODY20:%.*]], label [[OMP_INNER_FOR_END26:%.*]]
1792 // CHECK13: omp.inner.for.body20:
1793 // CHECK13-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV16]], align 4, !llvm.access.group [[ACC_GRP6]]
1794 // CHECK13-NEXT: [[MUL21:%.*]] = mul nsw i32 [[TMP13]], 1
1795 // CHECK13-NEXT: [[ADD22:%.*]] = add nsw i32 0, [[MUL21]]
1796 // CHECK13-NEXT: store i32 [[ADD22]], ptr [[I17]], align 4, !llvm.access.group [[ACC_GRP6]]
1797 // CHECK13-NEXT: br label [[OMP_BODY_CONTINUE23:%.*]]
1798 // CHECK13: omp.body.continue23:
1799 // CHECK13-NEXT: br label [[OMP_INNER_FOR_INC24:%.*]]
1800 // CHECK13: omp.inner.for.inc24:
1801 // CHECK13-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV16]], align 4, !llvm.access.group [[ACC_GRP6]]
1802 // CHECK13-NEXT: [[ADD25:%.*]] = add nsw i32 [[TMP14]], 1
1803 // CHECK13-NEXT: store i32 [[ADD25]], ptr [[DOTOMP_IV16]], align 4, !llvm.access.group [[ACC_GRP6]]
1804 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND18]], !llvm.loop [[LOOP7:![0-9]+]]
1805 // CHECK13: omp.inner.for.end26:
1806 // CHECK13-NEXT: store i32 2, ptr [[I12]], align 4
1807 // CHECK13-NEXT: [[CALL:%.*]] = call noundef signext i32 @_Z5tmainIiET_v()
1808 // CHECK13-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1809 // CHECK13-NEXT: [[ARRAY_BEGIN27:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1810 // CHECK13-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN27]], i64 2
1811 // CHECK13-NEXT: br label [[ARRAYDESTROY_BODY28:%.*]]
1812 // CHECK13: arraydestroy.body28:
1813 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENTPAST29:%.*]] = phi ptr [ [[TMP15]], [[OMP_INNER_FOR_END26]] ], [ [[ARRAYDESTROY_ELEMENT30:%.*]], [[ARRAYDESTROY_BODY28]] ]
1814 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENT30]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST29]], i64 -1
1815 // CHECK13-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT30]]) #[[ATTR4]]
1816 // CHECK13-NEXT: [[ARRAYDESTROY_DONE31:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT30]], [[ARRAY_BEGIN27]]
1817 // CHECK13-NEXT: br i1 [[ARRAYDESTROY_DONE31]], label [[ARRAYDESTROY_DONE32:%.*]], label [[ARRAYDESTROY_BODY28]]
1818 // CHECK13: arraydestroy.done32:
1819 // CHECK13-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1820 // CHECK13-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
1821 // CHECK13-NEXT: ret i32 [[TMP16]]
1824 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1825 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
1826 // CHECK13-NEXT: entry:
1827 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1828 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1829 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1830 // CHECK13-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1831 // CHECK13-NEXT: ret void
1834 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1835 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1836 // CHECK13-NEXT: entry:
1837 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1838 // CHECK13-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1839 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1840 // CHECK13-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1841 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1842 // CHECK13-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1843 // CHECK13-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
1844 // CHECK13-NEXT: ret void
1847 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1848 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1849 // CHECK13-NEXT: entry:
1850 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1851 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1852 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1853 // CHECK13-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1854 // CHECK13-NEXT: ret void
1857 // CHECK13-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1858 // CHECK13-SAME: () #[[ATTR3:[0-9]+]] comdat {
1859 // CHECK13-NEXT: entry:
1860 // CHECK13-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1861 // CHECK13-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1862 // CHECK13-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1863 // CHECK13-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1864 // CHECK13-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
1865 // CHECK13-NEXT: [[VAR:%.*]] = alloca ptr, align 8
1866 // CHECK13-NEXT: [[TMP:%.*]] = alloca i32, align 4
1867 // CHECK13-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1868 // CHECK13-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
1869 // CHECK13-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
1870 // CHECK13-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
1871 // CHECK13-NEXT: [[I:%.*]] = alloca i32, align 4
1872 // CHECK13-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
1873 // CHECK13-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
1874 // CHECK13-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S.0], align 4
1875 // CHECK13-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0]], align 4
1876 // CHECK13-NEXT: [[_TMP6:%.*]] = alloca ptr, align 8
1877 // CHECK13-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1878 // CHECK13-NEXT: store i32 0, ptr [[T_VAR]], align 4
1879 // CHECK13-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
1880 // CHECK13-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
1881 // CHECK13-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef signext 1)
1882 // CHECK13-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
1883 // CHECK13-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef signext 2)
1884 // CHECK13-NEXT: store ptr [[TEST]], ptr [[VAR]], align 8
1885 // CHECK13-NEXT: store ptr undef, ptr [[_TMP1]], align 8
1886 // CHECK13-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
1887 // CHECK13-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
1888 // CHECK13-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
1889 // CHECK13-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_IV]], align 4
1890 // CHECK13-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
1891 // CHECK13-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1892 // CHECK13-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1893 // CHECK13: arrayctor.loop:
1894 // CHECK13-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1895 // CHECK13-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1896 // CHECK13-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
1897 // CHECK13-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1898 // CHECK13-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1899 // CHECK13: arrayctor.cont:
1900 // CHECK13-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
1901 // CHECK13-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 8
1902 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
1903 // CHECK13: omp.inner.for.cond:
1904 // CHECK13-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP9:![0-9]+]]
1905 // CHECK13-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP9]]
1906 // CHECK13-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP1]], [[TMP2]]
1907 // CHECK13-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
1908 // CHECK13: omp.inner.for.cond.cleanup:
1909 // CHECK13-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
1910 // CHECK13: omp.inner.for.body:
1911 // CHECK13-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP9]]
1912 // CHECK13-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP3]], 1
1913 // CHECK13-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1914 // CHECK13-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP9]]
1915 // CHECK13-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR2]], align 4, !llvm.access.group [[ACC_GRP9]]
1916 // CHECK13-NEXT: [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP9]]
1917 // CHECK13-NEXT: [[IDXPROM:%.*]] = sext i32 [[TMP5]] to i64
1918 // CHECK13-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i64 0, i64 [[IDXPROM]]
1919 // CHECK13-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP9]]
1920 // CHECK13-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP6]], align 8, !llvm.access.group [[ACC_GRP9]]
1921 // CHECK13-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP9]]
1922 // CHECK13-NEXT: [[IDXPROM7:%.*]] = sext i32 [[TMP7]] to i64
1923 // CHECK13-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i64 0, i64 [[IDXPROM7]]
1924 // CHECK13-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX8]], ptr align 4 [[TMP6]], i64 4, i1 false), !llvm.access.group [[ACC_GRP9]]
1925 // CHECK13-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
1926 // CHECK13: omp.body.continue:
1927 // CHECK13-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
1928 // CHECK13: omp.inner.for.inc:
1929 // CHECK13-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP9]]
1930 // CHECK13-NEXT: [[ADD9:%.*]] = add nsw i32 [[TMP8]], 1
1931 // CHECK13-NEXT: store i32 [[ADD9]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP9]]
1932 // CHECK13-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP10:![0-9]+]]
1933 // CHECK13: omp.inner.for.end:
1934 // CHECK13-NEXT: store i32 2, ptr [[I]], align 4
1935 // CHECK13-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
1936 // CHECK13-NEXT: [[ARRAY_BEGIN10:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
1937 // CHECK13-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN10]], i64 2
1938 // CHECK13-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1939 // CHECK13: arraydestroy.body:
1940 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP9]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1941 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1942 // CHECK13-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1943 // CHECK13-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN10]]
1944 // CHECK13-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE11:%.*]], label [[ARRAYDESTROY_BODY]]
1945 // CHECK13: arraydestroy.done11:
1946 // CHECK13-NEXT: store i32 0, ptr [[RETVAL]], align 4
1947 // CHECK13-NEXT: [[ARRAY_BEGIN12:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1948 // CHECK13-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN12]], i64 2
1949 // CHECK13-NEXT: br label [[ARRAYDESTROY_BODY13:%.*]]
1950 // CHECK13: arraydestroy.body13:
1951 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENTPAST14:%.*]] = phi ptr [ [[TMP10]], [[ARRAYDESTROY_DONE11]] ], [ [[ARRAYDESTROY_ELEMENT15:%.*]], [[ARRAYDESTROY_BODY13]] ]
1952 // CHECK13-NEXT: [[ARRAYDESTROY_ELEMENT15]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST14]], i64 -1
1953 // CHECK13-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT15]]) #[[ATTR4]]
1954 // CHECK13-NEXT: [[ARRAYDESTROY_DONE16:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT15]], [[ARRAY_BEGIN12]]
1955 // CHECK13-NEXT: br i1 [[ARRAYDESTROY_DONE16]], label [[ARRAYDESTROY_DONE17:%.*]], label [[ARRAYDESTROY_BODY13]]
1956 // CHECK13: arraydestroy.done17:
1957 // CHECK13-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1958 // CHECK13-NEXT: [[TMP11:%.*]] = load i32, ptr [[RETVAL]], align 4
1959 // CHECK13-NEXT: ret i32 [[TMP11]]
1962 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1963 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1964 // CHECK13-NEXT: entry:
1965 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1966 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1967 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1968 // CHECK13-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1969 // CHECK13-NEXT: store float 0.000000e+00, ptr [[F]], align 4
1970 // CHECK13-NEXT: ret void
1973 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1974 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1975 // CHECK13-NEXT: entry:
1976 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1977 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1978 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1979 // CHECK13-NEXT: ret void
1982 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1983 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1984 // CHECK13-NEXT: entry:
1985 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1986 // CHECK13-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1987 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1988 // CHECK13-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1989 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1990 // CHECK13-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1991 // CHECK13-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1992 // CHECK13-NEXT: store float [[TMP0]], ptr [[F]], align 4
1993 // CHECK13-NEXT: ret void
1996 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1997 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1998 // CHECK13-NEXT: entry:
1999 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2000 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2001 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2002 // CHECK13-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
2003 // CHECK13-NEXT: ret void
2006 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
2007 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
2008 // CHECK13-NEXT: entry:
2009 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2010 // CHECK13-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2011 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2012 // CHECK13-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2013 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2014 // CHECK13-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2015 // CHECK13-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef signext [[TMP0]])
2016 // CHECK13-NEXT: ret void
2019 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
2020 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
2021 // CHECK13-NEXT: entry:
2022 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2023 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2024 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2025 // CHECK13-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
2026 // CHECK13-NEXT: ret void
2029 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
2030 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
2031 // CHECK13-NEXT: entry:
2032 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2033 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2034 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2035 // CHECK13-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2036 // CHECK13-NEXT: store i32 0, ptr [[F]], align 4
2037 // CHECK13-NEXT: ret void
2040 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
2041 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
2042 // CHECK13-NEXT: entry:
2043 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2044 // CHECK13-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2045 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2046 // CHECK13-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2047 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2048 // CHECK13-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2049 // CHECK13-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2050 // CHECK13-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
2051 // CHECK13-NEXT: ret void
2054 // CHECK13-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
2055 // CHECK13-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
2056 // CHECK13-NEXT: entry:
2057 // CHECK13-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2058 // CHECK13-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2059 // CHECK13-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2060 // CHECK13-NEXT: ret void
2063 // CHECK15-LABEL: define {{[^@]+}}@main
2064 // CHECK15-SAME: () #[[ATTR0:[0-9]+]] {
2065 // CHECK15-NEXT: entry:
2066 // CHECK15-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2067 // CHECK15-NEXT: [[G:%.*]] = alloca double, align 8
2068 // CHECK15-NEXT: [[G1:%.*]] = alloca ptr, align 4
2069 // CHECK15-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
2070 // CHECK15-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
2071 // CHECK15-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
2072 // CHECK15-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
2073 // CHECK15-NEXT: [[VAR:%.*]] = alloca ptr, align 4
2074 // CHECK15-NEXT: [[TMP:%.*]] = alloca i32, align 4
2075 // CHECK15-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
2076 // CHECK15-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2077 // CHECK15-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2078 // CHECK15-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2079 // CHECK15-NEXT: [[I:%.*]] = alloca i32, align 4
2080 // CHECK15-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
2081 // CHECK15-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
2082 // CHECK15-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S], align 4
2083 // CHECK15-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S]], align 4
2084 // CHECK15-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
2085 // CHECK15-NEXT: [[SVAR:%.*]] = alloca i32, align 4
2086 // CHECK15-NEXT: [[I11:%.*]] = alloca i32, align 4
2087 // CHECK15-NEXT: [[_TMP12:%.*]] = alloca i32, align 4
2088 // CHECK15-NEXT: [[DOTOMP_LB13:%.*]] = alloca i32, align 4
2089 // CHECK15-NEXT: [[DOTOMP_UB14:%.*]] = alloca i32, align 4
2090 // CHECK15-NEXT: [[DOTOMP_IV15:%.*]] = alloca i32, align 4
2091 // CHECK15-NEXT: [[I16:%.*]] = alloca i32, align 4
2092 // CHECK15-NEXT: store i32 0, ptr [[RETVAL]], align 4
2093 // CHECK15-NEXT: store ptr [[G]], ptr [[G1]], align 4
2094 // CHECK15-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
2095 // CHECK15-NEXT: store i32 0, ptr [[T_VAR]], align 4
2096 // CHECK15-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
2097 // CHECK15-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
2098 // CHECK15-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
2099 // CHECK15-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i32 1
2100 // CHECK15-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
2101 // CHECK15-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
2102 // CHECK15-NEXT: store ptr undef, ptr [[_TMP1]], align 4
2103 // CHECK15-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2104 // CHECK15-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2105 // CHECK15-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2106 // CHECK15-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_IV]], align 4
2107 // CHECK15-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
2108 // CHECK15-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
2109 // CHECK15-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2110 // CHECK15: arrayctor.loop:
2111 // CHECK15-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2112 // CHECK15-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2113 // CHECK15-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i32 1
2114 // CHECK15-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2115 // CHECK15-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2116 // CHECK15: arrayctor.cont:
2117 // CHECK15-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
2118 // CHECK15-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
2119 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2120 // CHECK15: omp.inner.for.cond:
2121 // CHECK15-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3:![0-9]+]]
2122 // CHECK15-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP3]]
2123 // CHECK15-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP1]], [[TMP2]]
2124 // CHECK15-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2125 // CHECK15: omp.inner.for.cond.cleanup:
2126 // CHECK15-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2127 // CHECK15: omp.inner.for.body:
2128 // CHECK15-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
2129 // CHECK15-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP3]], 1
2130 // CHECK15-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2131 // CHECK15-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP3]]
2132 // CHECK15-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR2]], align 4, !llvm.access.group [[ACC_GRP3]]
2133 // CHECK15-NEXT: [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP3]]
2134 // CHECK15-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i32 0, i32 [[TMP5]]
2135 // CHECK15-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP3]]
2136 // CHECK15-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP6]], align 4, !llvm.access.group [[ACC_GRP3]]
2137 // CHECK15-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP3]]
2138 // CHECK15-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 [[TMP7]]
2139 // CHECK15-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX7]], ptr align 4 [[TMP6]], i32 4, i1 false), !llvm.access.group [[ACC_GRP3]]
2140 // CHECK15-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2141 // CHECK15: omp.body.continue:
2142 // CHECK15-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2143 // CHECK15: omp.inner.for.inc:
2144 // CHECK15-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
2145 // CHECK15-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP8]], 1
2146 // CHECK15-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP3]]
2147 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP4:![0-9]+]]
2148 // CHECK15: omp.inner.for.end:
2149 // CHECK15-NEXT: store i32 2, ptr [[I]], align 4
2150 // CHECK15-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4:[0-9]+]]
2151 // CHECK15-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR4]], i32 0, i32 0
2152 // CHECK15-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN9]], i32 2
2153 // CHECK15-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2154 // CHECK15: arraydestroy.body:
2155 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP9]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2156 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2157 // CHECK15-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2158 // CHECK15-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN9]]
2159 // CHECK15-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE10:%.*]], label [[ARRAYDESTROY_BODY]]
2160 // CHECK15: arraydestroy.done10:
2161 // CHECK15-NEXT: store i32 0, ptr [[DOTOMP_LB13]], align 4
2162 // CHECK15-NEXT: store i32 1, ptr [[DOTOMP_UB14]], align 4
2163 // CHECK15-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_LB13]], align 4
2164 // CHECK15-NEXT: store i32 [[TMP10]], ptr [[DOTOMP_IV15]], align 4
2165 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND17:%.*]]
2166 // CHECK15: omp.inner.for.cond17:
2167 // CHECK15-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_IV15]], align 4, !llvm.access.group [[ACC_GRP7:![0-9]+]]
2168 // CHECK15-NEXT: [[TMP12:%.*]] = load i32, ptr [[DOTOMP_UB14]], align 4, !llvm.access.group [[ACC_GRP7]]
2169 // CHECK15-NEXT: [[CMP18:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
2170 // CHECK15-NEXT: br i1 [[CMP18]], label [[OMP_INNER_FOR_BODY19:%.*]], label [[OMP_INNER_FOR_END25:%.*]]
2171 // CHECK15: omp.inner.for.body19:
2172 // CHECK15-NEXT: [[TMP13:%.*]] = load i32, ptr [[DOTOMP_IV15]], align 4, !llvm.access.group [[ACC_GRP7]]
2173 // CHECK15-NEXT: [[MUL20:%.*]] = mul nsw i32 [[TMP13]], 1
2174 // CHECK15-NEXT: [[ADD21:%.*]] = add nsw i32 0, [[MUL20]]
2175 // CHECK15-NEXT: store i32 [[ADD21]], ptr [[I16]], align 4, !llvm.access.group [[ACC_GRP7]]
2176 // CHECK15-NEXT: br label [[OMP_BODY_CONTINUE22:%.*]]
2177 // CHECK15: omp.body.continue22:
2178 // CHECK15-NEXT: br label [[OMP_INNER_FOR_INC23:%.*]]
2179 // CHECK15: omp.inner.for.inc23:
2180 // CHECK15-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_IV15]], align 4, !llvm.access.group [[ACC_GRP7]]
2181 // CHECK15-NEXT: [[ADD24:%.*]] = add nsw i32 [[TMP14]], 1
2182 // CHECK15-NEXT: store i32 [[ADD24]], ptr [[DOTOMP_IV15]], align 4, !llvm.access.group [[ACC_GRP7]]
2183 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND17]], !llvm.loop [[LOOP8:![0-9]+]]
2184 // CHECK15: omp.inner.for.end25:
2185 // CHECK15-NEXT: store i32 2, ptr [[I11]], align 4
2186 // CHECK15-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIiET_v()
2187 // CHECK15-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
2188 // CHECK15-NEXT: [[ARRAY_BEGIN26:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
2189 // CHECK15-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN26]], i32 2
2190 // CHECK15-NEXT: br label [[ARRAYDESTROY_BODY27:%.*]]
2191 // CHECK15: arraydestroy.body27:
2192 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENTPAST28:%.*]] = phi ptr [ [[TMP15]], [[OMP_INNER_FOR_END25]] ], [ [[ARRAYDESTROY_ELEMENT29:%.*]], [[ARRAYDESTROY_BODY27]] ]
2193 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENT29]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST28]], i32 -1
2194 // CHECK15-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT29]]) #[[ATTR4]]
2195 // CHECK15-NEXT: [[ARRAYDESTROY_DONE30:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT29]], [[ARRAY_BEGIN26]]
2196 // CHECK15-NEXT: br i1 [[ARRAYDESTROY_DONE30]], label [[ARRAYDESTROY_DONE31:%.*]], label [[ARRAYDESTROY_BODY27]]
2197 // CHECK15: arraydestroy.done31:
2198 // CHECK15-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
2199 // CHECK15-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
2200 // CHECK15-NEXT: ret i32 [[TMP16]]
2203 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
2204 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
2205 // CHECK15-NEXT: entry:
2206 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2207 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2208 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2209 // CHECK15-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
2210 // CHECK15-NEXT: ret void
2213 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
2214 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2215 // CHECK15-NEXT: entry:
2216 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2217 // CHECK15-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
2218 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2219 // CHECK15-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
2220 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2221 // CHECK15-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
2222 // CHECK15-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
2223 // CHECK15-NEXT: ret void
2226 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
2227 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2228 // CHECK15-NEXT: entry:
2229 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2230 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2231 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2232 // CHECK15-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
2233 // CHECK15-NEXT: ret void
2236 // CHECK15-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
2237 // CHECK15-SAME: () #[[ATTR3:[0-9]+]] comdat {
2238 // CHECK15-NEXT: entry:
2239 // CHECK15-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2240 // CHECK15-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
2241 // CHECK15-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
2242 // CHECK15-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
2243 // CHECK15-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 4
2244 // CHECK15-NEXT: [[VAR:%.*]] = alloca ptr, align 4
2245 // CHECK15-NEXT: [[TMP:%.*]] = alloca i32, align 4
2246 // CHECK15-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
2247 // CHECK15-NEXT: [[DOTOMP_LB:%.*]] = alloca i32, align 4
2248 // CHECK15-NEXT: [[DOTOMP_UB:%.*]] = alloca i32, align 4
2249 // CHECK15-NEXT: [[DOTOMP_IV:%.*]] = alloca i32, align 4
2250 // CHECK15-NEXT: [[I:%.*]] = alloca i32, align 4
2251 // CHECK15-NEXT: [[T_VAR2:%.*]] = alloca i32, align 4
2252 // CHECK15-NEXT: [[VEC3:%.*]] = alloca [2 x i32], align 4
2253 // CHECK15-NEXT: [[S_ARR4:%.*]] = alloca [2 x %struct.S.0], align 4
2254 // CHECK15-NEXT: [[VAR5:%.*]] = alloca [[STRUCT_S_0]], align 4
2255 // CHECK15-NEXT: [[_TMP6:%.*]] = alloca ptr, align 4
2256 // CHECK15-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
2257 // CHECK15-NEXT: store i32 0, ptr [[T_VAR]], align 4
2258 // CHECK15-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
2259 // CHECK15-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
2260 // CHECK15-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef 1)
2261 // CHECK15-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i32 1
2262 // CHECK15-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
2263 // CHECK15-NEXT: store ptr [[TEST]], ptr [[VAR]], align 4
2264 // CHECK15-NEXT: store ptr undef, ptr [[_TMP1]], align 4
2265 // CHECK15-NEXT: store i32 0, ptr [[DOTOMP_LB]], align 4
2266 // CHECK15-NEXT: store i32 1, ptr [[DOTOMP_UB]], align 4
2267 // CHECK15-NEXT: [[TMP0:%.*]] = load i32, ptr [[DOTOMP_LB]], align 4
2268 // CHECK15-NEXT: store i32 [[TMP0]], ptr [[DOTOMP_IV]], align 4
2269 // CHECK15-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2270 // CHECK15-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
2271 // CHECK15-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2272 // CHECK15: arrayctor.loop:
2273 // CHECK15-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
2274 // CHECK15-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2275 // CHECK15-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i32 1
2276 // CHECK15-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2277 // CHECK15-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2278 // CHECK15: arrayctor.cont:
2279 // CHECK15-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]])
2280 // CHECK15-NEXT: store ptr [[VAR5]], ptr [[_TMP6]], align 4
2281 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND:%.*]]
2282 // CHECK15: omp.inner.for.cond:
2283 // CHECK15-NEXT: [[TMP1:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP10:![0-9]+]]
2284 // CHECK15-NEXT: [[TMP2:%.*]] = load i32, ptr [[DOTOMP_UB]], align 4, !llvm.access.group [[ACC_GRP10]]
2285 // CHECK15-NEXT: [[CMP:%.*]] = icmp sle i32 [[TMP1]], [[TMP2]]
2286 // CHECK15-NEXT: br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_COND_CLEANUP:%.*]]
2287 // CHECK15: omp.inner.for.cond.cleanup:
2288 // CHECK15-NEXT: br label [[OMP_INNER_FOR_END:%.*]]
2289 // CHECK15: omp.inner.for.body:
2290 // CHECK15-NEXT: [[TMP3:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP10]]
2291 // CHECK15-NEXT: [[MUL:%.*]] = mul nsw i32 [[TMP3]], 1
2292 // CHECK15-NEXT: [[ADD:%.*]] = add nsw i32 0, [[MUL]]
2293 // CHECK15-NEXT: store i32 [[ADD]], ptr [[I]], align 4, !llvm.access.group [[ACC_GRP10]]
2294 // CHECK15-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR2]], align 4, !llvm.access.group [[ACC_GRP10]]
2295 // CHECK15-NEXT: [[TMP5:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP10]]
2296 // CHECK15-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC3]], i32 0, i32 [[TMP5]]
2297 // CHECK15-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4, !llvm.access.group [[ACC_GRP10]]
2298 // CHECK15-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP6]], align 4, !llvm.access.group [[ACC_GRP10]]
2299 // CHECK15-NEXT: [[TMP7:%.*]] = load i32, ptr [[I]], align 4, !llvm.access.group [[ACC_GRP10]]
2300 // CHECK15-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 [[TMP7]]
2301 // CHECK15-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX7]], ptr align 4 [[TMP6]], i32 4, i1 false), !llvm.access.group [[ACC_GRP10]]
2302 // CHECK15-NEXT: br label [[OMP_BODY_CONTINUE:%.*]]
2303 // CHECK15: omp.body.continue:
2304 // CHECK15-NEXT: br label [[OMP_INNER_FOR_INC:%.*]]
2305 // CHECK15: omp.inner.for.inc:
2306 // CHECK15-NEXT: [[TMP8:%.*]] = load i32, ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP10]]
2307 // CHECK15-NEXT: [[ADD8:%.*]] = add nsw i32 [[TMP8]], 1
2308 // CHECK15-NEXT: store i32 [[ADD8]], ptr [[DOTOMP_IV]], align 4, !llvm.access.group [[ACC_GRP10]]
2309 // CHECK15-NEXT: br label [[OMP_INNER_FOR_COND]], !llvm.loop [[LOOP11:![0-9]+]]
2310 // CHECK15: omp.inner.for.end:
2311 // CHECK15-NEXT: store i32 2, ptr [[I]], align 4
2312 // CHECK15-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR5]]) #[[ATTR4]]
2313 // CHECK15-NEXT: [[ARRAY_BEGIN9:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR4]], i32 0, i32 0
2314 // CHECK15-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN9]], i32 2
2315 // CHECK15-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2316 // CHECK15: arraydestroy.body:
2317 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP9]], [[OMP_INNER_FOR_END]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2318 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
2319 // CHECK15-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
2320 // CHECK15-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN9]]
2321 // CHECK15-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE10:%.*]], label [[ARRAYDESTROY_BODY]]
2322 // CHECK15: arraydestroy.done10:
2323 // CHECK15-NEXT: store i32 0, ptr [[RETVAL]], align 4
2324 // CHECK15-NEXT: [[ARRAY_BEGIN11:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
2325 // CHECK15-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN11]], i32 2
2326 // CHECK15-NEXT: br label [[ARRAYDESTROY_BODY12:%.*]]
2327 // CHECK15: arraydestroy.body12:
2328 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENTPAST13:%.*]] = phi ptr [ [[TMP10]], [[ARRAYDESTROY_DONE10]] ], [ [[ARRAYDESTROY_ELEMENT14:%.*]], [[ARRAYDESTROY_BODY12]] ]
2329 // CHECK15-NEXT: [[ARRAYDESTROY_ELEMENT14]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST13]], i32 -1
2330 // CHECK15-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT14]]) #[[ATTR4]]
2331 // CHECK15-NEXT: [[ARRAYDESTROY_DONE15:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT14]], [[ARRAY_BEGIN11]]
2332 // CHECK15-NEXT: br i1 [[ARRAYDESTROY_DONE15]], label [[ARRAYDESTROY_DONE16:%.*]], label [[ARRAYDESTROY_BODY12]]
2333 // CHECK15: arraydestroy.done16:
2334 // CHECK15-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
2335 // CHECK15-NEXT: [[TMP11:%.*]] = load i32, ptr [[RETVAL]], align 4
2336 // CHECK15-NEXT: ret i32 [[TMP11]]
2339 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
2340 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2341 // CHECK15-NEXT: entry:
2342 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2343 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2344 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2345 // CHECK15-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
2346 // CHECK15-NEXT: store float 0.000000e+00, ptr [[F]], align 4
2347 // CHECK15-NEXT: ret void
2350 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
2351 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2352 // CHECK15-NEXT: entry:
2353 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2354 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2355 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2356 // CHECK15-NEXT: ret void
2359 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
2360 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2361 // CHECK15-NEXT: entry:
2362 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2363 // CHECK15-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
2364 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2365 // CHECK15-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
2366 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2367 // CHECK15-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
2368 // CHECK15-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
2369 // CHECK15-NEXT: store float [[TMP0]], ptr [[F]], align 4
2370 // CHECK15-NEXT: ret void
2373 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
2374 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2375 // CHECK15-NEXT: entry:
2376 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2377 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2378 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2379 // CHECK15-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
2380 // CHECK15-NEXT: ret void
2383 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
2384 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2385 // CHECK15-NEXT: entry:
2386 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2387 // CHECK15-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2388 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2389 // CHECK15-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2390 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2391 // CHECK15-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2392 // CHECK15-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
2393 // CHECK15-NEXT: ret void
2396 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
2397 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2398 // CHECK15-NEXT: entry:
2399 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2400 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2401 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2402 // CHECK15-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
2403 // CHECK15-NEXT: ret void
2406 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
2407 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2408 // CHECK15-NEXT: entry:
2409 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2410 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2411 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2412 // CHECK15-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2413 // CHECK15-NEXT: store i32 0, ptr [[F]], align 4
2414 // CHECK15-NEXT: ret void
2417 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
2418 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2419 // CHECK15-NEXT: entry:
2420 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2421 // CHECK15-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2422 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2423 // CHECK15-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2424 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2425 // CHECK15-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2426 // CHECK15-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2427 // CHECK15-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
2428 // CHECK15-NEXT: ret void
2431 // CHECK15-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
2432 // CHECK15-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2433 // CHECK15-NEXT: entry:
2434 // CHECK15-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2435 // CHECK15-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2436 // CHECK15-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2437 // CHECK15-NEXT: ret void