Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / single_codegen.cpp
blob0bc2ba2bcc6202302a287de79f914f20b713fd07
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _
2 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefix=CHECK2
5 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
6 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
8 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
9 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK4
11 // RUN: %clang_cc1 -verify -Wno-vla -triple x86_64-apple-darwin10 -std=c++11 -fopenmp -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK5
12 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp -fnoopenmp-use-tls -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK6
14 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
15 // RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
16 // RUN: %clang_cc1 -fopenmp-simd -fnoopenmp-use-tls -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
17 // RUN: %clang_cc1 -verify -Wno-vla -triple x86_64-apple-darwin10 -std=c++11 -fopenmp-simd -fnoopenmp-use-tls -fexceptions -fcxx-exceptions -debug-info-kind=line-tables-only -x c++ -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
18 // RUN: %clang_cc1 -verify -Wno-vla -fopenmp-simd -fnoopenmp-use-tls -x c++ -std=c++11 -DARRAY -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
19 // expected-no-diagnostics
20 #ifndef ARRAY
21 #ifndef HEADER
22 #define HEADER
24 class TestClass {
25 public:
26 int a;
27 TestClass() : a(0) {}
28 TestClass(const TestClass &C) : a(C.a) {}
29 TestClass &operator=(const TestClass &) { return *this;}
30 ~TestClass(){};
35 TestClass tc;
36 TestClass tc2[2];
37 #pragma omp threadprivate(tc, tc2)
39 void foo() { extern void mayThrow(); mayThrow(); }
41 struct SS {
42 int a;
43 int b : 4;
44 int &c;
45 SS(int &d) : a(0), b(0), c(d) {
46 #pragma omp parallel firstprivate(a, b, c)
47 #pragma omp single copyprivate(a, this->b, (this)->c)
48 [&]() {
49 ++this->a, --b, (this)->c /= 1;
50 #pragma omp parallel firstprivate(a, b, c)
51 #pragma omp single copyprivate(a, this->b, (this)->c)
52 ++(this)->a, --b, this->c /= 1;
53 }();
57 template<typename T>
58 struct SST {
59 T a;
60 SST() : a(T()) {
61 #pragma omp parallel firstprivate(a)
62 #pragma omp single copyprivate(this->a)
63 [&]() {
64 [&]() {
65 ++this->a;
66 #pragma omp parallel firstprivate(a)
67 #pragma omp single copyprivate((this)->a)
68 ++(this)->a;
69 }();
70 }();
74 int main() {
75 char a;
76 char a2[2];
77 TestClass &c = tc;
78 SST<double> sst;
79 SS ss(c.a);
81 #pragma omp single nowait
82 a = 2;
83 #pragma omp single
84 a = 2;
85 #pragma omp single copyprivate(a, c, tc, a2, tc2)
86 foo();
87 return a;
91 void parallel_single() {
92 #pragma omp parallel
93 #pragma omp single
94 foo();
96 #endif
97 #else
98 struct St {
99 int a, b;
100 St() : a(0), b(0) {}
101 St &operator=(const St &) { return *this; };
102 ~St() {}
105 void array_func(int n, int a[n], St s[2]) {
106 #pragma omp single copyprivate(a, s)
109 #endif
110 // CHECK1-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_.
111 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
112 // CHECK1-NEXT: entry:
113 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
114 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
115 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
116 // CHECK1-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]])
117 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
118 // CHECK1-NEXT: ret ptr [[TMP2]]
121 // CHECK1-LABEL: define {{[^@]+}}@_ZN9TestClassC1Ev
122 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
123 // CHECK1-NEXT: entry:
124 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
125 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
126 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
127 // CHECK1-NEXT: call void @_ZN9TestClassC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
128 // CHECK1-NEXT: ret void
131 // CHECK1-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_.
132 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
133 // CHECK1-NEXT: entry:
134 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
135 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
136 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
137 // CHECK1-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]]) #[[ATTR3:[0-9]+]]
138 // CHECK1-NEXT: ret void
141 // CHECK1-LABEL: define {{[^@]+}}@_ZN9TestClassD1Ev
142 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2:[0-9]+]] comdat align 2 {
143 // CHECK1-NEXT: entry:
144 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
145 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
146 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
147 // CHECK1-NEXT: call void @_ZN9TestClassD2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]]
148 // CHECK1-NEXT: ret void
151 // CHECK1-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_.
152 // CHECK1-SAME: () #[[ATTR0]] {
153 // CHECK1-NEXT: entry:
154 // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
155 // CHECK1-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc, ptr @.__kmpc_global_ctor_., ptr null, ptr @.__kmpc_global_dtor_.)
156 // CHECK1-NEXT: ret void
159 // CHECK1-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_..1
160 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] personality ptr @__gxx_personality_v0 {
161 // CHECK1-NEXT: entry:
162 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
163 // CHECK1-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
164 // CHECK1-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
165 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
166 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
167 // CHECK1-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %class.TestClass], ptr [[TMP1]], i32 0, i32 0
168 // CHECK1-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAY_BEGIN]], i64 2
169 // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
170 // CHECK1: arrayctor.loop:
171 // CHECK1-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
172 // CHECK1-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
173 // CHECK1-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
174 // CHECK1: invoke.cont:
175 // CHECK1-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYCTOR_CUR]], i64 1
176 // CHECK1-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
177 // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
178 // CHECK1: arrayctor.cont:
179 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
180 // CHECK1-NEXT: ret ptr [[TMP2]]
181 // CHECK1: lpad:
182 // CHECK1-NEXT: [[TMP3:%.*]] = landingpad { ptr, i32 }
183 // CHECK1-NEXT: cleanup
184 // CHECK1-NEXT: [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 0
185 // CHECK1-NEXT: store ptr [[TMP4]], ptr [[EXN_SLOT]], align 8
186 // CHECK1-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 1
187 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[EHSELECTOR_SLOT]], align 4
188 // CHECK1-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[ARRAYCTOR_CUR]]
189 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
190 // CHECK1: arraydestroy.body:
191 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
192 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
193 // CHECK1-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
194 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
195 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
196 // CHECK1: arraydestroy.done1:
197 // CHECK1-NEXT: br label [[EH_RESUME:%.*]]
198 // CHECK1: eh.resume:
199 // CHECK1-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
200 // CHECK1-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
201 // CHECK1-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
202 // CHECK1-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
203 // CHECK1-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
206 // CHECK1-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_..2
207 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
208 // CHECK1-NEXT: entry:
209 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
210 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
211 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
212 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP1]], i64 2
213 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
214 // CHECK1: arraydestroy.body:
215 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
216 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
217 // CHECK1-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
218 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[TMP1]]
219 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
220 // CHECK1: arraydestroy.done1:
221 // CHECK1-NEXT: ret void
224 // CHECK1-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_..3
225 // CHECK1-SAME: () #[[ATTR0]] {
226 // CHECK1-NEXT: entry:
227 // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
228 // CHECK1-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc2, ptr @.__kmpc_global_ctor_..1, ptr null, ptr @.__kmpc_global_dtor_..2)
229 // CHECK1-NEXT: ret void
232 // CHECK1-LABEL: define {{[^@]+}}@__cxx_global_var_init
233 // CHECK1-SAME: () #[[ATTR0]] {
234 // CHECK1-NEXT: entry:
235 // CHECK1-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) @tc)
236 // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @_ZN9TestClassD1Ev, ptr @tc, ptr @__dso_handle) #[[ATTR3]]
237 // CHECK1-NEXT: ret void
240 // CHECK1-LABEL: define {{[^@]+}}@__cxx_global_var_init.4
241 // CHECK1-SAME: () #[[ATTR0]] personality ptr @__gxx_personality_v0 {
242 // CHECK1-NEXT: entry:
243 // CHECK1-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
244 // CHECK1-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
245 // CHECK1-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
246 // CHECK1: arrayctor.loop:
247 // CHECK1-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ @tc2, [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
248 // CHECK1-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
249 // CHECK1-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
250 // CHECK1: invoke.cont:
251 // CHECK1-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAYCTOR_CUR]], i64 1
252 // CHECK1-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], getelementptr inbounds ([[CLASS_TESTCLASS]], ptr @tc2, i64 2)
253 // CHECK1-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
254 // CHECK1: arrayctor.cont:
255 // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle) #[[ATTR3]]
256 // CHECK1-NEXT: ret void
257 // CHECK1: lpad:
258 // CHECK1-NEXT: [[TMP1:%.*]] = landingpad { ptr, i32 }
259 // CHECK1-NEXT: cleanup
260 // CHECK1-NEXT: [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
261 // CHECK1-NEXT: store ptr [[TMP2]], ptr [[EXN_SLOT]], align 8
262 // CHECK1-NEXT: [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
263 // CHECK1-NEXT: store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
264 // CHECK1-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr @tc2, [[ARRAYCTOR_CUR]]
265 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
266 // CHECK1: arraydestroy.body:
267 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
268 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
269 // CHECK1-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
270 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
271 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
272 // CHECK1: arraydestroy.done1:
273 // CHECK1-NEXT: br label [[EH_RESUME:%.*]]
274 // CHECK1: eh.resume:
275 // CHECK1-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
276 // CHECK1-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
277 // CHECK1-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
278 // CHECK1-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
279 // CHECK1-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
282 // CHECK1-LABEL: define {{[^@]+}}@__cxx_global_array_dtor
283 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
284 // CHECK1-NEXT: entry:
285 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
286 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
287 // CHECK1-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
288 // CHECK1: arraydestroy.body:
289 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ getelementptr inbounds ([[CLASS_TESTCLASS:%.*]], ptr @tc2, i64 2), [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
290 // CHECK1-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
291 // CHECK1-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
292 // CHECK1-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
293 // CHECK1-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
294 // CHECK1: arraydestroy.done1:
295 // CHECK1-NEXT: ret void
298 // CHECK1-LABEL: define {{[^@]+}}@_ZN9TestClassC2Ev
299 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
300 // CHECK1-NEXT: entry:
301 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
302 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
303 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
304 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[THIS1]], i32 0, i32 0
305 // CHECK1-NEXT: store i32 0, ptr [[A]], align 4
306 // CHECK1-NEXT: ret void
309 // CHECK1-LABEL: define {{[^@]+}}@_ZN9TestClassD2Ev
310 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
311 // CHECK1-NEXT: entry:
312 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
313 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
314 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
315 // CHECK1-NEXT: ret void
318 // CHECK1-LABEL: define {{[^@]+}}@_Z3foov
319 // CHECK1-SAME: () #[[ATTR4:[0-9]+]] {
320 // CHECK1-NEXT: entry:
321 // CHECK1-NEXT: call void @_Z8mayThrowv()
322 // CHECK1-NEXT: ret void
325 // CHECK1-LABEL: define {{[^@]+}}@main
326 // CHECK1-SAME: () #[[ATTR6:[0-9]+]] personality ptr @__gxx_personality_v0 {
327 // CHECK1-NEXT: entry:
328 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
329 // CHECK1-NEXT: [[A:%.*]] = alloca i8, align 1
330 // CHECK1-NEXT: [[A2:%.*]] = alloca [2 x i8], align 1
331 // CHECK1-NEXT: [[C:%.*]] = alloca ptr, align 8
332 // CHECK1-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 8
333 // CHECK1-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
334 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
335 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [5 x ptr], align 8
336 // CHECK1-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
337 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
338 // CHECK1-NEXT: store ptr @tc, ptr [[C]], align 8
339 // CHECK1-NEXT: call void @_ZN3SSTIdEC1Ev(ptr noundef nonnull align 8 dereferenceable(8) [[SST]])
340 // CHECK1-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @tc)
341 // CHECK1-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
342 // CHECK1-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
343 // CHECK1-NEXT: br i1 [[TMP2]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
344 // CHECK1: omp_if.then:
345 // CHECK1-NEXT: store i8 2, ptr [[A]], align 1
346 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
347 // CHECK1-NEXT: br label [[OMP_IF_END]]
348 // CHECK1: omp_if.end:
349 // CHECK1-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
350 // CHECK1-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
351 // CHECK1-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN1:%.*]], label [[OMP_IF_END2:%.*]]
352 // CHECK1: omp_if.then1:
353 // CHECK1-NEXT: store i8 2, ptr [[A]], align 1
354 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
355 // CHECK1-NEXT: br label [[OMP_IF_END2]]
356 // CHECK1: omp_if.end2:
357 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2:[0-9]+]], i32 [[TMP0]])
358 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
359 // CHECK1-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
360 // CHECK1-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
361 // CHECK1-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN3:%.*]], label [[OMP_IF_END4:%.*]]
362 // CHECK1: omp_if.then3:
363 // CHECK1-NEXT: invoke void @_Z3foov()
364 // CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
365 // CHECK1: invoke.cont:
366 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
367 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
368 // CHECK1-NEXT: br label [[OMP_IF_END4]]
369 // CHECK1: omp_if.end4:
370 // CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
371 // CHECK1-NEXT: store ptr [[A]], ptr [[TMP7]], align 8
372 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
373 // CHECK1-NEXT: store ptr @tc, ptr [[TMP8]], align 8
374 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
375 // CHECK1-NEXT: [[TMP10:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc, i64 4, ptr @tc.cache.)
376 // CHECK1-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
377 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 3
378 // CHECK1-NEXT: store ptr [[A2]], ptr [[TMP11]], align 8
379 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 4
380 // CHECK1-NEXT: [[TMP13:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc2, i64 8, ptr @tc2.cache.)
381 // CHECK1-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
382 // CHECK1-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
383 // CHECK1-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP0]], i64 40, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func, i32 [[TMP14]])
384 // CHECK1-NEXT: [[TMP15:%.*]] = load i8, ptr [[A]], align 1
385 // CHECK1-NEXT: [[CONV:%.*]] = sext i8 [[TMP15]] to i32
386 // CHECK1-NEXT: ret i32 [[CONV]]
387 // CHECK1: terminate.lpad:
388 // CHECK1-NEXT: [[TMP16:%.*]] = landingpad { ptr, i32 }
389 // CHECK1-NEXT: catch ptr null
390 // CHECK1-NEXT: [[TMP17:%.*]] = extractvalue { ptr, i32 } [[TMP16]], 0
391 // CHECK1-NEXT: call void @__clang_call_terminate(ptr [[TMP17]]) #[[ATTR13:[0-9]+]]
392 // CHECK1-NEXT: unreachable
395 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIdEC1Ev
396 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
397 // CHECK1-NEXT: entry:
398 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
399 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
400 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
401 // CHECK1-NEXT: call void @_ZN3SSTIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) [[THIS1]])
402 // CHECK1-NEXT: ret void
405 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
406 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
407 // CHECK1-NEXT: entry:
408 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
409 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
410 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
411 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
412 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
413 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
414 // CHECK1-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
415 // CHECK1-NEXT: ret void
418 // CHECK1-LABEL: define {{[^@]+}}@__clang_call_terminate
419 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] comdat {
420 // CHECK1-NEXT: [[TMP2:%.*]] = call ptr @__cxa_begin_catch(ptr [[TMP0]]) #[[ATTR3]]
421 // CHECK1-NEXT: call void @_ZSt9terminatev() #[[ATTR13]]
422 // CHECK1-NEXT: unreachable
425 // CHECK1-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func
426 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] {
427 // CHECK1-NEXT: entry:
428 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
429 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
430 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
431 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
432 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
433 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
434 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 0
435 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
436 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 0
437 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
438 // CHECK1-NEXT: [[TMP8:%.*]] = load i8, ptr [[TMP7]], align 1
439 // CHECK1-NEXT: store i8 [[TMP8]], ptr [[TMP5]], align 1
440 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 1
441 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
442 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 1
443 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
444 // CHECK1-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP10]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP12]])
445 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 2
446 // CHECK1-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
447 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 2
448 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
449 // CHECK1-NEXT: [[CALL2:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP14]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP16]])
450 // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 3
451 // CHECK1-NEXT: [[TMP18:%.*]] = load ptr, ptr [[TMP17]], align 8
452 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 3
453 // CHECK1-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
454 // CHECK1-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[TMP18]], ptr align 1 [[TMP20]], i64 2, i1 false)
455 // CHECK1-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 4
456 // CHECK1-NEXT: [[TMP22:%.*]] = load ptr, ptr [[TMP21]], align 8
457 // CHECK1-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 4
458 // CHECK1-NEXT: [[TMP24:%.*]] = load ptr, ptr [[TMP23]], align 8
459 // CHECK1-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP22]], i64 2
460 // CHECK1-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP22]], [[TMP25]]
461 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
462 // CHECK1: omp.arraycpy.body:
463 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
464 // CHECK1-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP22]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
465 // CHECK1-NEXT: [[CALL3:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]])
466 // CHECK1-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
467 // CHECK1-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
468 // CHECK1-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
469 // CHECK1-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]]
470 // CHECK1: omp.arraycpy.done4:
471 // CHECK1-NEXT: ret void
474 // CHECK1-LABEL: define {{[^@]+}}@_ZN9TestClassaSERKS_
475 // CHECK1-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] comdat align 2 {
476 // CHECK1-NEXT: entry:
477 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
478 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
479 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
480 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
481 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
482 // CHECK1-NEXT: ret ptr [[THIS1]]
485 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev
486 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
487 // CHECK1-NEXT: entry:
488 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
489 // CHECK1-NEXT: [[A2:%.*]] = alloca ptr, align 8
490 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
491 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
492 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
493 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
494 // CHECK1-NEXT: store double 0.000000e+00, ptr [[A]], align 8
495 // CHECK1-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0
496 // CHECK1-NEXT: store ptr [[A3]], ptr [[A2]], align 8
497 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 8
498 // CHECK1-NEXT: [[TMP1:%.*]] = load double, ptr [[TMP0]], align 8
499 // CHECK1-NEXT: store double [[TMP1]], ptr [[A_CASTED]], align 8
500 // CHECK1-NEXT: [[TMP2:%.*]] = load i64, ptr [[A_CASTED]], align 8
501 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZN3SSTIdEC2Ev.omp_outlined, ptr [[THIS1]], i64 [[TMP2]])
502 // CHECK1-NEXT: ret void
505 // CHECK1-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev.omp_outlined
506 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12:[0-9]+]] personality ptr @__gxx_personality_v0 {
507 // CHECK1-NEXT: entry:
508 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
509 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
510 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
511 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
512 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
513 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
514 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
515 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
516 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
517 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
518 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
519 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
520 // CHECK1-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
521 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
522 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
523 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
524 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
525 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
526 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
527 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
528 // CHECK1-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
529 // CHECK1-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
530 // CHECK1-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
531 // CHECK1: omp_if.then:
532 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
533 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[TMP6]], align 8
534 // CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1
535 // CHECK1-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 8
536 // CHECK1-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 8
537 // CHECK1-NEXT: invoke void @_ZZN3SSTIdEC1EvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
538 // CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
539 // CHECK1: invoke.cont:
540 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
541 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
542 // CHECK1-NEXT: br label [[OMP_IF_END]]
543 // CHECK1: omp_if.end:
544 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
545 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP1]], align 8
546 // CHECK1-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
547 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
548 // CHECK1-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.5, i32 [[TMP11]])
549 // CHECK1-NEXT: ret void
550 // CHECK1: terminate.lpad:
551 // CHECK1-NEXT: [[TMP12:%.*]] = landingpad { ptr, i32 }
552 // CHECK1-NEXT: catch ptr null
553 // CHECK1-NEXT: [[TMP13:%.*]] = extractvalue { ptr, i32 } [[TMP12]], 0
554 // CHECK1-NEXT: call void @__clang_call_terminate(ptr [[TMP13]]) #[[ATTR13]]
555 // CHECK1-NEXT: unreachable
558 // CHECK1-LABEL: define {{[^@]+}}@_ZZN3SSTIdEC1EvENKUlvE_clEv
559 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR4]] align 2 {
560 // CHECK1-NEXT: entry:
561 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
562 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
563 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
564 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
565 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON:%.*]], ptr [[THIS1]], i32 0, i32 0
566 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
567 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
568 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[TMP2]], align 8
569 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
570 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1
571 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
572 // CHECK1-NEXT: store ptr [[TMP5]], ptr [[TMP3]], align 8
573 // CHECK1-NEXT: call void @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
574 // CHECK1-NEXT: ret void
577 // CHECK1-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.5
578 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
579 // CHECK1-NEXT: entry:
580 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
581 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
582 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
583 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
584 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
585 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
586 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
587 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
588 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
589 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
590 // CHECK1-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
591 // CHECK1-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
592 // CHECK1-NEXT: ret void
595 // CHECK1-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv
596 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR10]] align 2 {
597 // CHECK1-NEXT: entry:
598 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
599 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
600 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
601 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
602 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
603 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
604 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
605 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
606 // CHECK1-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
607 // CHECK1-NEXT: [[INC:%.*]] = fadd double [[TMP4]], 1.000000e+00
608 // CHECK1-NEXT: store double [[INC]], ptr [[TMP3]], align 8
609 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
610 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
611 // CHECK1-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
612 // CHECK1-NEXT: store double [[TMP7]], ptr [[A_CASTED]], align 8
613 // CHECK1-NEXT: [[TMP8:%.*]] = load i64, ptr [[A_CASTED]], align 8
614 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP8]])
615 // CHECK1-NEXT: ret void
618 // CHECK1-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined
619 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] {
620 // CHECK1-NEXT: entry:
621 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
622 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
623 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
624 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
625 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
626 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
627 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
628 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
629 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
630 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
631 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
632 // CHECK1-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
633 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
634 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
635 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
636 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
637 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
638 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
639 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
640 // CHECK1-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
641 // CHECK1-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
642 // CHECK1-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
643 // CHECK1: omp_if.then:
644 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8
645 // CHECK1-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
646 // CHECK1-NEXT: [[INC:%.*]] = fadd double [[TMP7]], 1.000000e+00
647 // CHECK1-NEXT: store double [[INC]], ptr [[TMP6]], align 8
648 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
649 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
650 // CHECK1-NEXT: br label [[OMP_IF_END]]
651 // CHECK1: omp_if.end:
652 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
653 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP1]], align 8
654 // CHECK1-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
655 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
656 // CHECK1-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.6, i32 [[TMP10]])
657 // CHECK1-NEXT: ret void
660 // CHECK1-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.6
661 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
662 // CHECK1-NEXT: entry:
663 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
664 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
665 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
666 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
667 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
668 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
669 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
670 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
671 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
672 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
673 // CHECK1-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
674 // CHECK1-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
675 // CHECK1-NEXT: ret void
678 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
679 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
680 // CHECK1-NEXT: entry:
681 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
682 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
683 // CHECK1-NEXT: [[A2:%.*]] = alloca ptr, align 8
684 // CHECK1-NEXT: [[B4:%.*]] = alloca i32, align 4
685 // CHECK1-NEXT: [[C7:%.*]] = alloca ptr, align 8
686 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
687 // CHECK1-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
688 // CHECK1-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
689 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
690 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
691 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
692 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
693 // CHECK1-NEXT: store i32 0, ptr [[A]], align 8
694 // CHECK1-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
695 // CHECK1-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
696 // CHECK1-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
697 // CHECK1-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
698 // CHECK1-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
699 // CHECK1-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
700 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
701 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
702 // CHECK1-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
703 // CHECK1-NEXT: store ptr [[A3]], ptr [[A2]], align 8
704 // CHECK1-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
705 // CHECK1-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
706 // CHECK1-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
707 // CHECK1-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
708 // CHECK1-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
709 // CHECK1-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
710 // CHECK1-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
711 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
712 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
713 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
714 // CHECK1-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
715 // CHECK1-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
716 // CHECK1-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
717 // CHECK1-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
718 // CHECK1-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
719 // CHECK1-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
720 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
721 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
722 // CHECK1-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
723 // CHECK1-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
724 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]])
725 // CHECK1-NEXT: ret void
728 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
729 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
730 // CHECK1-NEXT: entry:
731 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
732 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
733 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
734 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
735 // CHECK1-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
736 // CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
737 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
738 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
739 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
740 // CHECK1-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
741 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
742 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 8
743 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
744 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
745 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
746 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
747 // CHECK1-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
748 // CHECK1-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
749 // CHECK1-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
750 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
751 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
752 // CHECK1-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
753 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
754 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
755 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
756 // CHECK1-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
757 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
758 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
759 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
760 // CHECK1-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
761 // CHECK1-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
762 // CHECK1-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
763 // CHECK1: omp_if.then:
764 // CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0
765 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[TMP7]], align 8
766 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1
767 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP2]], align 8
768 // CHECK1-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
769 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 2
770 // CHECK1-NEXT: store ptr [[B_ADDR]], ptr [[TMP10]], align 8
771 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 3
772 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[_TMP3]], align 8
773 // CHECK1-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 8
774 // CHECK1-NEXT: invoke void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
775 // CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
776 // CHECK1: invoke.cont:
777 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
778 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
779 // CHECK1-NEXT: br label [[OMP_IF_END]]
780 // CHECK1: omp_if.end:
781 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
782 // CHECK1-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP2]], align 8
783 // CHECK1-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8
784 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
785 // CHECK1-NEXT: store ptr [[B_ADDR]], ptr [[TMP15]], align 8
786 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
787 // CHECK1-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP3]], align 8
788 // CHECK1-NEXT: store ptr [[TMP17]], ptr [[TMP16]], align 8
789 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
790 // CHECK1-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.7, i32 [[TMP18]])
791 // CHECK1-NEXT: ret void
792 // CHECK1: terminate.lpad:
793 // CHECK1-NEXT: [[TMP19:%.*]] = landingpad { ptr, i32 }
794 // CHECK1-NEXT: catch ptr null
795 // CHECK1-NEXT: [[TMP20:%.*]] = extractvalue { ptr, i32 } [[TMP19]], 0
796 // CHECK1-NEXT: call void @__clang_call_terminate(ptr [[TMP20]]) #[[ATTR13]]
797 // CHECK1-NEXT: unreachable
800 // CHECK1-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
801 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR10]] align 2 {
802 // CHECK1-NEXT: entry:
803 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
804 // CHECK1-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
805 // CHECK1-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
806 // CHECK1-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
807 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
808 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
809 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1:%.*]], ptr [[THIS1]], i32 0, i32 0
810 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
811 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
812 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
813 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
814 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
815 // CHECK1-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
816 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 2
817 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
818 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
819 // CHECK1-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
820 // CHECK1-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
821 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 3
822 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
823 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
824 // CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
825 // CHECK1-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
826 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
827 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
828 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
829 // CHECK1-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4
830 // CHECK1-NEXT: [[TMP14:%.*]] = load i64, ptr [[A_CASTED]], align 8
831 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 2
832 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
833 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
834 // CHECK1-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4
835 // CHECK1-NEXT: [[TMP18:%.*]] = load i64, ptr [[B_CASTED]], align 8
836 // CHECK1-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 3
837 // CHECK1-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
838 // CHECK1-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
839 // CHECK1-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4
840 // CHECK1-NEXT: [[TMP22:%.*]] = load i64, ptr [[C_CASTED]], align 8
841 // CHECK1-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]])
842 // CHECK1-NEXT: ret void
845 // CHECK1-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.7
846 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
847 // CHECK1-NEXT: entry:
848 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
849 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
850 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
851 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
852 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
853 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
854 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
855 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
856 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
857 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
858 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
859 // CHECK1-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
860 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
861 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
862 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
863 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
864 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
865 // CHECK1-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
866 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
867 // CHECK1-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
868 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
869 // CHECK1-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
870 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
871 // CHECK1-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
872 // CHECK1-NEXT: ret void
875 // CHECK1-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
876 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] {
877 // CHECK1-NEXT: entry:
878 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
879 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
880 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
881 // CHECK1-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
882 // CHECK1-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
883 // CHECK1-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
884 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
885 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
886 // CHECK1-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
887 // CHECK1-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
888 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
889 // CHECK1-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
890 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
891 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
892 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
893 // CHECK1-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
894 // CHECK1-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
895 // CHECK1-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
896 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
897 // CHECK1-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
898 // CHECK1-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
899 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
900 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
901 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
902 // CHECK1-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
903 // CHECK1-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
904 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
905 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
906 // CHECK1-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
907 // CHECK1-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
908 // CHECK1-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
909 // CHECK1: omp_if.then:
910 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP2]], align 8
911 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
912 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1
913 // CHECK1-NEXT: store i32 [[INC]], ptr [[TMP7]], align 4
914 // CHECK1-NEXT: [[TMP9:%.*]] = load i32, ptr [[B_ADDR]], align 4
915 // CHECK1-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP9]], -1
916 // CHECK1-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
917 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP3]], align 8
918 // CHECK1-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
919 // CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP11]], 1
920 // CHECK1-NEXT: store i32 [[DIV]], ptr [[TMP10]], align 4
921 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
922 // CHECK1-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
923 // CHECK1-NEXT: br label [[OMP_IF_END]]
924 // CHECK1: omp_if.end:
925 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
926 // CHECK1-NEXT: [[TMP13:%.*]] = load ptr, ptr [[_TMP2]], align 8
927 // CHECK1-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
928 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
929 // CHECK1-NEXT: store ptr [[B_ADDR]], ptr [[TMP14]], align 8
930 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
931 // CHECK1-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP3]], align 8
932 // CHECK1-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 8
933 // CHECK1-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
934 // CHECK1-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.8, i32 [[TMP17]])
935 // CHECK1-NEXT: ret void
938 // CHECK1-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.8
939 // CHECK1-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
940 // CHECK1-NEXT: entry:
941 // CHECK1-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
942 // CHECK1-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
943 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
944 // CHECK1-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
945 // CHECK1-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
946 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
947 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
948 // CHECK1-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
949 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
950 // CHECK1-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
951 // CHECK1-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
952 // CHECK1-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
953 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
954 // CHECK1-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
955 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
956 // CHECK1-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
957 // CHECK1-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
958 // CHECK1-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
959 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
960 // CHECK1-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
961 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
962 // CHECK1-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
963 // CHECK1-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
964 // CHECK1-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
965 // CHECK1-NEXT: ret void
968 // CHECK1-LABEL: define {{[^@]+}}@_Z15parallel_singlev
969 // CHECK1-SAME: () #[[ATTR10]] {
970 // CHECK1-NEXT: entry:
971 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 0, ptr @_Z15parallel_singlev.omp_outlined)
972 // CHECK1-NEXT: ret void
975 // CHECK1-LABEL: define {{[^@]+}}@_Z15parallel_singlev.omp_outlined
976 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
977 // CHECK1-NEXT: entry:
978 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
979 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
980 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
981 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
982 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
983 // CHECK1-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
984 // CHECK1-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP1]])
985 // CHECK1-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
986 // CHECK1-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
987 // CHECK1: omp_if.then:
988 // CHECK1-NEXT: invoke void @_Z3foov()
989 // CHECK1-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
990 // CHECK1: invoke.cont:
991 // CHECK1-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP1]])
992 // CHECK1-NEXT: br label [[OMP_IF_END]]
993 // CHECK1: omp_if.end:
994 // CHECK1-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2]], i32 [[TMP1]])
995 // CHECK1-NEXT: ret void
996 // CHECK1: terminate.lpad:
997 // CHECK1-NEXT: [[TMP4:%.*]] = landingpad { ptr, i32 }
998 // CHECK1-NEXT: catch ptr null
999 // CHECK1-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
1000 // CHECK1-NEXT: call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR13]]
1001 // CHECK1-NEXT: unreachable
1004 // CHECK1-LABEL: define {{[^@]+}}@_GLOBAL__sub_I_single_codegen.cpp
1005 // CHECK1-SAME: () #[[ATTR0]] {
1006 // CHECK1-NEXT: entry:
1007 // CHECK1-NEXT: call void @__cxx_global_var_init()
1008 // CHECK1-NEXT: call void @__cxx_global_var_init.4()
1009 // CHECK1-NEXT: call void @.__omp_threadprivate_init_.()
1010 // CHECK1-NEXT: call void @.__omp_threadprivate_init_..3()
1011 // CHECK1-NEXT: ret void
1014 // CHECK2-LABEL: define {{[^@]+}}@__cxx_global_var_init
1015 // CHECK2-SAME: () #[[ATTR0:[0-9]+]] {
1016 // CHECK2-NEXT: entry:
1017 // CHECK2-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) @tc)
1018 // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @_ZN9TestClassD1Ev, ptr @tc, ptr @__dso_handle) #[[ATTR3:[0-9]+]]
1019 // CHECK2-NEXT: ret void
1022 // CHECK2-LABEL: define {{[^@]+}}@_ZN9TestClassC1Ev
1023 // CHECK2-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1024 // CHECK2-NEXT: entry:
1025 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1026 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1027 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1028 // CHECK2-NEXT: call void @_ZN9TestClassC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1029 // CHECK2-NEXT: ret void
1032 // CHECK2-LABEL: define {{[^@]+}}@_ZN9TestClassD1Ev
1033 // CHECK2-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2:[0-9]+]] comdat align 2 {
1034 // CHECK2-NEXT: entry:
1035 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1036 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1037 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1038 // CHECK2-NEXT: call void @_ZN9TestClassD2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]]
1039 // CHECK2-NEXT: ret void
1042 // CHECK2-LABEL: define {{[^@]+}}@__cxx_global_var_init.1
1043 // CHECK2-SAME: () #[[ATTR0]] personality ptr @__gxx_personality_v0 {
1044 // CHECK2-NEXT: entry:
1045 // CHECK2-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
1046 // CHECK2-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
1047 // CHECK2-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1048 // CHECK2: arrayctor.loop:
1049 // CHECK2-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ @tc2, [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
1050 // CHECK2-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1051 // CHECK2-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
1052 // CHECK2: invoke.cont:
1053 // CHECK2-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAYCTOR_CUR]], i64 1
1054 // CHECK2-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], getelementptr inbounds ([[CLASS_TESTCLASS]], ptr @tc2, i64 2)
1055 // CHECK2-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1056 // CHECK2: arrayctor.cont:
1057 // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle) #[[ATTR3]]
1058 // CHECK2-NEXT: ret void
1059 // CHECK2: lpad:
1060 // CHECK2-NEXT: [[TMP1:%.*]] = landingpad { ptr, i32 }
1061 // CHECK2-NEXT: cleanup
1062 // CHECK2-NEXT: [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
1063 // CHECK2-NEXT: store ptr [[TMP2]], ptr [[EXN_SLOT]], align 8
1064 // CHECK2-NEXT: [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
1065 // CHECK2-NEXT: store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
1066 // CHECK2-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr @tc2, [[ARRAYCTOR_CUR]]
1067 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
1068 // CHECK2: arraydestroy.body:
1069 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1070 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1071 // CHECK2-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
1072 // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
1073 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
1074 // CHECK2: arraydestroy.done1:
1075 // CHECK2-NEXT: br label [[EH_RESUME:%.*]]
1076 // CHECK2: eh.resume:
1077 // CHECK2-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
1078 // CHECK2-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
1079 // CHECK2-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
1080 // CHECK2-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
1081 // CHECK2-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
1084 // CHECK2-LABEL: define {{[^@]+}}@__cxx_global_array_dtor
1085 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1086 // CHECK2-NEXT: entry:
1087 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1088 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1089 // CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1090 // CHECK2: arraydestroy.body:
1091 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ getelementptr inbounds ([[CLASS_TESTCLASS:%.*]], ptr @tc2, i64 2), [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1092 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1093 // CHECK2-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
1094 // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
1095 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
1096 // CHECK2: arraydestroy.done1:
1097 // CHECK2-NEXT: ret void
1100 // CHECK2-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_.
1101 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1102 // CHECK2-NEXT: entry:
1103 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1104 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1105 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1106 // CHECK2-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]])
1107 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1108 // CHECK2-NEXT: ret ptr [[TMP2]]
1111 // CHECK2-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_.
1112 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1113 // CHECK2-NEXT: entry:
1114 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1115 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1116 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1117 // CHECK2-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]]) #[[ATTR3]]
1118 // CHECK2-NEXT: ret void
1121 // CHECK2-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_.
1122 // CHECK2-SAME: () #[[ATTR0]] {
1123 // CHECK2-NEXT: entry:
1124 // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
1125 // CHECK2-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc, ptr @.__kmpc_global_ctor_., ptr null, ptr @.__kmpc_global_dtor_.)
1126 // CHECK2-NEXT: ret void
1129 // CHECK2-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_..2
1130 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] personality ptr @__gxx_personality_v0 {
1131 // CHECK2-NEXT: entry:
1132 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1133 // CHECK2-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
1134 // CHECK2-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
1135 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1136 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1137 // CHECK2-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %class.TestClass], ptr [[TMP1]], i32 0, i32 0
1138 // CHECK2-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAY_BEGIN]], i64 2
1139 // CHECK2-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1140 // CHECK2: arrayctor.loop:
1141 // CHECK2-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
1142 // CHECK2-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1143 // CHECK2-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
1144 // CHECK2: invoke.cont:
1145 // CHECK2-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYCTOR_CUR]], i64 1
1146 // CHECK2-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1147 // CHECK2-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1148 // CHECK2: arrayctor.cont:
1149 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1150 // CHECK2-NEXT: ret ptr [[TMP2]]
1151 // CHECK2: lpad:
1152 // CHECK2-NEXT: [[TMP3:%.*]] = landingpad { ptr, i32 }
1153 // CHECK2-NEXT: cleanup
1154 // CHECK2-NEXT: [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 0
1155 // CHECK2-NEXT: store ptr [[TMP4]], ptr [[EXN_SLOT]], align 8
1156 // CHECK2-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 1
1157 // CHECK2-NEXT: store i32 [[TMP5]], ptr [[EHSELECTOR_SLOT]], align 4
1158 // CHECK2-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[ARRAYCTOR_CUR]]
1159 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
1160 // CHECK2: arraydestroy.body:
1161 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1162 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1163 // CHECK2-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
1164 // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1165 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
1166 // CHECK2: arraydestroy.done1:
1167 // CHECK2-NEXT: br label [[EH_RESUME:%.*]]
1168 // CHECK2: eh.resume:
1169 // CHECK2-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
1170 // CHECK2-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
1171 // CHECK2-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
1172 // CHECK2-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
1173 // CHECK2-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
1176 // CHECK2-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_..3
1177 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1178 // CHECK2-NEXT: entry:
1179 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1180 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1181 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1182 // CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP1]], i64 2
1183 // CHECK2-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1184 // CHECK2: arraydestroy.body:
1185 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1186 // CHECK2-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1187 // CHECK2-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
1188 // CHECK2-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[TMP1]]
1189 // CHECK2-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
1190 // CHECK2: arraydestroy.done1:
1191 // CHECK2-NEXT: ret void
1194 // CHECK2-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_..4
1195 // CHECK2-SAME: () #[[ATTR0]] {
1196 // CHECK2-NEXT: entry:
1197 // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1198 // CHECK2-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc2, ptr @.__kmpc_global_ctor_..2, ptr null, ptr @.__kmpc_global_dtor_..3)
1199 // CHECK2-NEXT: ret void
1202 // CHECK2-LABEL: define {{[^@]+}}@_Z3foov
1203 // CHECK2-SAME: () #[[ATTR4:[0-9]+]] {
1204 // CHECK2-NEXT: entry:
1205 // CHECK2-NEXT: call void @_Z8mayThrowv()
1206 // CHECK2-NEXT: ret void
1209 // CHECK2-LABEL: define {{[^@]+}}@main
1210 // CHECK2-SAME: () #[[ATTR6:[0-9]+]] personality ptr @__gxx_personality_v0 {
1211 // CHECK2-NEXT: entry:
1212 // CHECK2-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1213 // CHECK2-NEXT: [[A:%.*]] = alloca i8, align 1
1214 // CHECK2-NEXT: [[A2:%.*]] = alloca [2 x i8], align 1
1215 // CHECK2-NEXT: [[C:%.*]] = alloca ptr, align 8
1216 // CHECK2-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 8
1217 // CHECK2-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
1218 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
1219 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [5 x ptr], align 8
1220 // CHECK2-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1221 // CHECK2-NEXT: store i32 0, ptr [[RETVAL]], align 4
1222 // CHECK2-NEXT: store ptr @tc, ptr [[C]], align 8
1223 // CHECK2-NEXT: call void @_ZN3SSTIdEC1Ev(ptr noundef nonnull align 8 dereferenceable(8) [[SST]])
1224 // CHECK2-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @tc)
1225 // CHECK2-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
1226 // CHECK2-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
1227 // CHECK2-NEXT: br i1 [[TMP2]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1228 // CHECK2: omp_if.then:
1229 // CHECK2-NEXT: store i8 2, ptr [[A]], align 1
1230 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
1231 // CHECK2-NEXT: br label [[OMP_IF_END]]
1232 // CHECK2: omp_if.end:
1233 // CHECK2-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
1234 // CHECK2-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
1235 // CHECK2-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN1:%.*]], label [[OMP_IF_END2:%.*]]
1236 // CHECK2: omp_if.then1:
1237 // CHECK2-NEXT: store i8 2, ptr [[A]], align 1
1238 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
1239 // CHECK2-NEXT: br label [[OMP_IF_END2]]
1240 // CHECK2: omp_if.end2:
1241 // CHECK2-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2:[0-9]+]], i32 [[TMP0]])
1242 // CHECK2-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1243 // CHECK2-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
1244 // CHECK2-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
1245 // CHECK2-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN3:%.*]], label [[OMP_IF_END4:%.*]]
1246 // CHECK2: omp_if.then3:
1247 // CHECK2-NEXT: invoke void @_Z3foov()
1248 // CHECK2-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
1249 // CHECK2: invoke.cont:
1250 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
1251 // CHECK2-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1252 // CHECK2-NEXT: br label [[OMP_IF_END4]]
1253 // CHECK2: omp_if.end4:
1254 // CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
1255 // CHECK2-NEXT: store ptr [[A]], ptr [[TMP7]], align 8
1256 // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
1257 // CHECK2-NEXT: store ptr @tc, ptr [[TMP8]], align 8
1258 // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
1259 // CHECK2-NEXT: [[TMP10:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc, i64 4, ptr @tc.cache.)
1260 // CHECK2-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
1261 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 3
1262 // CHECK2-NEXT: store ptr [[A2]], ptr [[TMP11]], align 8
1263 // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 4
1264 // CHECK2-NEXT: [[TMP13:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc2, i64 8, ptr @tc2.cache.)
1265 // CHECK2-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
1266 // CHECK2-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1267 // CHECK2-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP0]], i64 40, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func, i32 [[TMP14]])
1268 // CHECK2-NEXT: [[TMP15:%.*]] = load i8, ptr [[A]], align 1
1269 // CHECK2-NEXT: [[CONV:%.*]] = sext i8 [[TMP15]] to i32
1270 // CHECK2-NEXT: ret i32 [[CONV]]
1271 // CHECK2: terminate.lpad:
1272 // CHECK2-NEXT: [[TMP16:%.*]] = landingpad { ptr, i32 }
1273 // CHECK2-NEXT: catch ptr null
1274 // CHECK2-NEXT: [[TMP17:%.*]] = extractvalue { ptr, i32 } [[TMP16]], 0
1275 // CHECK2-NEXT: call void @__clang_call_terminate(ptr [[TMP17]]) #[[ATTR13:[0-9]+]]
1276 // CHECK2-NEXT: unreachable
1279 // CHECK2-LABEL: define {{[^@]+}}@_ZN3SSTIdEC1Ev
1280 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1281 // CHECK2-NEXT: entry:
1282 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1283 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1284 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1285 // CHECK2-NEXT: call void @_ZN3SSTIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) [[THIS1]])
1286 // CHECK2-NEXT: ret void
1289 // CHECK2-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
1290 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1291 // CHECK2-NEXT: entry:
1292 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1293 // CHECK2-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
1294 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1295 // CHECK2-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
1296 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1297 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
1298 // CHECK2-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
1299 // CHECK2-NEXT: ret void
1302 // CHECK2-LABEL: define {{[^@]+}}@__clang_call_terminate
1303 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] comdat {
1304 // CHECK2-NEXT: [[TMP2:%.*]] = call ptr @__cxa_begin_catch(ptr [[TMP0]]) #[[ATTR3]]
1305 // CHECK2-NEXT: call void @_ZSt9terminatev() #[[ATTR13]]
1306 // CHECK2-NEXT: unreachable
1309 // CHECK2-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func
1310 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] {
1311 // CHECK2-NEXT: entry:
1312 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1313 // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1314 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1315 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1316 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1317 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1318 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 0
1319 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1320 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 0
1321 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1322 // CHECK2-NEXT: [[TMP8:%.*]] = load i8, ptr [[TMP7]], align 1
1323 // CHECK2-NEXT: store i8 [[TMP8]], ptr [[TMP5]], align 1
1324 // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 1
1325 // CHECK2-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
1326 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 1
1327 // CHECK2-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1328 // CHECK2-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP10]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP12]])
1329 // CHECK2-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 2
1330 // CHECK2-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
1331 // CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 2
1332 // CHECK2-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
1333 // CHECK2-NEXT: [[CALL2:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP14]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP16]])
1334 // CHECK2-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 3
1335 // CHECK2-NEXT: [[TMP18:%.*]] = load ptr, ptr [[TMP17]], align 8
1336 // CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 3
1337 // CHECK2-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
1338 // CHECK2-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[TMP18]], ptr align 1 [[TMP20]], i64 2, i1 false)
1339 // CHECK2-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 4
1340 // CHECK2-NEXT: [[TMP22:%.*]] = load ptr, ptr [[TMP21]], align 8
1341 // CHECK2-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 4
1342 // CHECK2-NEXT: [[TMP24:%.*]] = load ptr, ptr [[TMP23]], align 8
1343 // CHECK2-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP22]], i64 2
1344 // CHECK2-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP22]], [[TMP25]]
1345 // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1346 // CHECK2: omp.arraycpy.body:
1347 // CHECK2-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1348 // CHECK2-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP22]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1349 // CHECK2-NEXT: [[CALL3:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]])
1350 // CHECK2-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1351 // CHECK2-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1352 // CHECK2-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
1353 // CHECK2-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]]
1354 // CHECK2: omp.arraycpy.done4:
1355 // CHECK2-NEXT: ret void
1358 // CHECK2-LABEL: define {{[^@]+}}@_ZN9TestClassaSERKS_
1359 // CHECK2-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] comdat align 2 {
1360 // CHECK2-NEXT: entry:
1361 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1362 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1363 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1364 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1365 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1366 // CHECK2-NEXT: ret ptr [[THIS1]]
1369 // CHECK2-LABEL: define {{[^@]+}}@_Z15parallel_singlev
1370 // CHECK2-SAME: () #[[ATTR10]] {
1371 // CHECK2-NEXT: entry:
1372 // CHECK2-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 0, ptr @_Z15parallel_singlev.omp_outlined)
1373 // CHECK2-NEXT: ret void
1376 // CHECK2-LABEL: define {{[^@]+}}@_Z15parallel_singlev.omp_outlined
1377 // CHECK2-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR12:[0-9]+]] personality ptr @__gxx_personality_v0 {
1378 // CHECK2-NEXT: entry:
1379 // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1380 // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1381 // CHECK2-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1382 // CHECK2-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1383 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1384 // CHECK2-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
1385 // CHECK2-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP1]])
1386 // CHECK2-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
1387 // CHECK2-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1388 // CHECK2: omp_if.then:
1389 // CHECK2-NEXT: invoke void @_Z3foov()
1390 // CHECK2-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
1391 // CHECK2: invoke.cont:
1392 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP1]])
1393 // CHECK2-NEXT: br label [[OMP_IF_END]]
1394 // CHECK2: omp_if.end:
1395 // CHECK2-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2]], i32 [[TMP1]])
1396 // CHECK2-NEXT: ret void
1397 // CHECK2: terminate.lpad:
1398 // CHECK2-NEXT: [[TMP4:%.*]] = landingpad { ptr, i32 }
1399 // CHECK2-NEXT: catch ptr null
1400 // CHECK2-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
1401 // CHECK2-NEXT: call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR13]]
1402 // CHECK2-NEXT: unreachable
1405 // CHECK2-LABEL: define {{[^@]+}}@_ZN9TestClassC2Ev
1406 // CHECK2-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
1407 // CHECK2-NEXT: entry:
1408 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1409 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1410 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1411 // CHECK2-NEXT: [[A:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[THIS1]], i32 0, i32 0
1412 // CHECK2-NEXT: store i32 0, ptr [[A]], align 4
1413 // CHECK2-NEXT: ret void
1416 // CHECK2-LABEL: define {{[^@]+}}@_ZN9TestClassD2Ev
1417 // CHECK2-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
1418 // CHECK2-NEXT: entry:
1419 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1420 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1421 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1422 // CHECK2-NEXT: ret void
1425 // CHECK2-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
1426 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
1427 // CHECK2-NEXT: entry:
1428 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1429 // CHECK2-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
1430 // CHECK2-NEXT: [[A2:%.*]] = alloca ptr, align 8
1431 // CHECK2-NEXT: [[B4:%.*]] = alloca i32, align 4
1432 // CHECK2-NEXT: [[C7:%.*]] = alloca ptr, align 8
1433 // CHECK2-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1434 // CHECK2-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
1435 // CHECK2-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
1436 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1437 // CHECK2-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
1438 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1439 // CHECK2-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
1440 // CHECK2-NEXT: store i32 0, ptr [[A]], align 8
1441 // CHECK2-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1442 // CHECK2-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
1443 // CHECK2-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
1444 // CHECK2-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
1445 // CHECK2-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
1446 // CHECK2-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1447 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
1448 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
1449 // CHECK2-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
1450 // CHECK2-NEXT: store ptr [[A3]], ptr [[A2]], align 8
1451 // CHECK2-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1452 // CHECK2-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
1453 // CHECK2-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
1454 // CHECK2-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
1455 // CHECK2-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
1456 // CHECK2-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
1457 // CHECK2-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1458 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
1459 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
1460 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
1461 // CHECK2-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1462 // CHECK2-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
1463 // CHECK2-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
1464 // CHECK2-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
1465 // CHECK2-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
1466 // CHECK2-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
1467 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
1468 // CHECK2-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1469 // CHECK2-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
1470 // CHECK2-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
1471 // CHECK2-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]])
1472 // CHECK2-NEXT: ret void
1475 // CHECK2-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
1476 // CHECK2-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
1477 // CHECK2-NEXT: entry:
1478 // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1479 // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1480 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1481 // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1482 // CHECK2-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
1483 // CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
1484 // CHECK2-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1485 // CHECK2-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1486 // CHECK2-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
1487 // CHECK2-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
1488 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
1489 // CHECK2-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
1490 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
1491 // CHECK2-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1492 // CHECK2-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1493 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1494 // CHECK2-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1495 // CHECK2-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
1496 // CHECK2-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
1497 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1498 // CHECK2-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
1499 // CHECK2-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
1500 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
1501 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
1502 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
1503 // CHECK2-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
1504 // CHECK2-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1505 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1506 // CHECK2-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1507 // CHECK2-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
1508 // CHECK2-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
1509 // CHECK2-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1510 // CHECK2: omp_if.then:
1511 // CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
1512 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[TMP7]], align 8
1513 // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1
1514 // CHECK2-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP2]], align 8
1515 // CHECK2-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
1516 // CHECK2-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 2
1517 // CHECK2-NEXT: store ptr [[B_ADDR]], ptr [[TMP10]], align 8
1518 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 3
1519 // CHECK2-NEXT: [[TMP12:%.*]] = load ptr, ptr [[_TMP3]], align 8
1520 // CHECK2-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 8
1521 // CHECK2-NEXT: invoke void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
1522 // CHECK2-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
1523 // CHECK2: invoke.cont:
1524 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
1525 // CHECK2-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1526 // CHECK2-NEXT: br label [[OMP_IF_END]]
1527 // CHECK2: omp_if.end:
1528 // CHECK2-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
1529 // CHECK2-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP2]], align 8
1530 // CHECK2-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8
1531 // CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
1532 // CHECK2-NEXT: store ptr [[B_ADDR]], ptr [[TMP15]], align 8
1533 // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
1534 // CHECK2-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP3]], align 8
1535 // CHECK2-NEXT: store ptr [[TMP17]], ptr [[TMP16]], align 8
1536 // CHECK2-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1537 // CHECK2-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.5, i32 [[TMP18]])
1538 // CHECK2-NEXT: ret void
1539 // CHECK2: terminate.lpad:
1540 // CHECK2-NEXT: [[TMP19:%.*]] = landingpad { ptr, i32 }
1541 // CHECK2-NEXT: catch ptr null
1542 // CHECK2-NEXT: [[TMP20:%.*]] = extractvalue { ptr, i32 } [[TMP19]], 0
1543 // CHECK2-NEXT: call void @__clang_call_terminate(ptr [[TMP20]]) #[[ATTR13]]
1544 // CHECK2-NEXT: unreachable
1547 // CHECK2-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
1548 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR10]] align 2 {
1549 // CHECK2-NEXT: entry:
1550 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1551 // CHECK2-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1552 // CHECK2-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
1553 // CHECK2-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
1554 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1555 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1556 // CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON:%.*]], ptr [[THIS1]], i32 0, i32 0
1557 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
1558 // CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1
1559 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
1560 // CHECK2-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1561 // CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
1562 // CHECK2-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
1563 // CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 2
1564 // CHECK2-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
1565 // CHECK2-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
1566 // CHECK2-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
1567 // CHECK2-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
1568 // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 3
1569 // CHECK2-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
1570 // CHECK2-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
1571 // CHECK2-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
1572 // CHECK2-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
1573 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1
1574 // CHECK2-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1575 // CHECK2-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
1576 // CHECK2-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4
1577 // CHECK2-NEXT: [[TMP14:%.*]] = load i64, ptr [[A_CASTED]], align 8
1578 // CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 2
1579 // CHECK2-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
1580 // CHECK2-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
1581 // CHECK2-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4
1582 // CHECK2-NEXT: [[TMP18:%.*]] = load i64, ptr [[B_CASTED]], align 8
1583 // CHECK2-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 3
1584 // CHECK2-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
1585 // CHECK2-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
1586 // CHECK2-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4
1587 // CHECK2-NEXT: [[TMP22:%.*]] = load i64, ptr [[C_CASTED]], align 8
1588 // CHECK2-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]])
1589 // CHECK2-NEXT: ret void
1592 // CHECK2-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.5
1593 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
1594 // CHECK2-NEXT: entry:
1595 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1596 // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1597 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1598 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1599 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1600 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1601 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
1602 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1603 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
1604 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1605 // CHECK2-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1606 // CHECK2-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
1607 // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
1608 // CHECK2-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
1609 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
1610 // CHECK2-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1611 // CHECK2-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
1612 // CHECK2-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
1613 // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
1614 // CHECK2-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
1615 // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
1616 // CHECK2-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
1617 // CHECK2-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
1618 // CHECK2-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
1619 // CHECK2-NEXT: ret void
1622 // CHECK2-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
1623 // CHECK2-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] {
1624 // CHECK2-NEXT: entry:
1625 // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1626 // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1627 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1628 // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1629 // CHECK2-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
1630 // CHECK2-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
1631 // CHECK2-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1632 // CHECK2-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1633 // CHECK2-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
1634 // CHECK2-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
1635 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
1636 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
1637 // CHECK2-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1638 // CHECK2-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1639 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1640 // CHECK2-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1641 // CHECK2-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
1642 // CHECK2-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
1643 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1644 // CHECK2-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
1645 // CHECK2-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
1646 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
1647 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
1648 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
1649 // CHECK2-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
1650 // CHECK2-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1651 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1652 // CHECK2-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
1653 // CHECK2-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
1654 // CHECK2-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
1655 // CHECK2-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1656 // CHECK2: omp_if.then:
1657 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP2]], align 8
1658 // CHECK2-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1659 // CHECK2-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1
1660 // CHECK2-NEXT: store i32 [[INC]], ptr [[TMP7]], align 4
1661 // CHECK2-NEXT: [[TMP9:%.*]] = load i32, ptr [[B_ADDR]], align 4
1662 // CHECK2-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP9]], -1
1663 // CHECK2-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
1664 // CHECK2-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP3]], align 8
1665 // CHECK2-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
1666 // CHECK2-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP11]], 1
1667 // CHECK2-NEXT: store i32 [[DIV]], ptr [[TMP10]], align 4
1668 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
1669 // CHECK2-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1670 // CHECK2-NEXT: br label [[OMP_IF_END]]
1671 // CHECK2: omp_if.end:
1672 // CHECK2-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
1673 // CHECK2-NEXT: [[TMP13:%.*]] = load ptr, ptr [[_TMP2]], align 8
1674 // CHECK2-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
1675 // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
1676 // CHECK2-NEXT: store ptr [[B_ADDR]], ptr [[TMP14]], align 8
1677 // CHECK2-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
1678 // CHECK2-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP3]], align 8
1679 // CHECK2-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 8
1680 // CHECK2-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1681 // CHECK2-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.6, i32 [[TMP17]])
1682 // CHECK2-NEXT: ret void
1685 // CHECK2-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.6
1686 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
1687 // CHECK2-NEXT: entry:
1688 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1689 // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1690 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1691 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1692 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1693 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1694 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
1695 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1696 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
1697 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1698 // CHECK2-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
1699 // CHECK2-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
1700 // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
1701 // CHECK2-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
1702 // CHECK2-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
1703 // CHECK2-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
1704 // CHECK2-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
1705 // CHECK2-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
1706 // CHECK2-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
1707 // CHECK2-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
1708 // CHECK2-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
1709 // CHECK2-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
1710 // CHECK2-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
1711 // CHECK2-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
1712 // CHECK2-NEXT: ret void
1715 // CHECK2-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev
1716 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
1717 // CHECK2-NEXT: entry:
1718 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1719 // CHECK2-NEXT: [[A2:%.*]] = alloca ptr, align 8
1720 // CHECK2-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1721 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1722 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1723 // CHECK2-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
1724 // CHECK2-NEXT: store double 0.000000e+00, ptr [[A]], align 8
1725 // CHECK2-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0
1726 // CHECK2-NEXT: store ptr [[A3]], ptr [[A2]], align 8
1727 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 8
1728 // CHECK2-NEXT: [[TMP1:%.*]] = load double, ptr [[TMP0]], align 8
1729 // CHECK2-NEXT: store double [[TMP1]], ptr [[A_CASTED]], align 8
1730 // CHECK2-NEXT: [[TMP2:%.*]] = load i64, ptr [[A_CASTED]], align 8
1731 // CHECK2-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZN3SSTIdEC2Ev.omp_outlined, ptr [[THIS1]], i64 [[TMP2]])
1732 // CHECK2-NEXT: ret void
1735 // CHECK2-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev.omp_outlined
1736 // CHECK2-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
1737 // CHECK2-NEXT: entry:
1738 // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1739 // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1740 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1741 // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1742 // CHECK2-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1743 // CHECK2-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1744 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
1745 // CHECK2-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
1746 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
1747 // CHECK2-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1748 // CHECK2-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1749 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1750 // CHECK2-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1751 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1752 // CHECK2-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
1753 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
1754 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
1755 // CHECK2-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1756 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1757 // CHECK2-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1758 // CHECK2-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
1759 // CHECK2-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
1760 // CHECK2-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1761 // CHECK2: omp_if.then:
1762 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
1763 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[TMP6]], align 8
1764 // CHECK2-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
1765 // CHECK2-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 8
1766 // CHECK2-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 8
1767 // CHECK2-NEXT: invoke void @_ZZN3SSTIdEC1EvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
1768 // CHECK2-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
1769 // CHECK2: invoke.cont:
1770 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
1771 // CHECK2-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1772 // CHECK2-NEXT: br label [[OMP_IF_END]]
1773 // CHECK2: omp_if.end:
1774 // CHECK2-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
1775 // CHECK2-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP1]], align 8
1776 // CHECK2-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
1777 // CHECK2-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1778 // CHECK2-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.7, i32 [[TMP11]])
1779 // CHECK2-NEXT: ret void
1780 // CHECK2: terminate.lpad:
1781 // CHECK2-NEXT: [[TMP12:%.*]] = landingpad { ptr, i32 }
1782 // CHECK2-NEXT: catch ptr null
1783 // CHECK2-NEXT: [[TMP13:%.*]] = extractvalue { ptr, i32 } [[TMP12]], 0
1784 // CHECK2-NEXT: call void @__clang_call_terminate(ptr [[TMP13]]) #[[ATTR13]]
1785 // CHECK2-NEXT: unreachable
1788 // CHECK2-LABEL: define {{[^@]+}}@_ZZN3SSTIdEC1EvENKUlvE_clEv
1789 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR4]] align 2 {
1790 // CHECK2-NEXT: entry:
1791 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1792 // CHECK2-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 8
1793 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1794 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1795 // CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1796 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
1797 // CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0
1798 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[TMP2]], align 8
1799 // CHECK2-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1
1800 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
1801 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1802 // CHECK2-NEXT: store ptr [[TMP5]], ptr [[TMP3]], align 8
1803 // CHECK2-NEXT: call void @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
1804 // CHECK2-NEXT: ret void
1807 // CHECK2-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.7
1808 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
1809 // CHECK2-NEXT: entry:
1810 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1811 // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1812 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1813 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1814 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1815 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1816 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
1817 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1818 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
1819 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1820 // CHECK2-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
1821 // CHECK2-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
1822 // CHECK2-NEXT: ret void
1825 // CHECK2-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv
1826 // CHECK2-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR10]] align 2 {
1827 // CHECK2-NEXT: entry:
1828 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1829 // CHECK2-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
1830 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1831 // CHECK2-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1832 // CHECK2-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1:%.*]], ptr [[THIS1]], i32 0, i32 0
1833 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
1834 // CHECK2-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
1835 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
1836 // CHECK2-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
1837 // CHECK2-NEXT: [[INC:%.*]] = fadd double [[TMP4]], 1.000000e+00
1838 // CHECK2-NEXT: store double [[INC]], ptr [[TMP3]], align 8
1839 // CHECK2-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
1840 // CHECK2-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
1841 // CHECK2-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
1842 // CHECK2-NEXT: store double [[TMP7]], ptr [[A_CASTED]], align 8
1843 // CHECK2-NEXT: [[TMP8:%.*]] = load i64, ptr [[A_CASTED]], align 8
1844 // CHECK2-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP8]])
1845 // CHECK2-NEXT: ret void
1848 // CHECK2-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined
1849 // CHECK2-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] {
1850 // CHECK2-NEXT: entry:
1851 // CHECK2-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1852 // CHECK2-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1853 // CHECK2-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1854 // CHECK2-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
1855 // CHECK2-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1856 // CHECK2-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
1857 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
1858 // CHECK2-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
1859 // CHECK2-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1860 // CHECK2-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1861 // CHECK2-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1862 // CHECK2-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
1863 // CHECK2-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1864 // CHECK2-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
1865 // CHECK2-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
1866 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
1867 // CHECK2-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1868 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
1869 // CHECK2-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
1870 // CHECK2-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
1871 // CHECK2-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
1872 // CHECK2-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
1873 // CHECK2: omp_if.then:
1874 // CHECK2-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8
1875 // CHECK2-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
1876 // CHECK2-NEXT: [[INC:%.*]] = fadd double [[TMP7]], 1.000000e+00
1877 // CHECK2-NEXT: store double [[INC]], ptr [[TMP6]], align 8
1878 // CHECK2-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
1879 // CHECK2-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1880 // CHECK2-NEXT: br label [[OMP_IF_END]]
1881 // CHECK2: omp_if.end:
1882 // CHECK2-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
1883 // CHECK2-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP1]], align 8
1884 // CHECK2-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
1885 // CHECK2-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
1886 // CHECK2-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.8, i32 [[TMP10]])
1887 // CHECK2-NEXT: ret void
1890 // CHECK2-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.8
1891 // CHECK2-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
1892 // CHECK2-NEXT: entry:
1893 // CHECK2-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1894 // CHECK2-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
1895 // CHECK2-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1896 // CHECK2-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
1897 // CHECK2-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1898 // CHECK2-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
1899 // CHECK2-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
1900 // CHECK2-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
1901 // CHECK2-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
1902 // CHECK2-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
1903 // CHECK2-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
1904 // CHECK2-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
1905 // CHECK2-NEXT: ret void
1908 // CHECK2-LABEL: define {{[^@]+}}@_GLOBAL__sub_I_single_codegen.cpp
1909 // CHECK2-SAME: () #[[ATTR0]] {
1910 // CHECK2-NEXT: entry:
1911 // CHECK2-NEXT: call void @__cxx_global_var_init()
1912 // CHECK2-NEXT: call void @__cxx_global_var_init.1()
1913 // CHECK2-NEXT: call void @.__omp_threadprivate_init_.()
1914 // CHECK2-NEXT: call void @.__omp_threadprivate_init_..4()
1915 // CHECK2-NEXT: ret void
1918 // CHECK4-LABEL: define {{[^@]+}}@__cxx_global_var_init
1919 // CHECK4-SAME: () #[[ATTR0:[0-9]+]] {
1920 // CHECK4-NEXT: entry:
1921 // CHECK4-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
1922 // CHECK4-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc, ptr @.__kmpc_global_ctor_., ptr null, ptr @.__kmpc_global_dtor_.)
1923 // CHECK4-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) @tc)
1924 // CHECK4-NEXT: [[TMP1:%.*]] = call i32 @__cxa_atexit(ptr @_ZN9TestClassD1Ev, ptr @tc, ptr @__dso_handle) #[[ATTR3:[0-9]+]]
1925 // CHECK4-NEXT: ret void
1928 // CHECK4-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_.
1929 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1930 // CHECK4-NEXT: entry:
1931 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1932 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1933 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1934 // CHECK4-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]])
1935 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1936 // CHECK4-NEXT: ret ptr [[TMP2]]
1939 // CHECK4-LABEL: define {{[^@]+}}@_ZN9TestClassC1Ev
1940 // CHECK4-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1941 // CHECK4-NEXT: entry:
1942 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1943 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1944 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1945 // CHECK4-NEXT: call void @_ZN9TestClassC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1946 // CHECK4-NEXT: ret void
1949 // CHECK4-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_.
1950 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
1951 // CHECK4-NEXT: entry:
1952 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
1953 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
1954 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
1955 // CHECK4-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]]) #[[ATTR3]]
1956 // CHECK4-NEXT: ret void
1959 // CHECK4-LABEL: define {{[^@]+}}@_ZN9TestClassD1Ev
1960 // CHECK4-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2:[0-9]+]] comdat align 2 {
1961 // CHECK4-NEXT: entry:
1962 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1963 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1964 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1965 // CHECK4-NEXT: call void @_ZN9TestClassD2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]]
1966 // CHECK4-NEXT: ret void
1969 // CHECK4-LABEL: define {{[^@]+}}@__cxx_global_var_init.1
1970 // CHECK4-SAME: () #[[ATTR0]] personality ptr @__gxx_personality_v0 {
1971 // CHECK4-NEXT: entry:
1972 // CHECK4-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
1973 // CHECK4-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
1974 // CHECK4-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
1975 // CHECK4-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc2, ptr @.__kmpc_global_ctor_..2, ptr null, ptr @.__kmpc_global_dtor_..3)
1976 // CHECK4-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1977 // CHECK4: arrayctor.loop:
1978 // CHECK4-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ @tc2, [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
1979 // CHECK4-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1980 // CHECK4-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
1981 // CHECK4: invoke.cont:
1982 // CHECK4-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAYCTOR_CUR]], i64 1
1983 // CHECK4-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], getelementptr inbounds ([[CLASS_TESTCLASS]], ptr @tc2, i64 2)
1984 // CHECK4-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1985 // CHECK4: arrayctor.cont:
1986 // CHECK4-NEXT: [[TMP1:%.*]] = call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle) #[[ATTR3]]
1987 // CHECK4-NEXT: ret void
1988 // CHECK4: lpad:
1989 // CHECK4-NEXT: [[TMP2:%.*]] = landingpad { ptr, i32 }
1990 // CHECK4-NEXT: cleanup
1991 // CHECK4-NEXT: [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
1992 // CHECK4-NEXT: store ptr [[TMP3]], ptr [[EXN_SLOT]], align 8
1993 // CHECK4-NEXT: [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
1994 // CHECK4-NEXT: store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
1995 // CHECK4-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr @tc2, [[ARRAYCTOR_CUR]]
1996 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
1997 // CHECK4: arraydestroy.body:
1998 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1999 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2000 // CHECK4-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
2001 // CHECK4-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
2002 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
2003 // CHECK4: arraydestroy.done1:
2004 // CHECK4-NEXT: br label [[EH_RESUME:%.*]]
2005 // CHECK4: eh.resume:
2006 // CHECK4-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
2007 // CHECK4-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
2008 // CHECK4-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
2009 // CHECK4-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
2010 // CHECK4-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
2013 // CHECK4-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_..2
2014 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] personality ptr @__gxx_personality_v0 {
2015 // CHECK4-NEXT: entry:
2016 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2017 // CHECK4-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
2018 // CHECK4-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
2019 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2020 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2021 // CHECK4-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %class.TestClass], ptr [[TMP1]], i32 0, i32 0
2022 // CHECK4-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAY_BEGIN]], i64 2
2023 // CHECK4-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
2024 // CHECK4: arrayctor.loop:
2025 // CHECK4-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ]
2026 // CHECK4-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2027 // CHECK4-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]]
2028 // CHECK4: invoke.cont:
2029 // CHECK4-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYCTOR_CUR]], i64 1
2030 // CHECK4-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
2031 // CHECK4-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
2032 // CHECK4: arrayctor.cont:
2033 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2034 // CHECK4-NEXT: ret ptr [[TMP2]]
2035 // CHECK4: lpad:
2036 // CHECK4-NEXT: [[TMP3:%.*]] = landingpad { ptr, i32 }
2037 // CHECK4-NEXT: cleanup
2038 // CHECK4-NEXT: [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 0
2039 // CHECK4-NEXT: store ptr [[TMP4]], ptr [[EXN_SLOT]], align 8
2040 // CHECK4-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 1
2041 // CHECK4-NEXT: store i32 [[TMP5]], ptr [[EHSELECTOR_SLOT]], align 4
2042 // CHECK4-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[ARRAYCTOR_CUR]]
2043 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]]
2044 // CHECK4: arraydestroy.body:
2045 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2046 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2047 // CHECK4-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
2048 // CHECK4-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
2049 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]]
2050 // CHECK4: arraydestroy.done1:
2051 // CHECK4-NEXT: br label [[EH_RESUME:%.*]]
2052 // CHECK4: eh.resume:
2053 // CHECK4-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8
2054 // CHECK4-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
2055 // CHECK4-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0
2056 // CHECK4-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
2057 // CHECK4-NEXT: resume { ptr, i32 } [[LPAD_VAL2]]
2060 // CHECK4-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_..3
2061 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
2062 // CHECK4-NEXT: entry:
2063 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2064 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2065 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2066 // CHECK4-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP1]], i64 2
2067 // CHECK4-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2068 // CHECK4: arraydestroy.body:
2069 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2070 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2071 // CHECK4-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
2072 // CHECK4-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[TMP1]]
2073 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
2074 // CHECK4: arraydestroy.done1:
2075 // CHECK4-NEXT: ret void
2078 // CHECK4-LABEL: define {{[^@]+}}@__cxx_global_array_dtor
2079 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] {
2080 // CHECK4-NEXT: entry:
2081 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2082 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2083 // CHECK4-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
2084 // CHECK4: arraydestroy.body:
2085 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ getelementptr inbounds ([[CLASS_TESTCLASS:%.*]], ptr @tc2, i64 2), [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
2086 // CHECK4-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
2087 // CHECK4-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]]
2088 // CHECK4-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2
2089 // CHECK4-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
2090 // CHECK4: arraydestroy.done1:
2091 // CHECK4-NEXT: ret void
2094 // CHECK4-LABEL: define {{[^@]+}}@_Z3foov
2095 // CHECK4-SAME: () #[[ATTR4:[0-9]+]] {
2096 // CHECK4-NEXT: entry:
2097 // CHECK4-NEXT: call void @_Z8mayThrowv()
2098 // CHECK4-NEXT: ret void
2101 // CHECK4-LABEL: define {{[^@]+}}@main
2102 // CHECK4-SAME: () #[[ATTR6:[0-9]+]] personality ptr @__gxx_personality_v0 {
2103 // CHECK4-NEXT: entry:
2104 // CHECK4-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
2105 // CHECK4-NEXT: [[A:%.*]] = alloca i8, align 1
2106 // CHECK4-NEXT: [[A2:%.*]] = alloca [2 x i8], align 1
2107 // CHECK4-NEXT: [[C:%.*]] = alloca ptr, align 8
2108 // CHECK4-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 8
2109 // CHECK4-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
2110 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
2111 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [5 x ptr], align 8
2112 // CHECK4-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1]])
2113 // CHECK4-NEXT: store i32 0, ptr [[RETVAL]], align 4
2114 // CHECK4-NEXT: store ptr @tc, ptr [[C]], align 8
2115 // CHECK4-NEXT: call void @_ZN3SSTIdEC1Ev(ptr noundef nonnull align 8 dereferenceable(8) [[SST]])
2116 // CHECK4-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @tc)
2117 // CHECK4-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
2118 // CHECK4-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0
2119 // CHECK4-NEXT: br i1 [[TMP2]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2120 // CHECK4: omp_if.then:
2121 // CHECK4-NEXT: store i8 2, ptr [[A]], align 1
2122 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
2123 // CHECK4-NEXT: br label [[OMP_IF_END]]
2124 // CHECK4: omp_if.end:
2125 // CHECK4-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
2126 // CHECK4-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
2127 // CHECK4-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN1:%.*]], label [[OMP_IF_END2:%.*]]
2128 // CHECK4: omp_if.then1:
2129 // CHECK4-NEXT: store i8 2, ptr [[A]], align 1
2130 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
2131 // CHECK4-NEXT: br label [[OMP_IF_END2]]
2132 // CHECK4: omp_if.end2:
2133 // CHECK4-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2:[0-9]+]], i32 [[TMP0]])
2134 // CHECK4-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2135 // CHECK4-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
2136 // CHECK4-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
2137 // CHECK4-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN3:%.*]], label [[OMP_IF_END4:%.*]]
2138 // CHECK4: omp_if.then3:
2139 // CHECK4-NEXT: invoke void @_Z3foov()
2140 // CHECK4-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
2141 // CHECK4: invoke.cont:
2142 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
2143 // CHECK4-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2144 // CHECK4-NEXT: br label [[OMP_IF_END4]]
2145 // CHECK4: omp_if.end4:
2146 // CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
2147 // CHECK4-NEXT: store ptr [[A]], ptr [[TMP7]], align 8
2148 // CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
2149 // CHECK4-NEXT: store ptr @tc, ptr [[TMP8]], align 8
2150 // CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
2151 // CHECK4-NEXT: [[TMP10:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc, i64 4, ptr @tc.cache.)
2152 // CHECK4-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
2153 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 3
2154 // CHECK4-NEXT: store ptr [[A2]], ptr [[TMP11]], align 8
2155 // CHECK4-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 4
2156 // CHECK4-NEXT: [[TMP13:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB1]], i32 [[TMP0]], ptr @tc2, i64 8, ptr @tc2.cache.)
2157 // CHECK4-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2158 // CHECK4-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2159 // CHECK4-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP0]], i64 40, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func, i32 [[TMP14]])
2160 // CHECK4-NEXT: [[TMP15:%.*]] = load i8, ptr [[A]], align 1
2161 // CHECK4-NEXT: [[CONV:%.*]] = sext i8 [[TMP15]] to i32
2162 // CHECK4-NEXT: ret i32 [[CONV]]
2163 // CHECK4: terminate.lpad:
2164 // CHECK4-NEXT: [[TMP16:%.*]] = landingpad { ptr, i32 }
2165 // CHECK4-NEXT: catch ptr null
2166 // CHECK4-NEXT: [[TMP17:%.*]] = extractvalue { ptr, i32 } [[TMP16]], 0
2167 // CHECK4-NEXT: call void @__clang_call_terminate(ptr [[TMP17]]) #[[ATTR13:[0-9]+]]
2168 // CHECK4-NEXT: unreachable
2171 // CHECK4-LABEL: define {{[^@]+}}@_ZN3SSTIdEC1Ev
2172 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2173 // CHECK4-NEXT: entry:
2174 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2175 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2176 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2177 // CHECK4-NEXT: call void @_ZN3SSTIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) [[THIS1]])
2178 // CHECK4-NEXT: ret void
2181 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
2182 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
2183 // CHECK4-NEXT: entry:
2184 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2185 // CHECK4-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2186 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2187 // CHECK4-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2188 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2189 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2190 // CHECK4-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
2191 // CHECK4-NEXT: ret void
2194 // CHECK4-LABEL: define {{[^@]+}}@__clang_call_terminate
2195 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] comdat {
2196 // CHECK4-NEXT: [[TMP2:%.*]] = call ptr @__cxa_begin_catch(ptr [[TMP0]]) #[[ATTR3]]
2197 // CHECK4-NEXT: call void @_ZSt9terminatev() #[[ATTR13]]
2198 // CHECK4-NEXT: unreachable
2201 // CHECK4-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func
2202 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] {
2203 // CHECK4-NEXT: entry:
2204 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2205 // CHECK4-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2206 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2207 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2208 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2209 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2210 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 0
2211 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2212 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 0
2213 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2214 // CHECK4-NEXT: [[TMP8:%.*]] = load i8, ptr [[TMP7]], align 1
2215 // CHECK4-NEXT: store i8 [[TMP8]], ptr [[TMP5]], align 1
2216 // CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 1
2217 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
2218 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 1
2219 // CHECK4-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
2220 // CHECK4-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP10]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP12]])
2221 // CHECK4-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 2
2222 // CHECK4-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8
2223 // CHECK4-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 2
2224 // CHECK4-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
2225 // CHECK4-NEXT: [[CALL2:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP14]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP16]])
2226 // CHECK4-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 3
2227 // CHECK4-NEXT: [[TMP18:%.*]] = load ptr, ptr [[TMP17]], align 8
2228 // CHECK4-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 3
2229 // CHECK4-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
2230 // CHECK4-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[TMP18]], ptr align 1 [[TMP20]], i64 2, i1 false)
2231 // CHECK4-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 4
2232 // CHECK4-NEXT: [[TMP22:%.*]] = load ptr, ptr [[TMP21]], align 8
2233 // CHECK4-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 4
2234 // CHECK4-NEXT: [[TMP24:%.*]] = load ptr, ptr [[TMP23]], align 8
2235 // CHECK4-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP22]], i64 2
2236 // CHECK4-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP22]], [[TMP25]]
2237 // CHECK4-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
2238 // CHECK4: omp.arraycpy.body:
2239 // CHECK4-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2240 // CHECK4-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP22]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
2241 // CHECK4-NEXT: [[CALL3:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]])
2242 // CHECK4-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
2243 // CHECK4-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
2244 // CHECK4-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]]
2245 // CHECK4-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]]
2246 // CHECK4: omp.arraycpy.done4:
2247 // CHECK4-NEXT: ret void
2250 // CHECK4-LABEL: define {{[^@]+}}@_ZN9TestClassaSERKS_
2251 // CHECK4-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] comdat align 2 {
2252 // CHECK4-NEXT: entry:
2253 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2254 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2255 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2256 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2257 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2258 // CHECK4-NEXT: ret ptr [[THIS1]]
2261 // CHECK4-LABEL: define {{[^@]+}}@_Z15parallel_singlev
2262 // CHECK4-SAME: () #[[ATTR10]] {
2263 // CHECK4-NEXT: entry:
2264 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 0, ptr @_Z15parallel_singlev.omp_outlined)
2265 // CHECK4-NEXT: ret void
2268 // CHECK4-LABEL: define {{[^@]+}}@_Z15parallel_singlev.omp_outlined
2269 // CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR12:[0-9]+]] personality ptr @__gxx_personality_v0 {
2270 // CHECK4-NEXT: entry:
2271 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2272 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2273 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2274 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2275 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2276 // CHECK4-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
2277 // CHECK4-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP1]])
2278 // CHECK4-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0
2279 // CHECK4-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2280 // CHECK4: omp_if.then:
2281 // CHECK4-NEXT: invoke void @_Z3foov()
2282 // CHECK4-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
2283 // CHECK4: invoke.cont:
2284 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP1]])
2285 // CHECK4-NEXT: br label [[OMP_IF_END]]
2286 // CHECK4: omp_if.end:
2287 // CHECK4-NEXT: call void @__kmpc_barrier(ptr @[[GLOB2]], i32 [[TMP1]])
2288 // CHECK4-NEXT: ret void
2289 // CHECK4: terminate.lpad:
2290 // CHECK4-NEXT: [[TMP4:%.*]] = landingpad { ptr, i32 }
2291 // CHECK4-NEXT: catch ptr null
2292 // CHECK4-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
2293 // CHECK4-NEXT: call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR13]]
2294 // CHECK4-NEXT: unreachable
2297 // CHECK4-LABEL: define {{[^@]+}}@_ZN9TestClassC2Ev
2298 // CHECK4-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
2299 // CHECK4-NEXT: entry:
2300 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2301 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2302 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2303 // CHECK4-NEXT: [[A:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[THIS1]], i32 0, i32 0
2304 // CHECK4-NEXT: store i32 0, ptr [[A]], align 4
2305 // CHECK4-NEXT: ret void
2308 // CHECK4-LABEL: define {{[^@]+}}@_ZN9TestClassD2Ev
2309 // CHECK4-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
2310 // CHECK4-NEXT: entry:
2311 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2312 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2313 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2314 // CHECK4-NEXT: ret void
2317 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
2318 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
2319 // CHECK4-NEXT: entry:
2320 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2321 // CHECK4-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
2322 // CHECK4-NEXT: [[A2:%.*]] = alloca ptr, align 8
2323 // CHECK4-NEXT: [[B4:%.*]] = alloca i32, align 4
2324 // CHECK4-NEXT: [[C7:%.*]] = alloca ptr, align 8
2325 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2326 // CHECK4-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2327 // CHECK4-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2328 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2329 // CHECK4-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
2330 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2331 // CHECK4-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
2332 // CHECK4-NEXT: store i32 0, ptr [[A]], align 8
2333 // CHECK4-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2334 // CHECK4-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
2335 // CHECK4-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
2336 // CHECK4-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
2337 // CHECK4-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
2338 // CHECK4-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2339 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
2340 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
2341 // CHECK4-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0
2342 // CHECK4-NEXT: store ptr [[A3]], ptr [[A2]], align 8
2343 // CHECK4-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
2344 // CHECK4-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4
2345 // CHECK4-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4
2346 // CHECK4-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4
2347 // CHECK4-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32
2348 // CHECK4-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4
2349 // CHECK4-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
2350 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8
2351 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8
2352 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8
2353 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2354 // CHECK4-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4
2355 // CHECK4-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8
2356 // CHECK4-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4
2357 // CHECK4-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4
2358 // CHECK4-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8
2359 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8
2360 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2361 // CHECK4-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4
2362 // CHECK4-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8
2363 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 4, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]])
2364 // CHECK4-NEXT: ret void
2367 // CHECK4-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
2368 // CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
2369 // CHECK4-NEXT: entry:
2370 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2371 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2372 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2373 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2374 // CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2375 // CHECK4-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2376 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2377 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2378 // CHECK4-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
2379 // CHECK4-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
2380 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
2381 // CHECK4-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
2382 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
2383 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2384 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2385 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2386 // CHECK4-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2387 // CHECK4-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2388 // CHECK4-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2389 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2390 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2391 // CHECK4-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2392 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2393 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
2394 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
2395 // CHECK4-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
2396 // CHECK4-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2397 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2398 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2399 // CHECK4-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
2400 // CHECK4-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
2401 // CHECK4-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2402 // CHECK4: omp_if.then:
2403 // CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
2404 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[TMP7]], align 8
2405 // CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1
2406 // CHECK4-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP2]], align 8
2407 // CHECK4-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
2408 // CHECK4-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 2
2409 // CHECK4-NEXT: store ptr [[B_ADDR]], ptr [[TMP10]], align 8
2410 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 3
2411 // CHECK4-NEXT: [[TMP12:%.*]] = load ptr, ptr [[_TMP3]], align 8
2412 // CHECK4-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 8
2413 // CHECK4-NEXT: invoke void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
2414 // CHECK4-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
2415 // CHECK4: invoke.cont:
2416 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
2417 // CHECK4-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2418 // CHECK4-NEXT: br label [[OMP_IF_END]]
2419 // CHECK4: omp_if.end:
2420 // CHECK4-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
2421 // CHECK4-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP2]], align 8
2422 // CHECK4-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8
2423 // CHECK4-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
2424 // CHECK4-NEXT: store ptr [[B_ADDR]], ptr [[TMP15]], align 8
2425 // CHECK4-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
2426 // CHECK4-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP3]], align 8
2427 // CHECK4-NEXT: store ptr [[TMP17]], ptr [[TMP16]], align 8
2428 // CHECK4-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2429 // CHECK4-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.4, i32 [[TMP18]])
2430 // CHECK4-NEXT: ret void
2431 // CHECK4: terminate.lpad:
2432 // CHECK4-NEXT: [[TMP19:%.*]] = landingpad { ptr, i32 }
2433 // CHECK4-NEXT: catch ptr null
2434 // CHECK4-NEXT: [[TMP20:%.*]] = extractvalue { ptr, i32 } [[TMP19]], 0
2435 // CHECK4-NEXT: call void @__clang_call_terminate(ptr [[TMP20]]) #[[ATTR13]]
2436 // CHECK4-NEXT: unreachable
2439 // CHECK4-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
2440 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR10]] align 2 {
2441 // CHECK4-NEXT: entry:
2442 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2443 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2444 // CHECK4-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
2445 // CHECK4-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
2446 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2447 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2448 // CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON:%.*]], ptr [[THIS1]], i32 0, i32 0
2449 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
2450 // CHECK4-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1
2451 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
2452 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2453 // CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
2454 // CHECK4-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
2455 // CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 2
2456 // CHECK4-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
2457 // CHECK4-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
2458 // CHECK4-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
2459 // CHECK4-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
2460 // CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 3
2461 // CHECK4-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
2462 // CHECK4-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
2463 // CHECK4-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
2464 // CHECK4-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
2465 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1
2466 // CHECK4-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
2467 // CHECK4-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
2468 // CHECK4-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4
2469 // CHECK4-NEXT: [[TMP14:%.*]] = load i64, ptr [[A_CASTED]], align 8
2470 // CHECK4-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 2
2471 // CHECK4-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8
2472 // CHECK4-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
2473 // CHECK4-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4
2474 // CHECK4-NEXT: [[TMP18:%.*]] = load i64, ptr [[B_CASTED]], align 8
2475 // CHECK4-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 3
2476 // CHECK4-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8
2477 // CHECK4-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4
2478 // CHECK4-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4
2479 // CHECK4-NEXT: [[TMP22:%.*]] = load i64, ptr [[C_CASTED]], align 8
2480 // CHECK4-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]])
2481 // CHECK4-NEXT: ret void
2484 // CHECK4-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.4
2485 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
2486 // CHECK4-NEXT: entry:
2487 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2488 // CHECK4-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2489 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2490 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2491 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2492 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2493 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
2494 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2495 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
2496 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2497 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2498 // CHECK4-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
2499 // CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
2500 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
2501 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
2502 // CHECK4-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
2503 // CHECK4-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
2504 // CHECK4-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
2505 // CHECK4-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
2506 // CHECK4-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
2507 // CHECK4-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
2508 // CHECK4-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
2509 // CHECK4-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
2510 // CHECK4-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
2511 // CHECK4-NEXT: ret void
2514 // CHECK4-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
2515 // CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] {
2516 // CHECK4-NEXT: entry:
2517 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2518 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2519 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2520 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2521 // CHECK4-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
2522 // CHECK4-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
2523 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2524 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2525 // CHECK4-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
2526 // CHECK4-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
2527 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
2528 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
2529 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2530 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2531 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2532 // CHECK4-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2533 // CHECK4-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
2534 // CHECK4-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
2535 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2536 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2537 // CHECK4-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8
2538 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2539 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8
2540 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8
2541 // CHECK4-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8
2542 // CHECK4-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2543 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2544 // CHECK4-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
2545 // CHECK4-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP4]])
2546 // CHECK4-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
2547 // CHECK4-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2548 // CHECK4: omp_if.then:
2549 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP2]], align 8
2550 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2551 // CHECK4-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1
2552 // CHECK4-NEXT: store i32 [[INC]], ptr [[TMP7]], align 4
2553 // CHECK4-NEXT: [[TMP9:%.*]] = load i32, ptr [[B_ADDR]], align 4
2554 // CHECK4-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP9]], -1
2555 // CHECK4-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4
2556 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP3]], align 8
2557 // CHECK4-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
2558 // CHECK4-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP11]], 1
2559 // CHECK4-NEXT: store i32 [[DIV]], ptr [[TMP10]], align 4
2560 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP4]])
2561 // CHECK4-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2562 // CHECK4-NEXT: br label [[OMP_IF_END]]
2563 // CHECK4: omp_if.end:
2564 // CHECK4-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
2565 // CHECK4-NEXT: [[TMP13:%.*]] = load ptr, ptr [[_TMP2]], align 8
2566 // CHECK4-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8
2567 // CHECK4-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
2568 // CHECK4-NEXT: store ptr [[B_ADDR]], ptr [[TMP14]], align 8
2569 // CHECK4-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2
2570 // CHECK4-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP3]], align 8
2571 // CHECK4-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 8
2572 // CHECK4-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2573 // CHECK4-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.5, i32 [[TMP17]])
2574 // CHECK4-NEXT: ret void
2577 // CHECK4-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.5
2578 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
2579 // CHECK4-NEXT: entry:
2580 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2581 // CHECK4-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2582 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2583 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2584 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2585 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2586 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0
2587 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2588 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0
2589 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2590 // CHECK4-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4
2591 // CHECK4-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4
2592 // CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1
2593 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
2594 // CHECK4-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1
2595 // CHECK4-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
2596 // CHECK4-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4
2597 // CHECK4-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4
2598 // CHECK4-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2
2599 // CHECK4-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8
2600 // CHECK4-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2
2601 // CHECK4-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8
2602 // CHECK4-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4
2603 // CHECK4-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4
2604 // CHECK4-NEXT: ret void
2607 // CHECK4-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev
2608 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] comdat align 2 {
2609 // CHECK4-NEXT: entry:
2610 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2611 // CHECK4-NEXT: [[A2:%.*]] = alloca ptr, align 8
2612 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2613 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2614 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2615 // CHECK4-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
2616 // CHECK4-NEXT: store double 0.000000e+00, ptr [[A]], align 8
2617 // CHECK4-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0
2618 // CHECK4-NEXT: store ptr [[A3]], ptr [[A2]], align 8
2619 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 8
2620 // CHECK4-NEXT: [[TMP1:%.*]] = load double, ptr [[TMP0]], align 8
2621 // CHECK4-NEXT: store double [[TMP1]], ptr [[A_CASTED]], align 8
2622 // CHECK4-NEXT: [[TMP2:%.*]] = load i64, ptr [[A_CASTED]], align 8
2623 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZN3SSTIdEC2Ev.omp_outlined, ptr [[THIS1]], i64 [[TMP2]])
2624 // CHECK4-NEXT: ret void
2627 // CHECK4-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev.omp_outlined
2628 // CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 {
2629 // CHECK4-NEXT: entry:
2630 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2631 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2632 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2633 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2634 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2635 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2636 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
2637 // CHECK4-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
2638 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
2639 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2640 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2641 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2642 // CHECK4-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2643 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2644 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2645 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2646 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
2647 // CHECK4-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2648 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2649 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2650 // CHECK4-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
2651 // CHECK4-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
2652 // CHECK4-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2653 // CHECK4: omp_if.then:
2654 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
2655 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[TMP6]], align 8
2656 // CHECK4-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
2657 // CHECK4-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 8
2658 // CHECK4-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 8
2659 // CHECK4-NEXT: invoke void @_ZZN3SSTIdEC1EvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
2660 // CHECK4-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
2661 // CHECK4: invoke.cont:
2662 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
2663 // CHECK4-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2664 // CHECK4-NEXT: br label [[OMP_IF_END]]
2665 // CHECK4: omp_if.end:
2666 // CHECK4-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
2667 // CHECK4-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP1]], align 8
2668 // CHECK4-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8
2669 // CHECK4-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2670 // CHECK4-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.6, i32 [[TMP11]])
2671 // CHECK4-NEXT: ret void
2672 // CHECK4: terminate.lpad:
2673 // CHECK4-NEXT: [[TMP12:%.*]] = landingpad { ptr, i32 }
2674 // CHECK4-NEXT: catch ptr null
2675 // CHECK4-NEXT: [[TMP13:%.*]] = extractvalue { ptr, i32 } [[TMP12]], 0
2676 // CHECK4-NEXT: call void @__clang_call_terminate(ptr [[TMP13]]) #[[ATTR13]]
2677 // CHECK4-NEXT: unreachable
2680 // CHECK4-LABEL: define {{[^@]+}}@_ZZN3SSTIdEC1EvENKUlvE_clEv
2681 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR4]] align 2 {
2682 // CHECK4-NEXT: entry:
2683 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2684 // CHECK4-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 8
2685 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2686 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2687 // CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
2688 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
2689 // CHECK4-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0
2690 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[TMP2]], align 8
2691 // CHECK4-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1
2692 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
2693 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2694 // CHECK4-NEXT: store ptr [[TMP5]], ptr [[TMP3]], align 8
2695 // CHECK4-NEXT: call void @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
2696 // CHECK4-NEXT: ret void
2699 // CHECK4-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.6
2700 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
2701 // CHECK4-NEXT: entry:
2702 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2703 // CHECK4-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2704 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2705 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2706 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2707 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2708 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2709 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2710 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2711 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2712 // CHECK4-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
2713 // CHECK4-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
2714 // CHECK4-NEXT: ret void
2717 // CHECK4-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv
2718 // CHECK4-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR10]] align 2 {
2719 // CHECK4-NEXT: entry:
2720 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2721 // CHECK4-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
2722 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2723 // CHECK4-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2724 // CHECK4-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1:%.*]], ptr [[THIS1]], i32 0, i32 0
2725 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
2726 // CHECK4-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
2727 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
2728 // CHECK4-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8
2729 // CHECK4-NEXT: [[INC:%.*]] = fadd double [[TMP4]], 1.000000e+00
2730 // CHECK4-NEXT: store double [[INC]], ptr [[TMP3]], align 8
2731 // CHECK4-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1
2732 // CHECK4-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
2733 // CHECK4-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
2734 // CHECK4-NEXT: store double [[TMP7]], ptr [[A_CASTED]], align 8
2735 // CHECK4-NEXT: [[TMP8:%.*]] = load i64, ptr [[A_CASTED]], align 8
2736 // CHECK4-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB1]], i32 2, ptr @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP8]])
2737 // CHECK4-NEXT: ret void
2740 // CHECK4-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined
2741 // CHECK4-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] {
2742 // CHECK4-NEXT: entry:
2743 // CHECK4-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2744 // CHECK4-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2745 // CHECK4-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2746 // CHECK4-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
2747 // CHECK4-NEXT: [[TMP:%.*]] = alloca ptr, align 8
2748 // CHECK4-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
2749 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
2750 // CHECK4-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
2751 // CHECK4-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2752 // CHECK4-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2753 // CHECK4-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2754 // CHECK4-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
2755 // CHECK4-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2756 // CHECK4-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8
2757 // CHECK4-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
2758 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8
2759 // CHECK4-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2760 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8
2761 // CHECK4-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4
2762 // CHECK4-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP3]])
2763 // CHECK4-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0
2764 // CHECK4-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
2765 // CHECK4: omp_if.then:
2766 // CHECK4-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8
2767 // CHECK4-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8
2768 // CHECK4-NEXT: [[INC:%.*]] = fadd double [[TMP7]], 1.000000e+00
2769 // CHECK4-NEXT: store double [[INC]], ptr [[TMP6]], align 8
2770 // CHECK4-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP3]])
2771 // CHECK4-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2772 // CHECK4-NEXT: br label [[OMP_IF_END]]
2773 // CHECK4: omp_if.end:
2774 // CHECK4-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
2775 // CHECK4-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP1]], align 8
2776 // CHECK4-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8
2777 // CHECK4-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
2778 // CHECK4-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.7, i32 [[TMP10]])
2779 // CHECK4-NEXT: ret void
2782 // CHECK4-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.7
2783 // CHECK4-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] {
2784 // CHECK4-NEXT: entry:
2785 // CHECK4-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2786 // CHECK4-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
2787 // CHECK4-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2788 // CHECK4-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
2789 // CHECK4-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
2790 // CHECK4-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
2791 // CHECK4-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0
2792 // CHECK4-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
2793 // CHECK4-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0
2794 // CHECK4-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
2795 // CHECK4-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8
2796 // CHECK4-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8
2797 // CHECK4-NEXT: ret void
2800 // CHECK4-LABEL: define {{[^@]+}}@_GLOBAL__sub_I_single_codegen.cpp
2801 // CHECK4-SAME: () #[[ATTR0]] {
2802 // CHECK4-NEXT: entry:
2803 // CHECK4-NEXT: call void @__cxx_global_var_init()
2804 // CHECK4-NEXT: call void @__cxx_global_var_init.1()
2805 // CHECK4-NEXT: ret void
2808 // CHECK5-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_.
2809 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG6:![0-9]+]] {
2810 // CHECK5-NEXT: entry:
2811 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2812 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2813 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG10:![0-9]+]]
2814 // CHECK5-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]]), !dbg [[DBG11:![0-9]+]]
2815 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG10]]
2816 // CHECK5-NEXT: ret ptr [[TMP2]], !dbg [[DBG10]]
2819 // CHECK5-LABEL: define {{[^@]+}}@_ZN9TestClassC1Ev
2820 // CHECK5-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] align 2 !dbg [[DBG12:![0-9]+]] {
2821 // CHECK5-NEXT: entry:
2822 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2823 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2824 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2825 // CHECK5-NEXT: call void @_ZN9TestClassC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]), !dbg [[DBG13:![0-9]+]]
2826 // CHECK5-NEXT: ret void, !dbg [[DBG14:![0-9]+]]
2829 // CHECK5-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_.
2830 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG15:![0-9]+]] {
2831 // CHECK5-NEXT: entry:
2832 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2833 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2834 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG16:![0-9]+]]
2835 // CHECK5-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TMP1]]) #[[ATTR3:[0-9]+]], !dbg [[DBG16]]
2836 // CHECK5-NEXT: ret void, !dbg [[DBG17:![0-9]+]]
2839 // CHECK5-LABEL: define {{[^@]+}}@_ZN9TestClassD1Ev
2840 // CHECK5-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2:[0-9]+]] align 2 !dbg [[DBG18:![0-9]+]] {
2841 // CHECK5-NEXT: entry:
2842 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2843 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2844 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2845 // CHECK5-NEXT: call void @_ZN9TestClassD2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3]], !dbg [[DBG19:![0-9]+]]
2846 // CHECK5-NEXT: ret void, !dbg [[DBG20:![0-9]+]]
2849 // CHECK5-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_.
2850 // CHECK5-SAME: () #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG21:![0-9]+]] {
2851 // CHECK5-NEXT: entry:
2852 // CHECK5-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]]), !dbg [[DBG22:![0-9]+]]
2853 // CHECK5-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB1]], ptr @tc, ptr @.__kmpc_global_ctor_., ptr null, ptr @.__kmpc_global_dtor_.), !dbg [[DBG22]]
2854 // CHECK5-NEXT: ret void, !dbg [[DBG22]]
2857 // CHECK5-LABEL: define {{[^@]+}}@.__kmpc_global_ctor_..1
2858 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" personality ptr @__gxx_personality_v0 !dbg [[DBG23:![0-9]+]] {
2859 // CHECK5-NEXT: entry:
2860 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2861 // CHECK5-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
2862 // CHECK5-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
2863 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2864 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG24:![0-9]+]]
2865 // CHECK5-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %class.TestClass], ptr [[TMP1]], i32 0, i32 0, !dbg [[DBG25:![0-9]+]]
2866 // CHECK5-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAY_BEGIN]], i64 2, !dbg [[DBG25]]
2867 // CHECK5-NEXT: br label [[ARRAYCTOR_LOOP:%.*]], !dbg [[DBG25]]
2868 // CHECK5: arrayctor.loop:
2869 // CHECK5-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ], !dbg [[DBG25]]
2870 // CHECK5-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2871 // CHECK5-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]], !dbg [[DBG25]]
2872 // CHECK5: invoke.cont:
2873 // CHECK5-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYCTOR_CUR]], i64 1, !dbg [[DBG25]]
2874 // CHECK5-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]], !dbg [[DBG25]]
2875 // CHECK5-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]], !dbg [[DBG25]]
2876 // CHECK5: arrayctor.cont:
2877 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG24]]
2878 // CHECK5-NEXT: ret ptr [[TMP2]], !dbg [[DBG24]]
2879 // CHECK5: lpad:
2880 // CHECK5-NEXT: [[TMP3:%.*]] = landingpad { ptr, i32 }
2881 // CHECK5-NEXT: cleanup, !dbg [[DBG26:![0-9]+]]
2882 // CHECK5-NEXT: [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 0, !dbg [[DBG26]]
2883 // CHECK5-NEXT: store ptr [[TMP4]], ptr [[EXN_SLOT]], align 8, !dbg [[DBG26]]
2884 // CHECK5-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP3]], 1, !dbg [[DBG26]]
2885 // CHECK5-NEXT: store i32 [[TMP5]], ptr [[EHSELECTOR_SLOT]], align 4, !dbg [[DBG26]]
2886 // CHECK5-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[ARRAYCTOR_CUR]], !dbg [[DBG25]]
2887 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]], !dbg [[DBG25]]
2888 // CHECK5: arraydestroy.body:
2889 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ], !dbg [[DBG25]]
2890 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1, !dbg [[DBG25]]
2891 // CHECK5-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]], !dbg [[DBG25]]
2892 // CHECK5-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]], !dbg [[DBG25]]
2893 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]], !dbg [[DBG25]]
2894 // CHECK5: arraydestroy.done1:
2895 // CHECK5-NEXT: br label [[EH_RESUME:%.*]], !dbg [[DBG25]]
2896 // CHECK5: eh.resume:
2897 // CHECK5-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8, !dbg [[DBG25]]
2898 // CHECK5-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4, !dbg [[DBG25]]
2899 // CHECK5-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0, !dbg [[DBG25]]
2900 // CHECK5-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1, !dbg [[DBG25]]
2901 // CHECK5-NEXT: resume { ptr, i32 } [[LPAD_VAL2]], !dbg [[DBG25]]
2904 // CHECK5-LABEL: define {{[^@]+}}@.__kmpc_global_dtor_..2
2905 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG27:![0-9]+]] {
2906 // CHECK5-NEXT: entry:
2907 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2908 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2909 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG28:![0-9]+]]
2910 // CHECK5-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP1]], i64 2, !dbg [[DBG28]]
2911 // CHECK5-NEXT: br label [[ARRAYDESTROY_BODY:%.*]], !dbg [[DBG28]]
2912 // CHECK5: arraydestroy.body:
2913 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP2]], [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ], !dbg [[DBG28]]
2914 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1, !dbg [[DBG28]]
2915 // CHECK5-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]], !dbg [[DBG28]]
2916 // CHECK5-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[TMP1]], !dbg [[DBG28]]
2917 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]], !dbg [[DBG28]]
2918 // CHECK5: arraydestroy.done1:
2919 // CHECK5-NEXT: ret void, !dbg [[DBG29:![0-9]+]]
2922 // CHECK5-LABEL: define {{[^@]+}}@.__omp_threadprivate_init_..3
2923 // CHECK5-SAME: () #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG30:![0-9]+]] {
2924 // CHECK5-NEXT: entry:
2925 // CHECK5-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB3:[0-9]+]]), !dbg [[DBG31:![0-9]+]]
2926 // CHECK5-NEXT: call void @__kmpc_threadprivate_register(ptr @[[GLOB3]], ptr @tc2, ptr @.__kmpc_global_ctor_..1, ptr null, ptr @.__kmpc_global_dtor_..2), !dbg [[DBG31]]
2927 // CHECK5-NEXT: ret void, !dbg [[DBG31]]
2930 // CHECK5-LABEL: define {{[^@]+}}@__cxx_global_var_init
2931 // CHECK5-SAME: () #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG32:![0-9]+]] {
2932 // CHECK5-NEXT: entry:
2933 // CHECK5-NEXT: call void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) @tc), !dbg [[DBG34:![0-9]+]]
2934 // CHECK5-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @_ZN9TestClassD1Ev, ptr @tc, ptr @__dso_handle) #[[ATTR3]], !dbg [[DBG36:![0-9]+]]
2935 // CHECK5-NEXT: ret void, !dbg [[DBG34]]
2938 // CHECK5-LABEL: define {{[^@]+}}@__cxx_global_var_init.4
2939 // CHECK5-SAME: () #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" personality ptr @__gxx_personality_v0 !dbg [[DBG37:![0-9]+]] {
2940 // CHECK5-NEXT: entry:
2941 // CHECK5-NEXT: [[EXN_SLOT:%.*]] = alloca ptr, align 8
2942 // CHECK5-NEXT: [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
2943 // CHECK5-NEXT: br label [[ARRAYCTOR_LOOP:%.*]], !dbg [[DBG38:![0-9]+]]
2944 // CHECK5: arrayctor.loop:
2945 // CHECK5-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ @tc2, [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[INVOKE_CONT:%.*]] ], !dbg [[DBG38]]
2946 // CHECK5-NEXT: invoke void @_ZN9TestClassC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
2947 // CHECK5-NEXT: to label [[INVOKE_CONT]] unwind label [[LPAD:%.*]], !dbg [[DBG38]]
2948 // CHECK5: invoke.cont:
2949 // CHECK5-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[ARRAYCTOR_CUR]], i64 1, !dbg [[DBG38]]
2950 // CHECK5-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], getelementptr inbounds ([[CLASS_TESTCLASS]], ptr @tc2, i64 2), !dbg [[DBG38]]
2951 // CHECK5-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]], !dbg [[DBG38]]
2952 // CHECK5: arrayctor.cont:
2953 // CHECK5-NEXT: [[TMP0:%.*]] = call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle) #[[ATTR3]], !dbg [[DBG40:![0-9]+]]
2954 // CHECK5-NEXT: ret void, !dbg [[DBG40]]
2955 // CHECK5: lpad:
2956 // CHECK5-NEXT: [[TMP1:%.*]] = landingpad { ptr, i32 }
2957 // CHECK5-NEXT: cleanup, !dbg [[DBG41:![0-9]+]]
2958 // CHECK5-NEXT: [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0, !dbg [[DBG41]]
2959 // CHECK5-NEXT: store ptr [[TMP2]], ptr [[EXN_SLOT]], align 8, !dbg [[DBG41]]
2960 // CHECK5-NEXT: [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1, !dbg [[DBG41]]
2961 // CHECK5-NEXT: store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4, !dbg [[DBG41]]
2962 // CHECK5-NEXT: [[ARRAYDESTROY_ISEMPTY:%.*]] = icmp eq ptr @tc2, [[ARRAYCTOR_CUR]], !dbg [[DBG38]]
2963 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_ISEMPTY]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY:%.*]], !dbg [[DBG38]]
2964 // CHECK5: arraydestroy.body:
2965 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[ARRAYCTOR_CUR]], [[LPAD]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ], !dbg [[DBG38]]
2966 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1, !dbg [[DBG38]]
2967 // CHECK5-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]], !dbg [[DBG38]]
2968 // CHECK5-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2, !dbg [[DBG38]]
2969 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1]], label [[ARRAYDESTROY_BODY]], !dbg [[DBG38]]
2970 // CHECK5: arraydestroy.done1:
2971 // CHECK5-NEXT: br label [[EH_RESUME:%.*]], !dbg [[DBG38]]
2972 // CHECK5: eh.resume:
2973 // CHECK5-NEXT: [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 8, !dbg [[DBG38]]
2974 // CHECK5-NEXT: [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4, !dbg [[DBG38]]
2975 // CHECK5-NEXT: [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } poison, ptr [[EXN]], 0, !dbg [[DBG38]]
2976 // CHECK5-NEXT: [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1, !dbg [[DBG38]]
2977 // CHECK5-NEXT: resume { ptr, i32 } [[LPAD_VAL2]], !dbg [[DBG38]]
2980 // CHECK5-LABEL: define {{[^@]+}}@__cxx_global_array_dtor
2981 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG42:![0-9]+]] {
2982 // CHECK5-NEXT: entry:
2983 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
2984 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
2985 // CHECK5-NEXT: br label [[ARRAYDESTROY_BODY:%.*]], !dbg [[DBG43:![0-9]+]]
2986 // CHECK5: arraydestroy.body:
2987 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ getelementptr inbounds ([[CLASS_TESTCLASS:%.*]], ptr @tc2, i64 2), [[ENTRY:%.*]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ], !dbg [[DBG43]]
2988 // CHECK5-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[CLASS_TESTCLASS]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1, !dbg [[DBG43]]
2989 // CHECK5-NEXT: call void @_ZN9TestClassD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR3]], !dbg [[DBG43]]
2990 // CHECK5-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], @tc2, !dbg [[DBG43]]
2991 // CHECK5-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]], !dbg [[DBG43]]
2992 // CHECK5: arraydestroy.done1:
2993 // CHECK5-NEXT: ret void, !dbg [[DBG43]]
2996 // CHECK5-LABEL: define {{[^@]+}}@_ZN9TestClassC2Ev
2997 // CHECK5-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] align 2 !dbg [[DBG44:![0-9]+]] {
2998 // CHECK5-NEXT: entry:
2999 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3000 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3001 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3002 // CHECK5-NEXT: [[A:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[THIS1]], i32 0, i32 0, !dbg [[DBG45:![0-9]+]]
3003 // CHECK5-NEXT: store i32 0, ptr [[A]], align 4, !dbg [[DBG45]]
3004 // CHECK5-NEXT: ret void, !dbg [[DBG46:![0-9]+]]
3007 // CHECK5-LABEL: define {{[^@]+}}@_ZN9TestClassD2Ev
3008 // CHECK5-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] align 2 !dbg [[DBG47:![0-9]+]] {
3009 // CHECK5-NEXT: entry:
3010 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3011 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3012 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3013 // CHECK5-NEXT: ret void, !dbg [[DBG48:![0-9]+]]
3016 // CHECK5-LABEL: define {{[^@]+}}@_Z3foov
3017 // CHECK5-SAME: () #[[ATTR4:[0-9]+]] !dbg [[DBG49:![0-9]+]] {
3018 // CHECK5-NEXT: entry:
3019 // CHECK5-NEXT: call void @_Z8mayThrowv(), !dbg [[DBG50:![0-9]+]]
3020 // CHECK5-NEXT: ret void, !dbg [[DBG51:![0-9]+]]
3023 // CHECK5-LABEL: define {{[^@]+}}@main
3024 // CHECK5-SAME: () #[[ATTR6:[0-9]+]] personality ptr @__gxx_personality_v0 !dbg [[DBG52:![0-9]+]] {
3025 // CHECK5-NEXT: entry:
3026 // CHECK5-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
3027 // CHECK5-NEXT: [[A:%.*]] = alloca i8, align 1
3028 // CHECK5-NEXT: [[A2:%.*]] = alloca [2 x i8], align 1
3029 // CHECK5-NEXT: [[C:%.*]] = alloca ptr, align 8
3030 // CHECK5-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 8
3031 // CHECK5-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
3032 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3033 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [5 x ptr], align 8
3034 // CHECK5-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB5:[0-9]+]])
3035 // CHECK5-NEXT: store i32 0, ptr [[RETVAL]], align 4
3036 // CHECK5-NEXT: store ptr @tc, ptr [[C]], align 8, !dbg [[DBG53:![0-9]+]]
3037 // CHECK5-NEXT: call void @_ZN3SSTIdEC1Ev(ptr noundef nonnull align 8 dereferenceable(8) [[SST]]), !dbg [[DBG54:![0-9]+]]
3038 // CHECK5-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @tc), !dbg [[DBG55:![0-9]+]]
3039 // CHECK5-NEXT: [[TMP1:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB5]], i32 [[TMP0]]), !dbg [[DBG56:![0-9]+]]
3040 // CHECK5-NEXT: [[TMP2:%.*]] = icmp ne i32 [[TMP1]], 0, !dbg [[DBG56]]
3041 // CHECK5-NEXT: br i1 [[TMP2]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG56]]
3042 // CHECK5: omp_if.then:
3043 // CHECK5-NEXT: store i8 2, ptr [[A]], align 1, !dbg [[DBG57:![0-9]+]]
3044 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB5]], i32 [[TMP0]]), !dbg [[DBG58:![0-9]+]]
3045 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG58]]
3046 // CHECK5: omp_if.end:
3047 // CHECK5-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB7:[0-9]+]], i32 [[TMP0]]), !dbg [[DBG59:![0-9]+]]
3048 // CHECK5-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0, !dbg [[DBG59]]
3049 // CHECK5-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN1:%.*]], label [[OMP_IF_END2:%.*]], !dbg [[DBG59]]
3050 // CHECK5: omp_if.then1:
3051 // CHECK5-NEXT: store i8 2, ptr [[A]], align 1, !dbg [[DBG60:![0-9]+]]
3052 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB7]], i32 [[TMP0]]), !dbg [[DBG61:![0-9]+]]
3053 // CHECK5-NEXT: br label [[OMP_IF_END2]], !dbg [[DBG61]]
3054 // CHECK5: omp_if.end2:
3055 // CHECK5-NEXT: call void @__kmpc_barrier(ptr @[[GLOB8:[0-9]+]], i32 [[TMP0]]), !dbg [[DBG62:![0-9]+]]
3056 // CHECK5-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG63:![0-9]+]]
3057 // CHECK5-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB10:[0-9]+]], i32 [[TMP0]]), !dbg [[DBG63]]
3058 // CHECK5-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0, !dbg [[DBG63]]
3059 // CHECK5-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN3:%.*]], label [[OMP_IF_END4:%.*]], !dbg [[DBG63]]
3060 // CHECK5: omp_if.then3:
3061 // CHECK5-NEXT: invoke void @_Z3foov()
3062 // CHECK5-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]], !dbg [[DBG64:![0-9]+]]
3063 // CHECK5: invoke.cont:
3064 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB10]], i32 [[TMP0]]), !dbg [[DBG64]]
3065 // CHECK5-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG64]]
3066 // CHECK5-NEXT: br label [[OMP_IF_END4]], !dbg [[DBG64]]
3067 // CHECK5: omp_if.end4:
3068 // CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0, !dbg [[DBG64]]
3069 // CHECK5-NEXT: store ptr [[A]], ptr [[TMP7]], align 8, !dbg [[DBG64]]
3070 // CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1, !dbg [[DBG64]]
3071 // CHECK5-NEXT: store ptr @tc, ptr [[TMP8]], align 8, !dbg [[DBG64]]
3072 // CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2, !dbg [[DBG64]]
3073 // CHECK5-NEXT: [[TMP10:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB12:[0-9]+]], i32 [[TMP0]], ptr @tc, i64 4, ptr @tc.cache.), !dbg [[DBG65:![0-9]+]]
3074 // CHECK5-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8, !dbg [[DBG64]]
3075 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 3, !dbg [[DBG64]]
3076 // CHECK5-NEXT: store ptr [[A2]], ptr [[TMP11]], align 8, !dbg [[DBG64]]
3077 // CHECK5-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 4, !dbg [[DBG64]]
3078 // CHECK5-NEXT: [[TMP13:%.*]] = call ptr @__kmpc_threadprivate_cached(ptr @[[GLOB14:[0-9]+]], i32 [[TMP0]], ptr @tc2, i64 8, ptr @tc2.cache.), !dbg [[DBG66:![0-9]+]]
3079 // CHECK5-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !dbg [[DBG64]]
3080 // CHECK5-NEXT: [[TMP14:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG64]]
3081 // CHECK5-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB10]], i32 [[TMP0]], i64 40, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func, i32 [[TMP14]]), !dbg [[DBG64]]
3082 // CHECK5-NEXT: [[TMP15:%.*]] = load i8, ptr [[A]], align 1, !dbg [[DBG67:![0-9]+]]
3083 // CHECK5-NEXT: [[CONV:%.*]] = sext i8 [[TMP15]] to i32, !dbg [[DBG67]]
3084 // CHECK5-NEXT: ret i32 [[CONV]], !dbg [[DBG68:![0-9]+]]
3085 // CHECK5: terminate.lpad:
3086 // CHECK5-NEXT: [[TMP16:%.*]] = landingpad { ptr, i32 }
3087 // CHECK5-NEXT: catch ptr null, !dbg [[DBG64]]
3088 // CHECK5-NEXT: [[TMP17:%.*]] = extractvalue { ptr, i32 } [[TMP16]], 0, !dbg [[DBG64]]
3089 // CHECK5-NEXT: call void @__clang_call_terminate(ptr [[TMP17]]) #[[ATTR13:[0-9]+]], !dbg [[DBG64]]
3090 // CHECK5-NEXT: unreachable, !dbg [[DBG64]]
3093 // CHECK5-LABEL: define {{[^@]+}}@_ZN3SSTIdEC1Ev
3094 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] align 2 !dbg [[DBG69:![0-9]+]] {
3095 // CHECK5-NEXT: entry:
3096 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3097 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3098 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3099 // CHECK5-NEXT: call void @_ZN3SSTIdEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) [[THIS1]]), !dbg [[DBG70:![0-9]+]]
3100 // CHECK5-NEXT: ret void, !dbg [[DBG71:![0-9]+]]
3103 // CHECK5-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
3104 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] align 2 !dbg [[DBG72:![0-9]+]] {
3105 // CHECK5-NEXT: entry:
3106 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3107 // CHECK5-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
3108 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3109 // CHECK5-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
3110 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3111 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8, !dbg [[DBG73:![0-9]+]]
3112 // CHECK5-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]]), !dbg [[DBG73]]
3113 // CHECK5-NEXT: ret void, !dbg [[DBG74:![0-9]+]]
3116 // CHECK5-LABEL: define {{[^@]+}}@__clang_call_terminate
3117 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] {
3118 // CHECK5-NEXT: [[TMP2:%.*]] = call ptr @__cxa_begin_catch(ptr [[TMP0]]) #[[ATTR3]]
3119 // CHECK5-NEXT: call void @_ZSt9terminatev() #[[ATTR13]]
3120 // CHECK5-NEXT: unreachable
3123 // CHECK5-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func
3124 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9:[0-9]+]] !dbg [[DBG75:![0-9]+]] {
3125 // CHECK5-NEXT: entry:
3126 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3127 // CHECK5-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3128 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3129 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3130 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG76:![0-9]+]]
3131 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8, !dbg [[DBG76]]
3132 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 0, !dbg [[DBG76]]
3133 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG76]]
3134 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 0, !dbg [[DBG76]]
3135 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8, !dbg [[DBG76]]
3136 // CHECK5-NEXT: [[TMP8:%.*]] = load i8, ptr [[TMP7]], align 1, !dbg [[DBG77:![0-9]+]]
3137 // CHECK5-NEXT: store i8 [[TMP8]], ptr [[TMP5]], align 1, !dbg [[DBG77]]
3138 // CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 1, !dbg [[DBG76]]
3139 // CHECK5-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8, !dbg [[DBG76]]
3140 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 1, !dbg [[DBG76]]
3141 // CHECK5-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8, !dbg [[DBG76]]
3142 // CHECK5-NEXT: [[CALL:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP10]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP12]]), !dbg [[DBG78:![0-9]+]]
3143 // CHECK5-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 2, !dbg [[DBG76]]
3144 // CHECK5-NEXT: [[TMP14:%.*]] = load ptr, ptr [[TMP13]], align 8, !dbg [[DBG76]]
3145 // CHECK5-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 2, !dbg [[DBG76]]
3146 // CHECK5-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8, !dbg [[DBG76]]
3147 // CHECK5-NEXT: [[CALL2:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[TMP14]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP16]]), !dbg [[DBG79:![0-9]+]]
3148 // CHECK5-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 3, !dbg [[DBG76]]
3149 // CHECK5-NEXT: [[TMP18:%.*]] = load ptr, ptr [[TMP17]], align 8, !dbg [[DBG76]]
3150 // CHECK5-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 3, !dbg [[DBG76]]
3151 // CHECK5-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8, !dbg [[DBG76]]
3152 // CHECK5-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[TMP18]], ptr align 1 [[TMP20]], i64 2, i1 false), !dbg [[DBG76]]
3153 // CHECK5-NEXT: [[TMP21:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP2]], i64 0, i64 4, !dbg [[DBG76]]
3154 // CHECK5-NEXT: [[TMP22:%.*]] = load ptr, ptr [[TMP21]], align 8, !dbg [[DBG76]]
3155 // CHECK5-NEXT: [[TMP23:%.*]] = getelementptr inbounds [5 x ptr], ptr [[TMP3]], i64 0, i64 4, !dbg [[DBG76]]
3156 // CHECK5-NEXT: [[TMP24:%.*]] = load ptr, ptr [[TMP23]], align 8, !dbg [[DBG76]]
3157 // CHECK5-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[CLASS_TESTCLASS:%.*]], ptr [[TMP22]], i64 2, !dbg [[DBG76]]
3158 // CHECK5-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[TMP22]], [[TMP25]], !dbg [[DBG76]]
3159 // CHECK5-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE4:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]], !dbg [[DBG76]]
3160 // CHECK5: omp.arraycpy.body:
3161 // CHECK5-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP24]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ], !dbg [[DBG76]]
3162 // CHECK5-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[TMP22]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ], !dbg [[DBG76]]
3163 // CHECK5-NEXT: [[CALL3:%.*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN9TestClassaSERKS_(ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr noundef nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]]), !dbg [[DBG80:![0-9]+]]
3164 // CHECK5-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1, !dbg [[DBG76]]
3165 // CHECK5-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[CLASS_TESTCLASS]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1, !dbg [[DBG76]]
3166 // CHECK5-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP25]], !dbg [[DBG76]]
3167 // CHECK5-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE4]], label [[OMP_ARRAYCPY_BODY]], !dbg [[DBG76]]
3168 // CHECK5: omp.arraycpy.done4:
3169 // CHECK5-NEXT: ret void, !dbg [[DBG80]]
3172 // CHECK5-LABEL: define {{[^@]+}}@_ZN9TestClassaSERKS_
3173 // CHECK5-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] align 2 !dbg [[DBG81:![0-9]+]] {
3174 // CHECK5-NEXT: entry:
3175 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3176 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3177 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3178 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3179 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3180 // CHECK5-NEXT: ret ptr [[THIS1]], !dbg [[DBG82:![0-9]+]]
3183 // CHECK5-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev
3184 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR2]] align 2 !dbg [[DBG83:![0-9]+]] {
3185 // CHECK5-NEXT: entry:
3186 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3187 // CHECK5-NEXT: [[A2:%.*]] = alloca ptr, align 8
3188 // CHECK5-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
3189 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3190 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3191 // CHECK5-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0, !dbg [[DBG84:![0-9]+]]
3192 // CHECK5-NEXT: store double 0.000000e+00, ptr [[A]], align 8, !dbg [[DBG84]]
3193 // CHECK5-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SST]], ptr [[THIS1]], i32 0, i32 0, !dbg [[DBG85:![0-9]+]]
3194 // CHECK5-NEXT: store ptr [[A3]], ptr [[A2]], align 8, !dbg [[DBG85]]
3195 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A2]], align 8, !dbg [[DBG86:![0-9]+]]
3196 // CHECK5-NEXT: [[TMP1:%.*]] = load double, ptr [[TMP0]], align 8, !dbg [[DBG87:![0-9]+]]
3197 // CHECK5-NEXT: store double [[TMP1]], ptr [[A_CASTED]], align 8, !dbg [[DBG87]]
3198 // CHECK5-NEXT: [[TMP2:%.*]] = load i64, ptr [[A_CASTED]], align 8, !dbg [[DBG87]]
3199 // CHECK5-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB18:[0-9]+]], i32 2, ptr @_ZN3SSTIdEC2Ev.omp_outlined, ptr [[THIS1]], i64 [[TMP2]]), !dbg [[DBG87]]
3200 // CHECK5-NEXT: ret void, !dbg [[DBG88:![0-9]+]]
3203 // CHECK5-LABEL: define {{[^@]+}}@_ZN3SSTIdEC2Ev.omp_outlined
3204 // CHECK5-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12:[0-9]+]] personality ptr @__gxx_personality_v0 !dbg [[DBG89:![0-9]+]] {
3205 // CHECK5-NEXT: entry:
3206 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3207 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3208 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3209 // CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
3210 // CHECK5-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3211 // CHECK5-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
3212 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3213 // CHECK5-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 8
3214 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
3215 // CHECK5-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3216 // CHECK5-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3217 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3218 // CHECK5-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
3219 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8, !dbg [[DBG90:![0-9]+]]
3220 // CHECK5-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8, !dbg [[DBG90]]
3221 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8, !dbg [[DBG91:![0-9]+]]
3222 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8, !dbg [[DBG92:![0-9]+]]
3223 // CHECK5-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG92]]
3224 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG92]]
3225 // CHECK5-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4, !dbg [[DBG92]]
3226 // CHECK5-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB16:[0-9]+]], i32 [[TMP3]]), !dbg [[DBG92]]
3227 // CHECK5-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0, !dbg [[DBG92]]
3228 // CHECK5-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG92]]
3229 // CHECK5: omp_if.then:
3230 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0, !dbg [[DBG93:![0-9]+]]
3231 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[TMP6]], align 8, !dbg [[DBG93]]
3232 // CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 1, !dbg [[DBG93]]
3233 // CHECK5-NEXT: [[TMP8:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG94:![0-9]+]]
3234 // CHECK5-NEXT: store ptr [[TMP8]], ptr [[TMP7]], align 8, !dbg [[DBG93]]
3235 // CHECK5-NEXT: invoke void @_ZZN3SSTIdEC1EvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
3236 // CHECK5-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]], !dbg [[DBG93]]
3237 // CHECK5: invoke.cont:
3238 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB16]], i32 [[TMP3]]), !dbg [[DBG93]]
3239 // CHECK5-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG93]]
3240 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG93]]
3241 // CHECK5: omp_if.end:
3242 // CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0, !dbg [[DBG93]]
3243 // CHECK5-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG95:![0-9]+]]
3244 // CHECK5-NEXT: store ptr [[TMP10]], ptr [[TMP9]], align 8, !dbg [[DBG93]]
3245 // CHECK5-NEXT: [[TMP11:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG93]]
3246 // CHECK5-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB16]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.5, i32 [[TMP11]]), !dbg [[DBG93]]
3247 // CHECK5-NEXT: ret void, !dbg [[DBG96:![0-9]+]]
3248 // CHECK5: terminate.lpad:
3249 // CHECK5-NEXT: [[TMP12:%.*]] = landingpad { ptr, i32 }
3250 // CHECK5-NEXT: catch ptr null, !dbg [[DBG93]]
3251 // CHECK5-NEXT: [[TMP13:%.*]] = extractvalue { ptr, i32 } [[TMP12]], 0, !dbg [[DBG93]]
3252 // CHECK5-NEXT: call void @__clang_call_terminate(ptr [[TMP13]]) #[[ATTR13]], !dbg [[DBG93]]
3253 // CHECK5-NEXT: unreachable, !dbg [[DBG93]]
3256 // CHECK5-LABEL: define {{[^@]+}}@_ZZN3SSTIdEC1EvENKUlvE_clEv
3257 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR4]] align 2 !dbg [[DBG97:![0-9]+]] {
3258 // CHECK5-NEXT: entry:
3259 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3260 // CHECK5-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
3261 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3262 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3263 // CHECK5-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON:%.*]], ptr [[THIS1]], i32 0, i32 0
3264 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
3265 // CHECK5-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0, !dbg [[DBG98:![0-9]+]]
3266 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[TMP2]], align 8, !dbg [[DBG98]]
3267 // CHECK5-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1, !dbg [[DBG98]]
3268 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG99:![0-9]+]]
3269 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG99]]
3270 // CHECK5-NEXT: store ptr [[TMP5]], ptr [[TMP3]], align 8, !dbg [[DBG98]]
3271 // CHECK5-NEXT: call void @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]]), !dbg [[DBG98]]
3272 // CHECK5-NEXT: ret void, !dbg [[DBG100:![0-9]+]]
3275 // CHECK5-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.5
3276 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] !dbg [[DBG101:![0-9]+]] {
3277 // CHECK5-NEXT: entry:
3278 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3279 // CHECK5-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3280 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3281 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3282 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG102:![0-9]+]]
3283 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8, !dbg [[DBG102]]
3284 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0, !dbg [[DBG102]]
3285 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG102]]
3286 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0, !dbg [[DBG102]]
3287 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8, !dbg [[DBG102]]
3288 // CHECK5-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8, !dbg [[DBG103:![0-9]+]]
3289 // CHECK5-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8, !dbg [[DBG103]]
3290 // CHECK5-NEXT: ret void, !dbg [[DBG103]]
3293 // CHECK5-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv
3294 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]]) #[[ATTR10]] align 2 !dbg [[DBG106:![0-9]+]] {
3295 // CHECK5-NEXT: entry:
3296 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3297 // CHECK5-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
3298 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3299 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3300 // CHECK5-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
3301 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
3302 // CHECK5-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG107:![0-9]+]]
3303 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8, !dbg [[DBG107]]
3304 // CHECK5-NEXT: [[TMP4:%.*]] = load double, ptr [[TMP3]], align 8, !dbg [[DBG108:![0-9]+]]
3305 // CHECK5-NEXT: [[INC:%.*]] = fadd double [[TMP4]], 1.000000e+00, !dbg [[DBG108]]
3306 // CHECK5-NEXT: store double [[INC]], ptr [[TMP3]], align 8, !dbg [[DBG108]]
3307 // CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG109:![0-9]+]]
3308 // CHECK5-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8, !dbg [[DBG109]]
3309 // CHECK5-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8, !dbg [[DBG110:![0-9]+]]
3310 // CHECK5-NEXT: store double [[TMP7]], ptr [[A_CASTED]], align 8, !dbg [[DBG110]]
3311 // CHECK5-NEXT: [[TMP8:%.*]] = load i64, ptr [[A_CASTED]], align 8, !dbg [[DBG110]]
3312 // CHECK5-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB22:[0-9]+]], i32 2, ptr @_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP8]]), !dbg [[DBG110]]
3313 // CHECK5-NEXT: ret void, !dbg [[DBG111:![0-9]+]]
3316 // CHECK5-LABEL: define {{[^@]+}}@_ZZZN3SSTIdEC1EvENKUlvE_clEvENKUlvE_clEv.omp_outlined
3317 // CHECK5-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]]) #[[ATTR12]] !dbg [[DBG112:![0-9]+]] {
3318 // CHECK5-NEXT: entry:
3319 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3320 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3321 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3322 // CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
3323 // CHECK5-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3324 // CHECK5-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
3325 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3326 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [1 x ptr], align 8
3327 // CHECK5-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3328 // CHECK5-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3329 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3330 // CHECK5-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
3331 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8, !dbg [[DBG113:![0-9]+]]
3332 // CHECK5-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8, !dbg [[DBG113]]
3333 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8, !dbg [[DBG114:![0-9]+]]
3334 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[_TMP1]], align 8, !dbg [[DBG115:![0-9]+]]
3335 // CHECK5-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG115]]
3336 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG115]]
3337 // CHECK5-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4, !dbg [[DBG115]]
3338 // CHECK5-NEXT: [[TMP4:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB20:[0-9]+]], i32 [[TMP3]]), !dbg [[DBG115]]
3339 // CHECK5-NEXT: [[TMP5:%.*]] = icmp ne i32 [[TMP4]], 0, !dbg [[DBG115]]
3340 // CHECK5-NEXT: br i1 [[TMP5]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG115]]
3341 // CHECK5: omp_if.then:
3342 // CHECK5-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG114]]
3343 // CHECK5-NEXT: [[TMP7:%.*]] = load double, ptr [[TMP6]], align 8, !dbg [[DBG116:![0-9]+]]
3344 // CHECK5-NEXT: [[INC:%.*]] = fadd double [[TMP7]], 1.000000e+00, !dbg [[DBG116]]
3345 // CHECK5-NEXT: store double [[INC]], ptr [[TMP6]], align 8, !dbg [[DBG116]]
3346 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB20]], i32 [[TMP3]]), !dbg [[DBG116]]
3347 // CHECK5-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG116]]
3348 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG116]]
3349 // CHECK5: omp_if.end:
3350 // CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0, !dbg [[DBG116]]
3351 // CHECK5-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG117:![0-9]+]]
3352 // CHECK5-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8, !dbg [[DBG116]]
3353 // CHECK5-NEXT: [[TMP10:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG116]]
3354 // CHECK5-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB20]], i32 [[TMP3]], i64 8, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.6, i32 [[TMP10]]), !dbg [[DBG116]]
3355 // CHECK5-NEXT: ret void, !dbg [[DBG118:![0-9]+]]
3358 // CHECK5-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.6
3359 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] !dbg [[DBG119:![0-9]+]] {
3360 // CHECK5-NEXT: entry:
3361 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3362 // CHECK5-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3363 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3364 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3365 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG120:![0-9]+]]
3366 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8, !dbg [[DBG120]]
3367 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP2]], i64 0, i64 0, !dbg [[DBG120]]
3368 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG120]]
3369 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [1 x ptr], ptr [[TMP3]], i64 0, i64 0, !dbg [[DBG120]]
3370 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8, !dbg [[DBG120]]
3371 // CHECK5-NEXT: [[TMP8:%.*]] = load double, ptr [[TMP7]], align 8, !dbg [[DBG121:![0-9]+]]
3372 // CHECK5-NEXT: store double [[TMP8]], ptr [[TMP5]], align 8, !dbg [[DBG121]]
3373 // CHECK5-NEXT: ret void, !dbg [[DBG121]]
3376 // CHECK5-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
3377 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR2]] align 2 !dbg [[DBG122:![0-9]+]] {
3378 // CHECK5-NEXT: entry:
3379 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3380 // CHECK5-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
3381 // CHECK5-NEXT: [[A2:%.*]] = alloca ptr, align 8
3382 // CHECK5-NEXT: [[B4:%.*]] = alloca i32, align 4
3383 // CHECK5-NEXT: [[C7:%.*]] = alloca ptr, align 8
3384 // CHECK5-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
3385 // CHECK5-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
3386 // CHECK5-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
3387 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3388 // CHECK5-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
3389 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3390 // CHECK5-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0, !dbg [[DBG123:![0-9]+]]
3391 // CHECK5-NEXT: store i32 0, ptr [[A]], align 8, !dbg [[DBG123]]
3392 // CHECK5-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG124:![0-9]+]]
3393 // CHECK5-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4, !dbg [[DBG124]]
3394 // CHECK5-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16, !dbg [[DBG124]]
3395 // CHECK5-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0, !dbg [[DBG124]]
3396 // CHECK5-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4, !dbg [[DBG124]]
3397 // CHECK5-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2, !dbg [[DBG125:![0-9]+]]
3398 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8, !dbg [[DBG126:![0-9]+]]
3399 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[C]], align 8, !dbg [[DBG125]]
3400 // CHECK5-NEXT: [[A3:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 0, !dbg [[DBG127:![0-9]+]]
3401 // CHECK5-NEXT: store ptr [[A3]], ptr [[A2]], align 8, !dbg [[DBG127]]
3402 // CHECK5-NEXT: [[B5:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG128:![0-9]+]]
3403 // CHECK5-NEXT: [[BF_LOAD6:%.*]] = load i8, ptr [[B5]], align 4, !dbg [[DBG128]]
3404 // CHECK5-NEXT: [[BF_SHL:%.*]] = shl i8 [[BF_LOAD6]], 4, !dbg [[DBG128]]
3405 // CHECK5-NEXT: [[BF_ASHR:%.*]] = ashr i8 [[BF_SHL]], 4, !dbg [[DBG128]]
3406 // CHECK5-NEXT: [[BF_CAST:%.*]] = sext i8 [[BF_ASHR]] to i32, !dbg [[DBG128]]
3407 // CHECK5-NEXT: store i32 [[BF_CAST]], ptr [[B4]], align 4, !dbg [[DBG128]]
3408 // CHECK5-NEXT: [[C8:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2, !dbg [[DBG129:![0-9]+]]
3409 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[C8]], align 8, !dbg [[DBG129]]
3410 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[C7]], align 8, !dbg [[DBG129]]
3411 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[A2]], align 8, !dbg [[DBG130:![0-9]+]]
3412 // CHECK5-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 4, !dbg [[DBG131:![0-9]+]]
3413 // CHECK5-NEXT: store i32 [[TMP3]], ptr [[A_CASTED]], align 4, !dbg [[DBG131]]
3414 // CHECK5-NEXT: [[TMP4:%.*]] = load i64, ptr [[A_CASTED]], align 8, !dbg [[DBG131]]
3415 // CHECK5-NEXT: [[TMP5:%.*]] = load i32, ptr [[B4]], align 4, !dbg [[DBG131]]
3416 // CHECK5-NEXT: store i32 [[TMP5]], ptr [[B_CASTED]], align 4, !dbg [[DBG131]]
3417 // CHECK5-NEXT: [[TMP6:%.*]] = load i64, ptr [[B_CASTED]], align 8, !dbg [[DBG131]]
3418 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[C7]], align 8, !dbg [[DBG132:![0-9]+]]
3419 // CHECK5-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4, !dbg [[DBG131]]
3420 // CHECK5-NEXT: store i32 [[TMP8]], ptr [[C_CASTED]], align 4, !dbg [[DBG131]]
3421 // CHECK5-NEXT: [[TMP9:%.*]] = load i64, ptr [[C_CASTED]], align 8, !dbg [[DBG131]]
3422 // CHECK5-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB26:[0-9]+]], i32 4, ptr @_ZN2SSC2ERi.omp_outlined, ptr [[THIS1]], i64 [[TMP4]], i64 [[TMP6]], i64 [[TMP9]]), !dbg [[DBG131]]
3423 // CHECK5-NEXT: ret void, !dbg [[DBG133:![0-9]+]]
3426 // CHECK5-LABEL: define {{[^@]+}}@_ZN2SSC2ERi.omp_outlined
3427 // CHECK5-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 !dbg [[DBG134:![0-9]+]] {
3428 // CHECK5-NEXT: entry:
3429 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3430 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3431 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3432 // CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
3433 // CHECK5-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
3434 // CHECK5-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
3435 // CHECK5-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3436 // CHECK5-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
3437 // CHECK5-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
3438 // CHECK5-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
3439 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3440 // CHECK5-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 8
3441 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
3442 // CHECK5-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3443 // CHECK5-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3444 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3445 // CHECK5-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
3446 // CHECK5-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
3447 // CHECK5-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
3448 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8, !dbg [[DBG135:![0-9]+]]
3449 // CHECK5-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8, !dbg [[DBG135]]
3450 // CHECK5-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8, !dbg [[DBG135]]
3451 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8, !dbg [[DBG136:![0-9]+]]
3452 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8, !dbg [[DBG137:![0-9]+]]
3453 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG138:![0-9]+]]
3454 // CHECK5-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8, !dbg [[DBG137]]
3455 // CHECK5-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG137]]
3456 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG137]]
3457 // CHECK5-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4, !dbg [[DBG137]]
3458 // CHECK5-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB24:[0-9]+]], i32 [[TMP4]]), !dbg [[DBG137]]
3459 // CHECK5-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0, !dbg [[DBG137]]
3460 // CHECK5-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG137]]
3461 // CHECK5: omp_if.then:
3462 // CHECK5-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0, !dbg [[DBG139:![0-9]+]]
3463 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[TMP7]], align 8, !dbg [[DBG139]]
3464 // CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1, !dbg [[DBG139]]
3465 // CHECK5-NEXT: [[TMP9:%.*]] = load ptr, ptr [[_TMP2]], align 8, !dbg [[DBG140:![0-9]+]]
3466 // CHECK5-NEXT: store ptr [[TMP9]], ptr [[TMP8]], align 8, !dbg [[DBG139]]
3467 // CHECK5-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 2, !dbg [[DBG139]]
3468 // CHECK5-NEXT: store ptr [[B_ADDR]], ptr [[TMP10]], align 8, !dbg [[DBG139]]
3469 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 3, !dbg [[DBG139]]
3470 // CHECK5-NEXT: [[TMP12:%.*]] = load ptr, ptr [[_TMP3]], align 8, !dbg [[DBG140]]
3471 // CHECK5-NEXT: store ptr [[TMP12]], ptr [[TMP11]], align 8, !dbg [[DBG139]]
3472 // CHECK5-NEXT: invoke void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
3473 // CHECK5-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]], !dbg [[DBG139]]
3474 // CHECK5: invoke.cont:
3475 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB24]], i32 [[TMP4]]), !dbg [[DBG139]]
3476 // CHECK5-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG139]]
3477 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG139]]
3478 // CHECK5: omp_if.end:
3479 // CHECK5-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0, !dbg [[DBG139]]
3480 // CHECK5-NEXT: [[TMP14:%.*]] = load ptr, ptr [[_TMP2]], align 8, !dbg [[DBG141:![0-9]+]]
3481 // CHECK5-NEXT: store ptr [[TMP14]], ptr [[TMP13]], align 8, !dbg [[DBG139]]
3482 // CHECK5-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1, !dbg [[DBG139]]
3483 // CHECK5-NEXT: store ptr [[B_ADDR]], ptr [[TMP15]], align 8, !dbg [[DBG139]]
3484 // CHECK5-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2, !dbg [[DBG139]]
3485 // CHECK5-NEXT: [[TMP17:%.*]] = load ptr, ptr [[_TMP3]], align 8, !dbg [[DBG142:![0-9]+]]
3486 // CHECK5-NEXT: store ptr [[TMP17]], ptr [[TMP16]], align 8, !dbg [[DBG139]]
3487 // CHECK5-NEXT: [[TMP18:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG139]]
3488 // CHECK5-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB24]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.7, i32 [[TMP18]]), !dbg [[DBG139]]
3489 // CHECK5-NEXT: ret void, !dbg [[DBG143:![0-9]+]]
3490 // CHECK5: terminate.lpad:
3491 // CHECK5-NEXT: [[TMP19:%.*]] = landingpad { ptr, i32 }
3492 // CHECK5-NEXT: catch ptr null, !dbg [[DBG139]]
3493 // CHECK5-NEXT: [[TMP20:%.*]] = extractvalue { ptr, i32 } [[TMP19]], 0, !dbg [[DBG139]]
3494 // CHECK5-NEXT: call void @__clang_call_terminate(ptr [[TMP20]]) #[[ATTR13]], !dbg [[DBG139]]
3495 // CHECK5-NEXT: unreachable, !dbg [[DBG139]]
3498 // CHECK5-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
3499 // CHECK5-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR10]] align 2 !dbg [[DBG144:![0-9]+]] {
3500 // CHECK5-NEXT: entry:
3501 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3502 // CHECK5-NEXT: [[A_CASTED:%.*]] = alloca i64, align 8
3503 // CHECK5-NEXT: [[B_CASTED:%.*]] = alloca i64, align 8
3504 // CHECK5-NEXT: [[C_CASTED:%.*]] = alloca i64, align 8
3505 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3506 // CHECK5-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
3507 // CHECK5-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1:%.*]], ptr [[THIS1]], i32 0, i32 0
3508 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
3509 // CHECK5-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG145:![0-9]+]]
3510 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8, !dbg [[DBG145]]
3511 // CHECK5-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4, !dbg [[DBG146:![0-9]+]]
3512 // CHECK5-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1, !dbg [[DBG146]]
3513 // CHECK5-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4, !dbg [[DBG146]]
3514 // CHECK5-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 2, !dbg [[DBG147:![0-9]+]]
3515 // CHECK5-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8, !dbg [[DBG147]]
3516 // CHECK5-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4, !dbg [[DBG148:![0-9]+]]
3517 // CHECK5-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1, !dbg [[DBG148]]
3518 // CHECK5-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4, !dbg [[DBG148]]
3519 // CHECK5-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 3, !dbg [[DBG149:![0-9]+]]
3520 // CHECK5-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8, !dbg [[DBG149]]
3521 // CHECK5-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4, !dbg [[DBG150:![0-9]+]]
3522 // CHECK5-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1, !dbg [[DBG150]]
3523 // CHECK5-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4, !dbg [[DBG150]]
3524 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 1, !dbg [[DBG151:![0-9]+]]
3525 // CHECK5-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8, !dbg [[DBG151]]
3526 // CHECK5-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4, !dbg [[DBG152:![0-9]+]]
3527 // CHECK5-NEXT: store i32 [[TMP13]], ptr [[A_CASTED]], align 4, !dbg [[DBG152]]
3528 // CHECK5-NEXT: [[TMP14:%.*]] = load i64, ptr [[A_CASTED]], align 8, !dbg [[DBG152]]
3529 // CHECK5-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 2, !dbg [[DBG153:![0-9]+]]
3530 // CHECK5-NEXT: [[TMP16:%.*]] = load ptr, ptr [[TMP15]], align 8, !dbg [[DBG153]]
3531 // CHECK5-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4, !dbg [[DBG152]]
3532 // CHECK5-NEXT: store i32 [[TMP17]], ptr [[B_CASTED]], align 4, !dbg [[DBG152]]
3533 // CHECK5-NEXT: [[TMP18:%.*]] = load i64, ptr [[B_CASTED]], align 8, !dbg [[DBG152]]
3534 // CHECK5-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[THIS1]], i32 0, i32 3, !dbg [[DBG154:![0-9]+]]
3535 // CHECK5-NEXT: [[TMP20:%.*]] = load ptr, ptr [[TMP19]], align 8, !dbg [[DBG154]]
3536 // CHECK5-NEXT: [[TMP21:%.*]] = load i32, ptr [[TMP20]], align 4, !dbg [[DBG152]]
3537 // CHECK5-NEXT: store i32 [[TMP21]], ptr [[C_CASTED]], align 4, !dbg [[DBG152]]
3538 // CHECK5-NEXT: [[TMP22:%.*]] = load i64, ptr [[C_CASTED]], align 8, !dbg [[DBG152]]
3539 // CHECK5-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB30:[0-9]+]], i32 4, ptr @_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined, ptr [[TMP1]], i64 [[TMP14]], i64 [[TMP18]], i64 [[TMP22]]), !dbg [[DBG152]]
3540 // CHECK5-NEXT: ret void, !dbg [[DBG155:![0-9]+]]
3543 // CHECK5-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.7
3544 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] !dbg [[DBG156:![0-9]+]] {
3545 // CHECK5-NEXT: entry:
3546 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3547 // CHECK5-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3548 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3549 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3550 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG157:![0-9]+]]
3551 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8, !dbg [[DBG157]]
3552 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0, !dbg [[DBG157]]
3553 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG157]]
3554 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0, !dbg [[DBG157]]
3555 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8, !dbg [[DBG157]]
3556 // CHECK5-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4, !dbg [[DBG158:![0-9]+]]
3557 // CHECK5-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4, !dbg [[DBG158]]
3558 // CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1, !dbg [[DBG157]]
3559 // CHECK5-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8, !dbg [[DBG157]]
3560 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1, !dbg [[DBG157]]
3561 // CHECK5-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8, !dbg [[DBG157]]
3562 // CHECK5-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4, !dbg [[DBG159:![0-9]+]]
3563 // CHECK5-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4, !dbg [[DBG159]]
3564 // CHECK5-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2, !dbg [[DBG157]]
3565 // CHECK5-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8, !dbg [[DBG157]]
3566 // CHECK5-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2, !dbg [[DBG157]]
3567 // CHECK5-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8, !dbg [[DBG157]]
3568 // CHECK5-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4, !dbg [[DBG160:![0-9]+]]
3569 // CHECK5-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4, !dbg [[DBG160]]
3570 // CHECK5-NEXT: ret void, !dbg [[DBG160]]
3573 // CHECK5-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv.omp_outlined
3574 // CHECK5-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]], i64 noundef [[A:%.*]], i64 noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR12]] !dbg [[DBG161:![0-9]+]] {
3575 // CHECK5-NEXT: entry:
3576 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3577 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3578 // CHECK5-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
3579 // CHECK5-NEXT: [[A_ADDR:%.*]] = alloca i64, align 8
3580 // CHECK5-NEXT: [[B_ADDR:%.*]] = alloca i64, align 8
3581 // CHECK5-NEXT: [[C_ADDR:%.*]] = alloca i64, align 8
3582 // CHECK5-NEXT: [[TMP:%.*]] = alloca ptr, align 8
3583 // CHECK5-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
3584 // CHECK5-NEXT: [[_TMP2:%.*]] = alloca ptr, align 8
3585 // CHECK5-NEXT: [[_TMP3:%.*]] = alloca ptr, align 8
3586 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3587 // CHECK5-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [3 x ptr], align 8
3588 // CHECK5-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3589 // CHECK5-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3590 // CHECK5-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
3591 // CHECK5-NEXT: store i64 [[A]], ptr [[A_ADDR]], align 8
3592 // CHECK5-NEXT: store i64 [[B]], ptr [[B_ADDR]], align 8
3593 // CHECK5-NEXT: store i64 [[C]], ptr [[C_ADDR]], align 8
3594 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8, !dbg [[DBG162:![0-9]+]]
3595 // CHECK5-NEXT: store ptr [[A_ADDR]], ptr [[TMP]], align 8, !dbg [[DBG162]]
3596 // CHECK5-NEXT: store ptr [[C_ADDR]], ptr [[_TMP1]], align 8, !dbg [[DBG162]]
3597 // CHECK5-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8, !dbg [[DBG163:![0-9]+]]
3598 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[_TMP2]], align 8, !dbg [[DBG164:![0-9]+]]
3599 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[_TMP1]], align 8, !dbg [[DBG165:![0-9]+]]
3600 // CHECK5-NEXT: store ptr [[TMP2]], ptr [[_TMP3]], align 8, !dbg [[DBG164]]
3601 // CHECK5-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG164]]
3602 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG164]]
3603 // CHECK5-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4, !dbg [[DBG164]]
3604 // CHECK5-NEXT: [[TMP5:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB28:[0-9]+]], i32 [[TMP4]]), !dbg [[DBG164]]
3605 // CHECK5-NEXT: [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0, !dbg [[DBG164]]
3606 // CHECK5-NEXT: br i1 [[TMP6]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG164]]
3607 // CHECK5: omp_if.then:
3608 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[_TMP2]], align 8, !dbg [[DBG163]]
3609 // CHECK5-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4, !dbg [[DBG166:![0-9]+]]
3610 // CHECK5-NEXT: [[INC:%.*]] = add nsw i32 [[TMP8]], 1, !dbg [[DBG166]]
3611 // CHECK5-NEXT: store i32 [[INC]], ptr [[TMP7]], align 4, !dbg [[DBG166]]
3612 // CHECK5-NEXT: [[TMP9:%.*]] = load i32, ptr [[B_ADDR]], align 4, !dbg [[DBG167:![0-9]+]]
3613 // CHECK5-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP9]], -1, !dbg [[DBG167]]
3614 // CHECK5-NEXT: store i32 [[DEC]], ptr [[B_ADDR]], align 4, !dbg [[DBG167]]
3615 // CHECK5-NEXT: [[TMP10:%.*]] = load ptr, ptr [[_TMP3]], align 8, !dbg [[DBG165]]
3616 // CHECK5-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4, !dbg [[DBG168:![0-9]+]]
3617 // CHECK5-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP11]], 1, !dbg [[DBG168]]
3618 // CHECK5-NEXT: store i32 [[DIV]], ptr [[TMP10]], align 4, !dbg [[DBG168]]
3619 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB28]], i32 [[TMP4]]), !dbg [[DBG166]]
3620 // CHECK5-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG166]]
3621 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG166]]
3622 // CHECK5: omp_if.end:
3623 // CHECK5-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0, !dbg [[DBG166]]
3624 // CHECK5-NEXT: [[TMP13:%.*]] = load ptr, ptr [[_TMP2]], align 8, !dbg [[DBG169:![0-9]+]]
3625 // CHECK5-NEXT: store ptr [[TMP13]], ptr [[TMP12]], align 8, !dbg [[DBG166]]
3626 // CHECK5-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1, !dbg [[DBG166]]
3627 // CHECK5-NEXT: store ptr [[B_ADDR]], ptr [[TMP14]], align 8, !dbg [[DBG166]]
3628 // CHECK5-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 2, !dbg [[DBG166]]
3629 // CHECK5-NEXT: [[TMP16:%.*]] = load ptr, ptr [[_TMP3]], align 8, !dbg [[DBG170:![0-9]+]]
3630 // CHECK5-NEXT: store ptr [[TMP16]], ptr [[TMP15]], align 8, !dbg [[DBG166]]
3631 // CHECK5-NEXT: [[TMP17:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4, !dbg [[DBG166]]
3632 // CHECK5-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB28]], i32 [[TMP4]], i64 24, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func.8, i32 [[TMP17]]), !dbg [[DBG166]]
3633 // CHECK5-NEXT: ret void, !dbg [[DBG171:![0-9]+]]
3636 // CHECK5-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func.8
3637 // CHECK5-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR9]] !dbg [[DBG172:![0-9]+]] {
3638 // CHECK5-NEXT: entry:
3639 // CHECK5-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3640 // CHECK5-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3641 // CHECK5-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3642 // CHECK5-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3643 // CHECK5-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8, !dbg [[DBG173:![0-9]+]]
3644 // CHECK5-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8, !dbg [[DBG173]]
3645 // CHECK5-NEXT: [[TMP4:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 0, !dbg [[DBG173]]
3646 // CHECK5-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8, !dbg [[DBG173]]
3647 // CHECK5-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 0, !dbg [[DBG173]]
3648 // CHECK5-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8, !dbg [[DBG173]]
3649 // CHECK5-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP7]], align 4, !dbg [[DBG174:![0-9]+]]
3650 // CHECK5-NEXT: store i32 [[TMP8]], ptr [[TMP5]], align 4, !dbg [[DBG174]]
3651 // CHECK5-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 1, !dbg [[DBG173]]
3652 // CHECK5-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8, !dbg [[DBG173]]
3653 // CHECK5-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 1, !dbg [[DBG173]]
3654 // CHECK5-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8, !dbg [[DBG173]]
3655 // CHECK5-NEXT: [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4, !dbg [[DBG175:![0-9]+]]
3656 // CHECK5-NEXT: store i32 [[TMP13]], ptr [[TMP10]], align 4, !dbg [[DBG175]]
3657 // CHECK5-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP2]], i64 0, i64 2, !dbg [[DBG173]]
3658 // CHECK5-NEXT: [[TMP15:%.*]] = load ptr, ptr [[TMP14]], align 8, !dbg [[DBG173]]
3659 // CHECK5-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[TMP3]], i64 0, i64 2, !dbg [[DBG173]]
3660 // CHECK5-NEXT: [[TMP17:%.*]] = load ptr, ptr [[TMP16]], align 8, !dbg [[DBG173]]
3661 // CHECK5-NEXT: [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4, !dbg [[DBG176:![0-9]+]]
3662 // CHECK5-NEXT: store i32 [[TMP18]], ptr [[TMP15]], align 4, !dbg [[DBG176]]
3663 // CHECK5-NEXT: ret void, !dbg [[DBG176]]
3666 // CHECK5-LABEL: define {{[^@]+}}@_Z15parallel_singlev
3667 // CHECK5-SAME: () #[[ATTR10]] !dbg [[DBG177:![0-9]+]] {
3668 // CHECK5-NEXT: entry:
3669 // CHECK5-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_call(ptr @[[GLOB35:[0-9]+]], i32 0, ptr @_Z15parallel_singlev.omp_outlined), !dbg [[DBG178:![0-9]+]]
3670 // CHECK5-NEXT: ret void, !dbg [[DBG179:![0-9]+]]
3673 // CHECK5-LABEL: define {{[^@]+}}@_Z15parallel_singlev.omp_outlined
3674 // CHECK5-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR12]] personality ptr @__gxx_personality_v0 !dbg [[DBG180:![0-9]+]] {
3675 // CHECK5-NEXT: entry:
3676 // CHECK5-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
3677 // CHECK5-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
3678 // CHECK5-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
3679 // CHECK5-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
3680 // CHECK5-NEXT: [[TMP0:%.*]] = load ptr, ptr [[DOTGLOBAL_TID__ADDR]], align 8, !dbg [[DBG181:![0-9]+]]
3681 // CHECK5-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4, !dbg [[DBG181]]
3682 // CHECK5-NEXT: [[TMP2:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB32:[0-9]+]], i32 [[TMP1]]), !dbg [[DBG181]]
3683 // CHECK5-NEXT: [[TMP3:%.*]] = icmp ne i32 [[TMP2]], 0, !dbg [[DBG181]]
3684 // CHECK5-NEXT: br i1 [[TMP3]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]], !dbg [[DBG181]]
3685 // CHECK5: omp_if.then:
3686 // CHECK5-NEXT: invoke void @_Z3foov()
3687 // CHECK5-NEXT: to label [[INVOKE_CONT:%.*]] unwind label [[TERMINATE_LPAD:%.*]], !dbg [[DBG182:![0-9]+]]
3688 // CHECK5: invoke.cont:
3689 // CHECK5-NEXT: call void @__kmpc_end_single(ptr @[[GLOB32]], i32 [[TMP1]]), !dbg [[DBG182]]
3690 // CHECK5-NEXT: br label [[OMP_IF_END]], !dbg [[DBG182]]
3691 // CHECK5: omp_if.end:
3692 // CHECK5-NEXT: call void @__kmpc_barrier(ptr @[[GLOB33:[0-9]+]], i32 [[TMP1]]), !dbg [[DBG183:![0-9]+]]
3693 // CHECK5-NEXT: ret void, !dbg [[DBG183]]
3694 // CHECK5: terminate.lpad:
3695 // CHECK5-NEXT: [[TMP4:%.*]] = landingpad { ptr, i32 }
3696 // CHECK5-NEXT: catch ptr null, !dbg [[DBG182]]
3697 // CHECK5-NEXT: [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0, !dbg [[DBG182]]
3698 // CHECK5-NEXT: call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR13]], !dbg [[DBG182]]
3699 // CHECK5-NEXT: unreachable, !dbg [[DBG182]]
3702 // CHECK5-LABEL: define {{[^@]+}}@_GLOBAL__sub_I_single_codegen.cpp
3703 // CHECK5-SAME: () #[[ATTR0]] section "__TEXT,__StaticInit,regular,pure_instructions" !dbg [[DBG184:![0-9]+]] {
3704 // CHECK5-NEXT: entry:
3705 // CHECK5-NEXT: call void @__cxx_global_var_init(), !dbg [[DBG185:![0-9]+]]
3706 // CHECK5-NEXT: call void @__cxx_global_var_init.4(), !dbg [[DBG185]]
3707 // CHECK5-NEXT: call void @.__omp_threadprivate_init_.(), !dbg [[DBG185]]
3708 // CHECK5-NEXT: call void @.__omp_threadprivate_init_..3(), !dbg [[DBG185]]
3709 // CHECK5-NEXT: ret void
3712 // CHECK6-LABEL: define {{[^@]+}}@_Z10array_funciPiP2St
3713 // CHECK6-SAME: (i32 noundef [[N:%.*]], ptr noundef [[A:%.*]], ptr noundef [[S:%.*]]) #[[ATTR0:[0-9]+]] {
3714 // CHECK6-NEXT: entry:
3715 // CHECK6-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
3716 // CHECK6-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
3717 // CHECK6-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
3718 // CHECK6-NEXT: [[DOTOMP_COPYPRIVATE_DID_IT:%.*]] = alloca i32, align 4
3719 // CHECK6-NEXT: [[DOTOMP_COPYPRIVATE_CPR_LIST:%.*]] = alloca [2 x ptr], align 8
3720 // CHECK6-NEXT: [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(ptr @[[GLOB1:[0-9]+]])
3721 // CHECK6-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
3722 // CHECK6-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
3723 // CHECK6-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
3724 // CHECK6-NEXT: [[TMP1:%.*]] = load i32, ptr [[N_ADDR]], align 4
3725 // CHECK6-NEXT: [[TMP2:%.*]] = zext i32 [[TMP1]] to i64
3726 // CHECK6-NEXT: store i32 0, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
3727 // CHECK6-NEXT: [[TMP3:%.*]] = call i32 @__kmpc_single(ptr @[[GLOB1]], i32 [[TMP0]])
3728 // CHECK6-NEXT: [[TMP4:%.*]] = icmp ne i32 [[TMP3]], 0
3729 // CHECK6-NEXT: br i1 [[TMP4]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_END:%.*]]
3730 // CHECK6: omp_if.then:
3731 // CHECK6-NEXT: call void @__kmpc_end_single(ptr @[[GLOB1]], i32 [[TMP0]])
3732 // CHECK6-NEXT: store i32 1, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
3733 // CHECK6-NEXT: br label [[OMP_IF_END]]
3734 // CHECK6: omp_if.end:
3735 // CHECK6-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 0
3736 // CHECK6-NEXT: store ptr [[A_ADDR]], ptr [[TMP5]], align 8
3737 // CHECK6-NEXT: [[TMP6:%.*]] = getelementptr inbounds [2 x ptr], ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], i64 0, i64 1
3738 // CHECK6-NEXT: store ptr [[S_ADDR]], ptr [[TMP6]], align 8
3739 // CHECK6-NEXT: [[TMP7:%.*]] = load i32, ptr [[DOTOMP_COPYPRIVATE_DID_IT]], align 4
3740 // CHECK6-NEXT: call void @__kmpc_copyprivate(ptr @[[GLOB1]], i32 [[TMP0]], i64 16, ptr [[DOTOMP_COPYPRIVATE_CPR_LIST]], ptr @.omp.copyprivate.copy_func, i32 [[TMP7]])
3741 // CHECK6-NEXT: ret void
3744 // CHECK6-LABEL: define {{[^@]+}}@.omp.copyprivate.copy_func
3745 // CHECK6-SAME: (ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]]) #[[ATTR3:[0-9]+]] {
3746 // CHECK6-NEXT: entry:
3747 // CHECK6-NEXT: [[DOTADDR:%.*]] = alloca ptr, align 8
3748 // CHECK6-NEXT: [[DOTADDR1:%.*]] = alloca ptr, align 8
3749 // CHECK6-NEXT: store ptr [[TMP0]], ptr [[DOTADDR]], align 8
3750 // CHECK6-NEXT: store ptr [[TMP1]], ptr [[DOTADDR1]], align 8
3751 // CHECK6-NEXT: [[TMP2:%.*]] = load ptr, ptr [[DOTADDR]], align 8
3752 // CHECK6-NEXT: [[TMP3:%.*]] = load ptr, ptr [[DOTADDR1]], align 8
3753 // CHECK6-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP2]], i64 0, i64 0
3754 // CHECK6-NEXT: [[TMP5:%.*]] = load ptr, ptr [[TMP4]], align 8
3755 // CHECK6-NEXT: [[TMP6:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP3]], i64 0, i64 0
3756 // CHECK6-NEXT: [[TMP7:%.*]] = load ptr, ptr [[TMP6]], align 8
3757 // CHECK6-NEXT: [[TMP8:%.*]] = load ptr, ptr [[TMP7]], align 8
3758 // CHECK6-NEXT: store ptr [[TMP8]], ptr [[TMP5]], align 8
3759 // CHECK6-NEXT: [[TMP9:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP2]], i64 0, i64 1
3760 // CHECK6-NEXT: [[TMP10:%.*]] = load ptr, ptr [[TMP9]], align 8
3761 // CHECK6-NEXT: [[TMP11:%.*]] = getelementptr inbounds [2 x ptr], ptr [[TMP3]], i64 0, i64 1
3762 // CHECK6-NEXT: [[TMP12:%.*]] = load ptr, ptr [[TMP11]], align 8
3763 // CHECK6-NEXT: [[TMP13:%.*]] = load ptr, ptr [[TMP12]], align 8
3764 // CHECK6-NEXT: store ptr [[TMP13]], ptr [[TMP10]], align 8
3765 // CHECK6-NEXT: ret void