Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / teams_private_codegen.cpp
blob175de892c45512201afa6812fd902c1c3e2f6625
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _
2 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK1
3 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
4 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK1
5 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK3
6 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
7 // RUN: %clang_cc1 -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK3
9 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
10 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
11 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
12 // RUN: %clang_cc1 -DLAMBDA -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
13 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
14 // RUN: %clang_cc1 -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
16 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK9
17 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
18 // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK9
19 // RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK11
20 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
21 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK11
23 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
24 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s
25 // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
26 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
27 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s
28 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
29 // expected-no-diagnostics
30 #ifndef HEADER
31 #define HEADER
32 template <class T>
33 struct S {
34 T f;
35 S(T a) : f(a) {}
36 S() : f() {}
37 operator T() { return T(); }
38 ~S() {}
41 volatile int g __attribute__((aligned(128))) = 1212;
43 struct SS {
44 int a;
45 int b : 4;
46 int &c;
47 SS(int &d) : a(0), b(0), c(d) {
48 #pragma omp target
49 #pragma omp teams private(a, b, c)
50 #ifdef LAMBDA
51 [&]() {
52 ++this->a, --b, (this)->c /= 1;
53 }();
54 #else
55 ++this->a, --b, c /= 1;
56 #endif
60 template<typename T>
61 struct SST {
62 T a;
63 SST() : a(T()) {
64 #pragma omp target
65 #pragma omp teams private(a)
66 #ifdef LAMBDA
67 [&]() {
68 [&]() {
69 ++this->a;
70 }();
71 }();
72 #else
73 ++(this)->a;
74 #endif
78 template <typename T>
79 T tmain() {
80 S<T> test;
81 SST<T> sst;
82 T t_var __attribute__((aligned(128))) = T();
83 T vec[] __attribute__((aligned(128))) = {1, 2};
84 S<T> s_arr[] __attribute__((aligned(128))) = {1, 2};
85 S<T> var __attribute__((aligned(128))) (3);
86 #pragma omp target
87 #pragma omp teams private(t_var, vec, s_arr, var)
89 vec[0] = t_var;
90 s_arr[0] = var;
92 return T();
95 int main() {
96 static int sivar;
97 SS ss(sivar);
98 #ifdef LAMBDA
101 // lambda and target region in main
103 // target region in struct constructor
105 // offloading function in struct constructor
107 // outlined teams region in struct constructor
108 // call void [[INNER_LAMBDA_CONSTR:@.+]](ptr
110 // inner lambda in struct constructor
111 // define{{.*}} void [[INNER_LAMBDA_CONSTR]](ptr
114 // ret
116 [&]() {
117 #pragma omp target
118 #pragma omp teams private(g, sivar)
121 g = 1;
122 sivar = 2;
123 [&]() {
124 g = 2;
125 sivar = 4;
126 }();
128 }();
129 return 0;
130 #else
131 S<float> test;
132 int t_var = 0;
133 int vec[] = {1, 2};
134 S<float> s_arr[] = {1, 2};
135 S<float> var(3);
136 #pragma omp target
137 #pragma omp teams private(t_var, vec, s_arr, var, sivar)
139 vec[0] = t_var;
140 s_arr[0] = var;
141 sivar = 3;
143 return tmain<int>();
144 #endif
148 // target region in main function
151 // template tmain
153 // target in SS constructor
156 // target in tmain template
159 // SST constructor
161 // target in SST constructor
164 #endif
166 // CHECK1-LABEL: define {{[^@]+}}@main
167 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
168 // CHECK1-NEXT: entry:
169 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
170 // CHECK1-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
171 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
172 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
173 // CHECK1-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
174 // CHECK1-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
175 // CHECK1-NEXT: ret i32 0
178 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
179 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
180 // CHECK1-NEXT: entry:
181 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
182 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
183 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
184 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
185 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
186 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
187 // CHECK1-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
188 // CHECK1-NEXT: ret void
191 // CHECK1-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
192 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat {
193 // CHECK1-NEXT: entry:
194 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
195 // CHECK1-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
196 // CHECK1-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
197 // CHECK1-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
198 // CHECK1-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
199 // CHECK1-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
200 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
201 // CHECK1-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
202 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
203 // CHECK1-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
204 // CHECK1-NEXT: store i32 0, ptr [[A]], align 8
205 // CHECK1-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
206 // CHECK1-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
207 // CHECK1-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
208 // CHECK1-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
209 // CHECK1-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
210 // CHECK1-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
211 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
212 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
213 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
214 // CHECK1-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 8
215 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
216 // CHECK1-NEXT: store ptr [[THIS1]], ptr [[TMP2]], align 8
217 // CHECK1-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
218 // CHECK1-NEXT: store ptr null, ptr [[TMP3]], align 8
219 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
220 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
221 // CHECK1-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
222 // CHECK1-NEXT: store i32 2, ptr [[TMP6]], align 4
223 // CHECK1-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
224 // CHECK1-NEXT: store i32 1, ptr [[TMP7]], align 4
225 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
226 // CHECK1-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 8
227 // CHECK1-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
228 // CHECK1-NEXT: store ptr [[TMP5]], ptr [[TMP9]], align 8
229 // CHECK1-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
230 // CHECK1-NEXT: store ptr @.offload_sizes, ptr [[TMP10]], align 8
231 // CHECK1-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
232 // CHECK1-NEXT: store ptr @.offload_maptypes, ptr [[TMP11]], align 8
233 // CHECK1-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
234 // CHECK1-NEXT: store ptr null, ptr [[TMP12]], align 8
235 // CHECK1-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
236 // CHECK1-NEXT: store ptr null, ptr [[TMP13]], align 8
237 // CHECK1-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
238 // CHECK1-NEXT: store i64 0, ptr [[TMP14]], align 8
239 // CHECK1-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
240 // CHECK1-NEXT: store i64 0, ptr [[TMP15]], align 8
241 // CHECK1-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
242 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
243 // CHECK1-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
244 // CHECK1-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP17]], align 4
245 // CHECK1-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
246 // CHECK1-NEXT: store i32 0, ptr [[TMP18]], align 4
247 // CHECK1-NEXT: [[TMP19:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.region_id, ptr [[KERNEL_ARGS]])
248 // CHECK1-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
249 // CHECK1-NEXT: br i1 [[TMP20]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
250 // CHECK1: omp_offload.failed:
251 // CHECK1-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48(ptr [[THIS1]]) #[[ATTR5:[0-9]+]]
252 // CHECK1-NEXT: br label [[OMP_OFFLOAD_CONT]]
253 // CHECK1: omp_offload.cont:
254 // CHECK1-NEXT: ret void
257 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48
258 // CHECK1-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3:[0-9]+]] {
259 // CHECK1-NEXT: entry:
260 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
261 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
262 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
263 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined, ptr [[TMP0]])
264 // CHECK1-NEXT: ret void
267 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined
268 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4:[0-9]+]] {
269 // CHECK1-NEXT: entry:
270 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
271 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
272 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
273 // CHECK1-NEXT: [[A:%.*]] = alloca i32, align 4
274 // CHECK1-NEXT: [[TMP:%.*]] = alloca ptr, align 8
275 // CHECK1-NEXT: [[B:%.*]] = alloca i32, align 4
276 // CHECK1-NEXT: [[C:%.*]] = alloca i32, align 4
277 // CHECK1-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
278 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
279 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
280 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
281 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
282 // CHECK1-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
283 // CHECK1-NEXT: store ptr [[A]], ptr [[TMP]], align 8
284 // CHECK1-NEXT: store ptr [[C]], ptr [[_TMP1]], align 8
285 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
286 // CHECK1-NEXT: store ptr [[TMP0]], ptr [[TMP1]], align 8
287 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
288 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 8
289 // CHECK1-NEXT: store ptr [[TMP3]], ptr [[TMP2]], align 8
290 // CHECK1-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
291 // CHECK1-NEXT: store ptr [[B]], ptr [[TMP4]], align 8
292 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
293 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 8
294 // CHECK1-NEXT: store ptr [[TMP6]], ptr [[TMP5]], align 8
295 // CHECK1-NEXT: call void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 8 dereferenceable(32) [[REF_TMP]])
296 // CHECK1-NEXT: ret void
299 // CHECK1-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
300 // CHECK1-SAME: (ptr noundef nonnull align 8 dereferenceable(32) [[THIS:%.*]]) #[[ATTR2:[0-9]+]] {
301 // CHECK1-NEXT: entry:
302 // CHECK1-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
303 // CHECK1-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
304 // CHECK1-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
305 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
306 // CHECK1-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 8
307 // CHECK1-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
308 // CHECK1-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 8
309 // CHECK1-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
310 // CHECK1-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
311 // CHECK1-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
312 // CHECK1-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
313 // CHECK1-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 8
314 // CHECK1-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
315 // CHECK1-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
316 // CHECK1-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
317 // CHECK1-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
318 // CHECK1-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 8
319 // CHECK1-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
320 // CHECK1-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
321 // CHECK1-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
322 // CHECK1-NEXT: ret void
325 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117
326 // CHECK1-SAME: () #[[ATTR3]] {
327 // CHECK1-NEXT: entry:
328 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117.omp_outlined)
329 // CHECK1-NEXT: ret void
332 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117.omp_outlined
333 // CHECK1-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4]] {
334 // CHECK1-NEXT: entry:
335 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
336 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
337 // CHECK1-NEXT: [[G:%.*]] = alloca i32, align 128
338 // CHECK1-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
339 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 8
340 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
341 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
342 // CHECK1-NEXT: store i32 1, ptr [[G]], align 128
343 // CHECK1-NEXT: store i32 2, ptr [[SIVAR]], align 4
344 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0
345 // CHECK1-NEXT: store ptr [[G]], ptr [[TMP0]], align 8
346 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1
347 // CHECK1-NEXT: store ptr [[SIVAR]], ptr [[TMP1]], align 8
348 // CHECK1-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 8 dereferenceable(16) [[REF_TMP]])
349 // CHECK1-NEXT: ret void
352 // CHECK1-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
353 // CHECK1-SAME: () #[[ATTR6:[0-9]+]] {
354 // CHECK1-NEXT: entry:
355 // CHECK1-NEXT: call void @__tgt_register_requires(i64 1)
356 // CHECK1-NEXT: ret void
359 // CHECK3-LABEL: define {{[^@]+}}@main
360 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
361 // CHECK3-NEXT: entry:
362 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
363 // CHECK3-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
364 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
365 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
366 // CHECK3-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 4 dereferenceable(12) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
367 // CHECK3-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr noundef nonnull align 1 dereferenceable(1) [[REF_TMP]])
368 // CHECK3-NEXT: ret i32 0
371 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
372 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
373 // CHECK3-NEXT: entry:
374 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
375 // CHECK3-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
376 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
377 // CHECK3-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
378 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
379 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
380 // CHECK3-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
381 // CHECK3-NEXT: ret void
384 // CHECK3-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
385 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
386 // CHECK3-NEXT: entry:
387 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
388 // CHECK3-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
389 // CHECK3-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
390 // CHECK3-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
391 // CHECK3-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
392 // CHECK3-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
393 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
394 // CHECK3-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
395 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
396 // CHECK3-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
397 // CHECK3-NEXT: store i32 0, ptr [[A]], align 4
398 // CHECK3-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
399 // CHECK3-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
400 // CHECK3-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
401 // CHECK3-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
402 // CHECK3-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
403 // CHECK3-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
404 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
405 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[C]], align 4
406 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
407 // CHECK3-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 4
408 // CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
409 // CHECK3-NEXT: store ptr [[THIS1]], ptr [[TMP2]], align 4
410 // CHECK3-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
411 // CHECK3-NEXT: store ptr null, ptr [[TMP3]], align 4
412 // CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
413 // CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
414 // CHECK3-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
415 // CHECK3-NEXT: store i32 2, ptr [[TMP6]], align 4
416 // CHECK3-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
417 // CHECK3-NEXT: store i32 1, ptr [[TMP7]], align 4
418 // CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
419 // CHECK3-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 4
420 // CHECK3-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
421 // CHECK3-NEXT: store ptr [[TMP5]], ptr [[TMP9]], align 4
422 // CHECK3-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
423 // CHECK3-NEXT: store ptr @.offload_sizes, ptr [[TMP10]], align 4
424 // CHECK3-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
425 // CHECK3-NEXT: store ptr @.offload_maptypes, ptr [[TMP11]], align 4
426 // CHECK3-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
427 // CHECK3-NEXT: store ptr null, ptr [[TMP12]], align 4
428 // CHECK3-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
429 // CHECK3-NEXT: store ptr null, ptr [[TMP13]], align 4
430 // CHECK3-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
431 // CHECK3-NEXT: store i64 0, ptr [[TMP14]], align 8
432 // CHECK3-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
433 // CHECK3-NEXT: store i64 0, ptr [[TMP15]], align 8
434 // CHECK3-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
435 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
436 // CHECK3-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
437 // CHECK3-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP17]], align 4
438 // CHECK3-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
439 // CHECK3-NEXT: store i32 0, ptr [[TMP18]], align 4
440 // CHECK3-NEXT: [[TMP19:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.region_id, ptr [[KERNEL_ARGS]])
441 // CHECK3-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
442 // CHECK3-NEXT: br i1 [[TMP20]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
443 // CHECK3: omp_offload.failed:
444 // CHECK3-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48(ptr [[THIS1]]) #[[ATTR5:[0-9]+]]
445 // CHECK3-NEXT: br label [[OMP_OFFLOAD_CONT]]
446 // CHECK3: omp_offload.cont:
447 // CHECK3-NEXT: ret void
450 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48
451 // CHECK3-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3:[0-9]+]] {
452 // CHECK3-NEXT: entry:
453 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
454 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
455 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
456 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined, ptr [[TMP0]])
457 // CHECK3-NEXT: ret void
460 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined
461 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4:[0-9]+]] {
462 // CHECK3-NEXT: entry:
463 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
464 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
465 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
466 // CHECK3-NEXT: [[A:%.*]] = alloca i32, align 4
467 // CHECK3-NEXT: [[TMP:%.*]] = alloca ptr, align 4
468 // CHECK3-NEXT: [[B:%.*]] = alloca i32, align 4
469 // CHECK3-NEXT: [[C:%.*]] = alloca i32, align 4
470 // CHECK3-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
471 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
472 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
473 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
474 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
475 // CHECK3-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
476 // CHECK3-NEXT: store ptr [[A]], ptr [[TMP]], align 4
477 // CHECK3-NEXT: store ptr [[C]], ptr [[_TMP1]], align 4
478 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
479 // CHECK3-NEXT: store ptr [[TMP0]], ptr [[TMP1]], align 4
480 // CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
481 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP]], align 4
482 // CHECK3-NEXT: store ptr [[TMP3]], ptr [[TMP2]], align 4
483 // CHECK3-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 2
484 // CHECK3-NEXT: store ptr [[B]], ptr [[TMP4]], align 4
485 // CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 3
486 // CHECK3-NEXT: [[TMP6:%.*]] = load ptr, ptr [[_TMP1]], align 4
487 // CHECK3-NEXT: store ptr [[TMP6]], ptr [[TMP5]], align 4
488 // CHECK3-NEXT: call void @_ZZN2SSC1ERiENKUlvE_clEv(ptr noundef nonnull align 4 dereferenceable(16) [[REF_TMP]])
489 // CHECK3-NEXT: ret void
492 // CHECK3-LABEL: define {{[^@]+}}@_ZZN2SSC1ERiENKUlvE_clEv
493 // CHECK3-SAME: (ptr noundef nonnull align 4 dereferenceable(16) [[THIS:%.*]]) #[[ATTR2:[0-9]+]] align 2 {
494 // CHECK3-NEXT: entry:
495 // CHECK3-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
496 // CHECK3-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
497 // CHECK3-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
498 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_0:%.*]], ptr [[THIS1]], i32 0, i32 0
499 // CHECK3-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 4
500 // CHECK3-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 1
501 // CHECK3-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 4
502 // CHECK3-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP3]], align 4
503 // CHECK3-NEXT: [[INC:%.*]] = add nsw i32 [[TMP4]], 1
504 // CHECK3-NEXT: store i32 [[INC]], ptr [[TMP3]], align 4
505 // CHECK3-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 2
506 // CHECK3-NEXT: [[TMP6:%.*]] = load ptr, ptr [[TMP5]], align 4
507 // CHECK3-NEXT: [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4
508 // CHECK3-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP7]], -1
509 // CHECK3-NEXT: store i32 [[DEC]], ptr [[TMP6]], align 4
510 // CHECK3-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[THIS1]], i32 0, i32 3
511 // CHECK3-NEXT: [[TMP9:%.*]] = load ptr, ptr [[TMP8]], align 4
512 // CHECK3-NEXT: [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4
513 // CHECK3-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP10]], 1
514 // CHECK3-NEXT: store i32 [[DIV]], ptr [[TMP9]], align 4
515 // CHECK3-NEXT: ret void
518 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117
519 // CHECK3-SAME: () #[[ATTR3]] {
520 // CHECK3-NEXT: entry:
521 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117.omp_outlined)
522 // CHECK3-NEXT: ret void
525 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l117.omp_outlined
526 // CHECK3-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4]] {
527 // CHECK3-NEXT: entry:
528 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
529 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
530 // CHECK3-NEXT: [[G:%.*]] = alloca i32, align 128
531 // CHECK3-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
532 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_1:%.*]], align 4
533 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
534 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
535 // CHECK3-NEXT: store i32 1, ptr [[G]], align 128
536 // CHECK3-NEXT: store i32 2, ptr [[SIVAR]], align 4
537 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 0
538 // CHECK3-NEXT: store ptr [[G]], ptr [[TMP0]], align 4
539 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_1]], ptr [[REF_TMP]], i32 0, i32 1
540 // CHECK3-NEXT: store ptr [[SIVAR]], ptr [[TMP1]], align 4
541 // CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr noundef nonnull align 4 dereferenceable(8) [[REF_TMP]])
542 // CHECK3-NEXT: ret void
545 // CHECK3-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
546 // CHECK3-SAME: () #[[ATTR6:[0-9]+]] {
547 // CHECK3-NEXT: entry:
548 // CHECK3-NEXT: call void @__tgt_register_requires(i64 1)
549 // CHECK3-NEXT: ret void
552 // CHECK9-LABEL: define {{[^@]+}}@main
553 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
554 // CHECK9-NEXT: entry:
555 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
556 // CHECK9-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 8
557 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
558 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
559 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
560 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
561 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
562 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
563 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
564 // CHECK9-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 8 dereferenceable(16) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
565 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
566 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
567 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
568 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
569 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
570 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i64 1
571 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
572 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]], float noundef 3.000000e+00)
573 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
574 // CHECK9-NEXT: store i32 2, ptr [[TMP0]], align 4
575 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
576 // CHECK9-NEXT: store i32 0, ptr [[TMP1]], align 4
577 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
578 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
579 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
580 // CHECK9-NEXT: store ptr null, ptr [[TMP3]], align 8
581 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
582 // CHECK9-NEXT: store ptr null, ptr [[TMP4]], align 8
583 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
584 // CHECK9-NEXT: store ptr null, ptr [[TMP5]], align 8
585 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
586 // CHECK9-NEXT: store ptr null, ptr [[TMP6]], align 8
587 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
588 // CHECK9-NEXT: store ptr null, ptr [[TMP7]], align 8
589 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
590 // CHECK9-NEXT: store i64 0, ptr [[TMP8]], align 8
591 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
592 // CHECK9-NEXT: store i64 0, ptr [[TMP9]], align 8
593 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
594 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
595 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
596 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP11]], align 4
597 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
598 // CHECK9-NEXT: store i32 0, ptr [[TMP12]], align 4
599 // CHECK9-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.region_id, ptr [[KERNEL_ARGS]])
600 // CHECK9-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
601 // CHECK9-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
602 // CHECK9: omp_offload.failed:
603 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136() #[[ATTR5:[0-9]+]]
604 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
605 // CHECK9: omp_offload.cont:
606 // CHECK9-NEXT: [[CALL:%.*]] = call noundef signext i32 @_Z5tmainIiET_v()
607 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
608 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
609 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
610 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
611 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
612 // CHECK9: arraydestroy.body:
613 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
614 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
615 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
616 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
617 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
618 // CHECK9: arraydestroy.done1:
619 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR5]]
620 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
621 // CHECK9-NEXT: ret i32 [[TMP16]]
624 // CHECK9-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
625 // CHECK9-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
626 // CHECK9-NEXT: entry:
627 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
628 // CHECK9-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
629 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
630 // CHECK9-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
631 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
632 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
633 // CHECK9-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 8 dereferenceable(16) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
634 // CHECK9-NEXT: ret void
637 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
638 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
639 // CHECK9-NEXT: entry:
640 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
641 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
642 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
643 // CHECK9-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
644 // CHECK9-NEXT: ret void
647 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
648 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
649 // CHECK9-NEXT: entry:
650 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
651 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
652 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
653 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
654 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
655 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
656 // CHECK9-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
657 // CHECK9-NEXT: ret void
660 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136
661 // CHECK9-SAME: () #[[ATTR3:[0-9]+]] {
662 // CHECK9-NEXT: entry:
663 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.omp_outlined)
664 // CHECK9-NEXT: ret void
667 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.omp_outlined
668 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4:[0-9]+]] {
669 // CHECK9-NEXT: entry:
670 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
671 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
672 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
673 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
674 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
675 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S:%.*]], align 4
676 // CHECK9-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
677 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
678 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
679 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
680 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
681 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
682 // CHECK9: arrayctor.loop:
683 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
684 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
685 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i64 1
686 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
687 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
688 // CHECK9: arrayctor.cont:
689 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
690 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
691 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 0
692 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[ARRAYIDX]], align 4
693 // CHECK9-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i64 0, i64 0
694 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX1]], ptr align 4 [[VAR]], i64 4, i1 false)
695 // CHECK9-NEXT: store i32 3, ptr [[SIVAR]], align 4
696 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
697 // CHECK9-NEXT: [[ARRAY_BEGIN2:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
698 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN2]], i64 2
699 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
700 // CHECK9: arraydestroy.body:
701 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
702 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
703 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
704 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN2]]
705 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE3:%.*]], label [[ARRAYDESTROY_BODY]]
706 // CHECK9: arraydestroy.done3:
707 // CHECK9-NEXT: ret void
710 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
711 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
712 // CHECK9-NEXT: entry:
713 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
714 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
715 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
716 // CHECK9-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR5]]
717 // CHECK9-NEXT: ret void
720 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
721 // CHECK9-SAME: () #[[ATTR6:[0-9]+]] comdat {
722 // CHECK9-NEXT: entry:
723 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
724 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
725 // CHECK9-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 4
726 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
727 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
728 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
729 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
730 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
731 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
732 // CHECK9-NEXT: call void @_ZN3SSTIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[SST]])
733 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 128
734 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
735 // CHECK9-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
736 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef signext 1)
737 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i64 1
738 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef signext 2)
739 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]], i32 noundef signext 3)
740 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
741 // CHECK9-NEXT: store i32 2, ptr [[TMP0]], align 4
742 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
743 // CHECK9-NEXT: store i32 0, ptr [[TMP1]], align 4
744 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
745 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
746 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
747 // CHECK9-NEXT: store ptr null, ptr [[TMP3]], align 8
748 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
749 // CHECK9-NEXT: store ptr null, ptr [[TMP4]], align 8
750 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
751 // CHECK9-NEXT: store ptr null, ptr [[TMP5]], align 8
752 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
753 // CHECK9-NEXT: store ptr null, ptr [[TMP6]], align 8
754 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
755 // CHECK9-NEXT: store ptr null, ptr [[TMP7]], align 8
756 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
757 // CHECK9-NEXT: store i64 0, ptr [[TMP8]], align 8
758 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
759 // CHECK9-NEXT: store i64 0, ptr [[TMP9]], align 8
760 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
761 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
762 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
763 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP11]], align 4
764 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
765 // CHECK9-NEXT: store i32 0, ptr [[TMP12]], align 4
766 // CHECK9-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.region_id, ptr [[KERNEL_ARGS]])
767 // CHECK9-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
768 // CHECK9-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
769 // CHECK9: omp_offload.failed:
770 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86() #[[ATTR5]]
771 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
772 // CHECK9: omp_offload.cont:
773 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
774 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
775 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
776 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
777 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
778 // CHECK9: arraydestroy.body:
779 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
780 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
781 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
782 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
783 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
784 // CHECK9: arraydestroy.done1:
785 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR5]]
786 // CHECK9-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
787 // CHECK9-NEXT: ret i32 [[TMP16]]
790 // CHECK9-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
791 // CHECK9-SAME: (ptr noundef nonnull align 8 dereferenceable(16) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat {
792 // CHECK9-NEXT: entry:
793 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
794 // CHECK9-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 8
795 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
796 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
797 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
798 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
799 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
800 // CHECK9-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 8
801 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
802 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
803 // CHECK9-NEXT: store i32 0, ptr [[A]], align 8
804 // CHECK9-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
805 // CHECK9-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
806 // CHECK9-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
807 // CHECK9-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
808 // CHECK9-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
809 // CHECK9-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
810 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 8
811 // CHECK9-NEXT: store ptr [[TMP0]], ptr [[C]], align 8
812 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
813 // CHECK9-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 8
814 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
815 // CHECK9-NEXT: store ptr [[THIS1]], ptr [[TMP2]], align 8
816 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
817 // CHECK9-NEXT: store ptr null, ptr [[TMP3]], align 8
818 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
819 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
820 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
821 // CHECK9-NEXT: store i32 2, ptr [[TMP6]], align 4
822 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
823 // CHECK9-NEXT: store i32 1, ptr [[TMP7]], align 4
824 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
825 // CHECK9-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 8
826 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
827 // CHECK9-NEXT: store ptr [[TMP5]], ptr [[TMP9]], align 8
828 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
829 // CHECK9-NEXT: store ptr @.offload_sizes, ptr [[TMP10]], align 8
830 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
831 // CHECK9-NEXT: store ptr @.offload_maptypes, ptr [[TMP11]], align 8
832 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
833 // CHECK9-NEXT: store ptr null, ptr [[TMP12]], align 8
834 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
835 // CHECK9-NEXT: store ptr null, ptr [[TMP13]], align 8
836 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
837 // CHECK9-NEXT: store i64 0, ptr [[TMP14]], align 8
838 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
839 // CHECK9-NEXT: store i64 0, ptr [[TMP15]], align 8
840 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
841 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
842 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
843 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP17]], align 4
844 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
845 // CHECK9-NEXT: store i32 0, ptr [[TMP18]], align 4
846 // CHECK9-NEXT: [[TMP19:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.region_id, ptr [[KERNEL_ARGS]])
847 // CHECK9-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
848 // CHECK9-NEXT: br i1 [[TMP20]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
849 // CHECK9: omp_offload.failed:
850 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48(ptr [[THIS1]]) #[[ATTR5]]
851 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
852 // CHECK9: omp_offload.cont:
853 // CHECK9-NEXT: ret void
856 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48
857 // CHECK9-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3]] {
858 // CHECK9-NEXT: entry:
859 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
860 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
861 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
862 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined, ptr [[TMP0]])
863 // CHECK9-NEXT: ret void
866 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined
867 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4]] {
868 // CHECK9-NEXT: entry:
869 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
870 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
871 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
872 // CHECK9-NEXT: [[A:%.*]] = alloca i32, align 4
873 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
874 // CHECK9-NEXT: [[B:%.*]] = alloca i32, align 4
875 // CHECK9-NEXT: [[C:%.*]] = alloca i32, align 4
876 // CHECK9-NEXT: [[_TMP1:%.*]] = alloca ptr, align 8
877 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
878 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
879 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
880 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
881 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP]], align 8
882 // CHECK9-NEXT: store ptr [[C]], ptr [[_TMP1]], align 8
883 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
884 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
885 // CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
886 // CHECK9-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
887 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[B]], align 4
888 // CHECK9-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
889 // CHECK9-NEXT: store i32 [[DEC]], ptr [[B]], align 4
890 // CHECK9-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 8
891 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
892 // CHECK9-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
893 // CHECK9-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
894 // CHECK9-NEXT: ret void
897 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
898 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
899 // CHECK9-NEXT: entry:
900 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
901 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
902 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
903 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
904 // CHECK9-NEXT: store float 0.000000e+00, ptr [[F]], align 4
905 // CHECK9-NEXT: ret void
908 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
909 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
910 // CHECK9-NEXT: entry:
911 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
912 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
913 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
914 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
915 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
916 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
917 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
918 // CHECK9-NEXT: store float [[TMP0]], ptr [[F]], align 4
919 // CHECK9-NEXT: ret void
922 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
923 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
924 // CHECK9-NEXT: entry:
925 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
926 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
927 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
928 // CHECK9-NEXT: ret void
931 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
932 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
933 // CHECK9-NEXT: entry:
934 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
935 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
936 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
937 // CHECK9-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
938 // CHECK9-NEXT: ret void
941 // CHECK9-LABEL: define {{[^@]+}}@_ZN3SSTIiEC1Ev
942 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
943 // CHECK9-NEXT: entry:
944 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
945 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
946 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
947 // CHECK9-NEXT: call void @_ZN3SSTIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
948 // CHECK9-NEXT: ret void
951 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
952 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
953 // CHECK9-NEXT: entry:
954 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
955 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
956 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
957 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
958 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
959 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
960 // CHECK9-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef signext [[TMP0]])
961 // CHECK9-NEXT: ret void
964 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86
965 // CHECK9-SAME: () #[[ATTR3]] {
966 // CHECK9-NEXT: entry:
967 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.omp_outlined)
968 // CHECK9-NEXT: ret void
971 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.omp_outlined
972 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4]] {
973 // CHECK9-NEXT: entry:
974 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
975 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
976 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
977 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
978 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
979 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
980 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
981 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
982 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
983 // CHECK9-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
984 // CHECK9-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
985 // CHECK9: arrayctor.loop:
986 // CHECK9-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
987 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
988 // CHECK9-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i64 1
989 // CHECK9-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
990 // CHECK9-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
991 // CHECK9: arrayctor.cont:
992 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
993 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
994 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i64 0, i64 0
995 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[ARRAYIDX]], align 128
996 // CHECK9-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i64 0, i64 0
997 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[ARRAYIDX1]], ptr align 128 [[VAR]], i64 4, i1 false)
998 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
999 // CHECK9-NEXT: [[ARRAY_BEGIN2:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1000 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN2]], i64 2
1001 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1002 // CHECK9: arraydestroy.body:
1003 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1004 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
1005 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
1006 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN2]]
1007 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE3:%.*]], label [[ARRAYDESTROY_BODY]]
1008 // CHECK9: arraydestroy.done3:
1009 // CHECK9-NEXT: ret void
1012 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1013 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1014 // CHECK9-NEXT: entry:
1015 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1016 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1017 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1018 // CHECK9-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR5]]
1019 // CHECK9-NEXT: ret void
1022 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
1023 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1024 // CHECK9-NEXT: entry:
1025 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1026 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1027 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1028 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1029 // CHECK9-NEXT: store i32 0, ptr [[F]], align 4
1030 // CHECK9-NEXT: ret void
1033 // CHECK9-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev
1034 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1035 // CHECK9-NEXT: entry:
1036 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1037 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 8
1038 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 8
1039 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 8
1040 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1041 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1042 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1043 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
1044 // CHECK9-NEXT: store i32 0, ptr [[A]], align 4
1045 // CHECK9-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1046 // CHECK9-NEXT: store ptr [[THIS1]], ptr [[TMP0]], align 8
1047 // CHECK9-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1048 // CHECK9-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 8
1049 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
1050 // CHECK9-NEXT: store ptr null, ptr [[TMP2]], align 8
1051 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1052 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1053 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1054 // CHECK9-NEXT: store i32 2, ptr [[TMP5]], align 4
1055 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1056 // CHECK9-NEXT: store i32 1, ptr [[TMP6]], align 4
1057 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1058 // CHECK9-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 8
1059 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1060 // CHECK9-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 8
1061 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1062 // CHECK9-NEXT: store ptr @.offload_sizes.1, ptr [[TMP9]], align 8
1063 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1064 // CHECK9-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP10]], align 8
1065 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1066 // CHECK9-NEXT: store ptr null, ptr [[TMP11]], align 8
1067 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1068 // CHECK9-NEXT: store ptr null, ptr [[TMP12]], align 8
1069 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1070 // CHECK9-NEXT: store i64 0, ptr [[TMP13]], align 8
1071 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1072 // CHECK9-NEXT: store i64 0, ptr [[TMP14]], align 8
1073 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1074 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
1075 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1076 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
1077 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1078 // CHECK9-NEXT: store i32 0, ptr [[TMP17]], align 4
1079 // CHECK9-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.region_id, ptr [[KERNEL_ARGS]])
1080 // CHECK9-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
1081 // CHECK9-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1082 // CHECK9: omp_offload.failed:
1083 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64(ptr [[THIS1]]) #[[ATTR5]]
1084 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
1085 // CHECK9: omp_offload.cont:
1086 // CHECK9-NEXT: ret void
1089 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64
1090 // CHECK9-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3]] {
1091 // CHECK9-NEXT: entry:
1092 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1093 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1094 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1095 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.omp_outlined, ptr [[TMP0]])
1096 // CHECK9-NEXT: ret void
1099 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.omp_outlined
1100 // CHECK9-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4]] {
1101 // CHECK9-NEXT: entry:
1102 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
1103 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
1104 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1105 // CHECK9-NEXT: [[A:%.*]] = alloca i32, align 4
1106 // CHECK9-NEXT: [[TMP:%.*]] = alloca ptr, align 8
1107 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
1108 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
1109 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1110 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1111 // CHECK9-NEXT: store ptr [[A]], ptr [[TMP]], align 8
1112 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 8
1113 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1114 // CHECK9-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
1115 // CHECK9-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
1116 // CHECK9-NEXT: ret void
1119 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1120 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1121 // CHECK9-NEXT: entry:
1122 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1123 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1124 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1125 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1126 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1127 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1128 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1129 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1130 // CHECK9-NEXT: ret void
1133 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1134 // CHECK9-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1135 // CHECK9-NEXT: entry:
1136 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1137 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1138 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1139 // CHECK9-NEXT: ret void
1142 // CHECK9-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1143 // CHECK9-SAME: () #[[ATTR7:[0-9]+]] {
1144 // CHECK9-NEXT: entry:
1145 // CHECK9-NEXT: call void @__tgt_register_requires(i64 1)
1146 // CHECK9-NEXT: ret void
1149 // CHECK11-LABEL: define {{[^@]+}}@main
1150 // CHECK11-SAME: () #[[ATTR0:[0-9]+]] {
1151 // CHECK11-NEXT: entry:
1152 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1153 // CHECK11-NEXT: [[SS:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
1154 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1155 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1156 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1157 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1158 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
1159 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1160 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1161 // CHECK11-NEXT: call void @_ZN2SSC1ERi(ptr noundef nonnull align 4 dereferenceable(12) [[SS]], ptr noundef nonnull align 4 dereferenceable(4) @_ZZ4mainE5sivar)
1162 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1163 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
1164 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
1165 // CHECK11-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1166 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], float noundef 1.000000e+00)
1167 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYINIT_BEGIN]], i32 1
1168 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float noundef 2.000000e+00)
1169 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]], float noundef 3.000000e+00)
1170 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1171 // CHECK11-NEXT: store i32 2, ptr [[TMP0]], align 4
1172 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1173 // CHECK11-NEXT: store i32 0, ptr [[TMP1]], align 4
1174 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1175 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
1176 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1177 // CHECK11-NEXT: store ptr null, ptr [[TMP3]], align 4
1178 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1179 // CHECK11-NEXT: store ptr null, ptr [[TMP4]], align 4
1180 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1181 // CHECK11-NEXT: store ptr null, ptr [[TMP5]], align 4
1182 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1183 // CHECK11-NEXT: store ptr null, ptr [[TMP6]], align 4
1184 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1185 // CHECK11-NEXT: store ptr null, ptr [[TMP7]], align 4
1186 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1187 // CHECK11-NEXT: store i64 0, ptr [[TMP8]], align 8
1188 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1189 // CHECK11-NEXT: store i64 0, ptr [[TMP9]], align 8
1190 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1191 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
1192 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1193 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP11]], align 4
1194 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1195 // CHECK11-NEXT: store i32 0, ptr [[TMP12]], align 4
1196 // CHECK11-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.region_id, ptr [[KERNEL_ARGS]])
1197 // CHECK11-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
1198 // CHECK11-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1199 // CHECK11: omp_offload.failed:
1200 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136() #[[ATTR5:[0-9]+]]
1201 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1202 // CHECK11: omp_offload.cont:
1203 // CHECK11-NEXT: [[CALL:%.*]] = call noundef i32 @_Z5tmainIiET_v()
1204 // CHECK11-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1205 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
1206 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1207 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1208 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1209 // CHECK11: arraydestroy.body:
1210 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1211 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1212 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
1213 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1214 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
1215 // CHECK11: arraydestroy.done1:
1216 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR5]]
1217 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
1218 // CHECK11-NEXT: ret i32 [[TMP16]]
1221 // CHECK11-LABEL: define {{[^@]+}}@_ZN2SSC1ERi
1222 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1223 // CHECK11-NEXT: entry:
1224 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1225 // CHECK11-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
1226 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1227 // CHECK11-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
1228 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1229 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
1230 // CHECK11-NEXT: call void @_ZN2SSC2ERi(ptr noundef nonnull align 4 dereferenceable(12) [[THIS1]], ptr noundef nonnull align 4 dereferenceable(4) [[TMP0]])
1231 // CHECK11-NEXT: ret void
1234 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1235 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1236 // CHECK11-NEXT: entry:
1237 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1238 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1239 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1240 // CHECK11-NEXT: call void @_ZN1SIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1241 // CHECK11-NEXT: ret void
1244 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1245 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1246 // CHECK11-NEXT: entry:
1247 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1248 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1249 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1250 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1251 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1252 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1253 // CHECK11-NEXT: call void @_ZN1SIfEC2Ef(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], float noundef [[TMP0]])
1254 // CHECK11-NEXT: ret void
1257 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136
1258 // CHECK11-SAME: () #[[ATTR3:[0-9]+]] {
1259 // CHECK11-NEXT: entry:
1260 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.omp_outlined)
1261 // CHECK11-NEXT: ret void
1264 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l136.omp_outlined
1265 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4:[0-9]+]] {
1266 // CHECK11-NEXT: entry:
1267 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1268 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1269 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1270 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1271 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1272 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1273 // CHECK11-NEXT: [[SIVAR:%.*]] = alloca i32, align 4
1274 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1275 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1276 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1277 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1278 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1279 // CHECK11: arrayctor.loop:
1280 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1281 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1282 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYCTOR_CUR]], i32 1
1283 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1284 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1285 // CHECK11: arrayctor.cont:
1286 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
1287 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
1288 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i32 0, i32 0
1289 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[ARRAYIDX]], align 4
1290 // CHECK11-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1291 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX1]], ptr align 4 [[VAR]], i32 4, i1 false)
1292 // CHECK11-NEXT: store i32 3, ptr [[SIVAR]], align 4
1293 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
1294 // CHECK11-NEXT: [[ARRAY_BEGIN2:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1295 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN2]], i32 2
1296 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1297 // CHECK11: arraydestroy.body:
1298 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1299 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1300 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
1301 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN2]]
1302 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE3:%.*]], label [[ARRAYDESTROY_BODY]]
1303 // CHECK11: arraydestroy.done3:
1304 // CHECK11-NEXT: ret void
1307 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1308 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1309 // CHECK11-NEXT: entry:
1310 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1311 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1312 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1313 // CHECK11-NEXT: call void @_ZN1SIfED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR5]]
1314 // CHECK11-NEXT: ret void
1317 // CHECK11-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1318 // CHECK11-SAME: () #[[ATTR6:[0-9]+]] comdat {
1319 // CHECK11-NEXT: entry:
1320 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1321 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1322 // CHECK11-NEXT: [[SST:%.*]] = alloca [[STRUCT_SST:%.*]], align 4
1323 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
1324 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
1325 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
1326 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
1327 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1328 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]])
1329 // CHECK11-NEXT: call void @_ZN3SSTIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[SST]])
1330 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 128
1331 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
1332 // CHECK11-NEXT: [[ARRAYINIT_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1333 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_BEGIN]], i32 noundef 1)
1334 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYINIT_BEGIN]], i32 1
1335 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 noundef 2)
1336 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]], i32 noundef 3)
1337 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1338 // CHECK11-NEXT: store i32 2, ptr [[TMP0]], align 4
1339 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1340 // CHECK11-NEXT: store i32 0, ptr [[TMP1]], align 4
1341 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1342 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
1343 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1344 // CHECK11-NEXT: store ptr null, ptr [[TMP3]], align 4
1345 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1346 // CHECK11-NEXT: store ptr null, ptr [[TMP4]], align 4
1347 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1348 // CHECK11-NEXT: store ptr null, ptr [[TMP5]], align 4
1349 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1350 // CHECK11-NEXT: store ptr null, ptr [[TMP6]], align 4
1351 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1352 // CHECK11-NEXT: store ptr null, ptr [[TMP7]], align 4
1353 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1354 // CHECK11-NEXT: store i64 0, ptr [[TMP8]], align 8
1355 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1356 // CHECK11-NEXT: store i64 0, ptr [[TMP9]], align 8
1357 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1358 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP10]], align 4
1359 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1360 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP11]], align 4
1361 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1362 // CHECK11-NEXT: store i32 0, ptr [[TMP12]], align 4
1363 // CHECK11-NEXT: [[TMP13:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.region_id, ptr [[KERNEL_ARGS]])
1364 // CHECK11-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0
1365 // CHECK11-NEXT: br i1 [[TMP14]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1366 // CHECK11: omp_offload.failed:
1367 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86() #[[ATTR5]]
1368 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1369 // CHECK11: omp_offload.cont:
1370 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1371 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
1372 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1373 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1374 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1375 // CHECK11: arraydestroy.body:
1376 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP15]], [[OMP_OFFLOAD_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1377 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1378 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
1379 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1380 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE1:%.*]], label [[ARRAYDESTROY_BODY]]
1381 // CHECK11: arraydestroy.done1:
1382 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR5]]
1383 // CHECK11-NEXT: [[TMP16:%.*]] = load i32, ptr [[RETVAL]], align 4
1384 // CHECK11-NEXT: ret i32 [[TMP16]]
1387 // CHECK11-LABEL: define {{[^@]+}}@_ZN2SSC2ERi
1388 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(12) [[THIS:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[D:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1389 // CHECK11-NEXT: entry:
1390 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1391 // CHECK11-NEXT: [[D_ADDR:%.*]] = alloca ptr, align 4
1392 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
1393 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
1394 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
1395 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1396 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1397 // CHECK11-NEXT: store ptr [[D]], ptr [[D_ADDR]], align 4
1398 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1399 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SS:%.*]], ptr [[THIS1]], i32 0, i32 0
1400 // CHECK11-NEXT: store i32 0, ptr [[A]], align 4
1401 // CHECK11-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 1
1402 // CHECK11-NEXT: [[BF_LOAD:%.*]] = load i8, ptr [[B]], align 4
1403 // CHECK11-NEXT: [[BF_CLEAR:%.*]] = and i8 [[BF_LOAD]], -16
1404 // CHECK11-NEXT: [[BF_SET:%.*]] = or i8 [[BF_CLEAR]], 0
1405 // CHECK11-NEXT: store i8 [[BF_SET]], ptr [[B]], align 4
1406 // CHECK11-NEXT: [[C:%.*]] = getelementptr inbounds [[STRUCT_SS]], ptr [[THIS1]], i32 0, i32 2
1407 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[D_ADDR]], align 4
1408 // CHECK11-NEXT: store ptr [[TMP0]], ptr [[C]], align 4
1409 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1410 // CHECK11-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 4
1411 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1412 // CHECK11-NEXT: store ptr [[THIS1]], ptr [[TMP2]], align 4
1413 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1414 // CHECK11-NEXT: store ptr null, ptr [[TMP3]], align 4
1415 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1416 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1417 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1418 // CHECK11-NEXT: store i32 2, ptr [[TMP6]], align 4
1419 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1420 // CHECK11-NEXT: store i32 1, ptr [[TMP7]], align 4
1421 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1422 // CHECK11-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 4
1423 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1424 // CHECK11-NEXT: store ptr [[TMP5]], ptr [[TMP9]], align 4
1425 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1426 // CHECK11-NEXT: store ptr @.offload_sizes, ptr [[TMP10]], align 4
1427 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1428 // CHECK11-NEXT: store ptr @.offload_maptypes, ptr [[TMP11]], align 4
1429 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1430 // CHECK11-NEXT: store ptr null, ptr [[TMP12]], align 4
1431 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1432 // CHECK11-NEXT: store ptr null, ptr [[TMP13]], align 4
1433 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1434 // CHECK11-NEXT: store i64 0, ptr [[TMP14]], align 8
1435 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1436 // CHECK11-NEXT: store i64 0, ptr [[TMP15]], align 8
1437 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1438 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
1439 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1440 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP17]], align 4
1441 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1442 // CHECK11-NEXT: store i32 0, ptr [[TMP18]], align 4
1443 // CHECK11-NEXT: [[TMP19:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.region_id, ptr [[KERNEL_ARGS]])
1444 // CHECK11-NEXT: [[TMP20:%.*]] = icmp ne i32 [[TMP19]], 0
1445 // CHECK11-NEXT: br i1 [[TMP20]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1446 // CHECK11: omp_offload.failed:
1447 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48(ptr [[THIS1]]) #[[ATTR5]]
1448 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1449 // CHECK11: omp_offload.cont:
1450 // CHECK11-NEXT: ret void
1453 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48
1454 // CHECK11-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3]] {
1455 // CHECK11-NEXT: entry:
1456 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1457 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1458 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1459 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined, ptr [[TMP0]])
1460 // CHECK11-NEXT: ret void
1463 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2SSC1ERi_l48.omp_outlined
1464 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4]] {
1465 // CHECK11-NEXT: entry:
1466 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1467 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1468 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1469 // CHECK11-NEXT: [[A:%.*]] = alloca i32, align 4
1470 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1471 // CHECK11-NEXT: [[B:%.*]] = alloca i32, align 4
1472 // CHECK11-NEXT: [[C:%.*]] = alloca i32, align 4
1473 // CHECK11-NEXT: [[_TMP1:%.*]] = alloca ptr, align 4
1474 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1475 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1476 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1477 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1478 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP]], align 4
1479 // CHECK11-NEXT: store ptr [[C]], ptr [[_TMP1]], align 4
1480 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 4
1481 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1482 // CHECK11-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
1483 // CHECK11-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
1484 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[B]], align 4
1485 // CHECK11-NEXT: [[DEC:%.*]] = add nsw i32 [[TMP3]], -1
1486 // CHECK11-NEXT: store i32 [[DEC]], ptr [[B]], align 4
1487 // CHECK11-NEXT: [[TMP4:%.*]] = load ptr, ptr [[_TMP1]], align 4
1488 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[TMP4]], align 4
1489 // CHECK11-NEXT: [[DIV:%.*]] = sdiv i32 [[TMP5]], 1
1490 // CHECK11-NEXT: store i32 [[DIV]], ptr [[TMP4]], align 4
1491 // CHECK11-NEXT: ret void
1494 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1495 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1496 // CHECK11-NEXT: entry:
1497 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1498 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1499 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1500 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1501 // CHECK11-NEXT: store float 0.000000e+00, ptr [[F]], align 4
1502 // CHECK11-NEXT: ret void
1505 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1506 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], float noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1507 // CHECK11-NEXT: entry:
1508 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1509 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1510 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1511 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1512 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1513 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1514 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1515 // CHECK11-NEXT: store float [[TMP0]], ptr [[F]], align 4
1516 // CHECK11-NEXT: ret void
1519 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1520 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1521 // CHECK11-NEXT: entry:
1522 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1523 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1524 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1525 // CHECK11-NEXT: ret void
1528 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1529 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1530 // CHECK11-NEXT: entry:
1531 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1532 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1533 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1534 // CHECK11-NEXT: call void @_ZN1SIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1535 // CHECK11-NEXT: ret void
1538 // CHECK11-LABEL: define {{[^@]+}}@_ZN3SSTIiEC1Ev
1539 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1540 // CHECK11-NEXT: entry:
1541 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1542 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1543 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1544 // CHECK11-NEXT: call void @_ZN3SSTIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]])
1545 // CHECK11-NEXT: ret void
1548 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
1549 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1550 // CHECK11-NEXT: entry:
1551 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1552 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1553 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1554 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1555 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1556 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1557 // CHECK11-NEXT: call void @_ZN1SIiEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
1558 // CHECK11-NEXT: ret void
1561 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86
1562 // CHECK11-SAME: () #[[ATTR3]] {
1563 // CHECK11-NEXT: entry:
1564 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 0, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.omp_outlined)
1565 // CHECK11-NEXT: ret void
1568 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l86.omp_outlined
1569 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR4]] {
1570 // CHECK11-NEXT: entry:
1571 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1572 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1573 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
1574 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
1575 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
1576 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
1577 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1578 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1579 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1580 // CHECK11-NEXT: [[ARRAYCTOR_END:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1581 // CHECK11-NEXT: br label [[ARRAYCTOR_LOOP:%.*]]
1582 // CHECK11: arrayctor.loop:
1583 // CHECK11-NEXT: [[ARRAYCTOR_CUR:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP]] ]
1584 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYCTOR_CUR]])
1585 // CHECK11-NEXT: [[ARRAYCTOR_NEXT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYCTOR_CUR]], i32 1
1586 // CHECK11-NEXT: [[ARRAYCTOR_DONE:%.*]] = icmp eq ptr [[ARRAYCTOR_NEXT]], [[ARRAYCTOR_END]]
1587 // CHECK11-NEXT: br i1 [[ARRAYCTOR_DONE]], label [[ARRAYCTOR_CONT:%.*]], label [[ARRAYCTOR_LOOP]]
1588 // CHECK11: arrayctor.cont:
1589 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]])
1590 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
1591 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC]], i32 0, i32 0
1592 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[ARRAYIDX]], align 128
1593 // CHECK11-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1594 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[ARRAYIDX1]], ptr align 128 [[VAR]], i32 4, i1 false)
1595 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR5]]
1596 // CHECK11-NEXT: [[ARRAY_BEGIN2:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1597 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN2]], i32 2
1598 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1599 // CHECK11: arraydestroy.body:
1600 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ARRAYCTOR_CONT]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1601 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1602 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR5]]
1603 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN2]]
1604 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE3:%.*]], label [[ARRAYDESTROY_BODY]]
1605 // CHECK11: arraydestroy.done3:
1606 // CHECK11-NEXT: ret void
1609 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1610 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1611 // CHECK11-NEXT: entry:
1612 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1613 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1614 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1615 // CHECK11-NEXT: call void @_ZN1SIiED2Ev(ptr noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR5]]
1616 // CHECK11-NEXT: ret void
1619 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
1620 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1621 // CHECK11-NEXT: entry:
1622 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1623 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1624 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1625 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1626 // CHECK11-NEXT: store i32 0, ptr [[F]], align 4
1627 // CHECK11-NEXT: ret void
1630 // CHECK11-LABEL: define {{[^@]+}}@_ZN3SSTIiEC2Ev
1631 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1632 // CHECK11-NEXT: entry:
1633 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1634 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [1 x ptr], align 4
1635 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [1 x ptr], align 4
1636 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [1 x ptr], align 4
1637 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1638 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1639 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1640 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_SST:%.*]], ptr [[THIS1]], i32 0, i32 0
1641 // CHECK11-NEXT: store i32 0, ptr [[A]], align 4
1642 // CHECK11-NEXT: [[TMP0:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1643 // CHECK11-NEXT: store ptr [[THIS1]], ptr [[TMP0]], align 4
1644 // CHECK11-NEXT: [[TMP1:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1645 // CHECK11-NEXT: store ptr [[THIS1]], ptr [[TMP1]], align 4
1646 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1647 // CHECK11-NEXT: store ptr null, ptr [[TMP2]], align 4
1648 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1649 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1650 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1651 // CHECK11-NEXT: store i32 2, ptr [[TMP5]], align 4
1652 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1653 // CHECK11-NEXT: store i32 1, ptr [[TMP6]], align 4
1654 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1655 // CHECK11-NEXT: store ptr [[TMP3]], ptr [[TMP7]], align 4
1656 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1657 // CHECK11-NEXT: store ptr [[TMP4]], ptr [[TMP8]], align 4
1658 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1659 // CHECK11-NEXT: store ptr @.offload_sizes.1, ptr [[TMP9]], align 4
1660 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1661 // CHECK11-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP10]], align 4
1662 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1663 // CHECK11-NEXT: store ptr null, ptr [[TMP11]], align 4
1664 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1665 // CHECK11-NEXT: store ptr null, ptr [[TMP12]], align 4
1666 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1667 // CHECK11-NEXT: store i64 0, ptr [[TMP13]], align 8
1668 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1669 // CHECK11-NEXT: store i64 0, ptr [[TMP14]], align 8
1670 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1671 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP15]], align 4
1672 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1673 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP16]], align 4
1674 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1675 // CHECK11-NEXT: store i32 0, ptr [[TMP17]], align 4
1676 // CHECK11-NEXT: [[TMP18:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.region_id, ptr [[KERNEL_ARGS]])
1677 // CHECK11-NEXT: [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
1678 // CHECK11-NEXT: br i1 [[TMP19]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1679 // CHECK11: omp_offload.failed:
1680 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64(ptr [[THIS1]]) #[[ATTR5]]
1681 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1682 // CHECK11: omp_offload.cont:
1683 // CHECK11-NEXT: ret void
1686 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64
1687 // CHECK11-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR3]] {
1688 // CHECK11-NEXT: entry:
1689 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1690 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1691 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1692 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.omp_outlined, ptr [[TMP0]])
1693 // CHECK11-NEXT: ret void
1696 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN3SSTIiEC1Ev_l64.omp_outlined
1697 // CHECK11-SAME: (ptr noalias noundef [[DOTGLOBAL_TID_:%.*]], ptr noalias noundef [[DOTBOUND_TID_:%.*]], ptr noundef [[THIS:%.*]]) #[[ATTR4]] {
1698 // CHECK11-NEXT: entry:
1699 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1700 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1701 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1702 // CHECK11-NEXT: [[A:%.*]] = alloca i32, align 4
1703 // CHECK11-NEXT: [[TMP:%.*]] = alloca ptr, align 4
1704 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1705 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1706 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1707 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1708 // CHECK11-NEXT: store ptr [[A]], ptr [[TMP]], align 4
1709 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP]], align 4
1710 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
1711 // CHECK11-NEXT: [[INC:%.*]] = add nsw i32 [[TMP2]], 1
1712 // CHECK11-NEXT: store i32 [[INC]], ptr [[TMP1]], align 4
1713 // CHECK11-NEXT: ret void
1716 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1717 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1718 // CHECK11-NEXT: entry:
1719 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1720 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1721 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1722 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1723 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1724 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1725 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1726 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1727 // CHECK11-NEXT: ret void
1730 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1731 // CHECK11-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1732 // CHECK11-NEXT: entry:
1733 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1734 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1735 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1736 // CHECK11-NEXT: ret void
1739 // CHECK11-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1740 // CHECK11-SAME: () #[[ATTR7:[0-9]+]] {
1741 // CHECK11-NEXT: entry:
1742 // CHECK11-NEXT: call void @__tgt_register_requires(i64 1)
1743 // CHECK11-NEXT: ret void