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 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -std=c++11 -triple i386-pc-linux-gnu -emit-pch -o %t %s
4 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -triple i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
5 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -std=c++11 -DLAMBDA -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK3
6 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -fblocks -DBLOCKS -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK4
8 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
9 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -std=c++11 -triple i386-pc-linux-gnu -emit-pch -o %t %s
10 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -triple i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
11 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -DLAMBDA -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
12 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -fblocks -DBLOCKS -triple i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
14 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK9
15 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -std=c++11 -triple x86_64-pc-linux-gnu -emit-pch -o %t %s
16 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -triple x86_64-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK9
17 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -std=c++11 -DLAMBDA -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK11
18 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -fblocks -DBLOCKS -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK12
20 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
21 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -std=c++11 -triple x86_64-pc-linux-gnu -emit-pch -o %t %s
22 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -triple x86_64-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
23 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -DLAMBDA -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
24 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -fblocks -DBLOCKS -triple x86_64-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
26 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK17
28 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
29 // expected-no-diagnostics
34 enum omp_allocator_handle_t
{
35 omp_null_allocator
= 0,
36 omp_default_mem_alloc
= 1,
37 omp_large_cap_mem_alloc
= 2,
38 omp_const_mem_alloc
= 3,
39 omp_high_bw_mem_alloc
= 4,
40 omp_low_lat_mem_alloc
= 5,
41 omp_cgroup_mem_alloc
= 6,
42 omp_pteam_mem_alloc
= 7,
43 omp_thread_mem_alloc
= 8,
44 KMP_ALLOCATOR_MAX_HANDLE
= __UINTPTR_MAX__
50 St(const St
&st
) : a(st
.a
+ st
.b
), b(0) {}
54 volatile int g
__attribute__((aligned(128))) = 1212;
61 SS(int &d
) : a(0), b(0), c(d
) {
62 #pragma omp parallel firstprivate(a, b, c, e)
65 ++this->a
, --b
, (this)->c
/= 1;
66 #pragma omp parallel firstprivate(a, b, c)
67 ++(this)->a
, --b
, this->c
/= 1;
74 #pragma omp parallel firstprivate(a, b, c)
75 ++(this)->a
, --b
, this->c
/= 1;
78 ++this->a
, --b
, c
/= 1, e
[2] = 1111;
87 #pragma omp parallel firstprivate(a)
92 #pragma omp parallel firstprivate(a)
100 #pragma omp parallel firstprivate(a)
115 S(const S
&s
, St t
= St()) : f(s
.f
+ t
.a
) {}
116 operator T() { return T(); }
121 template <typename T
>
125 T t_var
__attribute__((aligned(128))) = T();
126 T vec
[] __attribute__((aligned(128))) = {1, 2};
127 S
<T
> s_arr
[] __attribute__((aligned(128))) = {1, 2};
128 S
<T
> var
__attribute__((aligned(128))) (3);
129 #pragma omp parallel firstprivate(t_var, vec, s_arr, var)
134 #pragma omp parallel firstprivate(t_var)
144 #pragma omp parallel firstprivate(g, sivar)
158 #elif defined(BLOCKS)
160 #pragma omp parallel firstprivate(g, sivar)
177 S
<float> s_arr
[] = {1, 2};
179 #pragma omp parallel firstprivate(t_var, vec, s_arr, var, sivar)
186 #pragma omp parallel allocate(omp_default_mem_alloc: t_var) firstprivate(t_var, a)
207 enum omp_allocator_handle_t
{
208 omp_null_allocator
= 0,
209 omp_default_mem_alloc
= 1,
210 omp_large_cap_mem_alloc
= 2,
211 omp_const_mem_alloc
= 3,
212 omp_high_bw_mem_alloc
= 4,
213 omp_low_lat_mem_alloc
= 5,
214 omp_cgroup_mem_alloc
= 6,
215 omp_pteam_mem_alloc
= 7,
216 omp_thread_mem_alloc
= 8,
217 KMP_ALLOCATOR_MAX_HANDLE
= __UINTPTR_MAX__
225 void St_func(St s
[2], int n
, long double vla1
[n
]) {
226 double vla2
[n
][n
] __attribute__((aligned(128)));
228 #pragma omp parallel allocate(omp_thread_mem_alloc:vla2) firstprivate(s, vla1, vla2)
229 vla1
[b
] = vla2
[1][n
- 1] = a
= b
;
233 void array_func(float a
[3], St s
[2], int n
, long double vla1
[n
]) {
234 double vla2
[n
][n
] __attribute__((aligned(128)));
235 #pragma omp parallel firstprivate(a, s, vla1, vla2)
236 s
[0].St_func(s
, n
, vla1
);
242 // CHECK1-LABEL: define {{[^@]+}}@main
243 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
244 // CHECK1-NEXT: entry:
245 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
246 // CHECK1-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
247 // CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
248 // CHECK1-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
249 // CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
250 // CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
251 // CHECK1-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
252 // CHECK1-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
253 // CHECK1-NEXT: [[SIVAR_CASTED:%.*]] = alloca i32, align 4
254 // CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
255 // CHECK1-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i32, align 4
256 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
257 // CHECK1-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 4 dereferenceable(28) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
258 // CHECK1-NEXT: call void @_ZN1SIfEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
259 // CHECK1-NEXT: store i32 0, ptr [[T_VAR]], align 4
260 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
261 // CHECK1-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
262 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float 1.000000e+00)
263 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i32 1
264 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float 2.000000e+00)
265 // CHECK1-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[VAR]], float 3.000000e+00)
266 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
267 // CHECK1-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
268 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
269 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
270 // CHECK1-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
271 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[SIVAR_CASTED]], align 4
272 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 5, ptr @main.omp_outlined, ptr [[VEC]], i32 [[TMP1]], ptr [[S_ARR]], ptr [[VAR]], i32 [[TMP3]])
273 // CHECK1-NEXT: store i32 0, ptr [[A]], align 4
274 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR]], align 4
275 // CHECK1-NEXT: store i32 [[TMP4]], ptr [[T_VAR_CASTED1]], align 4
276 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[T_VAR_CASTED1]], align 4
277 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.1, i32 [[TMP5]])
278 // CHECK1-NEXT: [[CALL:%.*]] = call i32 @_Z5tmainIiET_v()
279 // CHECK1-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
280 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4:[0-9]+]]
281 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
282 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
283 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
284 // CHECK1: arraydestroy.body:
285 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP6]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
286 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
287 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
288 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
289 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
290 // CHECK1: arraydestroy.done2:
291 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
292 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[RETVAL]], align 4
293 // CHECK1-NEXT: ret i32 [[TMP7]]
296 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
297 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
298 // CHECK1-NEXT: entry:
299 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
300 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
301 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
302 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
303 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
304 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
305 // CHECK1-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 4 dereferenceable(28) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
306 // CHECK1-NEXT: ret void
309 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
310 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
311 // CHECK1-NEXT: entry:
312 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
313 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
314 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
315 // CHECK1-NEXT: call void @_ZN1SIfEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
316 // CHECK1-NEXT: ret void
319 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
320 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
321 // CHECK1-NEXT: entry:
322 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
323 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
324 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
325 // CHECK1-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
326 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
327 // CHECK1-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
328 // CHECK1-NEXT: call void @_ZN1SIfEC2Ef(ptr nonnull align 4 dereferenceable(4) [[THIS1]], float [[TMP0]])
329 // CHECK1-NEXT: ret void
332 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined
333 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR3:[0-9]+]] {
334 // CHECK1-NEXT: entry:
335 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
336 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
337 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
338 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
339 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
340 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
341 // CHECK1-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
342 // CHECK1-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 4
343 // CHECK1-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S], align 4
344 // CHECK1-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
345 // CHECK1-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S:%.*]], align 4
346 // CHECK1-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
347 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
348 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
349 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
350 // CHECK1-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
351 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
352 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
353 // CHECK1-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
354 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
355 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
356 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
357 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC1]], ptr align 4 [[TMP0]], i32 8, i1 false)
358 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
359 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
360 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
361 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
362 // CHECK1: omp.arraycpy.body:
363 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
364 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
365 // CHECK1-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
366 // CHECK1-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
367 // CHECK1-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
368 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
369 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
370 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
371 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
372 // CHECK1: omp.arraycpy.done3:
373 // CHECK1-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
374 // CHECK1-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
375 // CHECK1-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
376 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
377 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i32 0, i32 0
378 // CHECK1-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4
379 // CHECK1-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
380 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX6]], ptr align 4 [[VAR4]], i32 4, i1 false)
381 // CHECK1-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
382 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
383 // CHECK1-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
384 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN7]], i32 2
385 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
386 // CHECK1: arraydestroy.body:
387 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
388 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
389 // CHECK1-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
390 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
391 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
392 // CHECK1: arraydestroy.done8:
393 // CHECK1-NEXT: ret void
396 // CHECK1-LABEL: define {{[^@]+}}@_ZN2StC1Ev
397 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
398 // CHECK1-NEXT: entry:
399 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
400 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
401 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
402 // CHECK1-NEXT: call void @_ZN2StC2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]])
403 // CHECK1-NEXT: ret void
406 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC1ERKS0_2St
407 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
408 // CHECK1-NEXT: entry:
409 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
410 // CHECK1-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
411 // CHECK1-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
412 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
413 // CHECK1-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
414 // CHECK1-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
415 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
416 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
417 // CHECK1-NEXT: call void @_ZN1SIfEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
418 // CHECK1-NEXT: ret void
421 // CHECK1-LABEL: define {{[^@]+}}@_ZN2StD1Ev
422 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
423 // CHECK1-NEXT: entry:
424 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
425 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
426 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
427 // CHECK1-NEXT: call void @_ZN2StD2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]]) #[[ATTR4]]
428 // CHECK1-NEXT: ret void
431 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
432 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
433 // CHECK1-NEXT: entry:
434 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
435 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
436 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
437 // CHECK1-NEXT: call void @_ZN1SIfED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
438 // CHECK1-NEXT: ret void
441 // CHECK1-LABEL: define {{[^@]+}}@main.omp_outlined.1
442 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[T_VAR:%.*]]) #[[ATTR3]] {
443 // CHECK1-NEXT: entry:
444 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
445 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
446 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
447 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
448 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
449 // CHECK1-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
450 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 4
451 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
452 // CHECK1-NEXT: [[DOTT_VAR__VOID_ADDR:%.*]] = call ptr @__kmpc_alloc(i32 [[TMP1]], i32 4, ptr inttoptr (i32 1 to ptr))
453 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
454 // CHECK1-NEXT: store i32 [[TMP2]], ptr [[DOTT_VAR__VOID_ADDR]], align 4
455 // CHECK1-NEXT: store i32 0, ptr [[DOTT_VAR__VOID_ADDR]], align 4
456 // CHECK1-NEXT: call void @__kmpc_free(i32 [[TMP1]], ptr [[DOTT_VAR__VOID_ADDR]], ptr inttoptr (i32 1 to ptr))
457 // CHECK1-NEXT: ret void
460 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
461 // CHECK1-SAME: () #[[ATTR5:[0-9]+]] comdat {
462 // CHECK1-NEXT: entry:
463 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
464 // CHECK1-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
465 // CHECK1-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 4
466 // CHECK1-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
467 // CHECK1-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
468 // CHECK1-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
469 // CHECK1-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
470 // CHECK1-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
471 // CHECK1-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i32, align 4
472 // CHECK1-NEXT: call void @_ZN1SIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
473 // CHECK1-NEXT: call void @_ZN3SSTIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[SST]])
474 // CHECK1-NEXT: store i32 0, ptr [[T_VAR]], align 128
475 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
476 // CHECK1-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
477 // CHECK1-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 1)
478 // CHECK1-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i32 1
479 // CHECK1-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
480 // CHECK1-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[VAR]], i32 3)
481 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
482 // CHECK1-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
483 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
484 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_Z5tmainIiET_v.omp_outlined, ptr [[VEC]], i32 [[TMP1]], ptr [[S_ARR]], ptr [[VAR]])
485 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR]], align 128
486 // CHECK1-NEXT: store i32 [[TMP2]], ptr [[T_VAR_CASTED1]], align 4
487 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR_CASTED1]], align 4
488 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z5tmainIiET_v.omp_outlined.2, i32 [[TMP3]])
489 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
490 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
491 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
492 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
493 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
494 // CHECK1: arraydestroy.body:
495 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP4]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
496 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
497 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
498 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
499 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
500 // CHECK1: arraydestroy.done2:
501 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
502 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[RETVAL]], align 4
503 // CHECK1-NEXT: ret i32 [[TMP5]]
506 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
507 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
508 // CHECK1-NEXT: entry:
509 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
510 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
511 // CHECK1-NEXT: [[A2:%.*]] = alloca ptr, align 4
512 // CHECK1-NEXT: [[B4:%.*]] = alloca i32, align 4
513 // CHECK1-NEXT: [[C7:%.*]] = alloca ptr, align 4
514 // CHECK1-NEXT: [[E:%.*]] = alloca ptr, align 4
515 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
516 // CHECK1-NEXT: [[B_CASTED:%.*]] = alloca i32, align 4
517 // CHECK1-NEXT: [[C_CASTED:%.*]] = alloca i32, align 4
518 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
519 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
520 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
521 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
522 // CHECK1-NEXT: store i32 0, ptr [[A]], align 4
523 // CHECK1-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
524 // CHECK1-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
525 // CHECK1-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
526 // CHECK1-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
527 // CHECK1-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
528 // CHECK1-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
529 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
530 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[C]], align 4
531 // CHECK1-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
532 // CHECK1-NEXT: store ptr [[A3]], ptr [[A2]], align 4
533 // CHECK1-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
534 // CHECK1-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
535 // CHECK1-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
536 // CHECK1-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
537 // CHECK1-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
538 // CHECK1-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
539 // CHECK1-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
540 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 4
541 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[C7]], align 4
542 // CHECK1-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
543 // CHECK1-NEXT: store ptr [[E9]], ptr [[E]], align 4
544 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 4
545 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
546 // CHECK1-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
547 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[A_CASTED]], align 4
548 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
549 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
550 // CHECK1-NEXT: [[TMP6:%.*]] = load i32, ptr [[B_CASTED]], align 4
551 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 4
552 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
553 // CHECK1-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
554 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[C_CASTED]], align 4
555 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 4
556 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i32 [[TMP4]], i32 [[TMP6]], i32 [[TMP9]], ptr [[TMP10]])
557 // CHECK1-NEXT: ret void
560 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
561 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR3]] {
562 // CHECK1-NEXT: entry:
563 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
564 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
565 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
566 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
567 // CHECK1-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
568 // CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i32, align 4
569 // CHECK1-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 4
570 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 4
571 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
572 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
573 // CHECK1-NEXT: [[E3:%.*]] = alloca [4 x i32], align 4
574 // CHECK1-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
575 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
576 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
577 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
578 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
579 // CHECK1-NEXT: store i32 [[B]], ptr [[B_ADDR]], align 4
580 // CHECK1-NEXT: store i32 [[C]], ptr [[C_ADDR]], align 4
581 // CHECK1-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 4
582 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
583 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 4
584 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
585 // CHECK1-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 4
586 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 4
587 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 4
588 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[E3]], ptr align 4 [[TMP2]], i32 16, i1 false)
589 // CHECK1-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 4
590 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
591 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
592 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
593 // CHECK1-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
594 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[B_ADDR]], align 4
595 // CHECK1-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP5]], -1
596 // CHECK1-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
597 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 4
598 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
599 // CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP7]], 1
600 // CHECK1-NEXT: store i32 [[DIV]], ptr [[TMP6]], align 4
601 // CHECK1-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP4]], align 4
602 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP8]], i32 0, i32 2
603 // CHECK1-NEXT: store i32 1111, ptr [[ARRAYIDX]], align 4
604 // CHECK1-NEXT: ret void
607 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
608 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
609 // CHECK1-NEXT: entry:
610 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
611 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
612 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
613 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
614 // CHECK1-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
615 // CHECK1-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float
616 // CHECK1-NEXT: store float [[CONV]], ptr [[F]], align 4
617 // CHECK1-NEXT: ret void
620 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
621 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
622 // CHECK1-NEXT: entry:
623 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
624 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
625 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
626 // CHECK1-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
627 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
628 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
629 // CHECK1-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
630 // CHECK1-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
631 // CHECK1-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to float
632 // CHECK1-NEXT: [[ADD:%.*]] = fadd float [[TMP0]], [[CONV]]
633 // CHECK1-NEXT: store float [[ADD]], ptr [[F]], align 4
634 // CHECK1-NEXT: ret void
637 // CHECK1-LABEL: define {{[^@]+}}@_ZN2StC2Ev
638 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
639 // CHECK1-NEXT: entry:
640 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
641 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
642 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
643 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
644 // CHECK1-NEXT: store i32 0, ptr [[A]], align 4
645 // CHECK1-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
646 // CHECK1-NEXT: store i32 0, ptr [[B]], align 4
647 // CHECK1-NEXT: ret void
650 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfEC2ERKS0_2St
651 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
652 // CHECK1-NEXT: entry:
653 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
654 // CHECK1-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
655 // CHECK1-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
656 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
657 // CHECK1-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
658 // CHECK1-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
659 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
660 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
661 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
662 // CHECK1-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[TMP0]], i32 0, i32 0
663 // CHECK1-NEXT: [[TMP1:%.*]] = load float, ptr [[F2]], align 4
664 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
665 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
666 // CHECK1-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP2]] to float
667 // CHECK1-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], [[CONV]]
668 // CHECK1-NEXT: store float [[ADD]], ptr [[F]], align 4
669 // CHECK1-NEXT: ret void
672 // CHECK1-LABEL: define {{[^@]+}}@_ZN2StD2Ev
673 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
674 // CHECK1-NEXT: entry:
675 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
676 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
677 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
678 // CHECK1-NEXT: ret void
681 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
682 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
683 // CHECK1-NEXT: entry:
684 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
685 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
686 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
687 // CHECK1-NEXT: ret void
690 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
691 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
692 // CHECK1-NEXT: entry:
693 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
694 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
695 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
696 // CHECK1-NEXT: call void @_ZN1SIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
697 // CHECK1-NEXT: ret void
700 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIiEC1Ev
701 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
702 // CHECK1-NEXT: entry:
703 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
704 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
705 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
706 // CHECK1-NEXT: call void @_ZN3SSTIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
707 // CHECK1-NEXT: ret void
710 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
711 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
712 // CHECK1-NEXT: entry:
713 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
714 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
715 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
716 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
717 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
718 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
719 // CHECK1-NEXT: call void @_ZN1SIiEC2Ei(ptr nonnull align 4 dereferenceable(4) [[THIS1]], i32 [[TMP0]])
720 // CHECK1-NEXT: ret void
723 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v.omp_outlined
724 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
725 // CHECK1-NEXT: entry:
726 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
727 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
728 // CHECK1-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
729 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
730 // CHECK1-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
731 // CHECK1-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
732 // CHECK1-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 128
733 // CHECK1-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S.0], align 128
734 // CHECK1-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
735 // CHECK1-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
736 // CHECK1-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
737 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
738 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
739 // CHECK1-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
740 // CHECK1-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
741 // CHECK1-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
742 // CHECK1-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
743 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
744 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
745 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
746 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VEC1]], ptr align 128 [[TMP0]], i32 8, i1 false)
747 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
748 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
749 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
750 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
751 // CHECK1: omp.arraycpy.body:
752 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
753 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
754 // CHECK1-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
755 // CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
756 // CHECK1-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
757 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
758 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
759 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
760 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
761 // CHECK1: omp.arraycpy.done3:
762 // CHECK1-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
763 // CHECK1-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
764 // CHECK1-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
765 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
766 // CHECK1-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i32 0, i32 0
767 // CHECK1-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 128
768 // CHECK1-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
769 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[ARRAYIDX6]], ptr align 128 [[VAR4]], i32 4, i1 false)
770 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
771 // CHECK1-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
772 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN7]], i32 2
773 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
774 // CHECK1: arraydestroy.body:
775 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
776 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
777 // CHECK1-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
778 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
779 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
780 // CHECK1: arraydestroy.done8:
781 // CHECK1-NEXT: ret void
784 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC1ERKS0_2St
785 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
786 // CHECK1-NEXT: entry:
787 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
788 // CHECK1-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
789 // CHECK1-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
790 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
791 // CHECK1-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
792 // CHECK1-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
793 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
794 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
795 // CHECK1-NEXT: call void @_ZN1SIiEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
796 // CHECK1-NEXT: ret void
799 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
800 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
801 // CHECK1-NEXT: entry:
802 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
803 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
804 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
805 // CHECK1-NEXT: call void @_ZN1SIiED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
806 // CHECK1-NEXT: ret void
809 // CHECK1-LABEL: define {{[^@]+}}@_Z5tmainIiET_v.omp_outlined.2
810 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[T_VAR:%.*]]) #[[ATTR3]] {
811 // CHECK1-NEXT: entry:
812 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
813 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
814 // CHECK1-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
815 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
816 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
817 // CHECK1-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
818 // CHECK1-NEXT: ret void
821 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
822 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
823 // CHECK1-NEXT: entry:
824 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
825 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
826 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
827 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
828 // CHECK1-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
829 // CHECK1-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
830 // CHECK1-NEXT: ret void
833 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev
834 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
835 // CHECK1-NEXT: entry:
836 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
837 // CHECK1-NEXT: [[A2:%.*]] = alloca ptr, align 4
838 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
839 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
840 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
841 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
842 // CHECK1-NEXT: store i32 0, ptr [[A]], align 4
843 // CHECK1-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0
844 // CHECK1-NEXT: store ptr [[A3]], ptr [[A2]], align 4
845 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 4
846 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
847 // CHECK1-NEXT: store i32 [[TMP1]], ptr [[A_CASTED]], align 4
848 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[A_CASTED]], align 4
849 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZN3SSTIiEC2Ev.omp_outlined, ptr [[THIS1]], i32 [[TMP2]])
850 // CHECK1-NEXT: ret void
853 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev.omp_outlined
854 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]]) #[[ATTR3]] {
855 // CHECK1-NEXT: entry:
856 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
857 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
858 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
859 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
860 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 4
861 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
862 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
863 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
864 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
865 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
866 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
867 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 4
868 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
869 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
870 // CHECK1-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
871 // CHECK1-NEXT: ret void
874 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
875 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
876 // CHECK1-NEXT: entry:
877 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
878 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
879 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
880 // CHECK1-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
881 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
882 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
883 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
884 // CHECK1-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
885 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
886 // CHECK1-NEXT: store i32 [[ADD]], ptr [[F]], align 4
887 // CHECK1-NEXT: ret void
890 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiEC2ERKS0_2St
891 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
892 // CHECK1-NEXT: entry:
893 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
894 // CHECK1-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
895 // CHECK1-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
896 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
897 // CHECK1-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
898 // CHECK1-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
899 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
900 // CHECK1-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
901 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
902 // CHECK1-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[TMP0]], i32 0, i32 0
903 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[F2]], align 4
904 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
905 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
906 // CHECK1-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
907 // CHECK1-NEXT: store i32 [[ADD]], ptr [[F]], align 4
908 // CHECK1-NEXT: ret void
911 // CHECK1-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
912 // CHECK1-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
913 // CHECK1-NEXT: entry:
914 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
915 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
916 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
917 // CHECK1-NEXT: ret void
920 // CHECK3-LABEL: define {{[^@]+}}@main
921 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
922 // CHECK3-NEXT: entry:
923 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
924 // CHECK3-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
925 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 4
926 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
927 // CHECK3-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 4 dereferenceable(28) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
928 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
929 // CHECK3-NEXT: store ptr @_ZZ4mainE5sivar, ptr [[TMP0]], align 4
930 // CHECK3-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr nonnull align 4 dereferenceable(4) [[REF_TMP]])
931 // CHECK3-NEXT: ret i32 0
934 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
935 // CHECK3-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
936 // CHECK3-NEXT: entry:
937 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
938 // CHECK3-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
939 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
940 // CHECK3-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
941 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
942 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
943 // CHECK3-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 4 dereferenceable(28) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
944 // CHECK3-NEXT: ret void
947 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
948 // CHECK3-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
949 // CHECK3-NEXT: entry:
950 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
951 // CHECK3-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
952 // CHECK3-NEXT: [[A2:%.*]] = alloca ptr, align 4
953 // CHECK3-NEXT: [[B4:%.*]] = alloca i32, align 4
954 // CHECK3-NEXT: [[C7:%.*]] = alloca ptr, align 4
955 // CHECK3-NEXT: [[E:%.*]] = alloca ptr, align 4
956 // CHECK3-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
957 // CHECK3-NEXT: [[B_CASTED:%.*]] = alloca i32, align 4
958 // CHECK3-NEXT: [[C_CASTED:%.*]] = alloca i32, align 4
959 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
960 // CHECK3-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
961 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
962 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
963 // CHECK3-NEXT: store i32 0, ptr [[A]], align 4
964 // CHECK3-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
965 // CHECK3-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
966 // CHECK3-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
967 // CHECK3-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
968 // CHECK3-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
969 // CHECK3-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
970 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
971 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[C]], align 4
972 // CHECK3-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
973 // CHECK3-NEXT: store ptr [[A3]], ptr [[A2]], align 4
974 // CHECK3-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
975 // CHECK3-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
976 // CHECK3-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
977 // CHECK3-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
978 // CHECK3-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
979 // CHECK3-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
980 // CHECK3-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
981 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 4
982 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[C7]], align 4
983 // CHECK3-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
984 // CHECK3-NEXT: store ptr [[E9]], ptr [[E]], align 4
985 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 4
986 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
987 // CHECK3-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
988 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[A_CASTED]], align 4
989 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
990 // CHECK3-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
991 // CHECK3-NEXT: [[TMP6:%.*]] = load i32, ptr [[B_CASTED]], align 4
992 // CHECK3-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 4
993 // CHECK3-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
994 // CHECK3-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
995 // CHECK3-NEXT: [[TMP9:%.*]] = load i32, ptr [[C_CASTED]], align 4
996 // CHECK3-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 4
997 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i32 [[TMP4]], i32 [[TMP6]], i32 [[TMP9]], ptr [[TMP10]])
998 // CHECK3-NEXT: ret void
1001 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
1002 // CHECK3-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR3:[0-9]+]] {
1003 // CHECK3-NEXT: entry:
1004 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1005 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1006 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1007 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1008 // CHECK3-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
1009 // CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32, align 4
1010 // CHECK3-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 4
1011 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1012 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1013 // CHECK3-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
1014 // CHECK3-NEXT: [[E3:%.*]] = alloca [4 x i32], align 4
1015 // CHECK3-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
1016 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
1017 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1018 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1019 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1020 // CHECK3-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1021 // CHECK3-NEXT: store i32 [[B]], ptr [[B_ADDR]], align 4
1022 // CHECK3-NEXT: store i32 [[C]], ptr [[C_ADDR]], align 4
1023 // CHECK3-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 4
1024 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1025 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 4
1026 // CHECK3-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
1027 // CHECK3-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 4
1028 // CHECK3-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 4
1029 // CHECK3-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 4
1030 // CHECK3-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[E3]], ptr align 4 [[TMP2]], i32 16, i1 false)
1031 // CHECK3-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 4
1032 // CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
1033 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[TMP3]], align 4
1034 // CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
1035 // CHECK3-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 4
1036 // CHECK3-NEXT: store ptr [[TMP5]], ptr [[TMP4]], align 4
1037 // CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
1038 // CHECK3-NEXT: store ptr [[B_ADDR]], ptr [[TMP6]], align 4
1039 // CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
1040 // CHECK3-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 4
1041 // CHECK3-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 4
1042 // CHECK3-NEXT: call void @_ZZN2SSC1ERiENKUlvE_clEv(ptr nonnull align 4 dereferenceable(16) [[REF_TMP]])
1043 // CHECK3-NEXT: ret void
1046 // CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
1047 // CHECK3-SAME: (ptr nonnull align 4 dereferenceable(16) [[THIS:%.*]]) #[[ATTR2:[0-9]+]] align 2 {
1048 // CHECK3-NEXT: entry:
1049 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1050 // CHECK3-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
1051 // CHECK3-NEXT: [[B_CASTED:%.*]] = alloca i32, align 4
1052 // CHECK3-NEXT: [[C_CASTED:%.*]] = alloca i32, align 4
1053 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1054 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1055 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1056 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 4
1057 // CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
1058 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 4
1059 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1060 // CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
1061 // CHECK3-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
1062 // CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
1063 // CHECK3-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 4
1064 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
1065 // CHECK3-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
1066 // CHECK3-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
1067 // CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
1068 // CHECK3-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 4
1069 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
1070 // CHECK3-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
1071 // CHECK3-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
1072 // CHECK3-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
1073 // CHECK3-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 4
1074 // CHECK3-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
1075 // CHECK3-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4
1076 // CHECK3-NEXT: [[TMP14:%.*]] = load i32, ptr [[A_CASTED]], align 4
1077 // CHECK3-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
1078 // CHECK3-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 4
1079 // CHECK3-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
1080 // CHECK3-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4
1081 // CHECK3-NEXT: [[TMP18:%.*]] = load i32, ptr [[B_CASTED]], align 4
1082 // CHECK3-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
1083 // CHECK3-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 4
1084 // CHECK3-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
1085 // CHECK3-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4
1086 // CHECK3-NEXT: [[TMP22:%.*]] = load i32, ptr [[C_CASTED]], align 4
1087 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i32 [[TMP14]], i32 [[TMP18]], i32 [[TMP22]])
1088 // CHECK3-NEXT: ret void
1091 // CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
1092 // CHECK3-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]]) #[[ATTR3]] {
1093 // CHECK3-NEXT: entry:
1094 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1095 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1096 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1097 // CHECK3-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1098 // CHECK3-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
1099 // CHECK3-NEXT: [[C_ADDR:%.*]] = alloca i32, align 4
1100 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1101 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1102 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1103 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1104 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1105 // CHECK3-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1106 // CHECK3-NEXT: store i32 [[B]], ptr [[B_ADDR]], align 4
1107 // CHECK3-NEXT: store i32 [[C]], ptr [[C_ADDR]], align 4
1108 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1109 // CHECK3-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
1110 // CHECK3-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 4
1111 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 4
1112 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1113 // CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
1114 // CHECK3-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
1115 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[B_ADDR]], align 4
1116 // CHECK3-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
1117 // CHECK3-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
1118 // CHECK3-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 4
1119 // CHECK3-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1120 // CHECK3-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
1121 // CHECK3-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
1122 // CHECK3-NEXT: ret void
1125 // CHECK4-LABEL: define {{[^@]+}}@main
1126 // CHECK4-SAME: () #[[ATTR0:[0-9]+]] {
1127 // CHECK4-NEXT: entry:
1128 // CHECK4-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1129 // CHECK4-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
1130 // CHECK4-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, i32 }>, align 4
1131 // CHECK4-NEXT: store i32 0, ptr [[RETVAL]], align 4
1132 // CHECK4-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 4 dereferenceable(28) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
1133 // CHECK4-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 0
1134 // CHECK4-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 4
1135 // CHECK4-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 1
1136 // CHECK4-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 4
1137 // CHECK4-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 2
1138 // CHECK4-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 4
1139 // CHECK4-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 3
1140 // CHECK4-NEXT: store ptr @__main_block_invoke, ptr [[BLOCK_INVOKE]], align 4
1141 // CHECK4-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 4
1142 // CHECK4-NEXT: store ptr @__block_descriptor_tmp.1, ptr [[BLOCK_DESCRIPTOR]], align 4
1143 // CHECK4-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 5
1144 // CHECK4-NEXT: [[TMP0:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
1145 // CHECK4-NEXT: store i32 [[TMP0]], ptr [[BLOCK_CAPTURED]], align 4
1146 // CHECK4-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
1147 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[TMP1]], align 4
1148 // CHECK4-NEXT: call void [[TMP2]](ptr [[BLOCK]])
1149 // CHECK4-NEXT: ret i32 0
1152 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
1153 // CHECK4-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1154 // CHECK4-NEXT: entry:
1155 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1156 // CHECK4-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
1157 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1158 // CHECK4-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
1159 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1160 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
1161 // CHECK4-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 4 dereferenceable(28) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
1162 // CHECK4-NEXT: ret void
1165 // CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke
1166 // CHECK4-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
1167 // CHECK4-NEXT: entry:
1168 // CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 4
1169 // CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 4
1170 // CHECK4-NEXT: [[G_CASTED:%.*]] = alloca i32, align 4
1171 // CHECK4-NEXT: [[SIVAR_CASTED:%.*]] = alloca i32, align 4
1172 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 4
1173 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 4
1174 // CHECK4-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
1175 // CHECK4-NEXT: store i32 [[TMP0]], ptr [[G_CASTED]], align 4
1176 // CHECK4-NEXT: [[TMP1:%.*]] = load i32, ptr [[G_CASTED]], align 4
1177 // CHECK4-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
1178 // CHECK4-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
1179 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[SIVAR_CASTED]], align 4
1180 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 2, ptr @__main_block_invoke.omp_outlined, i32 [[TMP1]], i32 [[TMP3]])
1181 // CHECK4-NEXT: ret void
1184 // CHECK4-LABEL: define {{[^@]+}}@__main_block_invoke.omp_outlined
1185 // CHECK4-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[G:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR2:[0-9]+]] {
1186 // CHECK4-NEXT: entry:
1187 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1188 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1189 // CHECK4-NEXT: [[G_ADDR:%.*]] = alloca i32, align 4
1190 // CHECK4-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
1191 // CHECK4-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, align 128
1192 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1193 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1194 // CHECK4-NEXT: store i32 [[G]], ptr [[G_ADDR]], align 4
1195 // CHECK4-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
1196 // CHECK4-NEXT: store i32 1, ptr [[G_ADDR]], align 4
1197 // CHECK4-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
1198 // CHECK4-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 0
1199 // CHECK4-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 128
1200 // CHECK4-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 1
1201 // CHECK4-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 4
1202 // CHECK4-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 2
1203 // CHECK4-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 8
1204 // CHECK4-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 3
1205 // CHECK4-NEXT: store ptr @g_block_invoke, ptr [[BLOCK_INVOKE]], align 4
1206 // CHECK4-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 4
1207 // CHECK4-NEXT: store ptr @__block_descriptor_tmp, ptr [[BLOCK_DESCRIPTOR]], align 16
1208 // CHECK4-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 7
1209 // CHECK4-NEXT: [[TMP0:%.*]] = load volatile i32, ptr [[G_ADDR]], align 4
1210 // CHECK4-NEXT: store volatile i32 [[TMP0]], ptr [[BLOCK_CAPTURED]], align 128
1211 // CHECK4-NEXT: [[BLOCK_CAPTURED1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 5
1212 // CHECK4-NEXT: [[TMP1:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
1213 // CHECK4-NEXT: store i32 [[TMP1]], ptr [[BLOCK_CAPTURED1]], align 4
1214 // CHECK4-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
1215 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 4
1216 // CHECK4-NEXT: call void [[TMP3]](ptr [[BLOCK]])
1217 // CHECK4-NEXT: ret void
1220 // CHECK4-LABEL: define {{[^@]+}}@g_block_invoke
1221 // CHECK4-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
1222 // CHECK4-NEXT: entry:
1223 // CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 4
1224 // CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 4
1225 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 4
1226 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 4
1227 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
1228 // CHECK4-NEXT: store i32 2, ptr [[BLOCK_CAPTURE_ADDR]], align 128
1229 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [104 x i8], i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 5
1230 // CHECK4-NEXT: store i32 4, ptr [[BLOCK_CAPTURE_ADDR1]], align 4
1231 // CHECK4-NEXT: ret void
1234 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
1235 // CHECK4-SAME: (ptr nonnull align 4 dereferenceable(28) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1236 // CHECK4-NEXT: entry:
1237 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1238 // CHECK4-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
1239 // CHECK4-NEXT: [[A2:%.*]] = alloca ptr, align 4
1240 // CHECK4-NEXT: [[B4:%.*]] = alloca i32, align 4
1241 // CHECK4-NEXT: [[C7:%.*]] = alloca ptr, align 4
1242 // CHECK4-NEXT: [[E:%.*]] = alloca ptr, align 4
1243 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
1244 // CHECK4-NEXT: [[B_CASTED:%.*]] = alloca i32, align 4
1245 // CHECK4-NEXT: [[C_CASTED:%.*]] = alloca i32, align 4
1246 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1247 // CHECK4-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
1248 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1249 // CHECK4-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
1250 // CHECK4-NEXT: store i32 0, ptr [[A]], align 4
1251 // CHECK4-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1252 // CHECK4-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
1253 // CHECK4-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
1254 // CHECK4-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
1255 // CHECK4-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
1256 // CHECK4-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1257 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
1258 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[C]], align 4
1259 // CHECK4-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
1260 // CHECK4-NEXT: store ptr [[A3]], ptr [[A2]], align 4
1261 // CHECK4-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1262 // CHECK4-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
1263 // CHECK4-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
1264 // CHECK4-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
1265 // CHECK4-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
1266 // CHECK4-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
1267 // CHECK4-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1268 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 4
1269 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[C7]], align 4
1270 // CHECK4-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
1271 // CHECK4-NEXT: store ptr [[E9]], ptr [[E]], align 4
1272 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 4
1273 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1274 // CHECK4-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
1275 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[A_CASTED]], align 4
1276 // CHECK4-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
1277 // CHECK4-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
1278 // CHECK4-NEXT: [[TMP6:%.*]] = load i32, ptr [[B_CASTED]], align 4
1279 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 4
1280 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1281 // CHECK4-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
1282 // CHECK4-NEXT: [[TMP9:%.*]] = load i32, ptr [[C_CASTED]], align 4
1283 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 4
1284 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i32 [[TMP4]], i32 [[TMP6]], i32 [[TMP9]], ptr [[TMP10]])
1285 // CHECK4-NEXT: ret void
1288 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
1289 // CHECK4-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR2]] {
1290 // CHECK4-NEXT: entry:
1291 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1292 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1293 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1294 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1295 // CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
1296 // CHECK4-NEXT: [[C_ADDR:%.*]] = alloca i32, align 4
1297 // CHECK4-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 4
1298 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1299 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1300 // CHECK4-NEXT: [[_TMP2:%.*]] = alloca ptr, align 4
1301 // CHECK4-NEXT: [[E3:%.*]] = alloca [4 x i32], align 4
1302 // CHECK4-NEXT: [[_TMP4:%.*]] = alloca ptr, align 4
1303 // CHECK4-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, align 4
1304 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1305 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1306 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1307 // CHECK4-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1308 // CHECK4-NEXT: store i32 [[B]], ptr [[B_ADDR]], align 4
1309 // CHECK4-NEXT: store i32 [[C]], ptr [[C_ADDR]], align 4
1310 // CHECK4-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 4
1311 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1312 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 4
1313 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
1314 // CHECK4-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 4
1315 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 4
1316 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 4
1317 // CHECK4-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[E3]], ptr align 4 [[TMP2]], i32 16, i1 false)
1318 // CHECK4-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 4
1319 // CHECK4-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 0
1320 // CHECK4-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 4
1321 // CHECK4-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 1
1322 // CHECK4-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 4
1323 // CHECK4-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 2
1324 // CHECK4-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 4
1325 // CHECK4-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 3
1326 // CHECK4-NEXT: store ptr @g_block_invoke_2, ptr [[BLOCK_INVOKE]], align 4
1327 // CHECK4-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 4
1328 // CHECK4-NEXT: store ptr @__block_descriptor_tmp.2, ptr [[BLOCK_DESCRIPTOR]], align 4
1329 // CHECK4-NEXT: [[BLOCK_CAPTURED_THIS_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 5
1330 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[BLOCK_CAPTURED_THIS_ADDR]], align 4
1331 // CHECK4-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 6
1332 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
1333 // CHECK4-NEXT: store ptr [[TMP3]], ptr [[BLOCK_CAPTURED]], align 4
1334 // CHECK4-NEXT: [[BLOCK_CAPTURED5:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 7
1335 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[B_ADDR]], align 4
1336 // CHECK4-NEXT: store i32 [[TMP4]], ptr [[BLOCK_CAPTURED5]], align 4
1337 // CHECK4-NEXT: [[BLOCK_CAPTURED6:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[BLOCK]], i32 0, i32 8
1338 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP1]], align 4
1339 // CHECK4-NEXT: store ptr [[TMP5]], ptr [[BLOCK_CAPTURED6]], align 4
1340 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
1341 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 4
1342 // CHECK4-NEXT: call void [[TMP7]](ptr [[BLOCK]])
1343 // CHECK4-NEXT: ret void
1346 // CHECK4-LABEL: define {{[^@]+}}@g_block_invoke_2
1347 // CHECK4-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
1348 // CHECK4-NEXT: entry:
1349 // CHECK4-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 4
1350 // CHECK4-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 4
1351 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i32, align 4
1352 // CHECK4-NEXT: [[B_CASTED:%.*]] = alloca i32, align 4
1353 // CHECK4-NEXT: [[C_CASTED:%.*]] = alloca i32, align 4
1354 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 4
1355 // CHECK4-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 4
1356 // CHECK4-NEXT: [[BLOCK_CAPTURED_THIS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 5
1357 // CHECK4-NEXT: [[THIS:%.*]] = load ptr, ptr [[BLOCK_CAPTURED_THIS]], align 4
1358 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 6
1359 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR]], align 4
1360 // CHECK4-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1361 // CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
1362 // CHECK4-NEXT: store i32 [[INC]], ptr [[TMP0]], align 4
1363 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
1364 // CHECK4-NEXT: [[TMP2:%.*]] = load i32, ptr [[BLOCK_CAPTURE_ADDR1]], align 4
1365 // CHECK4-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP2]], -1
1366 // CHECK4-NEXT: store i32 [[DEC]], ptr [[BLOCK_CAPTURE_ADDR1]], align 4
1367 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR2:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 8
1368 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR2]], align 4
1369 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1370 // CHECK4-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP4]], 1
1371 // CHECK4-NEXT: store i32 [[DIV]], ptr [[TMP3]], align 4
1372 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR3:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 6
1373 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR3]], align 4
1374 // CHECK4-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
1375 // CHECK4-NEXT: store i32 [[TMP6]], ptr [[A_CASTED]], align 4
1376 // CHECK4-NEXT: [[TMP7:%.*]] = load i32, ptr [[A_CASTED]], align 4
1377 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR4:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
1378 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[BLOCK_CAPTURE_ADDR4]], align 4
1379 // CHECK4-NEXT: store i32 [[TMP8]], ptr [[B_CASTED]], align 4
1380 // CHECK4-NEXT: [[TMP9:%.*]] = load i32, ptr [[B_CASTED]], align 4
1381 // CHECK4-NEXT: [[BLOCK_CAPTURE_ADDR5:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, i32, ptr }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 8
1382 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR5]], align 4
1383 // CHECK4-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
1384 // CHECK4-NEXT: store i32 [[TMP11]], ptr [[C_CASTED]], align 4
1385 // CHECK4-NEXT: [[TMP12:%.*]] = load i32, ptr [[C_CASTED]], align 4
1386 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @g_block_invoke_2.omp_outlined, ptr [[THIS]], i32 [[TMP7]], i32 [[TMP9]], i32 [[TMP12]])
1387 // CHECK4-NEXT: ret void
1390 // CHECK4-LABEL: define {{[^@]+}}@g_block_invoke_2.omp_outlined
1391 // CHECK4-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]]) #[[ATTR2]] {
1392 // CHECK4-NEXT: entry:
1393 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1394 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1395 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1396 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1397 // CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i32, align 4
1398 // CHECK4-NEXT: [[C_ADDR:%.*]] = alloca i32, align 4
1399 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1400 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1401 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1402 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1403 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1404 // CHECK4-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1405 // CHECK4-NEXT: store i32 [[B]], ptr [[B_ADDR]], align 4
1406 // CHECK4-NEXT: store i32 [[C]], ptr [[C_ADDR]], align 4
1407 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1408 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 4
1409 // CHECK4-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 4
1410 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 4
1411 // CHECK4-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1412 // CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
1413 // CHECK4-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
1414 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[B_ADDR]], align 4
1415 // CHECK4-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
1416 // CHECK4-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
1417 // CHECK4-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 4
1418 // CHECK4-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1419 // CHECK4-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
1420 // CHECK4-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
1421 // CHECK4-NEXT: ret void
1424 // CHECK9-LABEL: define {{[^@]+}}@main
1425 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
1426 // CHECK9-NEXT: entry:
1427 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1428 // CHECK9-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
1429 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1430 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1431 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1432 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1433 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
1434 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
1435 // CHECK9-NEXT: [[SIVAR_CASTED:%.*]] = alloca i64, align 8
1436 // CHECK9-NEXT: [[A:%.*]] = alloca i32, align 4
1437 // CHECK9-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i64, align 8
1438 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
1439 // CHECK9-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 8 dereferenceable(32) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
1440 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
1441 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
1442 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
1443 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
1444 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float 1.000000e+00)
1445 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
1446 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float 2.000000e+00)
1447 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[VAR]], float 3.000000e+00)
1448 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
1449 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1450 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
1451 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
1452 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
1453 // CHECK9-NEXT: [[TMP3:%.*]] = load i64, ptr [[SIVAR_CASTED]], align 8
1454 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 5, ptr @main.omp_outlined, ptr [[VEC]], i64 [[TMP1]], ptr [[S_ARR]], ptr [[VAR]], i64 [[TMP3]])
1455 // CHECK9-NEXT: store i32 0, ptr [[A]], align 4
1456 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR]], align 4
1457 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[T_VAR_CASTED1]], align 4
1458 // CHECK9-NEXT: [[TMP5:%.*]] = load i64, ptr [[T_VAR_CASTED1]], align 8
1459 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @main.omp_outlined.1, i64 [[TMP5]])
1460 // CHECK9-NEXT: [[CALL:%.*]] = call i32 @_Z5tmainIiET_v()
1461 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1462 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4:[0-9]+]]
1463 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1464 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
1465 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1466 // CHECK9: arraydestroy.body:
1467 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP6]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1468 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1469 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1470 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1471 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
1472 // CHECK9: arraydestroy.done2:
1473 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1474 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[RETVAL]], align 4
1475 // CHECK9-NEXT: ret i32 [[TMP7]]
1478 // CHECK9-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
1479 // CHECK9-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1480 // CHECK9-NEXT: entry:
1481 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1482 // CHECK9-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
1483 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1484 // CHECK9-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
1485 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1486 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
1487 // CHECK9-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 8 dereferenceable(32) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
1488 // CHECK9-NEXT: ret void
1491 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1492 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1493 // CHECK9-NEXT: entry:
1494 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1495 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1496 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1497 // CHECK9-NEXT: call void @_ZN1SIfEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
1498 // CHECK9-NEXT: ret void
1501 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1502 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1503 // CHECK9-NEXT: entry:
1504 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1505 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1506 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1507 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1508 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1509 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1510 // CHECK9-NEXT: call void @_ZN1SIfEC2Ef(ptr nonnull align 4 dereferenceable(4) [[THIS1]], float [[TMP0]])
1511 // CHECK9-NEXT: ret void
1514 // CHECK9-LABEL: define {{[^@]+}}@main.omp_outlined
1515 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR3:[0-9]+]] {
1516 // CHECK9-NEXT: entry:
1517 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1518 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1519 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1520 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
1521 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1522 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1523 // CHECK9-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
1524 // CHECK9-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 4
1525 // CHECK9-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S], align 4
1526 // CHECK9-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
1527 // CHECK9-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1528 // CHECK9-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
1529 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1530 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1531 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1532 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1533 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1534 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1535 // CHECK9-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
1536 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1537 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1538 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1539 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC1]], ptr align 4 [[TMP0]], i64 8, i1 false)
1540 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
1541 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
1542 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
1543 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1544 // CHECK9: omp.arraycpy.body:
1545 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1546 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1547 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
1548 // CHECK9-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
1549 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
1550 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1551 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1552 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
1553 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
1554 // CHECK9: omp.arraycpy.done3:
1555 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
1556 // CHECK9-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
1557 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
1558 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1559 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i64 0, i64 0
1560 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4
1561 // CHECK9-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i64 0, i64 0
1562 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX6]], ptr align 4 [[VAR4]], i64 4, i1 false)
1563 // CHECK9-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
1564 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
1565 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
1566 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN7]], i64 2
1567 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1568 // CHECK9: arraydestroy.body:
1569 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1570 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1571 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1572 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
1573 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1574 // CHECK9: arraydestroy.done8:
1575 // CHECK9-NEXT: ret void
1578 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StC1Ev
1579 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1580 // CHECK9-NEXT: entry:
1581 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1582 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1583 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1584 // CHECK9-NEXT: call void @_ZN2StC2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]])
1585 // CHECK9-NEXT: ret void
1588 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1ERKS0_2St
1589 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1590 // CHECK9-NEXT: entry:
1591 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1592 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1593 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
1594 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1595 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1596 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
1597 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1598 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
1599 // CHECK9-NEXT: call void @_ZN1SIfEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
1600 // CHECK9-NEXT: ret void
1603 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StD1Ev
1604 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1605 // CHECK9-NEXT: entry:
1606 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1607 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1608 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1609 // CHECK9-NEXT: call void @_ZN2StD2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]]) #[[ATTR4]]
1610 // CHECK9-NEXT: ret void
1613 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1614 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1615 // CHECK9-NEXT: entry:
1616 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1617 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1618 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1619 // CHECK9-NEXT: call void @_ZN1SIfED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1620 // CHECK9-NEXT: ret void
1623 // CHECK9-LABEL: define {{[^@]+}}@main.omp_outlined.1
1624 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[T_VAR:%.*]]) #[[ATTR3]] {
1625 // CHECK9-NEXT: entry:
1626 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1627 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1628 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
1629 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1630 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1631 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1632 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1633 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1634 // CHECK9-NEXT: [[DOTT_VAR__VOID_ADDR:%.*]] = call ptr @__kmpc_alloc(i32 [[TMP1]], i64 4, ptr inttoptr (i64 1 to ptr))
1635 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1636 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[DOTT_VAR__VOID_ADDR]], align 4
1637 // CHECK9-NEXT: store i32 0, ptr [[DOTT_VAR__VOID_ADDR]], align 4
1638 // CHECK9-NEXT: call void @__kmpc_free(i32 [[TMP1]], ptr [[DOTT_VAR__VOID_ADDR]], ptr inttoptr (i64 1 to ptr))
1639 // CHECK9-NEXT: ret void
1642 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1643 // CHECK9-SAME: () #[[ATTR5:[0-9]+]] comdat {
1644 // CHECK9-NEXT: entry:
1645 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1646 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1647 // CHECK9-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 4
1648 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
1649 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
1650 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
1651 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
1652 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
1653 // CHECK9-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i64, align 8
1654 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
1655 // CHECK9-NEXT: call void @_ZN3SSTIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[SST]])
1656 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 128
1657 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
1658 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
1659 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 1)
1660 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
1661 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
1662 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[VAR]], i32 3)
1663 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
1664 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1665 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
1666 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_Z5tmainIiET_v.omp_outlined, ptr [[VEC]], i64 [[TMP1]], ptr [[S_ARR]], ptr [[VAR]])
1667 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[T_VAR]], align 128
1668 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[T_VAR_CASTED1]], align 4
1669 // CHECK9-NEXT: [[TMP3:%.*]] = load i64, ptr [[T_VAR_CASTED1]], align 8
1670 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 1, ptr @_Z5tmainIiET_v.omp_outlined.2, i64 [[TMP3]])
1671 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
1672 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
1673 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1674 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1675 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1676 // CHECK9: arraydestroy.body:
1677 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP4]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1678 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1679 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1680 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1681 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE2:%.*]], label [[ARRAYDESTROY_BODY]]
1682 // CHECK9: arraydestroy.done2:
1683 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1684 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[RETVAL]], align 4
1685 // CHECK9-NEXT: ret i32 [[TMP5]]
1688 // CHECK9-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
1689 // CHECK9-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1690 // CHECK9-NEXT: entry:
1691 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1692 // CHECK9-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
1693 // CHECK9-NEXT: [[A2:%.*]] = alloca ptr, align 8
1694 // CHECK9-NEXT: [[B4:%.*]] = alloca i32, align 4
1695 // CHECK9-NEXT: [[C7:%.*]] = alloca ptr, align 8
1696 // CHECK9-NEXT: [[E:%.*]] = alloca ptr, align 8
1697 // CHECK9-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1698 // CHECK9-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
1699 // CHECK9-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
1700 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1701 // CHECK9-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
1702 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1703 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
1704 // CHECK9-NEXT: store i32 0, ptr [[A]], align 8
1705 // CHECK9-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1706 // CHECK9-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
1707 // CHECK9-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
1708 // CHECK9-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
1709 // CHECK9-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
1710 // CHECK9-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1711 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
1712 // CHECK9-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
1713 // CHECK9-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
1714 // CHECK9-NEXT: store ptr [[A3]], ptr [[A2]], align 8
1715 // CHECK9-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1716 // CHECK9-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
1717 // CHECK9-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
1718 // CHECK9-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
1719 // CHECK9-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
1720 // CHECK9-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
1721 // CHECK9-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1722 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
1723 // CHECK9-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
1724 // CHECK9-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
1725 // CHECK9-NEXT: store ptr [[E9]], ptr [[E]], align 8
1726 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
1727 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1728 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
1729 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
1730 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
1731 // CHECK9-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
1732 // CHECK9-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
1733 // CHECK9-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
1734 // CHECK9-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1735 // CHECK9-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
1736 // CHECK9-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
1737 // CHECK9-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 8
1738 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]], ptr [[TMP10]])
1739 // CHECK9-NEXT: ret void
1742 // CHECK9-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
1743 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]], i64 [[B:%.*]], i64 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR3]] {
1744 // CHECK9-NEXT: entry:
1745 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1746 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1747 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1748 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1749 // CHECK9-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
1750 // CHECK9-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
1751 // CHECK9-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 8
1752 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1753 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1754 // CHECK9-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
1755 // CHECK9-NEXT: [[E3:%.*]] = alloca [4 x i32], align 16
1756 // CHECK9-NEXT: [[_TMP4:%.*]] = alloca ptr, align 8
1757 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1758 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1759 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1760 // CHECK9-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1761 // CHECK9-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
1762 // CHECK9-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
1763 // CHECK9-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 8
1764 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1765 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 8
1766 // CHECK9-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
1767 // CHECK9-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
1768 // CHECK9-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
1769 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 8
1770 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 16 [[E3]], ptr align 4 [[TMP2]], i64 16, i1 false)
1771 // CHECK9-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 8
1772 // CHECK9-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
1773 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1774 // CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
1775 // CHECK9-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
1776 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[B_ADDR]], align 4
1777 // CHECK9-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP5]], -1
1778 // CHECK9-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
1779 // CHECK9-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8
1780 // CHECK9-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
1781 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP7]], 1
1782 // CHECK9-NEXT: store i32 [[DIV]], ptr [[TMP6]], align 4
1783 // CHECK9-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP4]], align 8
1784 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP8]], i64 0, i64 2
1785 // CHECK9-NEXT: store i32 1111, ptr [[ARRAYIDX]], align 4
1786 // CHECK9-NEXT: ret void
1789 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1790 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1791 // CHECK9-NEXT: entry:
1792 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1793 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1794 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1795 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1796 // CHECK9-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
1797 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float
1798 // CHECK9-NEXT: store float [[CONV]], ptr [[F]], align 4
1799 // CHECK9-NEXT: ret void
1802 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1803 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1804 // CHECK9-NEXT: entry:
1805 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1806 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1807 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1808 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1809 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1810 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1811 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1812 // CHECK9-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
1813 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to float
1814 // CHECK9-NEXT: [[ADD:%.*]] = fadd float [[TMP0]], [[CONV]]
1815 // CHECK9-NEXT: store float [[ADD]], ptr [[F]], align 4
1816 // CHECK9-NEXT: ret void
1819 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StC2Ev
1820 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1821 // CHECK9-NEXT: entry:
1822 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1823 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1824 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1825 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
1826 // CHECK9-NEXT: store i32 0, ptr [[A]], align 4
1827 // CHECK9-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
1828 // CHECK9-NEXT: store i32 0, ptr [[B]], align 4
1829 // CHECK9-NEXT: ret void
1832 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2ERKS0_2St
1833 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1834 // CHECK9-NEXT: entry:
1835 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1836 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1837 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
1838 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1839 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1840 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
1841 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1842 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1843 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
1844 // CHECK9-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[TMP0]], i32 0, i32 0
1845 // CHECK9-NEXT: [[TMP1:%.*]] = load float, ptr [[F2]], align 4
1846 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
1847 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
1848 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP2]] to float
1849 // CHECK9-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], [[CONV]]
1850 // CHECK9-NEXT: store float [[ADD]], ptr [[F]], align 4
1851 // CHECK9-NEXT: ret void
1854 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StD2Ev
1855 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1856 // CHECK9-NEXT: entry:
1857 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1858 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1859 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1860 // CHECK9-NEXT: ret void
1863 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1864 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1865 // CHECK9-NEXT: entry:
1866 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1867 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1868 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1869 // CHECK9-NEXT: ret void
1872 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1873 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1874 // CHECK9-NEXT: entry:
1875 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1876 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1877 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1878 // CHECK9-NEXT: call void @_ZN1SIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
1879 // CHECK9-NEXT: ret void
1882 // CHECK9-LABEL: define {{[^@]+}}@_ZN3SSTIiEC1Ev
1883 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1884 // CHECK9-NEXT: entry:
1885 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1886 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1887 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1888 // CHECK9-NEXT: call void @_ZN3SSTIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
1889 // CHECK9-NEXT: ret void
1892 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
1893 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1894 // CHECK9-NEXT: entry:
1895 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1896 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1897 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1898 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1899 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1900 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1901 // CHECK9-NEXT: call void @_ZN1SIiEC2Ei(ptr nonnull align 4 dereferenceable(4) [[THIS1]], i32 [[TMP0]])
1902 // CHECK9-NEXT: ret void
1905 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v.omp_outlined
1906 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1907 // CHECK9-NEXT: entry:
1908 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1909 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1910 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
1911 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
1912 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
1913 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
1914 // CHECK9-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 128
1915 // CHECK9-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S.0], align 128
1916 // CHECK9-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
1917 // CHECK9-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
1918 // CHECK9-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
1919 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1920 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1921 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
1922 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
1923 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
1924 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
1925 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
1926 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
1927 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
1928 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VEC1]], ptr align 128 [[TMP0]], i64 8, i1 false)
1929 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
1930 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
1931 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
1932 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1933 // CHECK9: omp.arraycpy.body:
1934 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1935 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1936 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
1937 // CHECK9-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
1938 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
1939 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1940 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1941 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
1942 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
1943 // CHECK9: omp.arraycpy.done3:
1944 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
1945 // CHECK9-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
1946 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
1947 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1948 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i64 0, i64 0
1949 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 128
1950 // CHECK9-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i64 0, i64 0
1951 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[ARRAYIDX6]], ptr align 128 [[VAR4]], i64 4, i1 false)
1952 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
1953 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
1954 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN7]], i64 2
1955 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1956 // CHECK9: arraydestroy.body:
1957 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1958 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1959 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1960 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
1961 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1962 // CHECK9: arraydestroy.done8:
1963 // CHECK9-NEXT: ret void
1966 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1ERKS0_2St
1967 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1968 // CHECK9-NEXT: entry:
1969 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1970 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1971 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
1972 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1973 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1974 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
1975 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1976 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
1977 // CHECK9-NEXT: call void @_ZN1SIiEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
1978 // CHECK9-NEXT: ret void
1981 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1982 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1983 // CHECK9-NEXT: entry:
1984 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1985 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1986 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1987 // CHECK9-NEXT: call void @_ZN1SIiED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1988 // CHECK9-NEXT: ret void
1991 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v.omp_outlined.2
1992 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[T_VAR:%.*]]) #[[ATTR3]] {
1993 // CHECK9-NEXT: entry:
1994 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1995 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1996 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
1997 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1998 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1999 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
2000 // CHECK9-NEXT: ret void
2003 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
2004 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2005 // CHECK9-NEXT: entry:
2006 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2007 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2008 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2009 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2010 // CHECK9-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
2011 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
2012 // CHECK9-NEXT: ret void
2015 // CHECK9-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev
2016 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2017 // CHECK9-NEXT: entry:
2018 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2019 // CHECK9-NEXT: [[A2:%.*]] = alloca ptr, align 8
2020 // CHECK9-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2021 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2022 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2023 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
2024 // CHECK9-NEXT: store i32 0, ptr [[A]], align 4
2025 // CHECK9-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0
2026 // CHECK9-NEXT: store ptr [[A3]], ptr [[A2]], align 8
2027 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 8
2028 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2029 // CHECK9-NEXT: store i32 [[TMP1]], ptr [[A_CASTED]], align 4
2030 // CHECK9-NEXT: [[TMP2:%.*]] = load i64, ptr [[A_CASTED]], align 8
2031 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZN3SSTIiEC2Ev.omp_outlined, ptr [[THIS1]], i64 [[TMP2]])
2032 // CHECK9-NEXT: ret void
2035 // CHECK9-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev.omp_outlined
2036 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]]) #[[ATTR3]] {
2037 // CHECK9-NEXT: entry:
2038 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2039 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2040 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2041 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2042 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2043 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2044 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2045 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2046 // CHECK9-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2047 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2048 // CHECK9-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2049 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2050 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
2051 // CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
2052 // CHECK9-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
2053 // CHECK9-NEXT: ret void
2056 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
2057 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2058 // CHECK9-NEXT: entry:
2059 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2060 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
2061 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2062 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
2063 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2064 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2065 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
2066 // CHECK9-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
2067 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
2068 // CHECK9-NEXT: store i32 [[ADD]], ptr [[F]], align 4
2069 // CHECK9-NEXT: ret void
2072 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2ERKS0_2St
2073 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2074 // CHECK9-NEXT: entry:
2075 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2076 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2077 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
2078 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2079 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2080 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
2081 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2082 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2083 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2084 // CHECK9-NEXT: [[F2:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[TMP0]], i32 0, i32 0
2085 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[F2]], align 4
2086 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
2087 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
2088 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
2089 // CHECK9-NEXT: store i32 [[ADD]], ptr [[F]], align 4
2090 // CHECK9-NEXT: ret void
2093 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
2094 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2095 // CHECK9-NEXT: entry:
2096 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2097 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2098 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2099 // CHECK9-NEXT: ret void
2102 // CHECK11-LABEL: define {{[^@]+}}@main
2103 // CHECK11-SAME: () #[[ATTR0:[0-9]+]] {
2104 // CHECK11-NEXT: entry:
2105 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2106 // CHECK11-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
2107 // CHECK11-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
2108 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
2109 // CHECK11-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 8 dereferenceable(32) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
2110 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
2111 // CHECK11-NEXT: store ptr @_ZZ4mainE5sivar, ptr [[TMP0]], align 8
2112 // CHECK11-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr nonnull align 8 dereferenceable(8) [[REF_TMP]])
2113 // CHECK11-NEXT: ret i32 0
2116 // CHECK11-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
2117 // CHECK11-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
2118 // CHECK11-NEXT: entry:
2119 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2120 // CHECK11-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2121 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2122 // CHECK11-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2123 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2124 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2125 // CHECK11-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 8 dereferenceable(32) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
2126 // CHECK11-NEXT: ret void
2129 // CHECK11-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
2130 // CHECK11-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2131 // CHECK11-NEXT: entry:
2132 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2133 // CHECK11-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2134 // CHECK11-NEXT: [[A2:%.*]] = alloca ptr, align 8
2135 // CHECK11-NEXT: [[B4:%.*]] = alloca i32, align 4
2136 // CHECK11-NEXT: [[C7:%.*]] = alloca ptr, align 8
2137 // CHECK11-NEXT: [[E:%.*]] = alloca ptr, align 8
2138 // CHECK11-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2139 // CHECK11-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2140 // CHECK11-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2141 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2142 // CHECK11-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2143 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2144 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
2145 // CHECK11-NEXT: store i32 0, ptr [[A]], align 8
2146 // CHECK11-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2147 // CHECK11-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
2148 // CHECK11-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
2149 // CHECK11-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
2150 // CHECK11-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
2151 // CHECK11-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2152 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2153 // CHECK11-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
2154 // CHECK11-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
2155 // CHECK11-NEXT: store ptr [[A3]], ptr [[A2]], align 8
2156 // CHECK11-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2157 // CHECK11-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
2158 // CHECK11-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
2159 // CHECK11-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
2160 // CHECK11-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
2161 // CHECK11-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
2162 // CHECK11-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2163 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
2164 // CHECK11-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
2165 // CHECK11-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
2166 // CHECK11-NEXT: store ptr [[E9]], ptr [[E]], align 8
2167 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
2168 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2169 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
2170 // CHECK11-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
2171 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
2172 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
2173 // CHECK11-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
2174 // CHECK11-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
2175 // CHECK11-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2176 // CHECK11-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
2177 // CHECK11-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
2178 // CHECK11-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 8
2179 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]], ptr [[TMP10]])
2180 // CHECK11-NEXT: ret void
2183 // CHECK11-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
2184 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]], i64 [[B:%.*]], i64 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR3:[0-9]+]] {
2185 // CHECK11-NEXT: entry:
2186 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2187 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2188 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2189 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2190 // CHECK11-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2191 // CHECK11-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2192 // CHECK11-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 8
2193 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2194 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2195 // CHECK11-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
2196 // CHECK11-NEXT: [[E3:%.*]] = alloca [4 x i32], align 16
2197 // CHECK11-NEXT: [[_TMP4:%.*]] = alloca ptr, align 8
2198 // CHECK11-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
2199 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2200 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2201 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2202 // CHECK11-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2203 // CHECK11-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2204 // CHECK11-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2205 // CHECK11-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 8
2206 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2207 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 8
2208 // CHECK11-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2209 // CHECK11-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2210 // CHECK11-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
2211 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 8
2212 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 16 [[E3]], ptr align 4 [[TMP2]], i64 16, i1 false)
2213 // CHECK11-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 8
2214 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
2215 // CHECK11-NEXT: store ptr [[TMP0]], ptr [[TMP3]], align 8
2216 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
2217 // CHECK11-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP]], align 8
2218 // CHECK11-NEXT: store ptr [[TMP5]], ptr [[TMP4]], align 8
2219 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
2220 // CHECK11-NEXT: store ptr [[B_ADDR]], ptr [[TMP6]], align 8
2221 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
2222 // CHECK11-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 8
2223 // CHECK11-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 8
2224 // CHECK11-NEXT: call void @_ZZN2SSC1ERiENKUlvE_clEv(ptr nonnull align 8 dereferenceable(32) [[REF_TMP]])
2225 // CHECK11-NEXT: ret void
2228 // CHECK11-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
2229 // CHECK11-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR2:[0-9]+]] align 2 {
2230 // CHECK11-NEXT: entry:
2231 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2232 // CHECK11-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2233 // CHECK11-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2234 // CHECK11-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2235 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2236 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2237 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2238 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
2239 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
2240 // CHECK11-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
2241 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2242 // CHECK11-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
2243 // CHECK11-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
2244 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
2245 // CHECK11-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
2246 // CHECK11-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
2247 // CHECK11-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
2248 // CHECK11-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
2249 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
2250 // CHECK11-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
2251 // CHECK11-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
2252 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
2253 // CHECK11-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
2254 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
2255 // CHECK11-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
2256 // CHECK11-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
2257 // CHECK11-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4
2258 // CHECK11-NEXT: [[TMP14:%.*]] = load i64, ptr [[A_CASTED]], align 8
2259 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
2260 // CHECK11-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
2261 // CHECK11-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
2262 // CHECK11-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4
2263 // CHECK11-NEXT: [[TMP18:%.*]] = load i64, ptr [[B_CASTED]], align 8
2264 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
2265 // CHECK11-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
2266 // CHECK11-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
2267 // CHECK11-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4
2268 // CHECK11-NEXT: [[TMP22:%.*]] = load i64, ptr [[C_CASTED]], align 8
2269 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP14]], i64 [[TMP18]], i64 [[TMP22]])
2270 // CHECK11-NEXT: ret void
2273 // CHECK11-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
2274 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]], i64 [[B:%.*]], i64 [[C:%.*]]) #[[ATTR3]] {
2275 // CHECK11-NEXT: entry:
2276 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2277 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2278 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2279 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2280 // CHECK11-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2281 // CHECK11-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2282 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2283 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2284 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2285 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2286 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2287 // CHECK11-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2288 // CHECK11-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2289 // CHECK11-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2290 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2291 // CHECK11-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2292 // CHECK11-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2293 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2294 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
2295 // CHECK11-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
2296 // CHECK11-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
2297 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[B_ADDR]], align 4
2298 // CHECK11-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
2299 // CHECK11-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
2300 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 8
2301 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
2302 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
2303 // CHECK11-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
2304 // CHECK11-NEXT: ret void
2307 // CHECK12-LABEL: define {{[^@]+}}@main
2308 // CHECK12-SAME: () #[[ATTR0:[0-9]+]] {
2309 // CHECK12-NEXT: entry:
2310 // CHECK12-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2311 // CHECK12-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
2312 // CHECK12-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, i32 }>, align 8
2313 // CHECK12-NEXT: store i32 0, ptr [[RETVAL]], align 4
2314 // CHECK12-NEXT: call void @_ZN2SSC1ERi(ptr nonnull align 8 dereferenceable(32) [[SS]], ptr nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
2315 // CHECK12-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 0
2316 // CHECK12-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 8
2317 // CHECK12-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 1
2318 // CHECK12-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 8
2319 // CHECK12-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 2
2320 // CHECK12-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 4
2321 // CHECK12-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 3
2322 // CHECK12-NEXT: store ptr @__main_block_invoke, ptr [[BLOCK_INVOKE]], align 8
2323 // CHECK12-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 4
2324 // CHECK12-NEXT: store ptr @__block_descriptor_tmp.1, ptr [[BLOCK_DESCRIPTOR]], align 8
2325 // CHECK12-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 5
2326 // CHECK12-NEXT: [[TMP0:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
2327 // CHECK12-NEXT: store i32 [[TMP0]], ptr [[BLOCK_CAPTURED]], align 8
2328 // CHECK12-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
2329 // CHECK12-NEXT: [[TMP2:%.*]] = load ptr, ptr [[TMP1]], align 8
2330 // CHECK12-NEXT: call void [[TMP2]](ptr [[BLOCK]])
2331 // CHECK12-NEXT: ret i32 0
2334 // CHECK12-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
2335 // CHECK12-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
2336 // CHECK12-NEXT: entry:
2337 // CHECK12-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2338 // CHECK12-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2339 // CHECK12-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2340 // CHECK12-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2341 // CHECK12-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2342 // CHECK12-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2343 // CHECK12-NEXT: call void @_ZN2SSC2ERi(ptr nonnull align 8 dereferenceable(32) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]])
2344 // CHECK12-NEXT: ret void
2347 // CHECK12-LABEL: define {{[^@]+}}@__main_block_invoke
2348 // CHECK12-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2349 // CHECK12-NEXT: entry:
2350 // CHECK12-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
2351 // CHECK12-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
2352 // CHECK12-NEXT: [[G_CASTED:%.*]] = alloca i64, align 8
2353 // CHECK12-NEXT: [[SIVAR_CASTED:%.*]] = alloca i64, align 8
2354 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 8
2355 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 8
2356 // CHECK12-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
2357 // CHECK12-NEXT: store i32 [[TMP0]], ptr [[G_CASTED]], align 4
2358 // CHECK12-NEXT: [[TMP1:%.*]] = load i64, ptr [[G_CASTED]], align 8
2359 // CHECK12-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
2360 // CHECK12-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
2361 // CHECK12-NEXT: [[TMP3:%.*]] = load i64, ptr [[SIVAR_CASTED]], align 8
2362 // CHECK12-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 2, ptr @__main_block_invoke.omp_outlined, i64 [[TMP1]], i64 [[TMP3]])
2363 // CHECK12-NEXT: ret void
2366 // CHECK12-LABEL: define {{[^@]+}}@__main_block_invoke.omp_outlined
2367 // CHECK12-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[G:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR2:[0-9]+]] {
2368 // CHECK12-NEXT: entry:
2369 // CHECK12-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2370 // CHECK12-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2371 // CHECK12-NEXT: [[G_ADDR:%.*]] = alloca i64, align 8
2372 // CHECK12-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
2373 // CHECK12-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, align 128
2374 // CHECK12-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2375 // CHECK12-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2376 // CHECK12-NEXT: store i64 [[G]], ptr [[G_ADDR]], align 8
2377 // CHECK12-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
2378 // CHECK12-NEXT: store i32 1, ptr [[G_ADDR]], align 4
2379 // CHECK12-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
2380 // CHECK12-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 0
2381 // CHECK12-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 128
2382 // CHECK12-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 1
2383 // CHECK12-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 8
2384 // CHECK12-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 2
2385 // CHECK12-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 4
2386 // CHECK12-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 3
2387 // CHECK12-NEXT: store ptr @g_block_invoke, ptr [[BLOCK_INVOKE]], align 16
2388 // CHECK12-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 4
2389 // CHECK12-NEXT: store ptr @__block_descriptor_tmp, ptr [[BLOCK_DESCRIPTOR]], align 8
2390 // CHECK12-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 7
2391 // CHECK12-NEXT: [[TMP0:%.*]] = load volatile i32, ptr [[G_ADDR]], align 4
2392 // CHECK12-NEXT: store volatile i32 [[TMP0]], ptr [[BLOCK_CAPTURED]], align 128
2393 // CHECK12-NEXT: [[BLOCK_CAPTURED1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[BLOCK]], i32 0, i32 5
2394 // CHECK12-NEXT: [[TMP1:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
2395 // CHECK12-NEXT: store i32 [[TMP1]], ptr [[BLOCK_CAPTURED1]], align 32
2396 // CHECK12-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
2397 // CHECK12-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
2398 // CHECK12-NEXT: call void [[TMP3]](ptr [[BLOCK]])
2399 // CHECK12-NEXT: ret void
2402 // CHECK12-LABEL: define {{[^@]+}}@g_block_invoke
2403 // CHECK12-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2404 // CHECK12-NEXT: entry:
2405 // CHECK12-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
2406 // CHECK12-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
2407 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 8
2408 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 8
2409 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
2410 // CHECK12-NEXT: store i32 2, ptr [[BLOCK_CAPTURE_ADDR]], align 128
2411 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, i32, [92 x i8], i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 5
2412 // CHECK12-NEXT: store i32 4, ptr [[BLOCK_CAPTURE_ADDR1]], align 32
2413 // CHECK12-NEXT: ret void
2416 // CHECK12-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
2417 // CHECK12-SAME: (ptr nonnull align 8 dereferenceable(32) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2418 // CHECK12-NEXT: entry:
2419 // CHECK12-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2420 // CHECK12-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2421 // CHECK12-NEXT: [[A2:%.*]] = alloca ptr, align 8
2422 // CHECK12-NEXT: [[B4:%.*]] = alloca i32, align 4
2423 // CHECK12-NEXT: [[C7:%.*]] = alloca ptr, align 8
2424 // CHECK12-NEXT: [[E:%.*]] = alloca ptr, align 8
2425 // CHECK12-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2426 // CHECK12-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2427 // CHECK12-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2428 // CHECK12-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2429 // CHECK12-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2430 // CHECK12-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2431 // CHECK12-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
2432 // CHECK12-NEXT: store i32 0, ptr [[A]], align 8
2433 // CHECK12-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2434 // CHECK12-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
2435 // CHECK12-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
2436 // CHECK12-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
2437 // CHECK12-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
2438 // CHECK12-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2439 // CHECK12-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2440 // CHECK12-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
2441 // CHECK12-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
2442 // CHECK12-NEXT: store ptr [[A3]], ptr [[A2]], align 8
2443 // CHECK12-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2444 // CHECK12-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
2445 // CHECK12-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
2446 // CHECK12-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
2447 // CHECK12-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
2448 // CHECK12-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
2449 // CHECK12-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2450 // CHECK12-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
2451 // CHECK12-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
2452 // CHECK12-NEXT: [[E9:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 3
2453 // CHECK12-NEXT: store ptr [[E9]], ptr [[E]], align 8
2454 // CHECK12-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
2455 // CHECK12-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2456 // CHECK12-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
2457 // CHECK12-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
2458 // CHECK12-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
2459 // CHECK12-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
2460 // CHECK12-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
2461 // CHECK12-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
2462 // CHECK12-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2463 // CHECK12-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
2464 // CHECK12-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
2465 // CHECK12-NEXT: [[TMP10:%.*]] = load ptr, ptr [[E]], align 8
2466 // CHECK12-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 5, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]], ptr [[TMP10]])
2467 // CHECK12-NEXT: ret void
2470 // CHECK12-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
2471 // CHECK12-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]], i64 [[B:%.*]], i64 [[C:%.*]], ptr nonnull align 4 dereferenceable(16) [[E:%.*]]) #[[ATTR2]] {
2472 // CHECK12-NEXT: entry:
2473 // CHECK12-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2474 // CHECK12-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2475 // CHECK12-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2476 // CHECK12-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2477 // CHECK12-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2478 // CHECK12-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2479 // CHECK12-NEXT: [[E_ADDR:%.*]] = alloca ptr, align 8
2480 // CHECK12-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2481 // CHECK12-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2482 // CHECK12-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
2483 // CHECK12-NEXT: [[E3:%.*]] = alloca [4 x i32], align 16
2484 // CHECK12-NEXT: [[_TMP4:%.*]] = alloca ptr, align 8
2485 // CHECK12-NEXT: [[BLOCK:%.*]] = alloca <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, align 8
2486 // CHECK12-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2487 // CHECK12-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2488 // CHECK12-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2489 // CHECK12-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2490 // CHECK12-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2491 // CHECK12-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2492 // CHECK12-NEXT: store ptr [[E]], ptr [[E_ADDR]], align 8
2493 // CHECK12-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2494 // CHECK12-NEXT: [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 8
2495 // CHECK12-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2496 // CHECK12-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2497 // CHECK12-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
2498 // CHECK12-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP2]], align 8
2499 // CHECK12-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 16 [[E3]], ptr align 4 [[TMP2]], i64 16, i1 false)
2500 // CHECK12-NEXT: store ptr [[E3]], ptr [[_TMP4]], align 8
2501 // CHECK12-NEXT: [[BLOCK_ISA:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 0
2502 // CHECK12-NEXT: store ptr @_NSConcreteStackBlock, ptr [[BLOCK_ISA]], align 8
2503 // CHECK12-NEXT: [[BLOCK_FLAGS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 1
2504 // CHECK12-NEXT: store i32 1073741824, ptr [[BLOCK_FLAGS]], align 8
2505 // CHECK12-NEXT: [[BLOCK_RESERVED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 2
2506 // CHECK12-NEXT: store i32 0, ptr [[BLOCK_RESERVED]], align 4
2507 // CHECK12-NEXT: [[BLOCK_INVOKE:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 3
2508 // CHECK12-NEXT: store ptr @g_block_invoke_2, ptr [[BLOCK_INVOKE]], align 8
2509 // CHECK12-NEXT: [[BLOCK_DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 4
2510 // CHECK12-NEXT: store ptr @__block_descriptor_tmp.2, ptr [[BLOCK_DESCRIPTOR]], align 8
2511 // CHECK12-NEXT: [[BLOCK_CAPTURED_THIS_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 5
2512 // CHECK12-NEXT: store ptr [[TMP0]], ptr [[BLOCK_CAPTURED_THIS_ADDR]], align 8
2513 // CHECK12-NEXT: [[BLOCK_CAPTURED:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 6
2514 // CHECK12-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
2515 // CHECK12-NEXT: store ptr [[TMP3]], ptr [[BLOCK_CAPTURED]], align 8
2516 // CHECK12-NEXT: [[BLOCK_CAPTURED5:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 8
2517 // CHECK12-NEXT: [[TMP4:%.*]] = load i32, ptr [[B_ADDR]], align 4
2518 // CHECK12-NEXT: store i32 [[TMP4]], ptr [[BLOCK_CAPTURED5]], align 8
2519 // CHECK12-NEXT: [[BLOCK_CAPTURED6:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[BLOCK]], i32 0, i32 7
2520 // CHECK12-NEXT: [[TMP5:%.*]] = load ptr, ptr [[_TMP1]], align 8
2521 // CHECK12-NEXT: store ptr [[TMP5]], ptr [[BLOCK_CAPTURED6]], align 8
2522 // CHECK12-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___BLOCK_LITERAL_GENERIC:%.*]], ptr [[BLOCK]], i32 0, i32 3
2523 // CHECK12-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2524 // CHECK12-NEXT: call void [[TMP7]](ptr [[BLOCK]])
2525 // CHECK12-NEXT: ret void
2528 // CHECK12-LABEL: define {{[^@]+}}@g_block_invoke_2
2529 // CHECK12-SAME: (ptr [[DOTBLOCK_DESCRIPTOR:%.*]]) #[[ATTR1]] {
2530 // CHECK12-NEXT: entry:
2531 // CHECK12-NEXT: [[DOTBLOCK_DESCRIPTOR_ADDR:%.*]] = alloca ptr, align 8
2532 // CHECK12-NEXT: [[BLOCK_ADDR:%.*]] = alloca ptr, align 8
2533 // CHECK12-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2534 // CHECK12-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2535 // CHECK12-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2536 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[DOTBLOCK_DESCRIPTOR_ADDR]], align 8
2537 // CHECK12-NEXT: store ptr [[DOTBLOCK_DESCRIPTOR]], ptr [[BLOCK_ADDR]], align 8
2538 // CHECK12-NEXT: [[BLOCK_CAPTURED_THIS:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 5
2539 // CHECK12-NEXT: [[THIS:%.*]] = load ptr, ptr [[BLOCK_CAPTURED_THIS]], align 8
2540 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 6
2541 // CHECK12-NEXT: [[TMP0:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR]], align 8
2542 // CHECK12-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2543 // CHECK12-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
2544 // CHECK12-NEXT: store i32 [[INC]], ptr [[TMP0]], align 4
2545 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR1:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 8
2546 // CHECK12-NEXT: [[TMP2:%.*]] = load i32, ptr [[BLOCK_CAPTURE_ADDR1]], align 8
2547 // CHECK12-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP2]], -1
2548 // CHECK12-NEXT: store i32 [[DEC]], ptr [[BLOCK_CAPTURE_ADDR1]], align 8
2549 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR2:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
2550 // CHECK12-NEXT: [[TMP3:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR2]], align 8
2551 // CHECK12-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2552 // CHECK12-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP4]], 1
2553 // CHECK12-NEXT: store i32 [[DIV]], ptr [[TMP3]], align 4
2554 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR3:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 6
2555 // CHECK12-NEXT: [[TMP5:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR3]], align 8
2556 // CHECK12-NEXT: [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
2557 // CHECK12-NEXT: store i32 [[TMP6]], ptr [[A_CASTED]], align 4
2558 // CHECK12-NEXT: [[TMP7:%.*]] = load i64, ptr [[A_CASTED]], align 8
2559 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR4:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 8
2560 // CHECK12-NEXT: [[TMP8:%.*]] = load i32, ptr [[BLOCK_CAPTURE_ADDR4]], align 8
2561 // CHECK12-NEXT: store i32 [[TMP8]], ptr [[B_CASTED]], align 4
2562 // CHECK12-NEXT: [[TMP9:%.*]] = load i64, ptr [[B_CASTED]], align 8
2563 // CHECK12-NEXT: [[BLOCK_CAPTURE_ADDR5:%.*]] = getelementptr inbounds <{ ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i32 }>, ptr [[DOTBLOCK_DESCRIPTOR]], i32 0, i32 7
2564 // CHECK12-NEXT: [[TMP10:%.*]] = load ptr, ptr [[BLOCK_CAPTURE_ADDR5]], align 8
2565 // CHECK12-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
2566 // CHECK12-NEXT: store i32 [[TMP11]], ptr [[C_CASTED]], align 4
2567 // CHECK12-NEXT: [[TMP12:%.*]] = load i64, ptr [[C_CASTED]], align 8
2568 // CHECK12-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @g_block_invoke_2.omp_outlined, ptr [[THIS]], i64 [[TMP7]], i64 [[TMP9]], i64 [[TMP12]])
2569 // CHECK12-NEXT: ret void
2572 // CHECK12-LABEL: define {{[^@]+}}@g_block_invoke_2.omp_outlined
2573 // CHECK12-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[THIS:%.*]], i64 [[A:%.*]], i64 [[B:%.*]], i64 [[C:%.*]]) #[[ATTR2]] {
2574 // CHECK12-NEXT: entry:
2575 // CHECK12-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2576 // CHECK12-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2577 // CHECK12-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2578 // CHECK12-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2579 // CHECK12-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2580 // CHECK12-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2581 // CHECK12-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2582 // CHECK12-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2583 // CHECK12-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2584 // CHECK12-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2585 // CHECK12-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2586 // CHECK12-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2587 // CHECK12-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2588 // CHECK12-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2589 // CHECK12-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2590 // CHECK12-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2591 // CHECK12-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2592 // CHECK12-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2593 // CHECK12-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
2594 // CHECK12-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
2595 // CHECK12-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
2596 // CHECK12-NEXT: [[TMP3:%.*]] = load i32, ptr [[B_ADDR]], align 4
2597 // CHECK12-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
2598 // CHECK12-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
2599 // CHECK12-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 8
2600 // CHECK12-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
2601 // CHECK12-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
2602 // CHECK12-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
2603 // CHECK12-NEXT: ret void
2606 // CHECK17-LABEL: define {{[^@]+}}@_Z10array_funcPfP2StiPe
2607 // CHECK17-SAME: (ptr [[A:%.*]], ptr [[S:%.*]], i32 [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0:[0-9]+]] {
2608 // CHECK17-NEXT: entry:
2609 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2610 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2611 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2612 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2613 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2614 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2615 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2616 // CHECK17-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2617 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2618 // CHECK17-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2619 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2620 // CHECK17-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
2621 // CHECK17-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64
2622 // CHECK17-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
2623 // CHECK17-NEXT: [[TMP3:%.*]] = zext i32 [[TMP2]] to i64
2624 // CHECK17-NEXT: [[TMP4:%.*]] = load i32, ptr [[N_ADDR]], align 4
2625 // CHECK17-NEXT: [[TMP5:%.*]] = zext i32 [[TMP4]] to i64
2626 // CHECK17-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
2627 // CHECK17-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 8
2628 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
2629 // CHECK17-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP7]], align 128
2630 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR0]], align 8
2631 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[__VLA_EXPR1]], align 8
2632 // CHECK17-NEXT: [[TMP8:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2633 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2634 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2635 // CHECK17-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1:[0-9]+]], i32 8, ptr @_Z10array_funcPfP2StiPe.omp_outlined, ptr [[TMP8]], ptr [[N_ADDR]], i64 [[TMP1]], ptr [[TMP9]], ptr [[TMP10]], i64 [[TMP3]], i64 [[TMP5]], ptr [[VLA]])
2636 // CHECK17-NEXT: [[TMP11:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2637 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP11]])
2638 // CHECK17-NEXT: ret void
2641 // CHECK17-LABEL: define {{[^@]+}}@_Z10array_funcPfP2StiPe.omp_outlined
2642 // CHECK17-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[S:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[A:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]]) #[[ATTR2:[0-9]+]] {
2643 // CHECK17-NEXT: entry:
2644 // CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2645 // CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2646 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2647 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2648 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2649 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2650 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2651 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
2652 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
2653 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
2654 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2655 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2656 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2657 // CHECK17-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2658 // CHECK17-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2659 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2660 // CHECK17-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2661 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2662 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2663 // CHECK17-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2664 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
2665 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
2666 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
2667 // CHECK17-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2668 // CHECK17-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2669 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
2670 // CHECK17-NEXT: [[TMP3:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2671 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2672 // CHECK17-NEXT: [[TMP5:%.*]] = call ptr @llvm.stacksave.p0()
2673 // CHECK17-NEXT: store ptr [[TMP5]], ptr [[SAVED_STACK]], align 8
2674 // CHECK17-NEXT: [[TMP6:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2675 // CHECK17-NEXT: [[VLA7:%.*]] = alloca double, i64 [[TMP6]], align 128
2676 // CHECK17-NEXT: store i64 [[TMP2]], ptr [[__VLA_EXPR0]], align 8
2677 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR1]], align 8
2678 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2679 // CHECK17-NEXT: [[TMP8:%.*]] = mul nuw i64 [[TMP7]], 8
2680 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VLA7]], ptr align 128 [[TMP4]], i64 [[TMP8]], i1 false)
2681 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2682 // CHECK17-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP9]], i64 0
2683 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2684 // CHECK17-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP0]], align 4
2685 // CHECK17-NEXT: [[TMP12:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2686 // CHECK17-NEXT: call void @_ZN2St7St_funcEPS_iPe(ptr nonnull align 4 dereferenceable(8) [[ARRAYIDX]], ptr [[TMP10]], i32 [[TMP11]], ptr [[TMP12]])
2687 // CHECK17-NEXT: [[TMP13:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2688 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP13]])
2689 // CHECK17-NEXT: ret void
2692 // CHECK17-LABEL: define {{[^@]+}}@_ZN2St7St_funcEPS_iPe
2693 // CHECK17-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]], ptr [[S:%.*]], i32 [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0]] align 2 {
2694 // CHECK17-NEXT: entry:
2695 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2696 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2697 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2698 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2699 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2700 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2701 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2702 // CHECK17-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2703 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2704 // CHECK17-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2705 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2706 // CHECK17-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2707 // CHECK17-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
2708 // CHECK17-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64
2709 // CHECK17-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
2710 // CHECK17-NEXT: [[TMP3:%.*]] = zext i32 [[TMP2]] to i64
2711 // CHECK17-NEXT: [[TMP4:%.*]] = load i32, ptr [[N_ADDR]], align 4
2712 // CHECK17-NEXT: [[TMP5:%.*]] = zext i32 [[TMP4]] to i64
2713 // CHECK17-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
2714 // CHECK17-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 8
2715 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
2716 // CHECK17-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP7]], align 128
2717 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR0]], align 8
2718 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[__VLA_EXPR1]], align 8
2719 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 1
2720 // CHECK17-NEXT: [[TMP8:%.*]] = load i32, ptr [[B]], align 4
2721 // CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 0
2722 // CHECK17-NEXT: store i32 [[TMP8]], ptr [[A]], align 4
2723 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2724 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2725 // CHECK17-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 8, ptr @_ZN2St7St_funcEPS_iPe.omp_outlined, i64 [[TMP1]], ptr [[TMP9]], ptr [[THIS1]], i64 [[TMP3]], i64 [[TMP5]], ptr [[VLA]], ptr [[N_ADDR]], ptr [[TMP10]])
2726 // CHECK17-NEXT: [[TMP11:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2727 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP11]])
2728 // CHECK17-NEXT: ret void
2731 // CHECK17-LABEL: define {{[^@]+}}@_ZN2St7St_funcEPS_iPe.omp_outlined
2732 // CHECK17-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[THIS:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], ptr [[S:%.*]]) #[[ATTR2]] {
2733 // CHECK17-NEXT: entry:
2734 // CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2735 // CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2736 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2737 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2738 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2739 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
2740 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
2741 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
2742 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2743 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2744 // CHECK17-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2745 // CHECK17-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2746 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2747 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2748 // CHECK17-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2749 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
2750 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
2751 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
2752 // CHECK17-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2753 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2754 // CHECK17-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2755 // CHECK17-NEXT: [[TMP1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2756 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
2757 // CHECK17-NEXT: [[TMP3:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2758 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2759 // CHECK17-NEXT: [[TMP5:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2760 // CHECK17-NEXT: [[TMP6:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2761 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP6]], 8
2762 // CHECK17-NEXT: [[TMP8:%.*]] = add nuw i64 [[TMP7]], 127
2763 // CHECK17-NEXT: [[TMP9:%.*]] = udiv i64 [[TMP8]], 128
2764 // CHECK17-NEXT: [[TMP10:%.*]] = mul nuw i64 [[TMP9]], 128
2765 // CHECK17-NEXT: [[TMP11:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2766 // CHECK17-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP11]], align 4
2767 // CHECK17-NEXT: [[DOTVLA2__VOID_ADDR:%.*]] = call ptr @__kmpc_alloc(i32 [[TMP12]], i64 [[TMP10]], ptr inttoptr (i64 8 to ptr))
2768 // CHECK17-NEXT: [[TMP13:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2769 // CHECK17-NEXT: [[TMP14:%.*]] = mul nuw i64 [[TMP13]], 8
2770 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[DOTVLA2__VOID_ADDR]], ptr align 128 [[TMP4]], i64 [[TMP14]], i1 false)
2771 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP1]], i32 0, i32 1
2772 // CHECK17-NEXT: [[TMP15:%.*]] = load i32, ptr [[B]], align 4
2773 // CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 0
2774 // CHECK17-NEXT: store i32 [[TMP15]], ptr [[A]], align 4
2775 // CHECK17-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP15]] to double
2776 // CHECK17-NEXT: [[TMP16:%.*]] = mul nsw i64 1, [[TMP3]]
2777 // CHECK17-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[DOTVLA2__VOID_ADDR]], i64 [[TMP16]]
2778 // CHECK17-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP5]], align 4
2779 // CHECK17-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP17]], 1
2780 // CHECK17-NEXT: [[IDXPROM:%.*]] = sext i32 [[SUB]] to i64
2781 // CHECK17-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds double, ptr [[ARRAYIDX]], i64 [[IDXPROM]]
2782 // CHECK17-NEXT: store double [[CONV]], ptr [[ARRAYIDX7]], align 8
2783 // CHECK17-NEXT: [[CONV8:%.*]] = fpext double [[CONV]] to x86_fp80
2784 // CHECK17-NEXT: [[TMP18:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2785 // CHECK17-NEXT: [[B9:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 1
2786 // CHECK17-NEXT: [[TMP19:%.*]] = load i32, ptr [[B9]], align 4
2787 // CHECK17-NEXT: [[IDXPROM10:%.*]] = sext i32 [[TMP19]] to i64
2788 // CHECK17-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds x86_fp80, ptr [[TMP18]], i64 [[IDXPROM10]]
2789 // CHECK17-NEXT: store x86_fp80 [[CONV8]], ptr [[ARRAYIDX11]], align 16
2790 // CHECK17-NEXT: call void @__kmpc_free(i32 [[TMP12]], ptr [[DOTVLA2__VOID_ADDR]], ptr inttoptr (i64 8 to ptr))
2791 // CHECK17-NEXT: ret void