[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / teams_firstprivate_codegen.cpp
blob6f21c9e31bd8d16f4a8b74a680d61fba68709967
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 // Test host codegen.
3 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK1
4 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
5 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK1
6 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK3
7 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
8 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK3
10 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
11 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
12 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
13 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
14 // RUN: %clang_cc1 -no-enable-noundef-analysis -DLAMBDA -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
15 // RUN: %clang_cc1 -no-enable-noundef-analysis -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 -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
17 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK9
18 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
19 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK9
20 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK11
21 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
22 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK11
24 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
25 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
26 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
27 // RUN: %clang_cc1 -no-enable-noundef-analysis -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
28 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
29 // RUN: %clang_cc1 -no-enable-noundef-analysis -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
31 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK17
32 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
33 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK17
34 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -verify -Wno-vla -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK19
35 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
36 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --check-prefix=CHECK19
38 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
39 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp-simd -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
40 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -std=c++11 -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
41 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -verify -Wno-vla -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-llvm %s -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
42 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -emit-pch -o %t %s -Wno-openmp-mapping
43 // RUN: %clang_cc1 -no-enable-noundef-analysis -DARRAY -fopenmp-simd -x c++ -std=c++11 -triple i386-unknown-unknown -fopenmp-targets=i386-pc-linux-gnu -include-pch %t -verify -Wno-vla %s -emit-llvm -o - -Wno-openmp-mapping | FileCheck %s --implicit-check-not="{{__kmpc|__tgt}}"
44 // expected-no-diagnostics
45 #ifndef HEADER
46 #define HEADER
47 #ifndef ARRAY
48 struct St {
49 int a, b;
50 St() : a(0), b(0) {}
51 St(const St &st) : a(st.a + st.b), b(0) {}
52 ~St() {}
55 volatile int g __attribute__((aligned(128))) = 1212;
57 template <class T>
58 struct S {
59 T f;
60 S(T a) : f(a + g) {}
61 S() : f(g) {}
62 S(const S &s, St t = St()) : f(s.f + t.a) {}
63 operator T() { return T(); }
64 ~S() {}
68 template <typename T>
69 T tmain() {
70 S<T> test;
71 T t_var __attribute__((aligned(128))) = T();
72 T vec[] __attribute__((aligned(128))) = {1, 2};
73 S<T> s_arr[] __attribute__((aligned(128))) = {1, 2};
74 S<T> var __attribute__((aligned(128))) (3);
75 #pragma omp target
76 #pragma omp teams firstprivate(t_var, vec, s_arr, var)
78 vec[0] = t_var;
79 s_arr[0] = var;
81 #pragma omp target
82 #pragma omp teams firstprivate(t_var)
84 return T();
87 int main() {
88 static int sivar;
89 #ifdef LAMBDA
90 [&]() {
91 #pragma omp target
92 #pragma omp teams firstprivate(g, sivar)
94 g = 1;
95 sivar = 2;
96 [&]() {
97 g = 2;
98 sivar = 4;
99 }();
101 }();
102 return 0;
103 #else
104 S<float> test;
105 int t_var = 0;
106 int vec[] = {1, 2};
107 S<float> s_arr[] = {1, 2};
108 S<float> var(3);
109 #pragma omp target
110 #pragma omp teams firstprivate(t_var, vec, s_arr, var, sivar)
112 vec[0] = t_var;
113 s_arr[0] = var;
114 sivar = 2;
116 #pragma omp target
117 #pragma omp teams firstprivate(t_var)
119 return tmain<int>();
120 #endif
135 #else
136 struct St {
137 int a, b;
138 St() : a(0), b(0) {}
139 St(const St &) { }
140 ~St() {}
141 void St_func(St s[2], int n, long double vla1[n]) {
142 double vla2[n][n] __attribute__((aligned(128)));
143 a = b;
144 #pragma omp target
145 #pragma omp teams firstprivate(s, vla1, vla2)
146 vla1[b] = vla2[1][n - 1] = a = b;
150 void array_func(float a[3], St s[2], int n, long double vla1[n]) {
151 double vla2[n][n] __attribute__((aligned(128)));
152 #pragma omp target
153 #pragma omp teams firstprivate(a, s, vla1, vla2)
154 s[0].St_func(s, n, vla1);
158 #endif
159 #endif
160 // CHECK1-LABEL: define {{[^@]+}}@main
161 // CHECK1-SAME: () #[[ATTR0:[0-9]+]] {
162 // CHECK1-NEXT: entry:
163 // CHECK1-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
164 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
165 // CHECK1-NEXT: store i32 0, ptr [[RETVAL]], align 4
166 // CHECK1-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr nonnull align 1 dereferenceable(1) [[REF_TMP]])
167 // CHECK1-NEXT: ret i32 0
170 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91
171 // CHECK1-SAME: (i64 [[G:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR2:[0-9]+]] {
172 // CHECK1-NEXT: entry:
173 // CHECK1-NEXT: [[G_ADDR:%.*]] = alloca i64, align 8
174 // CHECK1-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
175 // CHECK1-NEXT: [[G_CASTED:%.*]] = alloca i64, align 8
176 // CHECK1-NEXT: [[SIVAR_CASTED:%.*]] = alloca i64, align 8
177 // CHECK1-NEXT: store i64 [[G]], ptr [[G_ADDR]], align 8
178 // CHECK1-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
179 // CHECK1-NEXT: [[TMP0:%.*]] = load i32, ptr [[G_ADDR]], align 4
180 // CHECK1-NEXT: store i32 [[TMP0]], ptr [[G_CASTED]], align 4
181 // CHECK1-NEXT: [[TMP1:%.*]] = load i64, ptr [[G_CASTED]], align 8
182 // CHECK1-NEXT: [[TMP2:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
183 // CHECK1-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
184 // CHECK1-NEXT: [[TMP3:%.*]] = load i64, ptr [[SIVAR_CASTED]], align 8
185 // CHECK1-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1:[0-9]+]], i32 2, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91.omp_outlined, i64 [[TMP1]], i64 [[TMP3]])
186 // CHECK1-NEXT: ret void
189 // CHECK1-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91.omp_outlined
190 // CHECK1-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[G:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR2]] {
191 // CHECK1-NEXT: entry:
192 // CHECK1-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
193 // CHECK1-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
194 // CHECK1-NEXT: [[G_ADDR:%.*]] = alloca i64, align 8
195 // CHECK1-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
196 // CHECK1-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 8
197 // CHECK1-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
198 // CHECK1-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
199 // CHECK1-NEXT: store i64 [[G]], ptr [[G_ADDR]], align 8
200 // CHECK1-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
201 // CHECK1-NEXT: store i32 1, ptr [[G_ADDR]], align 4
202 // CHECK1-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
203 // CHECK1-NEXT: [[TMP0:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
204 // CHECK1-NEXT: store ptr [[G_ADDR]], ptr [[TMP0]], align 8
205 // CHECK1-NEXT: [[TMP1:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
206 // CHECK1-NEXT: store ptr [[SIVAR_ADDR]], ptr [[TMP1]], align 8
207 // CHECK1-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr nonnull align 8 dereferenceable(16) [[REF_TMP]])
208 // CHECK1-NEXT: ret void
211 // CHECK3-LABEL: define {{[^@]+}}@main
212 // CHECK3-SAME: () #[[ATTR0:[0-9]+]] {
213 // CHECK3-NEXT: entry:
214 // CHECK3-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
215 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 1
216 // CHECK3-NEXT: store i32 0, ptr [[RETVAL]], align 4
217 // CHECK3-NEXT: call void @"_ZZ4mainENK3$_0clEv"(ptr nonnull align 1 dereferenceable(1) [[REF_TMP]])
218 // CHECK3-NEXT: ret i32 0
221 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91
222 // CHECK3-SAME: (i32 [[G:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR2:[0-9]+]] {
223 // CHECK3-NEXT: entry:
224 // CHECK3-NEXT: [[G_ADDR:%.*]] = alloca i32, align 4
225 // CHECK3-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
226 // CHECK3-NEXT: [[G_CASTED:%.*]] = alloca i32, align 4
227 // CHECK3-NEXT: [[SIVAR_CASTED:%.*]] = alloca i32, align 4
228 // CHECK3-NEXT: store i32 [[G]], ptr [[G_ADDR]], align 4
229 // CHECK3-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
230 // CHECK3-NEXT: [[TMP0:%.*]] = load i32, ptr [[G_ADDR]], align 4
231 // CHECK3-NEXT: store i32 [[TMP0]], ptr [[G_CASTED]], align 4
232 // CHECK3-NEXT: [[TMP1:%.*]] = load i32, ptr [[G_CASTED]], align 4
233 // CHECK3-NEXT: [[TMP2:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
234 // CHECK3-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
235 // CHECK3-NEXT: [[TMP3:%.*]] = load i32, ptr [[SIVAR_CASTED]], align 4
236 // CHECK3-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1:[0-9]+]], i32 2, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91.omp_outlined, i32 [[TMP1]], i32 [[TMP3]])
237 // CHECK3-NEXT: ret void
240 // CHECK3-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l91.omp_outlined
241 // CHECK3-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[G:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR2]] {
242 // CHECK3-NEXT: entry:
243 // CHECK3-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
244 // CHECK3-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
245 // CHECK3-NEXT: [[G_ADDR:%.*]] = alloca i32, align 4
246 // CHECK3-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
247 // CHECK3-NEXT: [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
248 // CHECK3-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
249 // CHECK3-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
250 // CHECK3-NEXT: store i32 [[G]], ptr [[G_ADDR]], align 4
251 // CHECK3-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
252 // CHECK3-NEXT: store i32 1, ptr [[G_ADDR]], align 4
253 // CHECK3-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
254 // CHECK3-NEXT: [[TMP0:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
255 // CHECK3-NEXT: store ptr [[G_ADDR]], ptr [[TMP0]], align 4
256 // CHECK3-NEXT: [[TMP1:%.*]] = getelementptr inbounds nuw [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 1
257 // CHECK3-NEXT: store ptr [[SIVAR_ADDR]], ptr [[TMP1]], align 4
258 // CHECK3-NEXT: call void @"_ZZZ4mainENK3$_0clEvENKUlvE_clEv"(ptr nonnull align 4 dereferenceable(8) [[REF_TMP]])
259 // CHECK3-NEXT: ret void
262 // CHECK9-LABEL: define {{[^@]+}}@main
263 // CHECK9-SAME: () #[[ATTR0:[0-9]+]] {
264 // CHECK9-NEXT: entry:
265 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
266 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
267 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
268 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
269 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
270 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
271 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
272 // CHECK9-NEXT: [[SIVAR_CASTED:%.*]] = alloca i64, align 8
273 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [5 x ptr], align 8
274 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [5 x ptr], align 8
275 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [5 x ptr], align 8
276 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
277 // CHECK9-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i64, align 8
278 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS2:%.*]] = alloca [1 x ptr], align 8
279 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS3:%.*]] = alloca [1 x ptr], align 8
280 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS4:%.*]] = alloca [1 x ptr], align 8
281 // CHECK9-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
282 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
283 // CHECK9-NEXT: call void @_ZN1SIfEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
284 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 4
285 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i64 8, i1 false)
286 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[S_ARR]], float 1.000000e+00)
287 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[S_ARR]], i64 1
288 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float 2.000000e+00)
289 // CHECK9-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[VAR]], float 3.000000e+00)
290 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
291 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
292 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
293 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
294 // CHECK9-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
295 // CHECK9-NEXT: [[TMP3:%.*]] = load i64, ptr [[SIVAR_CASTED]], align 8
296 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
297 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP4]], align 8
298 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
299 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP5]], align 8
300 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
301 // CHECK9-NEXT: store ptr null, ptr [[TMP6]], align 8
302 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
303 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP7]], align 8
304 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
305 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP8]], align 8
306 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
307 // CHECK9-NEXT: store ptr null, ptr [[TMP9]], align 8
308 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
309 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP10]], align 8
310 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
311 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP11]], align 8
312 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
313 // CHECK9-NEXT: store ptr null, ptr [[TMP12]], align 8
314 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
315 // CHECK9-NEXT: store ptr [[VAR]], ptr [[TMP13]], align 8
316 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
317 // CHECK9-NEXT: store ptr [[VAR]], ptr [[TMP14]], align 8
318 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
319 // CHECK9-NEXT: store ptr null, ptr [[TMP15]], align 8
320 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
321 // CHECK9-NEXT: store i64 [[TMP3]], ptr [[TMP16]], align 8
322 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
323 // CHECK9-NEXT: store i64 [[TMP3]], ptr [[TMP17]], align 8
324 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
325 // CHECK9-NEXT: store ptr null, ptr [[TMP18]], align 8
326 // CHECK9-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
327 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
328 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
329 // CHECK9-NEXT: store i32 3, ptr [[TMP21]], align 4
330 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
331 // CHECK9-NEXT: store i32 5, ptr [[TMP22]], align 4
332 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
333 // CHECK9-NEXT: store ptr [[TMP19]], ptr [[TMP23]], align 8
334 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
335 // CHECK9-NEXT: store ptr [[TMP20]], ptr [[TMP24]], align 8
336 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
337 // CHECK9-NEXT: store ptr @.offload_sizes, ptr [[TMP25]], align 8
338 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
339 // CHECK9-NEXT: store ptr @.offload_maptypes, ptr [[TMP26]], align 8
340 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
341 // CHECK9-NEXT: store ptr null, ptr [[TMP27]], align 8
342 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
343 // CHECK9-NEXT: store ptr null, ptr [[TMP28]], align 8
344 // CHECK9-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
345 // CHECK9-NEXT: store i64 0, ptr [[TMP29]], align 8
346 // CHECK9-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
347 // CHECK9-NEXT: store i64 0, ptr [[TMP30]], align 8
348 // CHECK9-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
349 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP31]], align 4
350 // CHECK9-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
351 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP32]], align 4
352 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
353 // CHECK9-NEXT: store i32 0, ptr [[TMP33]], align 4
354 // CHECK9-NEXT: [[TMP34:%.*]] = 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_l109.region_id, ptr [[KERNEL_ARGS]])
355 // CHECK9-NEXT: [[TMP35:%.*]] = icmp ne i32 [[TMP34]], 0
356 // CHECK9-NEXT: br i1 [[TMP35]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
357 // CHECK9: omp_offload.failed:
358 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109(i64 [[TMP1]], ptr [[VEC]], ptr [[S_ARR]], ptr [[VAR]], i64 [[TMP3]]) #[[ATTR4:[0-9]+]]
359 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
360 // CHECK9: omp_offload.cont:
361 // CHECK9-NEXT: [[TMP36:%.*]] = load i32, ptr [[T_VAR]], align 4
362 // CHECK9-NEXT: store i32 [[TMP36]], ptr [[T_VAR_CASTED1]], align 4
363 // CHECK9-NEXT: [[TMP37:%.*]] = load i64, ptr [[T_VAR_CASTED1]], align 8
364 // CHECK9-NEXT: [[TMP38:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
365 // CHECK9-NEXT: store i64 [[TMP37]], ptr [[TMP38]], align 8
366 // CHECK9-NEXT: [[TMP39:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
367 // CHECK9-NEXT: store i64 [[TMP37]], ptr [[TMP39]], align 8
368 // CHECK9-NEXT: [[TMP40:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS4]], i64 0, i64 0
369 // CHECK9-NEXT: store ptr null, ptr [[TMP40]], align 8
370 // CHECK9-NEXT: [[TMP41:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
371 // CHECK9-NEXT: [[TMP42:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
372 // CHECK9-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
373 // CHECK9-NEXT: store i32 3, ptr [[TMP43]], align 4
374 // CHECK9-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
375 // CHECK9-NEXT: store i32 1, ptr [[TMP44]], align 4
376 // CHECK9-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
377 // CHECK9-NEXT: store ptr [[TMP41]], ptr [[TMP45]], align 8
378 // CHECK9-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
379 // CHECK9-NEXT: store ptr [[TMP42]], ptr [[TMP46]], align 8
380 // CHECK9-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
381 // CHECK9-NEXT: store ptr @.offload_sizes.1, ptr [[TMP47]], align 8
382 // CHECK9-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
383 // CHECK9-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP48]], align 8
384 // CHECK9-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
385 // CHECK9-NEXT: store ptr null, ptr [[TMP49]], align 8
386 // CHECK9-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
387 // CHECK9-NEXT: store ptr null, ptr [[TMP50]], align 8
388 // CHECK9-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
389 // CHECK9-NEXT: store i64 0, ptr [[TMP51]], align 8
390 // CHECK9-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
391 // CHECK9-NEXT: store i64 0, ptr [[TMP52]], align 8
392 // CHECK9-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
393 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP53]], align 4
394 // CHECK9-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
395 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP54]], align 4
396 // CHECK9-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
397 // CHECK9-NEXT: store i32 0, ptr [[TMP55]], align 4
398 // CHECK9-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.region_id, ptr [[KERNEL_ARGS5]])
399 // CHECK9-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0
400 // CHECK9-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
401 // CHECK9: omp_offload.failed6:
402 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116(i64 [[TMP37]]) #[[ATTR4]]
403 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT7]]
404 // CHECK9: omp_offload.cont7:
405 // CHECK9-NEXT: [[CALL:%.*]] = call signext i32 @_Z5tmainIiET_v()
406 // CHECK9-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
407 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
408 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
409 // CHECK9-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
410 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
411 // CHECK9: arraydestroy.body:
412 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP58]], [[OMP_OFFLOAD_CONT7]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
413 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
414 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
415 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
416 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
417 // CHECK9: arraydestroy.done8:
418 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
419 // CHECK9-NEXT: [[TMP59:%.*]] = load i32, ptr [[RETVAL]], align 4
420 // CHECK9-NEXT: ret i32 [[TMP59]]
423 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
424 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat {
425 // CHECK9-NEXT: entry:
426 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
427 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
428 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
429 // CHECK9-NEXT: call void @_ZN1SIfEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
430 // CHECK9-NEXT: ret void
433 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
434 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
435 // CHECK9-NEXT: entry:
436 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
437 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
438 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
439 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
440 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
441 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
442 // CHECK9-NEXT: call void @_ZN1SIfEC2Ef(ptr nonnull align 4 dereferenceable(4) [[THIS1]], float [[TMP0]])
443 // CHECK9-NEXT: ret void
446 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109
447 // CHECK9-SAME: (i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR3:[0-9]+]] {
448 // CHECK9-NEXT: entry:
449 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
450 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
451 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
452 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
453 // CHECK9-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
454 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
455 // CHECK9-NEXT: [[SIVAR_CASTED:%.*]] = alloca i64, align 8
456 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
457 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
458 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
459 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
460 // CHECK9-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
461 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
462 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
463 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
464 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
465 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[T_VAR_CASTED]], align 4
466 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
467 // CHECK9-NEXT: [[TMP5:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
468 // CHECK9-NEXT: store i32 [[TMP5]], ptr [[SIVAR_CASTED]], align 4
469 // CHECK9-NEXT: [[TMP6:%.*]] = load i64, ptr [[SIVAR_CASTED]], align 8
470 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109.omp_outlined, ptr [[TMP0]], i64 [[TMP4]], ptr [[TMP1]], ptr [[TMP2]], i64 [[TMP6]])
471 // CHECK9-NEXT: ret void
474 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109.omp_outlined
475 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i64 [[SIVAR:%.*]]) #[[ATTR3]] {
476 // CHECK9-NEXT: entry:
477 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
478 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
479 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
480 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
481 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
482 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
483 // CHECK9-NEXT: [[SIVAR_ADDR:%.*]] = alloca i64, align 8
484 // CHECK9-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 4
485 // CHECK9-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S], align 4
486 // CHECK9-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
487 // CHECK9-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S:%.*]], align 4
488 // CHECK9-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
489 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
490 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
491 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
492 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
493 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
494 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
495 // CHECK9-NEXT: store i64 [[SIVAR]], ptr [[SIVAR_ADDR]], align 8
496 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
497 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
498 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
499 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[VEC1]], ptr align 4 [[TMP0]], i64 8, i1 false)
500 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
501 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i64 2
502 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
503 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
504 // CHECK9: omp.arraycpy.body:
505 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
506 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
507 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
508 // CHECK9-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
509 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
510 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
511 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
512 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
513 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
514 // CHECK9: omp.arraycpy.done3:
515 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
516 // CHECK9-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
517 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
518 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
519 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i64 0, i64 0
520 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4
521 // CHECK9-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i64 0, i64 0
522 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[ARRAYIDX6]], ptr align 4 [[VAR4]], i64 4, i1 false)
523 // CHECK9-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
524 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
525 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
526 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN7]], i64 2
527 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
528 // CHECK9: arraydestroy.body:
529 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
530 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
531 // CHECK9-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
532 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
533 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
534 // CHECK9: arraydestroy.done8:
535 // CHECK9-NEXT: ret void
538 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StC1Ev
539 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
540 // CHECK9-NEXT: entry:
541 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
542 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
543 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
544 // CHECK9-NEXT: call void @_ZN2StC2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]])
545 // CHECK9-NEXT: ret void
548 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC1ERKS0_2St
549 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat {
550 // CHECK9-NEXT: entry:
551 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
552 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
553 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
554 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
555 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
556 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
557 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
558 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
559 // CHECK9-NEXT: call void @_ZN1SIfEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
560 // CHECK9-NEXT: ret void
563 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StD1Ev
564 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
565 // CHECK9-NEXT: entry:
566 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
567 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
568 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
569 // CHECK9-NEXT: call void @_ZN2StD2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]]) #[[ATTR4]]
570 // CHECK9-NEXT: ret void
573 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
574 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
575 // CHECK9-NEXT: entry:
576 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
577 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
578 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
579 // CHECK9-NEXT: call void @_ZN1SIfED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
580 // CHECK9-NEXT: ret void
583 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116
584 // CHECK9-SAME: (i64 [[T_VAR:%.*]]) #[[ATTR3]] {
585 // CHECK9-NEXT: entry:
586 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
587 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
588 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
589 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
590 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
591 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
592 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined, i64 [[TMP1]])
593 // CHECK9-NEXT: ret void
596 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined
597 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[T_VAR:%.*]]) #[[ATTR3]] {
598 // CHECK9-NEXT: entry:
599 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
600 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
601 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
602 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
603 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
604 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
605 // CHECK9-NEXT: ret void
608 // CHECK9-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
609 // CHECK9-SAME: () #[[ATTR1]] comdat {
610 // CHECK9-NEXT: entry:
611 // CHECK9-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
612 // CHECK9-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
613 // CHECK9-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
614 // CHECK9-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
615 // CHECK9-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
616 // CHECK9-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
617 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
618 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [4 x ptr], align 8
619 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [4 x ptr], align 8
620 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [4 x ptr], align 8
621 // CHECK9-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
622 // CHECK9-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i64, align 8
623 // CHECK9-NEXT: [[DOTOFFLOAD_BASEPTRS2:%.*]] = alloca [1 x ptr], align 8
624 // CHECK9-NEXT: [[DOTOFFLOAD_PTRS3:%.*]] = alloca [1 x ptr], align 8
625 // CHECK9-NEXT: [[DOTOFFLOAD_MAPPERS4:%.*]] = alloca [1 x ptr], align 8
626 // CHECK9-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
627 // CHECK9-NEXT: call void @_ZN1SIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
628 // CHECK9-NEXT: store i32 0, ptr [[T_VAR]], align 128
629 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i64 8, i1 false)
630 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[S_ARR]], i32 signext 1)
631 // CHECK9-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[S_ARR]], i64 1
632 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 signext 2)
633 // CHECK9-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[VAR]], i32 signext 3)
634 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
635 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
636 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
637 // CHECK9-NEXT: [[TMP2:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
638 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP2]], align 8
639 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
640 // CHECK9-NEXT: store i64 [[TMP1]], ptr [[TMP3]], align 8
641 // CHECK9-NEXT: [[TMP4:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
642 // CHECK9-NEXT: store ptr null, ptr [[TMP4]], align 8
643 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
644 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP5]], align 8
645 // CHECK9-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
646 // CHECK9-NEXT: store ptr [[VEC]], ptr [[TMP6]], align 8
647 // CHECK9-NEXT: [[TMP7:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
648 // CHECK9-NEXT: store ptr null, ptr [[TMP7]], align 8
649 // CHECK9-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
650 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP8]], align 8
651 // CHECK9-NEXT: [[TMP9:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
652 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[TMP9]], align 8
653 // CHECK9-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
654 // CHECK9-NEXT: store ptr null, ptr [[TMP10]], align 8
655 // CHECK9-NEXT: [[TMP11:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
656 // CHECK9-NEXT: store ptr [[VAR]], ptr [[TMP11]], align 8
657 // CHECK9-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
658 // CHECK9-NEXT: store ptr [[VAR]], ptr [[TMP12]], align 8
659 // CHECK9-NEXT: [[TMP13:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
660 // CHECK9-NEXT: store ptr null, ptr [[TMP13]], align 8
661 // CHECK9-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
662 // CHECK9-NEXT: [[TMP15:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
663 // CHECK9-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
664 // CHECK9-NEXT: store i32 3, ptr [[TMP16]], align 4
665 // CHECK9-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
666 // CHECK9-NEXT: store i32 4, ptr [[TMP17]], align 4
667 // CHECK9-NEXT: [[TMP18:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
668 // CHECK9-NEXT: store ptr [[TMP14]], ptr [[TMP18]], align 8
669 // CHECK9-NEXT: [[TMP19:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
670 // CHECK9-NEXT: store ptr [[TMP15]], ptr [[TMP19]], align 8
671 // CHECK9-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
672 // CHECK9-NEXT: store ptr @.offload_sizes.3, ptr [[TMP20]], align 8
673 // CHECK9-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
674 // CHECK9-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP21]], align 8
675 // CHECK9-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
676 // CHECK9-NEXT: store ptr null, ptr [[TMP22]], align 8
677 // CHECK9-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
678 // CHECK9-NEXT: store ptr null, ptr [[TMP23]], align 8
679 // CHECK9-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
680 // CHECK9-NEXT: store i64 0, ptr [[TMP24]], align 8
681 // CHECK9-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
682 // CHECK9-NEXT: store i64 0, ptr [[TMP25]], align 8
683 // CHECK9-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
684 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP26]], align 4
685 // CHECK9-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
686 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP27]], align 4
687 // CHECK9-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
688 // CHECK9-NEXT: store i32 0, ptr [[TMP28]], align 4
689 // CHECK9-NEXT: [[TMP29:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.region_id, ptr [[KERNEL_ARGS]])
690 // CHECK9-NEXT: [[TMP30:%.*]] = icmp ne i32 [[TMP29]], 0
691 // CHECK9-NEXT: br i1 [[TMP30]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
692 // CHECK9: omp_offload.failed:
693 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75(i64 [[TMP1]], ptr [[VEC]], ptr [[S_ARR]], ptr [[VAR]]) #[[ATTR4]]
694 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT]]
695 // CHECK9: omp_offload.cont:
696 // CHECK9-NEXT: [[TMP31:%.*]] = load i32, ptr [[T_VAR]], align 128
697 // CHECK9-NEXT: store i32 [[TMP31]], ptr [[T_VAR_CASTED1]], align 4
698 // CHECK9-NEXT: [[TMP32:%.*]] = load i64, ptr [[T_VAR_CASTED1]], align 8
699 // CHECK9-NEXT: [[TMP33:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
700 // CHECK9-NEXT: store i64 [[TMP32]], ptr [[TMP33]], align 8
701 // CHECK9-NEXT: [[TMP34:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
702 // CHECK9-NEXT: store i64 [[TMP32]], ptr [[TMP34]], align 8
703 // CHECK9-NEXT: [[TMP35:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS4]], i64 0, i64 0
704 // CHECK9-NEXT: store ptr null, ptr [[TMP35]], align 8
705 // CHECK9-NEXT: [[TMP36:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
706 // CHECK9-NEXT: [[TMP37:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
707 // CHECK9-NEXT: [[TMP38:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
708 // CHECK9-NEXT: store i32 3, ptr [[TMP38]], align 4
709 // CHECK9-NEXT: [[TMP39:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
710 // CHECK9-NEXT: store i32 1, ptr [[TMP39]], align 4
711 // CHECK9-NEXT: [[TMP40:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
712 // CHECK9-NEXT: store ptr [[TMP36]], ptr [[TMP40]], align 8
713 // CHECK9-NEXT: [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
714 // CHECK9-NEXT: store ptr [[TMP37]], ptr [[TMP41]], align 8
715 // CHECK9-NEXT: [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
716 // CHECK9-NEXT: store ptr @.offload_sizes.5, ptr [[TMP42]], align 8
717 // CHECK9-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
718 // CHECK9-NEXT: store ptr @.offload_maptypes.6, ptr [[TMP43]], align 8
719 // CHECK9-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
720 // CHECK9-NEXT: store ptr null, ptr [[TMP44]], align 8
721 // CHECK9-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
722 // CHECK9-NEXT: store ptr null, ptr [[TMP45]], align 8
723 // CHECK9-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
724 // CHECK9-NEXT: store i64 0, ptr [[TMP46]], align 8
725 // CHECK9-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
726 // CHECK9-NEXT: store i64 0, ptr [[TMP47]], align 8
727 // CHECK9-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
728 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
729 // CHECK9-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
730 // CHECK9-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP49]], align 4
731 // CHECK9-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
732 // CHECK9-NEXT: store i32 0, ptr [[TMP50]], align 4
733 // CHECK9-NEXT: [[TMP51:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.region_id, ptr [[KERNEL_ARGS5]])
734 // CHECK9-NEXT: [[TMP52:%.*]] = icmp ne i32 [[TMP51]], 0
735 // CHECK9-NEXT: br i1 [[TMP52]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
736 // CHECK9: omp_offload.failed6:
737 // CHECK9-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81(i64 [[TMP32]]) #[[ATTR4]]
738 // CHECK9-NEXT: br label [[OMP_OFFLOAD_CONT7]]
739 // CHECK9: omp_offload.cont7:
740 // CHECK9-NEXT: store i32 0, ptr [[RETVAL]], align 4
741 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
742 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
743 // CHECK9-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
744 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
745 // CHECK9: arraydestroy.body:
746 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP53]], [[OMP_OFFLOAD_CONT7]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
747 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
748 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
749 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
750 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
751 // CHECK9: arraydestroy.done8:
752 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
753 // CHECK9-NEXT: [[TMP54:%.*]] = load i32, ptr [[RETVAL]], align 4
754 // CHECK9-NEXT: ret i32 [[TMP54]]
757 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
758 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
759 // CHECK9-NEXT: entry:
760 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
761 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
762 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
763 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
764 // CHECK9-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
765 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float
766 // CHECK9-NEXT: store float [[CONV]], ptr [[F]], align 4
767 // CHECK9-NEXT: ret void
770 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
771 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
772 // CHECK9-NEXT: entry:
773 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
774 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
775 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
776 // CHECK9-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
777 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
778 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
779 // CHECK9-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
780 // CHECK9-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
781 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to float
782 // CHECK9-NEXT: [[ADD:%.*]] = fadd float [[TMP0]], [[CONV]]
783 // CHECK9-NEXT: store float [[ADD]], ptr [[F]], align 4
784 // CHECK9-NEXT: ret void
787 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StC2Ev
788 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
789 // CHECK9-NEXT: entry:
790 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
791 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
792 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
793 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
794 // CHECK9-NEXT: store i32 0, ptr [[A]], align 4
795 // CHECK9-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
796 // CHECK9-NEXT: store i32 0, ptr [[B]], align 4
797 // CHECK9-NEXT: ret void
800 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfEC2ERKS0_2St
801 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat {
802 // CHECK9-NEXT: entry:
803 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
804 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
805 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
806 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
807 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
808 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
809 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
810 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
811 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
812 // CHECK9-NEXT: [[F2:%.*]] = getelementptr inbounds nuw [[STRUCT_S]], ptr [[TMP0]], i32 0, i32 0
813 // CHECK9-NEXT: [[TMP1:%.*]] = load float, ptr [[F2]], align 4
814 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
815 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
816 // CHECK9-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP2]] to float
817 // CHECK9-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], [[CONV]]
818 // CHECK9-NEXT: store float [[ADD]], ptr [[F]], align 4
819 // CHECK9-NEXT: ret void
822 // CHECK9-LABEL: define {{[^@]+}}@_ZN2StD2Ev
823 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
824 // CHECK9-NEXT: entry:
825 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
826 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
827 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
828 // CHECK9-NEXT: ret void
831 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
832 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
833 // CHECK9-NEXT: entry:
834 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
835 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
836 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
837 // CHECK9-NEXT: ret void
840 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
841 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
842 // CHECK9-NEXT: entry:
843 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
844 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
845 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
846 // CHECK9-NEXT: call void @_ZN1SIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
847 // CHECK9-NEXT: ret void
850 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
851 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
852 // CHECK9-NEXT: entry:
853 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
854 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
855 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
856 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
857 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
858 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
859 // CHECK9-NEXT: call void @_ZN1SIiEC2Ei(ptr nonnull align 4 dereferenceable(4) [[THIS1]], i32 signext [[TMP0]])
860 // CHECK9-NEXT: ret void
863 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75
864 // CHECK9-SAME: (i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
865 // CHECK9-NEXT: entry:
866 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
867 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
868 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
869 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
870 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
871 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
872 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
873 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
874 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
875 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
876 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
877 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
878 // CHECK9-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
879 // CHECK9-NEXT: store i32 [[TMP3]], ptr [[T_VAR_CASTED]], align 4
880 // CHECK9-NEXT: [[TMP4:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
881 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.omp_outlined, ptr [[TMP0]], i64 [[TMP4]], ptr [[TMP1]], ptr [[TMP2]])
882 // CHECK9-NEXT: ret void
885 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.omp_outlined
886 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i64 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
887 // CHECK9-NEXT: entry:
888 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
889 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
890 // CHECK9-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 8
891 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
892 // CHECK9-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 8
893 // CHECK9-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 8
894 // CHECK9-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 128
895 // CHECK9-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S.0], align 128
896 // CHECK9-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
897 // CHECK9-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
898 // CHECK9-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
899 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
900 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
901 // CHECK9-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 8
902 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
903 // CHECK9-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 8
904 // CHECK9-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 8
905 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 8
906 // CHECK9-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 8
907 // CHECK9-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 8
908 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VEC1]], ptr align 128 [[TMP0]], i64 8, i1 false)
909 // CHECK9-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
910 // CHECK9-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i64 2
911 // CHECK9-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
912 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
913 // CHECK9: omp.arraycpy.body:
914 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
915 // CHECK9-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
916 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
917 // CHECK9-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
918 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
919 // CHECK9-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
920 // CHECK9-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
921 // CHECK9-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
922 // CHECK9-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
923 // CHECK9: omp.arraycpy.done3:
924 // CHECK9-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
925 // CHECK9-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
926 // CHECK9-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
927 // CHECK9-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
928 // CHECK9-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i64 0, i64 0
929 // CHECK9-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 128
930 // CHECK9-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i64 0, i64 0
931 // CHECK9-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[ARRAYIDX6]], ptr align 128 [[VAR4]], i64 4, i1 false)
932 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
933 // CHECK9-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
934 // CHECK9-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN7]], i64 2
935 // CHECK9-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
936 // CHECK9: arraydestroy.body:
937 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
938 // CHECK9-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i64 -1
939 // CHECK9-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
940 // CHECK9-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
941 // CHECK9-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
942 // CHECK9: arraydestroy.done8:
943 // CHECK9-NEXT: ret void
946 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC1ERKS0_2St
947 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat {
948 // CHECK9-NEXT: entry:
949 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
950 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
951 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
952 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
953 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
954 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
955 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
956 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
957 // CHECK9-NEXT: call void @_ZN1SIiEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
958 // CHECK9-NEXT: ret void
961 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
962 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
963 // CHECK9-NEXT: entry:
964 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
965 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
966 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
967 // CHECK9-NEXT: call void @_ZN1SIiED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
968 // CHECK9-NEXT: ret void
971 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81
972 // CHECK9-SAME: (i64 [[T_VAR:%.*]]) #[[ATTR3]] {
973 // CHECK9-NEXT: entry:
974 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
975 // CHECK9-NEXT: [[T_VAR_CASTED:%.*]] = alloca i64, align 8
976 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
977 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
978 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
979 // CHECK9-NEXT: [[TMP1:%.*]] = load i64, ptr [[T_VAR_CASTED]], align 8
980 // CHECK9-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.omp_outlined, i64 [[TMP1]])
981 // CHECK9-NEXT: ret void
984 // CHECK9-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.omp_outlined
985 // CHECK9-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[T_VAR:%.*]]) #[[ATTR3]] {
986 // CHECK9-NEXT: entry:
987 // CHECK9-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
988 // CHECK9-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
989 // CHECK9-NEXT: [[T_VAR_ADDR:%.*]] = alloca i64, align 8
990 // CHECK9-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
991 // CHECK9-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
992 // CHECK9-NEXT: store i64 [[T_VAR]], ptr [[T_VAR_ADDR]], align 8
993 // CHECK9-NEXT: ret void
996 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
997 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
998 // CHECK9-NEXT: entry:
999 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1000 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1001 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1002 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1003 // CHECK9-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
1004 // CHECK9-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1005 // CHECK9-NEXT: ret void
1008 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1009 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 signext [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1010 // CHECK9-NEXT: entry:
1011 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1012 // CHECK9-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1013 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1014 // CHECK9-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1015 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1016 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1017 // CHECK9-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1018 // CHECK9-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
1019 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
1020 // CHECK9-NEXT: store i32 [[ADD]], ptr [[F]], align 4
1021 // CHECK9-NEXT: ret void
1024 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiEC2ERKS0_2St
1025 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1026 // CHECK9-NEXT: entry:
1027 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1028 // CHECK9-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1029 // CHECK9-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 8
1030 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1031 // CHECK9-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1032 // CHECK9-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 8
1033 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1034 // CHECK9-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1035 // CHECK9-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 8
1036 // CHECK9-NEXT: [[F2:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0]], ptr [[TMP0]], i32 0, i32 0
1037 // CHECK9-NEXT: [[TMP1:%.*]] = load i32, ptr [[F2]], align 4
1038 // CHECK9-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
1039 // CHECK9-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
1040 // CHECK9-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
1041 // CHECK9-NEXT: store i32 [[ADD]], ptr [[F]], align 4
1042 // CHECK9-NEXT: ret void
1045 // CHECK9-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1046 // CHECK9-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat {
1047 // CHECK9-NEXT: entry:
1048 // CHECK9-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
1049 // CHECK9-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
1050 // CHECK9-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
1051 // CHECK9-NEXT: ret void
1054 // CHECK11-LABEL: define {{[^@]+}}@main
1055 // CHECK11-SAME: () #[[ATTR0:[0-9]+]] {
1056 // CHECK11-NEXT: entry:
1057 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1058 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1059 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 4
1060 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 4
1061 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S], align 4
1062 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S]], align 4
1063 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1064 // CHECK11-NEXT: [[SIVAR_CASTED:%.*]] = alloca i32, align 4
1065 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [5 x ptr], align 4
1066 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [5 x ptr], align 4
1067 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [5 x ptr], align 4
1068 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1069 // CHECK11-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i32, align 4
1070 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS2:%.*]] = alloca [1 x ptr], align 4
1071 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS3:%.*]] = alloca [1 x ptr], align 4
1072 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS4:%.*]] = alloca [1 x ptr], align 4
1073 // CHECK11-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1074 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1075 // CHECK11-NEXT: call void @_ZN1SIfEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
1076 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 4
1077 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC]], ptr align 4 @__const.main.vec, i32 8, i1 false)
1078 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[S_ARR]], float 1.000000e+00)
1079 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[S_ARR]], i32 1
1080 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], float 2.000000e+00)
1081 // CHECK11-NEXT: call void @_ZN1SIfEC1Ef(ptr nonnull align 4 dereferenceable(4) [[VAR]], float 3.000000e+00)
1082 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 4
1083 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1084 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1085 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr @_ZZ4mainE5sivar, align 4
1086 // CHECK11-NEXT: store i32 [[TMP2]], ptr [[SIVAR_CASTED]], align 4
1087 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[SIVAR_CASTED]], align 4
1088 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1089 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[TMP4]], align 4
1090 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1091 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[TMP5]], align 4
1092 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1093 // CHECK11-NEXT: store ptr null, ptr [[TMP6]], align 4
1094 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1095 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP7]], align 4
1096 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1097 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP8]], align 4
1098 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
1099 // CHECK11-NEXT: store ptr null, ptr [[TMP9]], align 4
1100 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1101 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP10]], align 4
1102 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1103 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP11]], align 4
1104 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
1105 // CHECK11-NEXT: store ptr null, ptr [[TMP12]], align 4
1106 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1107 // CHECK11-NEXT: store ptr [[VAR]], ptr [[TMP13]], align 4
1108 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1109 // CHECK11-NEXT: store ptr [[VAR]], ptr [[TMP14]], align 4
1110 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
1111 // CHECK11-NEXT: store ptr null, ptr [[TMP15]], align 4
1112 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
1113 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[TMP16]], align 4
1114 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
1115 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[TMP17]], align 4
1116 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
1117 // CHECK11-NEXT: store ptr null, ptr [[TMP18]], align 4
1118 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1119 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds [5 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1120 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1121 // CHECK11-NEXT: store i32 3, ptr [[TMP21]], align 4
1122 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1123 // CHECK11-NEXT: store i32 5, ptr [[TMP22]], align 4
1124 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1125 // CHECK11-NEXT: store ptr [[TMP19]], ptr [[TMP23]], align 4
1126 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1127 // CHECK11-NEXT: store ptr [[TMP20]], ptr [[TMP24]], align 4
1128 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1129 // CHECK11-NEXT: store ptr @.offload_sizes, ptr [[TMP25]], align 4
1130 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1131 // CHECK11-NEXT: store ptr @.offload_maptypes, ptr [[TMP26]], align 4
1132 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1133 // CHECK11-NEXT: store ptr null, ptr [[TMP27]], align 4
1134 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1135 // CHECK11-NEXT: store ptr null, ptr [[TMP28]], align 4
1136 // CHECK11-NEXT: [[TMP29:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1137 // CHECK11-NEXT: store i64 0, ptr [[TMP29]], align 8
1138 // CHECK11-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1139 // CHECK11-NEXT: store i64 0, ptr [[TMP30]], align 8
1140 // CHECK11-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1141 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP31]], align 4
1142 // CHECK11-NEXT: [[TMP32:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1143 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP32]], align 4
1144 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1145 // CHECK11-NEXT: store i32 0, ptr [[TMP33]], align 4
1146 // CHECK11-NEXT: [[TMP34:%.*]] = 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_l109.region_id, ptr [[KERNEL_ARGS]])
1147 // CHECK11-NEXT: [[TMP35:%.*]] = icmp ne i32 [[TMP34]], 0
1148 // CHECK11-NEXT: br i1 [[TMP35]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1149 // CHECK11: omp_offload.failed:
1150 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109(i32 [[TMP1]], ptr [[VEC]], ptr [[S_ARR]], ptr [[VAR]], i32 [[TMP3]]) #[[ATTR4:[0-9]+]]
1151 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1152 // CHECK11: omp_offload.cont:
1153 // CHECK11-NEXT: [[TMP36:%.*]] = load i32, ptr [[T_VAR]], align 4
1154 // CHECK11-NEXT: store i32 [[TMP36]], ptr [[T_VAR_CASTED1]], align 4
1155 // CHECK11-NEXT: [[TMP37:%.*]] = load i32, ptr [[T_VAR_CASTED1]], align 4
1156 // CHECK11-NEXT: [[TMP38:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
1157 // CHECK11-NEXT: store i32 [[TMP37]], ptr [[TMP38]], align 4
1158 // CHECK11-NEXT: [[TMP39:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
1159 // CHECK11-NEXT: store i32 [[TMP37]], ptr [[TMP39]], align 4
1160 // CHECK11-NEXT: [[TMP40:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS4]], i32 0, i32 0
1161 // CHECK11-NEXT: store ptr null, ptr [[TMP40]], align 4
1162 // CHECK11-NEXT: [[TMP41:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
1163 // CHECK11-NEXT: [[TMP42:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
1164 // CHECK11-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
1165 // CHECK11-NEXT: store i32 3, ptr [[TMP43]], align 4
1166 // CHECK11-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
1167 // CHECK11-NEXT: store i32 1, ptr [[TMP44]], align 4
1168 // CHECK11-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
1169 // CHECK11-NEXT: store ptr [[TMP41]], ptr [[TMP45]], align 4
1170 // CHECK11-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
1171 // CHECK11-NEXT: store ptr [[TMP42]], ptr [[TMP46]], align 4
1172 // CHECK11-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
1173 // CHECK11-NEXT: store ptr @.offload_sizes.1, ptr [[TMP47]], align 4
1174 // CHECK11-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
1175 // CHECK11-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP48]], align 4
1176 // CHECK11-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
1177 // CHECK11-NEXT: store ptr null, ptr [[TMP49]], align 4
1178 // CHECK11-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
1179 // CHECK11-NEXT: store ptr null, ptr [[TMP50]], align 4
1180 // CHECK11-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
1181 // CHECK11-NEXT: store i64 0, ptr [[TMP51]], align 8
1182 // CHECK11-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
1183 // CHECK11-NEXT: store i64 0, ptr [[TMP52]], align 8
1184 // CHECK11-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
1185 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP53]], align 4
1186 // CHECK11-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
1187 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP54]], align 4
1188 // CHECK11-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
1189 // CHECK11-NEXT: store i32 0, ptr [[TMP55]], align 4
1190 // CHECK11-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.region_id, ptr [[KERNEL_ARGS5]])
1191 // CHECK11-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0
1192 // CHECK11-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
1193 // CHECK11: omp_offload.failed6:
1194 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116(i32 [[TMP37]]) #[[ATTR4]]
1195 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT7]]
1196 // CHECK11: omp_offload.cont7:
1197 // CHECK11-NEXT: [[CALL:%.*]] = call i32 @_Z5tmainIiET_v()
1198 // CHECK11-NEXT: store i32 [[CALL]], ptr [[RETVAL]], align 4
1199 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
1200 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR]], i32 0, i32 0
1201 // CHECK11-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1202 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1203 // CHECK11: arraydestroy.body:
1204 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP58]], [[OMP_OFFLOAD_CONT7]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1205 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1206 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1207 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1208 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1209 // CHECK11: arraydestroy.done8:
1210 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1211 // CHECK11-NEXT: [[TMP59:%.*]] = load i32, ptr [[RETVAL]], align 4
1212 // CHECK11-NEXT: ret i32 [[TMP59]]
1215 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ev
1216 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] comdat align 2 {
1217 // CHECK11-NEXT: entry:
1218 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1219 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1220 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1221 // CHECK11-NEXT: call void @_ZN1SIfEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
1222 // CHECK11-NEXT: ret void
1225 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1Ef
1226 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1227 // CHECK11-NEXT: entry:
1228 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1229 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1230 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1231 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1232 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1233 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1234 // CHECK11-NEXT: call void @_ZN1SIfEC2Ef(ptr nonnull align 4 dereferenceable(4) [[THIS1]], float [[TMP0]])
1235 // CHECK11-NEXT: ret void
1238 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109
1239 // CHECK11-SAME: (i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR3:[0-9]+]] {
1240 // CHECK11-NEXT: entry:
1241 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1242 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1243 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1244 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1245 // CHECK11-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
1246 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1247 // CHECK11-NEXT: [[SIVAR_CASTED:%.*]] = alloca i32, align 4
1248 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1249 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1250 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1251 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1252 // CHECK11-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
1253 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1254 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1255 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1256 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1257 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[T_VAR_CASTED]], align 4
1258 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1259 // CHECK11-NEXT: [[TMP5:%.*]] = load i32, ptr [[SIVAR_ADDR]], align 4
1260 // CHECK11-NEXT: store i32 [[TMP5]], ptr [[SIVAR_CASTED]], align 4
1261 // CHECK11-NEXT: [[TMP6:%.*]] = load i32, ptr [[SIVAR_CASTED]], align 4
1262 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 5, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109.omp_outlined, ptr [[TMP0]], i32 [[TMP4]], ptr [[TMP1]], ptr [[TMP2]], i32 [[TMP6]])
1263 // CHECK11-NEXT: ret void
1266 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l109.omp_outlined
1267 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]], i32 [[SIVAR:%.*]]) #[[ATTR3]] {
1268 // CHECK11-NEXT: entry:
1269 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1270 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1271 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1272 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1273 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1274 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1275 // CHECK11-NEXT: [[SIVAR_ADDR:%.*]] = alloca i32, align 4
1276 // CHECK11-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 4
1277 // CHECK11-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S], align 4
1278 // CHECK11-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
1279 // CHECK11-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S:%.*]], align 4
1280 // CHECK11-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
1281 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1282 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1283 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1284 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1285 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1286 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1287 // CHECK11-NEXT: store i32 [[SIVAR]], ptr [[SIVAR_ADDR]], align 4
1288 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1289 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1290 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1291 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[VEC1]], ptr align 4 [[TMP0]], i32 8, i1 false)
1292 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
1293 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN]], i32 2
1294 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
1295 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1296 // CHECK11: omp.arraycpy.body:
1297 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1298 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1299 // CHECK11-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
1300 // CHECK11-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
1301 // CHECK11-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
1302 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1303 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1304 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
1305 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
1306 // CHECK11: omp.arraycpy.done3:
1307 // CHECK11-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
1308 // CHECK11-NEXT: call void @_ZN1SIfEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
1309 // CHECK11-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
1310 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1311 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i32 0, i32 0
1312 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 4
1313 // CHECK11-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
1314 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ARRAYIDX6]], ptr align 4 [[VAR4]], i32 4, i1 false)
1315 // CHECK11-NEXT: store i32 2, ptr [[SIVAR_ADDR]], align 4
1316 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
1317 // CHECK11-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S], ptr [[S_ARR2]], i32 0, i32 0
1318 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAY_BEGIN7]], i32 2
1319 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1320 // CHECK11: arraydestroy.body:
1321 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1322 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1323 // CHECK11-NEXT: call void @_ZN1SIfED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1324 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
1325 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1326 // CHECK11: arraydestroy.done8:
1327 // CHECK11-NEXT: ret void
1330 // CHECK11-LABEL: define {{[^@]+}}@_ZN2StC1Ev
1331 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1332 // CHECK11-NEXT: entry:
1333 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1334 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1335 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1336 // CHECK11-NEXT: call void @_ZN2StC2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]])
1337 // CHECK11-NEXT: ret void
1340 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC1ERKS0_2St
1341 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1342 // CHECK11-NEXT: entry:
1343 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1344 // CHECK11-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
1345 // CHECK11-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
1346 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1347 // CHECK11-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
1348 // CHECK11-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
1349 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1350 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
1351 // CHECK11-NEXT: call void @_ZN1SIfEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
1352 // CHECK11-NEXT: ret void
1355 // CHECK11-LABEL: define {{[^@]+}}@_ZN2StD1Ev
1356 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1357 // CHECK11-NEXT: entry:
1358 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1359 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1360 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1361 // CHECK11-NEXT: call void @_ZN2StD2Ev(ptr nonnull align 4 dereferenceable(8) [[THIS1]]) #[[ATTR4]]
1362 // CHECK11-NEXT: ret void
1365 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED1Ev
1366 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1367 // CHECK11-NEXT: entry:
1368 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1369 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1370 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1371 // CHECK11-NEXT: call void @_ZN1SIfED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1372 // CHECK11-NEXT: ret void
1375 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116
1376 // CHECK11-SAME: (i32 [[T_VAR:%.*]]) #[[ATTR3]] {
1377 // CHECK11-NEXT: entry:
1378 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1379 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1380 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1381 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1382 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1383 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1384 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined, i32 [[TMP1]])
1385 // CHECK11-NEXT: ret void
1388 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_main_l116.omp_outlined
1389 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[T_VAR:%.*]]) #[[ATTR3]] {
1390 // CHECK11-NEXT: entry:
1391 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1392 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1393 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1394 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1395 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1396 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1397 // CHECK11-NEXT: ret void
1400 // CHECK11-LABEL: define {{[^@]+}}@_Z5tmainIiET_v
1401 // CHECK11-SAME: () #[[ATTR1]] comdat {
1402 // CHECK11-NEXT: entry:
1403 // CHECK11-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
1404 // CHECK11-NEXT: [[TEST:%.*]] = alloca [[STRUCT_S_0:%.*]], align 4
1405 // CHECK11-NEXT: [[T_VAR:%.*]] = alloca i32, align 128
1406 // CHECK11-NEXT: [[VEC:%.*]] = alloca [2 x i32], align 128
1407 // CHECK11-NEXT: [[S_ARR:%.*]] = alloca [2 x %struct.S.0], align 128
1408 // CHECK11-NEXT: [[VAR:%.*]] = alloca [[STRUCT_S_0]], align 128
1409 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1410 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [4 x ptr], align 4
1411 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [4 x ptr], align 4
1412 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [4 x ptr], align 4
1413 // CHECK11-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1414 // CHECK11-NEXT: [[T_VAR_CASTED1:%.*]] = alloca i32, align 4
1415 // CHECK11-NEXT: [[DOTOFFLOAD_BASEPTRS2:%.*]] = alloca [1 x ptr], align 4
1416 // CHECK11-NEXT: [[DOTOFFLOAD_PTRS3:%.*]] = alloca [1 x ptr], align 4
1417 // CHECK11-NEXT: [[DOTOFFLOAD_MAPPERS4:%.*]] = alloca [1 x ptr], align 4
1418 // CHECK11-NEXT: [[KERNEL_ARGS5:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1419 // CHECK11-NEXT: call void @_ZN1SIiEC1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]])
1420 // CHECK11-NEXT: store i32 0, ptr [[T_VAR]], align 128
1421 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VEC]], ptr align 128 @__const._Z5tmainIiET_v.vec, i32 8, i1 false)
1422 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[S_ARR]], i32 1)
1423 // CHECK11-NEXT: [[ARRAYINIT_ELEMENT:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[S_ARR]], i32 1
1424 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[ARRAYINIT_ELEMENT]], i32 2)
1425 // CHECK11-NEXT: call void @_ZN1SIiEC1Ei(ptr nonnull align 4 dereferenceable(4) [[VAR]], i32 3)
1426 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR]], align 128
1427 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1428 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1429 // CHECK11-NEXT: [[TMP2:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1430 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[TMP2]], align 4
1431 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1432 // CHECK11-NEXT: store i32 [[TMP1]], ptr [[TMP3]], align 4
1433 // CHECK11-NEXT: [[TMP4:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1434 // CHECK11-NEXT: store ptr null, ptr [[TMP4]], align 4
1435 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1436 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP5]], align 4
1437 // CHECK11-NEXT: [[TMP6:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1438 // CHECK11-NEXT: store ptr [[VEC]], ptr [[TMP6]], align 4
1439 // CHECK11-NEXT: [[TMP7:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
1440 // CHECK11-NEXT: store ptr null, ptr [[TMP7]], align 4
1441 // CHECK11-NEXT: [[TMP8:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1442 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP8]], align 4
1443 // CHECK11-NEXT: [[TMP9:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1444 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[TMP9]], align 4
1445 // CHECK11-NEXT: [[TMP10:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
1446 // CHECK11-NEXT: store ptr null, ptr [[TMP10]], align 4
1447 // CHECK11-NEXT: [[TMP11:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1448 // CHECK11-NEXT: store ptr [[VAR]], ptr [[TMP11]], align 4
1449 // CHECK11-NEXT: [[TMP12:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1450 // CHECK11-NEXT: store ptr [[VAR]], ptr [[TMP12]], align 4
1451 // CHECK11-NEXT: [[TMP13:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
1452 // CHECK11-NEXT: store ptr null, ptr [[TMP13]], align 4
1453 // CHECK11-NEXT: [[TMP14:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1454 // CHECK11-NEXT: [[TMP15:%.*]] = getelementptr inbounds [4 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1455 // CHECK11-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1456 // CHECK11-NEXT: store i32 3, ptr [[TMP16]], align 4
1457 // CHECK11-NEXT: [[TMP17:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1458 // CHECK11-NEXT: store i32 4, ptr [[TMP17]], align 4
1459 // CHECK11-NEXT: [[TMP18:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1460 // CHECK11-NEXT: store ptr [[TMP14]], ptr [[TMP18]], align 4
1461 // CHECK11-NEXT: [[TMP19:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1462 // CHECK11-NEXT: store ptr [[TMP15]], ptr [[TMP19]], align 4
1463 // CHECK11-NEXT: [[TMP20:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1464 // CHECK11-NEXT: store ptr @.offload_sizes.3, ptr [[TMP20]], align 4
1465 // CHECK11-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1466 // CHECK11-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP21]], align 4
1467 // CHECK11-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1468 // CHECK11-NEXT: store ptr null, ptr [[TMP22]], align 4
1469 // CHECK11-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1470 // CHECK11-NEXT: store ptr null, ptr [[TMP23]], align 4
1471 // CHECK11-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1472 // CHECK11-NEXT: store i64 0, ptr [[TMP24]], align 8
1473 // CHECK11-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1474 // CHECK11-NEXT: store i64 0, ptr [[TMP25]], align 8
1475 // CHECK11-NEXT: [[TMP26:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1476 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP26]], align 4
1477 // CHECK11-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1478 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP27]], align 4
1479 // CHECK11-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1480 // CHECK11-NEXT: store i32 0, ptr [[TMP28]], align 4
1481 // CHECK11-NEXT: [[TMP29:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.region_id, ptr [[KERNEL_ARGS]])
1482 // CHECK11-NEXT: [[TMP30:%.*]] = icmp ne i32 [[TMP29]], 0
1483 // CHECK11-NEXT: br i1 [[TMP30]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1484 // CHECK11: omp_offload.failed:
1485 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75(i32 [[TMP1]], ptr [[VEC]], ptr [[S_ARR]], ptr [[VAR]]) #[[ATTR4]]
1486 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT]]
1487 // CHECK11: omp_offload.cont:
1488 // CHECK11-NEXT: [[TMP31:%.*]] = load i32, ptr [[T_VAR]], align 128
1489 // CHECK11-NEXT: store i32 [[TMP31]], ptr [[T_VAR_CASTED1]], align 4
1490 // CHECK11-NEXT: [[TMP32:%.*]] = load i32, ptr [[T_VAR_CASTED1]], align 4
1491 // CHECK11-NEXT: [[TMP33:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
1492 // CHECK11-NEXT: store i32 [[TMP32]], ptr [[TMP33]], align 4
1493 // CHECK11-NEXT: [[TMP34:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
1494 // CHECK11-NEXT: store i32 [[TMP32]], ptr [[TMP34]], align 4
1495 // CHECK11-NEXT: [[TMP35:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS4]], i32 0, i32 0
1496 // CHECK11-NEXT: store ptr null, ptr [[TMP35]], align 4
1497 // CHECK11-NEXT: [[TMP36:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS2]], i32 0, i32 0
1498 // CHECK11-NEXT: [[TMP37:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS3]], i32 0, i32 0
1499 // CHECK11-NEXT: [[TMP38:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 0
1500 // CHECK11-NEXT: store i32 3, ptr [[TMP38]], align 4
1501 // CHECK11-NEXT: [[TMP39:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 1
1502 // CHECK11-NEXT: store i32 1, ptr [[TMP39]], align 4
1503 // CHECK11-NEXT: [[TMP40:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 2
1504 // CHECK11-NEXT: store ptr [[TMP36]], ptr [[TMP40]], align 4
1505 // CHECK11-NEXT: [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 3
1506 // CHECK11-NEXT: store ptr [[TMP37]], ptr [[TMP41]], align 4
1507 // CHECK11-NEXT: [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 4
1508 // CHECK11-NEXT: store ptr @.offload_sizes.5, ptr [[TMP42]], align 4
1509 // CHECK11-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 5
1510 // CHECK11-NEXT: store ptr @.offload_maptypes.6, ptr [[TMP43]], align 4
1511 // CHECK11-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 6
1512 // CHECK11-NEXT: store ptr null, ptr [[TMP44]], align 4
1513 // CHECK11-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 7
1514 // CHECK11-NEXT: store ptr null, ptr [[TMP45]], align 4
1515 // CHECK11-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 8
1516 // CHECK11-NEXT: store i64 0, ptr [[TMP46]], align 8
1517 // CHECK11-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 9
1518 // CHECK11-NEXT: store i64 0, ptr [[TMP47]], align 8
1519 // CHECK11-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 10
1520 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
1521 // CHECK11-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 11
1522 // CHECK11-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP49]], align 4
1523 // CHECK11-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS5]], i32 0, i32 12
1524 // CHECK11-NEXT: store i32 0, ptr [[TMP50]], align 4
1525 // CHECK11-NEXT: [[TMP51:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.region_id, ptr [[KERNEL_ARGS5]])
1526 // CHECK11-NEXT: [[TMP52:%.*]] = icmp ne i32 [[TMP51]], 0
1527 // CHECK11-NEXT: br i1 [[TMP52]], label [[OMP_OFFLOAD_FAILED6:%.*]], label [[OMP_OFFLOAD_CONT7:%.*]]
1528 // CHECK11: omp_offload.failed6:
1529 // CHECK11-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81(i32 [[TMP32]]) #[[ATTR4]]
1530 // CHECK11-NEXT: br label [[OMP_OFFLOAD_CONT7]]
1531 // CHECK11: omp_offload.cont7:
1532 // CHECK11-NEXT: store i32 0, ptr [[RETVAL]], align 4
1533 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR]]) #[[ATTR4]]
1534 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR]], i32 0, i32 0
1535 // CHECK11-NEXT: [[TMP53:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1536 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1537 // CHECK11: arraydestroy.body:
1538 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP53]], [[OMP_OFFLOAD_CONT7]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1539 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1540 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1541 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN]]
1542 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1543 // CHECK11: arraydestroy.done8:
1544 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[TEST]]) #[[ATTR4]]
1545 // CHECK11-NEXT: [[TMP54:%.*]] = load i32, ptr [[RETVAL]], align 4
1546 // CHECK11-NEXT: ret i32 [[TMP54]]
1549 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ev
1550 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1551 // CHECK11-NEXT: entry:
1552 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1553 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1554 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1555 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1556 // CHECK11-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
1557 // CHECK11-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP0]] to float
1558 // CHECK11-NEXT: store float [[CONV]], ptr [[F]], align 4
1559 // CHECK11-NEXT: ret void
1562 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2Ef
1563 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], float [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1564 // CHECK11-NEXT: entry:
1565 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1566 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca float, align 4
1567 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1568 // CHECK11-NEXT: store float [[A]], ptr [[A_ADDR]], align 4
1569 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1570 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1571 // CHECK11-NEXT: [[TMP0:%.*]] = load float, ptr [[A_ADDR]], align 4
1572 // CHECK11-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
1573 // CHECK11-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP1]] to float
1574 // CHECK11-NEXT: [[ADD:%.*]] = fadd float [[TMP0]], [[CONV]]
1575 // CHECK11-NEXT: store float [[ADD]], ptr [[F]], align 4
1576 // CHECK11-NEXT: ret void
1579 // CHECK11-LABEL: define {{[^@]+}}@_ZN2StC2Ev
1580 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1581 // CHECK11-NEXT: entry:
1582 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1583 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1584 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1585 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
1586 // CHECK11-NEXT: store i32 0, ptr [[A]], align 4
1587 // CHECK11-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
1588 // CHECK11-NEXT: store i32 0, ptr [[B]], align 4
1589 // CHECK11-NEXT: ret void
1592 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfEC2ERKS0_2St
1593 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1594 // CHECK11-NEXT: entry:
1595 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1596 // CHECK11-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
1597 // CHECK11-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
1598 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1599 // CHECK11-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
1600 // CHECK11-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
1601 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1602 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S:%.*]], ptr [[THIS1]], i32 0, i32 0
1603 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
1604 // CHECK11-NEXT: [[F2:%.*]] = getelementptr inbounds nuw [[STRUCT_S]], ptr [[TMP0]], i32 0, i32 0
1605 // CHECK11-NEXT: [[TMP1:%.*]] = load float, ptr [[F2]], align 4
1606 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
1607 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
1608 // CHECK11-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP2]] to float
1609 // CHECK11-NEXT: [[ADD:%.*]] = fadd float [[TMP1]], [[CONV]]
1610 // CHECK11-NEXT: store float [[ADD]], ptr [[F]], align 4
1611 // CHECK11-NEXT: ret void
1614 // CHECK11-LABEL: define {{[^@]+}}@_ZN2StD2Ev
1615 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1616 // CHECK11-NEXT: entry:
1617 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1618 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1619 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1620 // CHECK11-NEXT: ret void
1623 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIfED2Ev
1624 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1625 // CHECK11-NEXT: entry:
1626 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1627 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1628 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1629 // CHECK11-NEXT: ret void
1632 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ev
1633 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1634 // CHECK11-NEXT: entry:
1635 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1636 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1637 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1638 // CHECK11-NEXT: call void @_ZN1SIiEC2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]])
1639 // CHECK11-NEXT: ret void
1642 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1Ei
1643 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1644 // CHECK11-NEXT: entry:
1645 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1646 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1647 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1648 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1649 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1650 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1651 // CHECK11-NEXT: call void @_ZN1SIiEC2Ei(ptr nonnull align 4 dereferenceable(4) [[THIS1]], i32 [[TMP0]])
1652 // CHECK11-NEXT: ret void
1655 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75
1656 // CHECK11-SAME: (i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1657 // CHECK11-NEXT: entry:
1658 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1659 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1660 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1661 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1662 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1663 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1664 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1665 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1666 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1667 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1668 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1669 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1670 // CHECK11-NEXT: [[TMP3:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1671 // CHECK11-NEXT: store i32 [[TMP3]], ptr [[T_VAR_CASTED]], align 4
1672 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1673 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 4, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.omp_outlined, ptr [[TMP0]], i32 [[TMP4]], ptr [[TMP1]], ptr [[TMP2]])
1674 // CHECK11-NEXT: ret void
1677 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l75.omp_outlined
1678 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr nonnull align 4 dereferenceable(8) [[VEC:%.*]], i32 [[T_VAR:%.*]], ptr nonnull align 4 dereferenceable(8) [[S_ARR:%.*]], ptr nonnull align 4 dereferenceable(4) [[VAR:%.*]]) #[[ATTR3]] {
1679 // CHECK11-NEXT: entry:
1680 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1681 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1682 // CHECK11-NEXT: [[VEC_ADDR:%.*]] = alloca ptr, align 4
1683 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1684 // CHECK11-NEXT: [[S_ARR_ADDR:%.*]] = alloca ptr, align 4
1685 // CHECK11-NEXT: [[VAR_ADDR:%.*]] = alloca ptr, align 4
1686 // CHECK11-NEXT: [[VEC1:%.*]] = alloca [2 x i32], align 128
1687 // CHECK11-NEXT: [[S_ARR2:%.*]] = alloca [2 x %struct.S.0], align 128
1688 // CHECK11-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
1689 // CHECK11-NEXT: [[VAR4:%.*]] = alloca [[STRUCT_S_0:%.*]], align 128
1690 // CHECK11-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_ST]], align 4
1691 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1692 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1693 // CHECK11-NEXT: store ptr [[VEC]], ptr [[VEC_ADDR]], align 4
1694 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1695 // CHECK11-NEXT: store ptr [[S_ARR]], ptr [[S_ARR_ADDR]], align 4
1696 // CHECK11-NEXT: store ptr [[VAR]], ptr [[VAR_ADDR]], align 4
1697 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[VEC_ADDR]], align 4
1698 // CHECK11-NEXT: [[TMP1:%.*]] = load ptr, ptr [[S_ARR_ADDR]], align 4
1699 // CHECK11-NEXT: [[TMP2:%.*]] = load ptr, ptr [[VAR_ADDR]], align 4
1700 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VEC1]], ptr align 128 [[TMP0]], i32 8, i1 false)
1701 // CHECK11-NEXT: [[ARRAY_BEGIN:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
1702 // CHECK11-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN]], i32 2
1703 // CHECK11-NEXT: [[OMP_ARRAYCPY_ISEMPTY:%.*]] = icmp eq ptr [[ARRAY_BEGIN]], [[TMP3]]
1704 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_ISEMPTY]], label [[OMP_ARRAYCPY_DONE3:%.*]], label [[OMP_ARRAYCPY_BODY:%.*]]
1705 // CHECK11: omp.arraycpy.body:
1706 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRCELEMENTPAST:%.*]] = phi ptr [ [[TMP1]], [[ENTRY:%.*]] ], [ [[OMP_ARRAYCPY_SRC_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1707 // CHECK11-NEXT: [[OMP_ARRAYCPY_DESTELEMENTPAST:%.*]] = phi ptr [ [[ARRAY_BEGIN]], [[ENTRY]] ], [ [[OMP_ARRAYCPY_DEST_ELEMENT:%.*]], [[OMP_ARRAYCPY_BODY]] ]
1708 // CHECK11-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]])
1709 // CHECK11-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_DESTELEMENTPAST]], ptr nonnull align 4 dereferenceable(4) [[OMP_ARRAYCPY_SRCELEMENTPAST]], ptr [[AGG_TMP]])
1710 // CHECK11-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP]]) #[[ATTR4]]
1711 // CHECK11-NEXT: [[OMP_ARRAYCPY_DEST_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_DESTELEMENTPAST]], i32 1
1712 // CHECK11-NEXT: [[OMP_ARRAYCPY_SRC_ELEMENT]] = getelementptr [[STRUCT_S_0]], ptr [[OMP_ARRAYCPY_SRCELEMENTPAST]], i32 1
1713 // CHECK11-NEXT: [[OMP_ARRAYCPY_DONE:%.*]] = icmp eq ptr [[OMP_ARRAYCPY_DEST_ELEMENT]], [[TMP3]]
1714 // CHECK11-NEXT: br i1 [[OMP_ARRAYCPY_DONE]], label [[OMP_ARRAYCPY_DONE3]], label [[OMP_ARRAYCPY_BODY]]
1715 // CHECK11: omp.arraycpy.done3:
1716 // CHECK11-NEXT: call void @_ZN2StC1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]])
1717 // CHECK11-NEXT: call void @_ZN1SIiEC1ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[VAR4]], ptr nonnull align 4 dereferenceable(4) [[TMP2]], ptr [[AGG_TMP5]])
1718 // CHECK11-NEXT: call void @_ZN2StD1Ev(ptr nonnull align 4 dereferenceable(8) [[AGG_TMP5]]) #[[ATTR4]]
1719 // CHECK11-NEXT: [[TMP4:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1720 // CHECK11-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [2 x i32], ptr [[VEC1]], i32 0, i32 0
1721 // CHECK11-NEXT: store i32 [[TMP4]], ptr [[ARRAYIDX]], align 128
1722 // CHECK11-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
1723 // CHECK11-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[ARRAYIDX6]], ptr align 128 [[VAR4]], i32 4, i1 false)
1724 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[VAR4]]) #[[ATTR4]]
1725 // CHECK11-NEXT: [[ARRAY_BEGIN7:%.*]] = getelementptr inbounds [2 x %struct.S.0], ptr [[S_ARR2]], i32 0, i32 0
1726 // CHECK11-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAY_BEGIN7]], i32 2
1727 // CHECK11-NEXT: br label [[ARRAYDESTROY_BODY:%.*]]
1728 // CHECK11: arraydestroy.body:
1729 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENTPAST:%.*]] = phi ptr [ [[TMP5]], [[OMP_ARRAYCPY_DONE3]] ], [ [[ARRAYDESTROY_ELEMENT:%.*]], [[ARRAYDESTROY_BODY]] ]
1730 // CHECK11-NEXT: [[ARRAYDESTROY_ELEMENT]] = getelementptr inbounds [[STRUCT_S_0]], ptr [[ARRAYDESTROY_ELEMENTPAST]], i32 -1
1731 // CHECK11-NEXT: call void @_ZN1SIiED1Ev(ptr nonnull align 4 dereferenceable(4) [[ARRAYDESTROY_ELEMENT]]) #[[ATTR4]]
1732 // CHECK11-NEXT: [[ARRAYDESTROY_DONE:%.*]] = icmp eq ptr [[ARRAYDESTROY_ELEMENT]], [[ARRAY_BEGIN7]]
1733 // CHECK11-NEXT: br i1 [[ARRAYDESTROY_DONE]], label [[ARRAYDESTROY_DONE8:%.*]], label [[ARRAYDESTROY_BODY]]
1734 // CHECK11: arraydestroy.done8:
1735 // CHECK11-NEXT: ret void
1738 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC1ERKS0_2St
1739 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1740 // CHECK11-NEXT: entry:
1741 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1742 // CHECK11-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
1743 // CHECK11-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
1744 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1745 // CHECK11-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
1746 // CHECK11-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
1747 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1748 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
1749 // CHECK11-NEXT: call void @_ZN1SIiEC2ERKS0_2St(ptr nonnull align 4 dereferenceable(4) [[THIS1]], ptr nonnull align 4 dereferenceable(4) [[TMP0]], ptr [[T]])
1750 // CHECK11-NEXT: ret void
1753 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED1Ev
1754 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1755 // CHECK11-NEXT: entry:
1756 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1757 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1758 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1759 // CHECK11-NEXT: call void @_ZN1SIiED2Ev(ptr nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR4]]
1760 // CHECK11-NEXT: ret void
1763 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81
1764 // CHECK11-SAME: (i32 [[T_VAR:%.*]]) #[[ATTR3]] {
1765 // CHECK11-NEXT: entry:
1766 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1767 // CHECK11-NEXT: [[T_VAR_CASTED:%.*]] = alloca i32, align 4
1768 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1769 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[T_VAR_ADDR]], align 4
1770 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[T_VAR_CASTED]], align 4
1771 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[T_VAR_CASTED]], align 4
1772 // CHECK11-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 1, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.omp_outlined, i32 [[TMP1]])
1773 // CHECK11-NEXT: ret void
1776 // CHECK11-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z5tmainIiET_v_l81.omp_outlined
1777 // CHECK11-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[T_VAR:%.*]]) #[[ATTR3]] {
1778 // CHECK11-NEXT: entry:
1779 // CHECK11-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
1780 // CHECK11-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
1781 // CHECK11-NEXT: [[T_VAR_ADDR:%.*]] = alloca i32, align 4
1782 // CHECK11-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
1783 // CHECK11-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
1784 // CHECK11-NEXT: store i32 [[T_VAR]], ptr [[T_VAR_ADDR]], align 4
1785 // CHECK11-NEXT: ret void
1788 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ev
1789 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1790 // CHECK11-NEXT: entry:
1791 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1792 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1793 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1794 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1795 // CHECK11-NEXT: [[TMP0:%.*]] = load volatile i32, ptr @g, align 128
1796 // CHECK11-NEXT: store i32 [[TMP0]], ptr [[F]], align 4
1797 // CHECK11-NEXT: ret void
1800 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2Ei
1801 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 [[A:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1802 // CHECK11-NEXT: entry:
1803 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1804 // CHECK11-NEXT: [[A_ADDR:%.*]] = alloca i32, align 4
1805 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1806 // CHECK11-NEXT: store i32 [[A]], ptr [[A_ADDR]], align 4
1807 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1808 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1809 // CHECK11-NEXT: [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
1810 // CHECK11-NEXT: [[TMP1:%.*]] = load volatile i32, ptr @g, align 128
1811 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP0]], [[TMP1]]
1812 // CHECK11-NEXT: store i32 [[ADD]], ptr [[F]], align 4
1813 // CHECK11-NEXT: ret void
1816 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiEC2ERKS0_2St
1817 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]], ptr nonnull align 4 dereferenceable(4) [[S:%.*]], ptr [[T:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1818 // CHECK11-NEXT: entry:
1819 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1820 // CHECK11-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
1821 // CHECK11-NEXT: [[T_INDIRECT_ADDR:%.*]] = alloca ptr, align 4
1822 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1823 // CHECK11-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
1824 // CHECK11-NEXT: store ptr [[T]], ptr [[T_INDIRECT_ADDR]], align 4
1825 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1826 // CHECK11-NEXT: [[F:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0:%.*]], ptr [[THIS1]], i32 0, i32 0
1827 // CHECK11-NEXT: [[TMP0:%.*]] = load ptr, ptr [[S_ADDR]], align 4
1828 // CHECK11-NEXT: [[F2:%.*]] = getelementptr inbounds nuw [[STRUCT_S_0]], ptr [[TMP0]], i32 0, i32 0
1829 // CHECK11-NEXT: [[TMP1:%.*]] = load i32, ptr [[F2]], align 4
1830 // CHECK11-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[T]], i32 0, i32 0
1831 // CHECK11-NEXT: [[TMP2:%.*]] = load i32, ptr [[A]], align 4
1832 // CHECK11-NEXT: [[ADD:%.*]] = add nsw i32 [[TMP1]], [[TMP2]]
1833 // CHECK11-NEXT: store i32 [[ADD]], ptr [[F]], align 4
1834 // CHECK11-NEXT: ret void
1837 // CHECK11-LABEL: define {{[^@]+}}@_ZN1SIiED2Ev
1838 // CHECK11-SAME: (ptr nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR1]] comdat align 2 {
1839 // CHECK11-NEXT: entry:
1840 // CHECK11-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1841 // CHECK11-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1842 // CHECK11-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1843 // CHECK11-NEXT: ret void
1846 // CHECK17-LABEL: define {{[^@]+}}@_Z10array_funcPfP2StiPg
1847 // CHECK17-SAME: (ptr [[A:%.*]], ptr [[S:%.*]], i32 signext [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0:[0-9]+]] {
1848 // CHECK17-NEXT: entry:
1849 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1850 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1851 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
1852 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
1853 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
1854 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
1855 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
1856 // CHECK17-NEXT: [[N_CASTED:%.*]] = alloca i64, align 8
1857 // CHECK17-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [8 x ptr], align 8
1858 // CHECK17-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [8 x ptr], align 8
1859 // CHECK17-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [8 x ptr], align 8
1860 // CHECK17-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [8 x i64], align 8
1861 // CHECK17-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1862 // CHECK17-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1863 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1864 // CHECK17-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
1865 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
1866 // CHECK17-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
1867 // CHECK17-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64
1868 // CHECK17-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
1869 // CHECK17-NEXT: [[TMP3:%.*]] = zext i32 [[TMP2]] to i64
1870 // CHECK17-NEXT: [[TMP4:%.*]] = load i32, ptr [[N_ADDR]], align 4
1871 // CHECK17-NEXT: [[TMP5:%.*]] = zext i32 [[TMP4]] to i64
1872 // CHECK17-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
1873 // CHECK17-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 8
1874 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
1875 // CHECK17-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP7]], align 128
1876 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR0]], align 8
1877 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[__VLA_EXPR1]], align 8
1878 // CHECK17-NEXT: [[TMP8:%.*]] = load ptr, ptr [[A_ADDR]], align 8
1879 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[S_ADDR]], align 8
1880 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
1881 // CHECK17-NEXT: [[TMP11:%.*]] = load i32, ptr [[N_ADDR]], align 4
1882 // CHECK17-NEXT: store i32 [[TMP11]], ptr [[N_CASTED]], align 4
1883 // CHECK17-NEXT: [[TMP12:%.*]] = load i64, ptr [[N_CASTED]], align 8
1884 // CHECK17-NEXT: [[TMP13:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
1885 // CHECK17-NEXT: [[TMP14:%.*]] = mul nuw i64 [[TMP13]], 8
1886 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes, i64 64, i1 false)
1887 // CHECK17-NEXT: [[TMP15:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1888 // CHECK17-NEXT: store ptr [[TMP8]], ptr [[TMP15]], align 8
1889 // CHECK17-NEXT: [[TMP16:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1890 // CHECK17-NEXT: store ptr [[TMP8]], ptr [[TMP16]], align 8
1891 // CHECK17-NEXT: [[TMP17:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
1892 // CHECK17-NEXT: store ptr null, ptr [[TMP17]], align 8
1893 // CHECK17-NEXT: [[TMP18:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1894 // CHECK17-NEXT: store ptr [[TMP9]], ptr [[TMP18]], align 8
1895 // CHECK17-NEXT: [[TMP19:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1896 // CHECK17-NEXT: store ptr [[TMP9]], ptr [[TMP19]], align 8
1897 // CHECK17-NEXT: [[TMP20:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
1898 // CHECK17-NEXT: store ptr null, ptr [[TMP20]], align 8
1899 // CHECK17-NEXT: [[TMP21:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1900 // CHECK17-NEXT: store i64 [[TMP1]], ptr [[TMP21]], align 8
1901 // CHECK17-NEXT: [[TMP22:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1902 // CHECK17-NEXT: store i64 [[TMP1]], ptr [[TMP22]], align 8
1903 // CHECK17-NEXT: [[TMP23:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
1904 // CHECK17-NEXT: store ptr null, ptr [[TMP23]], align 8
1905 // CHECK17-NEXT: [[TMP24:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1906 // CHECK17-NEXT: store ptr [[TMP10]], ptr [[TMP24]], align 8
1907 // CHECK17-NEXT: [[TMP25:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1908 // CHECK17-NEXT: store ptr [[TMP10]], ptr [[TMP25]], align 8
1909 // CHECK17-NEXT: [[TMP26:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
1910 // CHECK17-NEXT: store ptr null, ptr [[TMP26]], align 8
1911 // CHECK17-NEXT: [[TMP27:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
1912 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[TMP27]], align 8
1913 // CHECK17-NEXT: [[TMP28:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
1914 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[TMP28]], align 8
1915 // CHECK17-NEXT: [[TMP29:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
1916 // CHECK17-NEXT: store ptr null, ptr [[TMP29]], align 8
1917 // CHECK17-NEXT: [[TMP30:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
1918 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[TMP30]], align 8
1919 // CHECK17-NEXT: [[TMP31:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
1920 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[TMP31]], align 8
1921 // CHECK17-NEXT: [[TMP32:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5
1922 // CHECK17-NEXT: store ptr null, ptr [[TMP32]], align 8
1923 // CHECK17-NEXT: [[TMP33:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
1924 // CHECK17-NEXT: store ptr [[VLA]], ptr [[TMP33]], align 8
1925 // CHECK17-NEXT: [[TMP34:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
1926 // CHECK17-NEXT: store ptr [[VLA]], ptr [[TMP34]], align 8
1927 // CHECK17-NEXT: [[TMP35:%.*]] = getelementptr inbounds [8 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 6
1928 // CHECK17-NEXT: store i64 [[TMP14]], ptr [[TMP35]], align 8
1929 // CHECK17-NEXT: [[TMP36:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6
1930 // CHECK17-NEXT: store ptr null, ptr [[TMP36]], align 8
1931 // CHECK17-NEXT: [[TMP37:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 7
1932 // CHECK17-NEXT: store i64 [[TMP12]], ptr [[TMP37]], align 8
1933 // CHECK17-NEXT: [[TMP38:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 7
1934 // CHECK17-NEXT: store i64 [[TMP12]], ptr [[TMP38]], align 8
1935 // CHECK17-NEXT: [[TMP39:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 7
1936 // CHECK17-NEXT: store ptr null, ptr [[TMP39]], align 8
1937 // CHECK17-NEXT: [[TMP40:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1938 // CHECK17-NEXT: [[TMP41:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1939 // CHECK17-NEXT: [[TMP42:%.*]] = getelementptr inbounds [8 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1940 // CHECK17-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1941 // CHECK17-NEXT: store i32 3, ptr [[TMP43]], align 4
1942 // CHECK17-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1943 // CHECK17-NEXT: store i32 8, ptr [[TMP44]], align 4
1944 // CHECK17-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1945 // CHECK17-NEXT: store ptr [[TMP40]], ptr [[TMP45]], align 8
1946 // CHECK17-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1947 // CHECK17-NEXT: store ptr [[TMP41]], ptr [[TMP46]], align 8
1948 // CHECK17-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1949 // CHECK17-NEXT: store ptr [[TMP42]], ptr [[TMP47]], align 8
1950 // CHECK17-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1951 // CHECK17-NEXT: store ptr @.offload_maptypes, ptr [[TMP48]], align 8
1952 // CHECK17-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1953 // CHECK17-NEXT: store ptr null, ptr [[TMP49]], align 8
1954 // CHECK17-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1955 // CHECK17-NEXT: store ptr null, ptr [[TMP50]], align 8
1956 // CHECK17-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1957 // CHECK17-NEXT: store i64 0, ptr [[TMP51]], align 8
1958 // CHECK17-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1959 // CHECK17-NEXT: store i64 0, ptr [[TMP52]], align 8
1960 // CHECK17-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1961 // CHECK17-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP53]], align 4
1962 // CHECK17-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1963 // CHECK17-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP54]], align 4
1964 // CHECK17-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1965 // CHECK17-NEXT: store i32 0, ptr [[TMP55]], align 4
1966 // CHECK17-NEXT: [[TMP56:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPg_l152.region_id, ptr [[KERNEL_ARGS]])
1967 // CHECK17-NEXT: [[TMP57:%.*]] = icmp ne i32 [[TMP56]], 0
1968 // CHECK17-NEXT: br i1 [[TMP57]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1969 // CHECK17: omp_offload.failed:
1970 // CHECK17-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPg_l152(ptr [[TMP8]], ptr [[TMP9]], i64 [[TMP1]], ptr [[TMP10]], i64 [[TMP3]], i64 [[TMP5]], ptr [[VLA]], i64 [[TMP12]]) #[[ATTR4:[0-9]+]]
1971 // CHECK17-NEXT: br label [[OMP_OFFLOAD_CONT]]
1972 // CHECK17: omp_offload.cont:
1973 // CHECK17-NEXT: [[TMP58:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
1974 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP58]])
1975 // CHECK17-NEXT: ret void
1978 // CHECK17-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPg_l152
1979 // CHECK17-SAME: (ptr [[A:%.*]], ptr [[S:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]], i64 [[N:%.*]]) #[[ATTR2:[0-9]+]] {
1980 // CHECK17-NEXT: entry:
1981 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
1982 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
1983 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
1984 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
1985 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
1986 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
1987 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
1988 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
1989 // CHECK17-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
1990 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
1991 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
1992 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
1993 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
1994 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
1995 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
1996 // CHECK17-NEXT: store i64 [[N]], ptr [[N_ADDR]], align 8
1997 // CHECK17-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
1998 // CHECK17-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
1999 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2000 // CHECK17-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2001 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2002 // CHECK17-NEXT: [[TMP5:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2003 // CHECK17-NEXT: [[TMP6:%.*]] = load ptr, ptr [[A_ADDR]], align 8
2004 // CHECK17-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 8, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPg_l152.omp_outlined, ptr [[TMP4]], ptr [[N_ADDR]], i64 [[TMP0]], ptr [[TMP5]], ptr [[TMP6]], i64 [[TMP1]], i64 [[TMP2]], ptr [[TMP3]])
2005 // CHECK17-NEXT: ret void
2008 // CHECK17-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPg_l152.omp_outlined
2009 // CHECK17-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[S:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[A:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]]) #[[ATTR2]] {
2010 // CHECK17-NEXT: entry:
2011 // CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2012 // CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2013 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2014 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2015 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2016 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2017 // CHECK17-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
2018 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
2019 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
2020 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
2021 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2022 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2023 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2024 // CHECK17-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2025 // CHECK17-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2026 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2027 // CHECK17-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2028 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2029 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2030 // CHECK17-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
2031 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
2032 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
2033 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
2034 // CHECK17-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2035 // CHECK17-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2036 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
2037 // CHECK17-NEXT: [[TMP3:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2038 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2039 // CHECK17-NEXT: [[TMP5:%.*]] = call ptr @llvm.stacksave.p0()
2040 // CHECK17-NEXT: store ptr [[TMP5]], ptr [[SAVED_STACK]], align 8
2041 // CHECK17-NEXT: [[TMP6:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2042 // CHECK17-NEXT: [[VLA7:%.*]] = alloca double, i64 [[TMP6]], align 128
2043 // CHECK17-NEXT: store i64 [[TMP2]], ptr [[__VLA_EXPR0]], align 8
2044 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR1]], align 8
2045 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2046 // CHECK17-NEXT: [[TMP8:%.*]] = mul nuw i64 [[TMP7]], 8
2047 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VLA7]], ptr align 128 [[TMP4]], i64 [[TMP8]], i1 false)
2048 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2049 // CHECK17-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP9]], i64 0
2050 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2051 // CHECK17-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP0]], align 4
2052 // CHECK17-NEXT: [[TMP12:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2053 // CHECK17-NEXT: call void @_ZN2St7St_funcEPS_iPg(ptr nonnull align 4 dereferenceable(8) [[ARRAYIDX]], ptr [[TMP10]], i32 signext [[TMP11]], ptr [[TMP12]])
2054 // CHECK17-NEXT: [[TMP13:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2055 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP13]])
2056 // CHECK17-NEXT: ret void
2059 // CHECK17-LABEL: define {{[^@]+}}@_ZN2St7St_funcEPS_iPg
2060 // CHECK17-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]], ptr [[S:%.*]], i32 signext [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0]] comdat {
2061 // CHECK17-NEXT: entry:
2062 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2063 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2064 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2065 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2066 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2067 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2068 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2069 // CHECK17-NEXT: [[N_CASTED:%.*]] = alloca i64, align 8
2070 // CHECK17-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [10 x ptr], align 8
2071 // CHECK17-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [10 x ptr], align 8
2072 // CHECK17-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [10 x ptr], align 8
2073 // CHECK17-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [10 x i64], align 8
2074 // CHECK17-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
2075 // CHECK17-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2076 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2077 // CHECK17-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2078 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2079 // CHECK17-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2080 // CHECK17-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
2081 // CHECK17-NEXT: [[TMP1:%.*]] = zext i32 [[TMP0]] to i64
2082 // CHECK17-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
2083 // CHECK17-NEXT: [[TMP3:%.*]] = zext i32 [[TMP2]] to i64
2084 // CHECK17-NEXT: [[TMP4:%.*]] = load i32, ptr [[N_ADDR]], align 4
2085 // CHECK17-NEXT: [[TMP5:%.*]] = zext i32 [[TMP4]] to i64
2086 // CHECK17-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
2087 // CHECK17-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 8
2088 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
2089 // CHECK17-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP7]], align 128
2090 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR0]], align 8
2091 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[__VLA_EXPR1]], align 8
2092 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 1
2093 // CHECK17-NEXT: [[TMP8:%.*]] = load i32, ptr [[B]], align 4
2094 // CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 0
2095 // CHECK17-NEXT: store i32 [[TMP8]], ptr [[A]], align 4
2096 // CHECK17-NEXT: [[TMP9:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2097 // CHECK17-NEXT: [[TMP10:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2098 // CHECK17-NEXT: [[TMP11:%.*]] = load i32, ptr [[N_ADDR]], align 4
2099 // CHECK17-NEXT: store i32 [[TMP11]], ptr [[N_CASTED]], align 4
2100 // CHECK17-NEXT: [[TMP12:%.*]] = load i64, ptr [[N_CASTED]], align 8
2101 // CHECK17-NEXT: [[TMP13:%.*]] = mul nuw i64 [[TMP3]], [[TMP5]]
2102 // CHECK17-NEXT: [[TMP14:%.*]] = mul nuw i64 [[TMP13]], 8
2103 // CHECK17-NEXT: [[B2:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
2104 // CHECK17-NEXT: [[A3:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 0
2105 // CHECK17-NEXT: [[TMP15:%.*]] = getelementptr i32, ptr [[B2]], i32 1
2106 // CHECK17-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[TMP15]] to i64
2107 // CHECK17-NEXT: [[TMP17:%.*]] = ptrtoint ptr [[A3]] to i64
2108 // CHECK17-NEXT: [[TMP18:%.*]] = sub i64 [[TMP16]], [[TMP17]]
2109 // CHECK17-NEXT: [[TMP19:%.*]] = sdiv exact i64 [[TMP18]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
2110 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes.1, i64 80, i1 false)
2111 // CHECK17-NEXT: [[TMP20:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2112 // CHECK17-NEXT: store ptr [[TMP9]], ptr [[TMP20]], align 8
2113 // CHECK17-NEXT: [[TMP21:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2114 // CHECK17-NEXT: store ptr [[TMP9]], ptr [[TMP21]], align 8
2115 // CHECK17-NEXT: [[TMP22:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
2116 // CHECK17-NEXT: store ptr null, ptr [[TMP22]], align 8
2117 // CHECK17-NEXT: [[TMP23:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
2118 // CHECK17-NEXT: store i64 [[TMP1]], ptr [[TMP23]], align 8
2119 // CHECK17-NEXT: [[TMP24:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
2120 // CHECK17-NEXT: store i64 [[TMP1]], ptr [[TMP24]], align 8
2121 // CHECK17-NEXT: [[TMP25:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
2122 // CHECK17-NEXT: store ptr null, ptr [[TMP25]], align 8
2123 // CHECK17-NEXT: [[TMP26:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
2124 // CHECK17-NEXT: store ptr [[TMP10]], ptr [[TMP26]], align 8
2125 // CHECK17-NEXT: [[TMP27:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
2126 // CHECK17-NEXT: store ptr [[TMP10]], ptr [[TMP27]], align 8
2127 // CHECK17-NEXT: [[TMP28:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
2128 // CHECK17-NEXT: store ptr null, ptr [[TMP28]], align 8
2129 // CHECK17-NEXT: [[TMP29:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
2130 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[TMP29]], align 8
2131 // CHECK17-NEXT: [[TMP30:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
2132 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[TMP30]], align 8
2133 // CHECK17-NEXT: [[TMP31:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
2134 // CHECK17-NEXT: store ptr null, ptr [[TMP31]], align 8
2135 // CHECK17-NEXT: [[TMP32:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
2136 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[TMP32]], align 8
2137 // CHECK17-NEXT: [[TMP33:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
2138 // CHECK17-NEXT: store i64 [[TMP5]], ptr [[TMP33]], align 8
2139 // CHECK17-NEXT: [[TMP34:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
2140 // CHECK17-NEXT: store ptr null, ptr [[TMP34]], align 8
2141 // CHECK17-NEXT: [[TMP35:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
2142 // CHECK17-NEXT: store ptr [[VLA]], ptr [[TMP35]], align 8
2143 // CHECK17-NEXT: [[TMP36:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
2144 // CHECK17-NEXT: store ptr [[VLA]], ptr [[TMP36]], align 8
2145 // CHECK17-NEXT: [[TMP37:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 5
2146 // CHECK17-NEXT: store i64 [[TMP14]], ptr [[TMP37]], align 8
2147 // CHECK17-NEXT: [[TMP38:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5
2148 // CHECK17-NEXT: store ptr null, ptr [[TMP38]], align 8
2149 // CHECK17-NEXT: [[TMP39:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
2150 // CHECK17-NEXT: store ptr [[THIS1]], ptr [[TMP39]], align 8
2151 // CHECK17-NEXT: [[TMP40:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
2152 // CHECK17-NEXT: store ptr [[A3]], ptr [[TMP40]], align 8
2153 // CHECK17-NEXT: [[TMP41:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 6
2154 // CHECK17-NEXT: store i64 [[TMP19]], ptr [[TMP41]], align 8
2155 // CHECK17-NEXT: [[TMP42:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6
2156 // CHECK17-NEXT: store ptr null, ptr [[TMP42]], align 8
2157 // CHECK17-NEXT: [[TMP43:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 7
2158 // CHECK17-NEXT: store ptr [[THIS1]], ptr [[TMP43]], align 8
2159 // CHECK17-NEXT: [[TMP44:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 7
2160 // CHECK17-NEXT: store ptr [[B2]], ptr [[TMP44]], align 8
2161 // CHECK17-NEXT: [[TMP45:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 7
2162 // CHECK17-NEXT: store ptr null, ptr [[TMP45]], align 8
2163 // CHECK17-NEXT: [[TMP46:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 8
2164 // CHECK17-NEXT: store ptr [[THIS1]], ptr [[TMP46]], align 8
2165 // CHECK17-NEXT: [[TMP47:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 8
2166 // CHECK17-NEXT: store ptr [[A3]], ptr [[TMP47]], align 8
2167 // CHECK17-NEXT: [[TMP48:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 8
2168 // CHECK17-NEXT: store ptr null, ptr [[TMP48]], align 8
2169 // CHECK17-NEXT: [[TMP49:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 9
2170 // CHECK17-NEXT: store i64 [[TMP12]], ptr [[TMP49]], align 8
2171 // CHECK17-NEXT: [[TMP50:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 9
2172 // CHECK17-NEXT: store i64 [[TMP12]], ptr [[TMP50]], align 8
2173 // CHECK17-NEXT: [[TMP51:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 9
2174 // CHECK17-NEXT: store ptr null, ptr [[TMP51]], align 8
2175 // CHECK17-NEXT: [[TMP52:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2176 // CHECK17-NEXT: [[TMP53:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2177 // CHECK17-NEXT: [[TMP54:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
2178 // CHECK17-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
2179 // CHECK17-NEXT: store i32 3, ptr [[TMP55]], align 4
2180 // CHECK17-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
2181 // CHECK17-NEXT: store i32 10, ptr [[TMP56]], align 4
2182 // CHECK17-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
2183 // CHECK17-NEXT: store ptr [[TMP52]], ptr [[TMP57]], align 8
2184 // CHECK17-NEXT: [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
2185 // CHECK17-NEXT: store ptr [[TMP53]], ptr [[TMP58]], align 8
2186 // CHECK17-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
2187 // CHECK17-NEXT: store ptr [[TMP54]], ptr [[TMP59]], align 8
2188 // CHECK17-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
2189 // CHECK17-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP60]], align 8
2190 // CHECK17-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
2191 // CHECK17-NEXT: store ptr null, ptr [[TMP61]], align 8
2192 // CHECK17-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
2193 // CHECK17-NEXT: store ptr null, ptr [[TMP62]], align 8
2194 // CHECK17-NEXT: [[TMP63:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
2195 // CHECK17-NEXT: store i64 0, ptr [[TMP63]], align 8
2196 // CHECK17-NEXT: [[TMP64:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
2197 // CHECK17-NEXT: store i64 0, ptr [[TMP64]], align 8
2198 // CHECK17-NEXT: [[TMP65:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
2199 // CHECK17-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP65]], align 4
2200 // CHECK17-NEXT: [[TMP66:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
2201 // CHECK17-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP66]], align 4
2202 // CHECK17-NEXT: [[TMP67:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
2203 // CHECK17-NEXT: store i32 0, ptr [[TMP67]], align 4
2204 // CHECK17-NEXT: [[TMP68:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPg_l144.region_id, ptr [[KERNEL_ARGS]])
2205 // CHECK17-NEXT: [[TMP69:%.*]] = icmp ne i32 [[TMP68]], 0
2206 // CHECK17-NEXT: br i1 [[TMP69]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
2207 // CHECK17: omp_offload.failed:
2208 // CHECK17-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPg_l144(ptr [[TMP9]], i64 [[TMP1]], ptr [[TMP10]], i64 [[TMP3]], i64 [[TMP5]], ptr [[VLA]], ptr [[THIS1]], i64 [[TMP12]]) #[[ATTR4]]
2209 // CHECK17-NEXT: br label [[OMP_OFFLOAD_CONT]]
2210 // CHECK17: omp_offload.cont:
2211 // CHECK17-NEXT: [[TMP70:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2212 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP70]])
2213 // CHECK17-NEXT: ret void
2216 // CHECK17-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPg_l144
2217 // CHECK17-SAME: (ptr [[S:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]], ptr [[THIS:%.*]], i64 [[N:%.*]]) #[[ATTR2]] {
2218 // CHECK17-NEXT: entry:
2219 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2220 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2221 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2222 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
2223 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
2224 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
2225 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2226 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca i64, align 8
2227 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2228 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2229 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2230 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
2231 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
2232 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
2233 // CHECK17-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2234 // CHECK17-NEXT: store i64 [[N]], ptr [[N_ADDR]], align 8
2235 // CHECK17-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2236 // CHECK17-NEXT: [[TMP1:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
2237 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2238 // CHECK17-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2239 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2240 // CHECK17-NEXT: [[TMP5:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2241 // CHECK17-NEXT: [[TMP6:%.*]] = load ptr, ptr [[S_ADDR]], align 8
2242 // CHECK17-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 8, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPg_l144.omp_outlined, i64 [[TMP0]], ptr [[TMP5]], ptr [[TMP4]], i64 [[TMP1]], i64 [[TMP2]], ptr [[TMP3]], ptr [[N_ADDR]], ptr [[TMP6]])
2243 // CHECK17-NEXT: ret void
2246 // CHECK17-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPg_l144.omp_outlined
2247 // CHECK17-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i64 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[THIS:%.*]], i64 [[VLA2:%.*]], i64 [[VLA4:%.*]], ptr nonnull align 8 dereferenceable(8) [[VLA26:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], ptr [[S:%.*]]) #[[ATTR2]] {
2248 // CHECK17-NEXT: entry:
2249 // CHECK17-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 8
2250 // CHECK17-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 8
2251 // CHECK17-NEXT: [[VLA_ADDR:%.*]] = alloca i64, align 8
2252 // CHECK17-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 8
2253 // CHECK17-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
2254 // CHECK17-NEXT: [[VLA_ADDR3:%.*]] = alloca i64, align 8
2255 // CHECK17-NEXT: [[VLA_ADDR5:%.*]] = alloca i64, align 8
2256 // CHECK17-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 8
2257 // CHECK17-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 8
2258 // CHECK17-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 8
2259 // CHECK17-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 8
2260 // CHECK17-NEXT: [[__VLA_EXPR0:%.*]] = alloca i64, align 8
2261 // CHECK17-NEXT: [[__VLA_EXPR1:%.*]] = alloca i64, align 8
2262 // CHECK17-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 8
2263 // CHECK17-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 8
2264 // CHECK17-NEXT: store i64 [[VLA]], ptr [[VLA_ADDR]], align 8
2265 // CHECK17-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 8
2266 // CHECK17-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
2267 // CHECK17-NEXT: store i64 [[VLA2]], ptr [[VLA_ADDR3]], align 8
2268 // CHECK17-NEXT: store i64 [[VLA4]], ptr [[VLA_ADDR5]], align 8
2269 // CHECK17-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 8
2270 // CHECK17-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 8
2271 // CHECK17-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 8
2272 // CHECK17-NEXT: [[TMP0:%.*]] = load i64, ptr [[VLA_ADDR]], align 8
2273 // CHECK17-NEXT: [[TMP1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
2274 // CHECK17-NEXT: [[TMP2:%.*]] = load i64, ptr [[VLA_ADDR3]], align 8
2275 // CHECK17-NEXT: [[TMP3:%.*]] = load i64, ptr [[VLA_ADDR5]], align 8
2276 // CHECK17-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 8
2277 // CHECK17-NEXT: [[TMP5:%.*]] = load ptr, ptr [[N_ADDR]], align 8
2278 // CHECK17-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
2279 // CHECK17-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 8
2280 // CHECK17-NEXT: [[TMP7:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2281 // CHECK17-NEXT: [[VLA7:%.*]] = alloca double, i64 [[TMP7]], align 128
2282 // CHECK17-NEXT: store i64 [[TMP2]], ptr [[__VLA_EXPR0]], align 8
2283 // CHECK17-NEXT: store i64 [[TMP3]], ptr [[__VLA_EXPR1]], align 8
2284 // CHECK17-NEXT: [[TMP8:%.*]] = mul nuw i64 [[TMP2]], [[TMP3]]
2285 // CHECK17-NEXT: [[TMP9:%.*]] = mul nuw i64 [[TMP8]], 8
2286 // CHECK17-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 128 [[VLA7]], ptr align 128 [[TMP4]], i64 [[TMP9]], i1 false)
2287 // CHECK17-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[TMP1]], i32 0, i32 1
2288 // CHECK17-NEXT: [[TMP10:%.*]] = load i32, ptr [[B]], align 4
2289 // CHECK17-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 0
2290 // CHECK17-NEXT: store i32 [[TMP10]], ptr [[A]], align 4
2291 // CHECK17-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP10]] to double
2292 // CHECK17-NEXT: [[TMP11:%.*]] = mul nsw i64 1, [[TMP3]]
2293 // CHECK17-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[VLA7]], i64 [[TMP11]]
2294 // CHECK17-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP5]], align 4
2295 // CHECK17-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP12]], 1
2296 // CHECK17-NEXT: [[IDXPROM:%.*]] = sext i32 [[SUB]] to i64
2297 // CHECK17-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds double, ptr [[ARRAYIDX]], i64 [[IDXPROM]]
2298 // CHECK17-NEXT: store double [[CONV]], ptr [[ARRAYIDX8]], align 8
2299 // CHECK17-NEXT: [[CONV9:%.*]] = fpext double [[CONV]] to ppc_fp128
2300 // CHECK17-NEXT: [[TMP13:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 8
2301 // CHECK17-NEXT: [[B10:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 1
2302 // CHECK17-NEXT: [[TMP14:%.*]] = load i32, ptr [[B10]], align 4
2303 // CHECK17-NEXT: [[IDXPROM11:%.*]] = sext i32 [[TMP14]] to i64
2304 // CHECK17-NEXT: [[ARRAYIDX12:%.*]] = getelementptr inbounds ppc_fp128, ptr [[TMP13]], i64 [[IDXPROM11]]
2305 // CHECK17-NEXT: store ppc_fp128 [[CONV9]], ptr [[ARRAYIDX12]], align 16
2306 // CHECK17-NEXT: [[TMP15:%.*]] = load ptr, ptr [[SAVED_STACK]], align 8
2307 // CHECK17-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP15]])
2308 // CHECK17-NEXT: ret void
2311 // CHECK19-LABEL: define {{[^@]+}}@_Z10array_funcPfP2StiPe
2312 // CHECK19-SAME: (ptr [[A:%.*]], ptr [[S:%.*]], i32 [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0:[0-9]+]] {
2313 // CHECK19-NEXT: entry:
2314 // CHECK19-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
2315 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2316 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2317 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2318 // CHECK19-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 4
2319 // CHECK19-NEXT: [[__VLA_EXPR0:%.*]] = alloca i32, align 4
2320 // CHECK19-NEXT: [[__VLA_EXPR1:%.*]] = alloca i32, align 4
2321 // CHECK19-NEXT: [[N_CASTED:%.*]] = alloca i32, align 4
2322 // CHECK19-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [8 x ptr], align 4
2323 // CHECK19-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [8 x ptr], align 4
2324 // CHECK19-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [8 x ptr], align 4
2325 // CHECK19-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [8 x i64], align 4
2326 // CHECK19-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
2327 // CHECK19-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
2328 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2329 // CHECK19-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2330 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2331 // CHECK19-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
2332 // CHECK19-NEXT: [[TMP1:%.*]] = load i32, ptr [[N_ADDR]], align 4
2333 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
2334 // CHECK19-NEXT: [[TMP3:%.*]] = call ptr @llvm.stacksave.p0()
2335 // CHECK19-NEXT: store ptr [[TMP3]], ptr [[SAVED_STACK]], align 4
2336 // CHECK19-NEXT: [[TMP4:%.*]] = mul nuw i32 [[TMP1]], [[TMP2]]
2337 // CHECK19-NEXT: [[VLA:%.*]] = alloca double, i32 [[TMP4]], align 128
2338 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[__VLA_EXPR0]], align 4
2339 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[__VLA_EXPR1]], align 4
2340 // CHECK19-NEXT: [[TMP5:%.*]] = load ptr, ptr [[A_ADDR]], align 4
2341 // CHECK19-NEXT: [[TMP6:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2342 // CHECK19-NEXT: [[TMP7:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2343 // CHECK19-NEXT: [[TMP8:%.*]] = load i32, ptr [[N_ADDR]], align 4
2344 // CHECK19-NEXT: store i32 [[TMP8]], ptr [[N_CASTED]], align 4
2345 // CHECK19-NEXT: [[TMP9:%.*]] = load i32, ptr [[N_CASTED]], align 4
2346 // CHECK19-NEXT: [[TMP10:%.*]] = mul nuw i32 [[TMP1]], [[TMP2]]
2347 // CHECK19-NEXT: [[TMP11:%.*]] = mul nuw i32 [[TMP10]], 8
2348 // CHECK19-NEXT: [[TMP12:%.*]] = sext i32 [[TMP11]] to i64
2349 // CHECK19-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes, i32 64, i1 false)
2350 // CHECK19-NEXT: [[TMP13:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2351 // CHECK19-NEXT: store ptr [[TMP5]], ptr [[TMP13]], align 4
2352 // CHECK19-NEXT: [[TMP14:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2353 // CHECK19-NEXT: store ptr [[TMP5]], ptr [[TMP14]], align 4
2354 // CHECK19-NEXT: [[TMP15:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
2355 // CHECK19-NEXT: store ptr null, ptr [[TMP15]], align 4
2356 // CHECK19-NEXT: [[TMP16:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
2357 // CHECK19-NEXT: store ptr [[TMP6]], ptr [[TMP16]], align 4
2358 // CHECK19-NEXT: [[TMP17:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
2359 // CHECK19-NEXT: store ptr [[TMP6]], ptr [[TMP17]], align 4
2360 // CHECK19-NEXT: [[TMP18:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
2361 // CHECK19-NEXT: store ptr null, ptr [[TMP18]], align 4
2362 // CHECK19-NEXT: [[TMP19:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
2363 // CHECK19-NEXT: store i32 [[TMP0]], ptr [[TMP19]], align 4
2364 // CHECK19-NEXT: [[TMP20:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
2365 // CHECK19-NEXT: store i32 [[TMP0]], ptr [[TMP20]], align 4
2366 // CHECK19-NEXT: [[TMP21:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
2367 // CHECK19-NEXT: store ptr null, ptr [[TMP21]], align 4
2368 // CHECK19-NEXT: [[TMP22:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
2369 // CHECK19-NEXT: store ptr [[TMP7]], ptr [[TMP22]], align 4
2370 // CHECK19-NEXT: [[TMP23:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
2371 // CHECK19-NEXT: store ptr [[TMP7]], ptr [[TMP23]], align 4
2372 // CHECK19-NEXT: [[TMP24:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
2373 // CHECK19-NEXT: store ptr null, ptr [[TMP24]], align 4
2374 // CHECK19-NEXT: [[TMP25:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
2375 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[TMP25]], align 4
2376 // CHECK19-NEXT: [[TMP26:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
2377 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[TMP26]], align 4
2378 // CHECK19-NEXT: [[TMP27:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
2379 // CHECK19-NEXT: store ptr null, ptr [[TMP27]], align 4
2380 // CHECK19-NEXT: [[TMP28:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
2381 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[TMP28]], align 4
2382 // CHECK19-NEXT: [[TMP29:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
2383 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[TMP29]], align 4
2384 // CHECK19-NEXT: [[TMP30:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5
2385 // CHECK19-NEXT: store ptr null, ptr [[TMP30]], align 4
2386 // CHECK19-NEXT: [[TMP31:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
2387 // CHECK19-NEXT: store ptr [[VLA]], ptr [[TMP31]], align 4
2388 // CHECK19-NEXT: [[TMP32:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
2389 // CHECK19-NEXT: store ptr [[VLA]], ptr [[TMP32]], align 4
2390 // CHECK19-NEXT: [[TMP33:%.*]] = getelementptr inbounds [8 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 6
2391 // CHECK19-NEXT: store i64 [[TMP12]], ptr [[TMP33]], align 4
2392 // CHECK19-NEXT: [[TMP34:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6
2393 // CHECK19-NEXT: store ptr null, ptr [[TMP34]], align 4
2394 // CHECK19-NEXT: [[TMP35:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 7
2395 // CHECK19-NEXT: store i32 [[TMP9]], ptr [[TMP35]], align 4
2396 // CHECK19-NEXT: [[TMP36:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 7
2397 // CHECK19-NEXT: store i32 [[TMP9]], ptr [[TMP36]], align 4
2398 // CHECK19-NEXT: [[TMP37:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 7
2399 // CHECK19-NEXT: store ptr null, ptr [[TMP37]], align 4
2400 // CHECK19-NEXT: [[TMP38:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2401 // CHECK19-NEXT: [[TMP39:%.*]] = getelementptr inbounds [8 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2402 // CHECK19-NEXT: [[TMP40:%.*]] = getelementptr inbounds [8 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
2403 // CHECK19-NEXT: [[TMP41:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
2404 // CHECK19-NEXT: store i32 3, ptr [[TMP41]], align 4
2405 // CHECK19-NEXT: [[TMP42:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
2406 // CHECK19-NEXT: store i32 8, ptr [[TMP42]], align 4
2407 // CHECK19-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
2408 // CHECK19-NEXT: store ptr [[TMP38]], ptr [[TMP43]], align 4
2409 // CHECK19-NEXT: [[TMP44:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
2410 // CHECK19-NEXT: store ptr [[TMP39]], ptr [[TMP44]], align 4
2411 // CHECK19-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
2412 // CHECK19-NEXT: store ptr [[TMP40]], ptr [[TMP45]], align 4
2413 // CHECK19-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
2414 // CHECK19-NEXT: store ptr @.offload_maptypes, ptr [[TMP46]], align 4
2415 // CHECK19-NEXT: [[TMP47:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
2416 // CHECK19-NEXT: store ptr null, ptr [[TMP47]], align 4
2417 // CHECK19-NEXT: [[TMP48:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
2418 // CHECK19-NEXT: store ptr null, ptr [[TMP48]], align 4
2419 // CHECK19-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
2420 // CHECK19-NEXT: store i64 0, ptr [[TMP49]], align 8
2421 // CHECK19-NEXT: [[TMP50:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
2422 // CHECK19-NEXT: store i64 0, ptr [[TMP50]], align 8
2423 // CHECK19-NEXT: [[TMP51:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
2424 // CHECK19-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP51]], align 4
2425 // CHECK19-NEXT: [[TMP52:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
2426 // CHECK19-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP52]], align 4
2427 // CHECK19-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
2428 // CHECK19-NEXT: store i32 0, ptr [[TMP53]], align 4
2429 // CHECK19-NEXT: [[TMP54:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPe_l152.region_id, ptr [[KERNEL_ARGS]])
2430 // CHECK19-NEXT: [[TMP55:%.*]] = icmp ne i32 [[TMP54]], 0
2431 // CHECK19-NEXT: br i1 [[TMP55]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
2432 // CHECK19: omp_offload.failed:
2433 // CHECK19-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPe_l152(ptr [[TMP5]], ptr [[TMP6]], i32 [[TMP0]], ptr [[TMP7]], i32 [[TMP1]], i32 [[TMP2]], ptr [[VLA]], i32 [[TMP9]]) #[[ATTR4:[0-9]+]]
2434 // CHECK19-NEXT: br label [[OMP_OFFLOAD_CONT]]
2435 // CHECK19: omp_offload.cont:
2436 // CHECK19-NEXT: [[TMP56:%.*]] = load ptr, ptr [[SAVED_STACK]], align 4
2437 // CHECK19-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP56]])
2438 // CHECK19-NEXT: ret void
2441 // CHECK19-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPe_l152
2442 // CHECK19-SAME: (ptr [[A:%.*]], ptr [[S:%.*]], i32 [[VLA:%.*]], ptr [[VLA1:%.*]], i32 [[VLA2:%.*]], i32 [[VLA4:%.*]], ptr nonnull align 4 dereferenceable(8) [[VLA26:%.*]], i32 [[N:%.*]]) #[[ATTR2:[0-9]+]] {
2443 // CHECK19-NEXT: entry:
2444 // CHECK19-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
2445 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2446 // CHECK19-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
2447 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2448 // CHECK19-NEXT: [[VLA_ADDR3:%.*]] = alloca i32, align 4
2449 // CHECK19-NEXT: [[VLA_ADDR5:%.*]] = alloca i32, align 4
2450 // CHECK19-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 4
2451 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2452 // CHECK19-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
2453 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2454 // CHECK19-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
2455 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2456 // CHECK19-NEXT: store i32 [[VLA2]], ptr [[VLA_ADDR3]], align 4
2457 // CHECK19-NEXT: store i32 [[VLA4]], ptr [[VLA_ADDR5]], align 4
2458 // CHECK19-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 4
2459 // CHECK19-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2460 // CHECK19-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
2461 // CHECK19-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR3]], align 4
2462 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[VLA_ADDR5]], align 4
2463 // CHECK19-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 4
2464 // CHECK19-NEXT: [[TMP4:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2465 // CHECK19-NEXT: [[TMP5:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2466 // CHECK19-NEXT: [[TMP6:%.*]] = load ptr, ptr [[A_ADDR]], align 4
2467 // CHECK19-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 8, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPe_l152.omp_outlined, ptr [[TMP4]], ptr [[N_ADDR]], i32 [[TMP0]], ptr [[TMP5]], ptr [[TMP6]], i32 [[TMP1]], i32 [[TMP2]], ptr [[TMP3]])
2468 // CHECK19-NEXT: ret void
2471 // CHECK19-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z10array_funcPfP2StiPe_l152.omp_outlined
2472 // CHECK19-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], ptr [[S:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], i32 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[A:%.*]], i32 [[VLA2:%.*]], i32 [[VLA4:%.*]], ptr nonnull align 4 dereferenceable(8) [[VLA26:%.*]]) #[[ATTR2]] {
2473 // CHECK19-NEXT: entry:
2474 // CHECK19-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
2475 // CHECK19-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
2476 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2477 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
2478 // CHECK19-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
2479 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2480 // CHECK19-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
2481 // CHECK19-NEXT: [[VLA_ADDR3:%.*]] = alloca i32, align 4
2482 // CHECK19-NEXT: [[VLA_ADDR5:%.*]] = alloca i32, align 4
2483 // CHECK19-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 4
2484 // CHECK19-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 4
2485 // CHECK19-NEXT: [[__VLA_EXPR0:%.*]] = alloca i32, align 4
2486 // CHECK19-NEXT: [[__VLA_EXPR1:%.*]] = alloca i32, align 4
2487 // CHECK19-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
2488 // CHECK19-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
2489 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2490 // CHECK19-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
2491 // CHECK19-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
2492 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2493 // CHECK19-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
2494 // CHECK19-NEXT: store i32 [[VLA2]], ptr [[VLA_ADDR3]], align 4
2495 // CHECK19-NEXT: store i32 [[VLA4]], ptr [[VLA_ADDR5]], align 4
2496 // CHECK19-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 4
2497 // CHECK19-NEXT: [[TMP0:%.*]] = load ptr, ptr [[N_ADDR]], align 4
2498 // CHECK19-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
2499 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[VLA_ADDR3]], align 4
2500 // CHECK19-NEXT: [[TMP3:%.*]] = load i32, ptr [[VLA_ADDR5]], align 4
2501 // CHECK19-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 4
2502 // CHECK19-NEXT: [[TMP5:%.*]] = call ptr @llvm.stacksave.p0()
2503 // CHECK19-NEXT: store ptr [[TMP5]], ptr [[SAVED_STACK]], align 4
2504 // CHECK19-NEXT: [[TMP6:%.*]] = mul nuw i32 [[TMP2]], [[TMP3]]
2505 // CHECK19-NEXT: [[VLA7:%.*]] = alloca double, i32 [[TMP6]], align 128
2506 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[__VLA_EXPR0]], align 4
2507 // CHECK19-NEXT: store i32 [[TMP3]], ptr [[__VLA_EXPR1]], align 4
2508 // CHECK19-NEXT: [[TMP7:%.*]] = mul nuw i32 [[TMP2]], [[TMP3]]
2509 // CHECK19-NEXT: [[TMP8:%.*]] = mul nuw i32 [[TMP7]], 8
2510 // CHECK19-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VLA7]], ptr align 128 [[TMP4]], i32 [[TMP8]], i1 false)
2511 // CHECK19-NEXT: [[TMP9:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2512 // CHECK19-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP9]], i32 0
2513 // CHECK19-NEXT: [[TMP10:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2514 // CHECK19-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP0]], align 4
2515 // CHECK19-NEXT: [[TMP12:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2516 // CHECK19-NEXT: call void @_ZN2St7St_funcEPS_iPe(ptr nonnull align 4 dereferenceable(8) [[ARRAYIDX]], ptr [[TMP10]], i32 [[TMP11]], ptr [[TMP12]])
2517 // CHECK19-NEXT: [[TMP13:%.*]] = load ptr, ptr [[SAVED_STACK]], align 4
2518 // CHECK19-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP13]])
2519 // CHECK19-NEXT: ret void
2522 // CHECK19-LABEL: define {{[^@]+}}@_ZN2St7St_funcEPS_iPe
2523 // CHECK19-SAME: (ptr nonnull align 4 dereferenceable(8) [[THIS:%.*]], ptr [[S:%.*]], i32 [[N:%.*]], ptr [[VLA1:%.*]]) #[[ATTR0]] comdat align 2 {
2524 // CHECK19-NEXT: entry:
2525 // CHECK19-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2526 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2527 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2528 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2529 // CHECK19-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 4
2530 // CHECK19-NEXT: [[__VLA_EXPR0:%.*]] = alloca i32, align 4
2531 // CHECK19-NEXT: [[__VLA_EXPR1:%.*]] = alloca i32, align 4
2532 // CHECK19-NEXT: [[N_CASTED:%.*]] = alloca i32, align 4
2533 // CHECK19-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [10 x ptr], align 4
2534 // CHECK19-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [10 x ptr], align 4
2535 // CHECK19-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [10 x ptr], align 4
2536 // CHECK19-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [10 x i64], align 4
2537 // CHECK19-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
2538 // CHECK19-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2539 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2540 // CHECK19-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2541 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2542 // CHECK19-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2543 // CHECK19-NEXT: [[TMP0:%.*]] = load i32, ptr [[N_ADDR]], align 4
2544 // CHECK19-NEXT: [[TMP1:%.*]] = load i32, ptr [[N_ADDR]], align 4
2545 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[N_ADDR]], align 4
2546 // CHECK19-NEXT: [[TMP3:%.*]] = call ptr @llvm.stacksave.p0()
2547 // CHECK19-NEXT: store ptr [[TMP3]], ptr [[SAVED_STACK]], align 4
2548 // CHECK19-NEXT: [[TMP4:%.*]] = mul nuw i32 [[TMP1]], [[TMP2]]
2549 // CHECK19-NEXT: [[VLA:%.*]] = alloca double, i32 [[TMP4]], align 128
2550 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[__VLA_EXPR0]], align 4
2551 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[__VLA_EXPR1]], align 4
2552 // CHECK19-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 1
2553 // CHECK19-NEXT: [[TMP5:%.*]] = load i32, ptr [[B]], align 4
2554 // CHECK19-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 0
2555 // CHECK19-NEXT: store i32 [[TMP5]], ptr [[A]], align 4
2556 // CHECK19-NEXT: [[TMP6:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2557 // CHECK19-NEXT: [[TMP7:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2558 // CHECK19-NEXT: [[TMP8:%.*]] = load i32, ptr [[N_ADDR]], align 4
2559 // CHECK19-NEXT: store i32 [[TMP8]], ptr [[N_CASTED]], align 4
2560 // CHECK19-NEXT: [[TMP9:%.*]] = load i32, ptr [[N_CASTED]], align 4
2561 // CHECK19-NEXT: [[TMP10:%.*]] = mul nuw i32 [[TMP1]], [[TMP2]]
2562 // CHECK19-NEXT: [[TMP11:%.*]] = mul nuw i32 [[TMP10]], 8
2563 // CHECK19-NEXT: [[TMP12:%.*]] = sext i32 [[TMP11]] to i64
2564 // CHECK19-NEXT: [[B2:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
2565 // CHECK19-NEXT: [[A3:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 0
2566 // CHECK19-NEXT: [[TMP13:%.*]] = getelementptr i32, ptr [[B2]], i32 1
2567 // CHECK19-NEXT: [[TMP14:%.*]] = ptrtoint ptr [[TMP13]] to i64
2568 // CHECK19-NEXT: [[TMP15:%.*]] = ptrtoint ptr [[A3]] to i64
2569 // CHECK19-NEXT: [[TMP16:%.*]] = sub i64 [[TMP14]], [[TMP15]]
2570 // CHECK19-NEXT: [[TMP17:%.*]] = sdiv exact i64 [[TMP16]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
2571 // CHECK19-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes.1, i32 80, i1 false)
2572 // CHECK19-NEXT: [[TMP18:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2573 // CHECK19-NEXT: store ptr [[TMP6]], ptr [[TMP18]], align 4
2574 // CHECK19-NEXT: [[TMP19:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2575 // CHECK19-NEXT: store ptr [[TMP6]], ptr [[TMP19]], align 4
2576 // CHECK19-NEXT: [[TMP20:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
2577 // CHECK19-NEXT: store ptr null, ptr [[TMP20]], align 4
2578 // CHECK19-NEXT: [[TMP21:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
2579 // CHECK19-NEXT: store i32 [[TMP0]], ptr [[TMP21]], align 4
2580 // CHECK19-NEXT: [[TMP22:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
2581 // CHECK19-NEXT: store i32 [[TMP0]], ptr [[TMP22]], align 4
2582 // CHECK19-NEXT: [[TMP23:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
2583 // CHECK19-NEXT: store ptr null, ptr [[TMP23]], align 4
2584 // CHECK19-NEXT: [[TMP24:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
2585 // CHECK19-NEXT: store ptr [[TMP7]], ptr [[TMP24]], align 4
2586 // CHECK19-NEXT: [[TMP25:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
2587 // CHECK19-NEXT: store ptr [[TMP7]], ptr [[TMP25]], align 4
2588 // CHECK19-NEXT: [[TMP26:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
2589 // CHECK19-NEXT: store ptr null, ptr [[TMP26]], align 4
2590 // CHECK19-NEXT: [[TMP27:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
2591 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[TMP27]], align 4
2592 // CHECK19-NEXT: [[TMP28:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
2593 // CHECK19-NEXT: store i32 [[TMP1]], ptr [[TMP28]], align 4
2594 // CHECK19-NEXT: [[TMP29:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
2595 // CHECK19-NEXT: store ptr null, ptr [[TMP29]], align 4
2596 // CHECK19-NEXT: [[TMP30:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
2597 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[TMP30]], align 4
2598 // CHECK19-NEXT: [[TMP31:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
2599 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[TMP31]], align 4
2600 // CHECK19-NEXT: [[TMP32:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
2601 // CHECK19-NEXT: store ptr null, ptr [[TMP32]], align 4
2602 // CHECK19-NEXT: [[TMP33:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
2603 // CHECK19-NEXT: store ptr [[VLA]], ptr [[TMP33]], align 4
2604 // CHECK19-NEXT: [[TMP34:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
2605 // CHECK19-NEXT: store ptr [[VLA]], ptr [[TMP34]], align 4
2606 // CHECK19-NEXT: [[TMP35:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 5
2607 // CHECK19-NEXT: store i64 [[TMP12]], ptr [[TMP35]], align 4
2608 // CHECK19-NEXT: [[TMP36:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5
2609 // CHECK19-NEXT: store ptr null, ptr [[TMP36]], align 4
2610 // CHECK19-NEXT: [[TMP37:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
2611 // CHECK19-NEXT: store ptr [[THIS1]], ptr [[TMP37]], align 4
2612 // CHECK19-NEXT: [[TMP38:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
2613 // CHECK19-NEXT: store ptr [[A3]], ptr [[TMP38]], align 4
2614 // CHECK19-NEXT: [[TMP39:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 6
2615 // CHECK19-NEXT: store i64 [[TMP17]], ptr [[TMP39]], align 4
2616 // CHECK19-NEXT: [[TMP40:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6
2617 // CHECK19-NEXT: store ptr null, ptr [[TMP40]], align 4
2618 // CHECK19-NEXT: [[TMP41:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 7
2619 // CHECK19-NEXT: store ptr [[THIS1]], ptr [[TMP41]], align 4
2620 // CHECK19-NEXT: [[TMP42:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 7
2621 // CHECK19-NEXT: store ptr [[B2]], ptr [[TMP42]], align 4
2622 // CHECK19-NEXT: [[TMP43:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 7
2623 // CHECK19-NEXT: store ptr null, ptr [[TMP43]], align 4
2624 // CHECK19-NEXT: [[TMP44:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 8
2625 // CHECK19-NEXT: store ptr [[THIS1]], ptr [[TMP44]], align 4
2626 // CHECK19-NEXT: [[TMP45:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 8
2627 // CHECK19-NEXT: store ptr [[A3]], ptr [[TMP45]], align 4
2628 // CHECK19-NEXT: [[TMP46:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 8
2629 // CHECK19-NEXT: store ptr null, ptr [[TMP46]], align 4
2630 // CHECK19-NEXT: [[TMP47:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 9
2631 // CHECK19-NEXT: store i32 [[TMP9]], ptr [[TMP47]], align 4
2632 // CHECK19-NEXT: [[TMP48:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 9
2633 // CHECK19-NEXT: store i32 [[TMP9]], ptr [[TMP48]], align 4
2634 // CHECK19-NEXT: [[TMP49:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 9
2635 // CHECK19-NEXT: store ptr null, ptr [[TMP49]], align 4
2636 // CHECK19-NEXT: [[TMP50:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
2637 // CHECK19-NEXT: [[TMP51:%.*]] = getelementptr inbounds [10 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
2638 // CHECK19-NEXT: [[TMP52:%.*]] = getelementptr inbounds [10 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
2639 // CHECK19-NEXT: [[TMP53:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
2640 // CHECK19-NEXT: store i32 3, ptr [[TMP53]], align 4
2641 // CHECK19-NEXT: [[TMP54:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
2642 // CHECK19-NEXT: store i32 10, ptr [[TMP54]], align 4
2643 // CHECK19-NEXT: [[TMP55:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
2644 // CHECK19-NEXT: store ptr [[TMP50]], ptr [[TMP55]], align 4
2645 // CHECK19-NEXT: [[TMP56:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
2646 // CHECK19-NEXT: store ptr [[TMP51]], ptr [[TMP56]], align 4
2647 // CHECK19-NEXT: [[TMP57:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
2648 // CHECK19-NEXT: store ptr [[TMP52]], ptr [[TMP57]], align 4
2649 // CHECK19-NEXT: [[TMP58:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
2650 // CHECK19-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP58]], align 4
2651 // CHECK19-NEXT: [[TMP59:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
2652 // CHECK19-NEXT: store ptr null, ptr [[TMP59]], align 4
2653 // CHECK19-NEXT: [[TMP60:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
2654 // CHECK19-NEXT: store ptr null, ptr [[TMP60]], align 4
2655 // CHECK19-NEXT: [[TMP61:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
2656 // CHECK19-NEXT: store i64 0, ptr [[TMP61]], align 8
2657 // CHECK19-NEXT: [[TMP62:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
2658 // CHECK19-NEXT: store i64 0, ptr [[TMP62]], align 8
2659 // CHECK19-NEXT: [[TMP63:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
2660 // CHECK19-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP63]], align 4
2661 // CHECK19-NEXT: [[TMP64:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
2662 // CHECK19-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP64]], align 4
2663 // CHECK19-NEXT: [[TMP65:%.*]] = getelementptr inbounds nuw [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
2664 // CHECK19-NEXT: store i32 0, ptr [[TMP65]], align 4
2665 // CHECK19-NEXT: [[TMP66:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 0, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPe_l144.region_id, ptr [[KERNEL_ARGS]])
2666 // CHECK19-NEXT: [[TMP67:%.*]] = icmp ne i32 [[TMP66]], 0
2667 // CHECK19-NEXT: br i1 [[TMP67]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
2668 // CHECK19: omp_offload.failed:
2669 // CHECK19-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPe_l144(ptr [[TMP6]], i32 [[TMP0]], ptr [[TMP7]], i32 [[TMP1]], i32 [[TMP2]], ptr [[VLA]], ptr [[THIS1]], i32 [[TMP9]]) #[[ATTR4]]
2670 // CHECK19-NEXT: br label [[OMP_OFFLOAD_CONT]]
2671 // CHECK19: omp_offload.cont:
2672 // CHECK19-NEXT: [[TMP68:%.*]] = load ptr, ptr [[SAVED_STACK]], align 4
2673 // CHECK19-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP68]])
2674 // CHECK19-NEXT: ret void
2677 // CHECK19-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPe_l144
2678 // CHECK19-SAME: (ptr [[S:%.*]], i32 [[VLA:%.*]], ptr [[VLA1:%.*]], i32 [[VLA2:%.*]], i32 [[VLA4:%.*]], ptr nonnull align 4 dereferenceable(8) [[VLA26:%.*]], ptr [[THIS:%.*]], i32 [[N:%.*]]) #[[ATTR2]] {
2679 // CHECK19-NEXT: entry:
2680 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2681 // CHECK19-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
2682 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2683 // CHECK19-NEXT: [[VLA_ADDR3:%.*]] = alloca i32, align 4
2684 // CHECK19-NEXT: [[VLA_ADDR5:%.*]] = alloca i32, align 4
2685 // CHECK19-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 4
2686 // CHECK19-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2687 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca i32, align 4
2688 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2689 // CHECK19-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
2690 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2691 // CHECK19-NEXT: store i32 [[VLA2]], ptr [[VLA_ADDR3]], align 4
2692 // CHECK19-NEXT: store i32 [[VLA4]], ptr [[VLA_ADDR5]], align 4
2693 // CHECK19-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 4
2694 // CHECK19-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2695 // CHECK19-NEXT: store i32 [[N]], ptr [[N_ADDR]], align 4
2696 // CHECK19-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
2697 // CHECK19-NEXT: [[TMP1:%.*]] = load i32, ptr [[VLA_ADDR3]], align 4
2698 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[VLA_ADDR5]], align 4
2699 // CHECK19-NEXT: [[TMP3:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 4
2700 // CHECK19-NEXT: [[TMP4:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2701 // CHECK19-NEXT: [[TMP5:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2702 // CHECK19-NEXT: [[TMP6:%.*]] = load ptr, ptr [[S_ADDR]], align 4
2703 // CHECK19-NEXT: call void (ptr, i32, ptr, ...) @__kmpc_fork_teams(ptr @[[GLOB1]], i32 8, ptr @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPe_l144.omp_outlined, i32 [[TMP0]], ptr [[TMP5]], ptr [[TMP4]], i32 [[TMP1]], i32 [[TMP2]], ptr [[TMP3]], ptr [[N_ADDR]], ptr [[TMP6]])
2704 // CHECK19-NEXT: ret void
2707 // CHECK19-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2St7St_funcEPS_iPe_l144.omp_outlined
2708 // CHECK19-SAME: (ptr noalias [[DOTGLOBAL_TID_:%.*]], ptr noalias [[DOTBOUND_TID_:%.*]], i32 [[VLA:%.*]], ptr [[VLA1:%.*]], ptr [[THIS:%.*]], i32 [[VLA2:%.*]], i32 [[VLA4:%.*]], ptr nonnull align 4 dereferenceable(8) [[VLA26:%.*]], ptr nonnull align 4 dereferenceable(4) [[N:%.*]], ptr [[S:%.*]]) #[[ATTR2]] {
2709 // CHECK19-NEXT: entry:
2710 // CHECK19-NEXT: [[DOTGLOBAL_TID__ADDR:%.*]] = alloca ptr, align 4
2711 // CHECK19-NEXT: [[DOTBOUND_TID__ADDR:%.*]] = alloca ptr, align 4
2712 // CHECK19-NEXT: [[VLA_ADDR:%.*]] = alloca i32, align 4
2713 // CHECK19-NEXT: [[VLA1_ADDR:%.*]] = alloca ptr, align 4
2714 // CHECK19-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
2715 // CHECK19-NEXT: [[VLA_ADDR3:%.*]] = alloca i32, align 4
2716 // CHECK19-NEXT: [[VLA_ADDR5:%.*]] = alloca i32, align 4
2717 // CHECK19-NEXT: [[VLA2_ADDR:%.*]] = alloca ptr, align 4
2718 // CHECK19-NEXT: [[N_ADDR:%.*]] = alloca ptr, align 4
2719 // CHECK19-NEXT: [[S_ADDR:%.*]] = alloca ptr, align 4
2720 // CHECK19-NEXT: [[SAVED_STACK:%.*]] = alloca ptr, align 4
2721 // CHECK19-NEXT: [[__VLA_EXPR0:%.*]] = alloca i32, align 4
2722 // CHECK19-NEXT: [[__VLA_EXPR1:%.*]] = alloca i32, align 4
2723 // CHECK19-NEXT: store ptr [[DOTGLOBAL_TID_]], ptr [[DOTGLOBAL_TID__ADDR]], align 4
2724 // CHECK19-NEXT: store ptr [[DOTBOUND_TID_]], ptr [[DOTBOUND_TID__ADDR]], align 4
2725 // CHECK19-NEXT: store i32 [[VLA]], ptr [[VLA_ADDR]], align 4
2726 // CHECK19-NEXT: store ptr [[VLA1]], ptr [[VLA1_ADDR]], align 4
2727 // CHECK19-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
2728 // CHECK19-NEXT: store i32 [[VLA2]], ptr [[VLA_ADDR3]], align 4
2729 // CHECK19-NEXT: store i32 [[VLA4]], ptr [[VLA_ADDR5]], align 4
2730 // CHECK19-NEXT: store ptr [[VLA26]], ptr [[VLA2_ADDR]], align 4
2731 // CHECK19-NEXT: store ptr [[N]], ptr [[N_ADDR]], align 4
2732 // CHECK19-NEXT: store ptr [[S]], ptr [[S_ADDR]], align 4
2733 // CHECK19-NEXT: [[TMP0:%.*]] = load i32, ptr [[VLA_ADDR]], align 4
2734 // CHECK19-NEXT: [[TMP1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
2735 // CHECK19-NEXT: [[TMP2:%.*]] = load i32, ptr [[VLA_ADDR3]], align 4
2736 // CHECK19-NEXT: [[TMP3:%.*]] = load i32, ptr [[VLA_ADDR5]], align 4
2737 // CHECK19-NEXT: [[TMP4:%.*]] = load ptr, ptr [[VLA2_ADDR]], align 4
2738 // CHECK19-NEXT: [[TMP5:%.*]] = load ptr, ptr [[N_ADDR]], align 4
2739 // CHECK19-NEXT: [[TMP6:%.*]] = call ptr @llvm.stacksave.p0()
2740 // CHECK19-NEXT: store ptr [[TMP6]], ptr [[SAVED_STACK]], align 4
2741 // CHECK19-NEXT: [[TMP7:%.*]] = mul nuw i32 [[TMP2]], [[TMP3]]
2742 // CHECK19-NEXT: [[VLA7:%.*]] = alloca double, i32 [[TMP7]], align 128
2743 // CHECK19-NEXT: store i32 [[TMP2]], ptr [[__VLA_EXPR0]], align 4
2744 // CHECK19-NEXT: store i32 [[TMP3]], ptr [[__VLA_EXPR1]], align 4
2745 // CHECK19-NEXT: [[TMP8:%.*]] = mul nuw i32 [[TMP2]], [[TMP3]]
2746 // CHECK19-NEXT: [[TMP9:%.*]] = mul nuw i32 [[TMP8]], 8
2747 // CHECK19-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 128 [[VLA7]], ptr align 128 [[TMP4]], i32 [[TMP9]], i1 false)
2748 // CHECK19-NEXT: [[B:%.*]] = getelementptr inbounds nuw [[STRUCT_ST:%.*]], ptr [[TMP1]], i32 0, i32 1
2749 // CHECK19-NEXT: [[TMP10:%.*]] = load i32, ptr [[B]], align 4
2750 // CHECK19-NEXT: [[A:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 0
2751 // CHECK19-NEXT: store i32 [[TMP10]], ptr [[A]], align 4
2752 // CHECK19-NEXT: [[CONV:%.*]] = sitofp i32 [[TMP10]] to double
2753 // CHECK19-NEXT: [[TMP11:%.*]] = mul nsw i32 1, [[TMP3]]
2754 // CHECK19-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds double, ptr [[VLA7]], i32 [[TMP11]]
2755 // CHECK19-NEXT: [[TMP12:%.*]] = load i32, ptr [[TMP5]], align 4
2756 // CHECK19-NEXT: [[SUB:%.*]] = sub nsw i32 [[TMP12]], 1
2757 // CHECK19-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds double, ptr [[ARRAYIDX]], i32 [[SUB]]
2758 // CHECK19-NEXT: store double [[CONV]], ptr [[ARRAYIDX8]], align 8
2759 // CHECK19-NEXT: [[CONV9:%.*]] = fpext double [[CONV]] to x86_fp80
2760 // CHECK19-NEXT: [[TMP13:%.*]] = load ptr, ptr [[VLA1_ADDR]], align 4
2761 // CHECK19-NEXT: [[B10:%.*]] = getelementptr inbounds nuw [[STRUCT_ST]], ptr [[TMP1]], i32 0, i32 1
2762 // CHECK19-NEXT: [[TMP14:%.*]] = load i32, ptr [[B10]], align 4
2763 // CHECK19-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds x86_fp80, ptr [[TMP13]], i32 [[TMP14]]
2764 // CHECK19-NEXT: store x86_fp80 [[CONV9]], ptr [[ARRAYIDX11]], align 4
2765 // CHECK19-NEXT: [[TMP15:%.*]] = load ptr, ptr [[SAVED_STACK]], align 4
2766 // CHECK19-NEXT: call void @llvm.stackrestore.p0(ptr [[TMP15]])
2767 // CHECK19-NEXT: ret void