Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / target_map_codegen_hold.cpp
bloba0732d5608a9aa028bb3b1fa71abe0e98816e18f
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-globals --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" --prefix-filecheck-ir-name _ --global-value-regex ".offload_maptypes.*" ".offload_sizes.*" --global-hex-value-regex ".offload_maptypes.*"
2 // expected-no-diagnostics
3 #ifndef HEADER
4 #define HEADER
6 //--------------------------------------------------
7 // With -DUSE.
8 //--------------------------------------------------
10 // powerpc64le-ibm-linux-gnu
12 // RUN: %clang_cc1 -DUSE -verify -fopenmp -fopenmp-extensions \
13 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \
14 // RUN: -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | \
15 // RUN: FileCheck %s --check-prefixes=CHECK-USE-PPC64LE
16 // RUN: %clang_cc1 -DUSE -fopenmp -fopenmp-extensions \
17 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 \
18 // RUN: -triple powerpc64le-unknown-unknown -emit-pch -o %t %s
19 // RUN: %clang_cc1 -DUSE -fopenmp -fopenmp-extensions \
20 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \
21 // RUN: -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t \
22 // RUN: -verify %s -emit-llvm -o - | \
23 // RUN: FileCheck %s --check-prefixes=CHECK-USE-PPC64LE
25 // i386-pc-linux-gnu
27 // RUN: %clang_cc1 -DUSE -verify -fopenmp -fopenmp-extensions \
28 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \
29 // RUN: -triple i386-unknown-unknown -emit-llvm %s -o - | \
30 // RUN: FileCheck %s --check-prefixes=CHECK-USE-I386
31 // RUN: %clang_cc1 -DUSE -fopenmp -fopenmp-extensions \
32 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 \
33 // RUN: -triple i386-unknown-unknown -emit-pch -o %t %s
34 // RUN: %clang_cc1 -DUSE -fopenmp -fopenmp-extensions \
35 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \
36 // RUN: -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s \
37 // RUN: -emit-llvm -o - | \
38 // RUN: FileCheck %s --check-prefixes=CHECK-USE-I386
40 //--------------------------------------------------
41 // Without -DUSE.
42 //--------------------------------------------------
44 // powerpc64le-ibm-linux-gnu
46 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-extensions \
47 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \
48 // RUN: -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | \
49 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-PPC64LE
50 // RUN: %clang_cc1 -fopenmp -fopenmp-extensions \
51 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 \
52 // RUN: -triple powerpc64le-unknown-unknown -emit-pch -o %t %s
53 // RUN: %clang_cc1 -fopenmp -fopenmp-extensions \
54 // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ \
55 // RUN: -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t \
56 // RUN: -verify %s -emit-llvm -o - | \
57 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-PPC64LE
59 // i386-pc-linux-gnu
61 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-extensions \
62 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \
63 // RUN: -triple i386-unknown-unknown -emit-llvm %s -o - | \
64 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-I386
65 // RUN: %clang_cc1 -fopenmp -fopenmp-extensions \
66 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 \
67 // RUN: -triple i386-unknown-unknown -emit-pch -o %t %s
68 // RUN: %clang_cc1 -fopenmp -fopenmp-extensions \
69 // RUN: -fopenmp-targets=i386-pc-linux-gnu -x c++ \
70 // RUN: -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s \
71 // RUN: -emit-llvm -o - | \
72 // RUN: FileCheck %s --check-prefixes=CHECK-NOUSE-I386
74 // Map flags used in @.offload_maptypes* below:
75 // TO = 0x1
76 // FROM = 0x2
77 // ALWAYS = 0x4
78 // TARGET_PARAM = 0x20
79 // CLOSE = 0x400
80 // OMPX_HOLD = 0x2000
81 // MEMBER_OF_1 = 0x1000000000000
82 // MEMBER_OF_5 = 0x5000000000000
84 struct ST {
85 int i;
86 int j;
87 void test_present_members();
90 void explicit_maps_single(int ii) {
92 // Map of a scalar.
93 int a = ii;
95 struct ST st1;
96 struct ST st2;
98 // Make sure the struct picks up ompx_hold even if another element of the
99 // struct doesn't have ompx_hold.
100 #pragma omp target map(tofrom : st1.i) \
101 map(ompx_hold, tofrom : a, st1.j, st2.i) \
102 map(tofrom : st2.j)
104 #ifdef USE
105 st1.i++;
106 a++;
107 st1.j++;
108 st2.i++;
109 st2.j++;
110 #endif
113 // Always Close Hold.
114 #pragma omp target map(always close ompx_hold tofrom: a)
116 #ifdef USE
117 a++;
118 #endif
122 void ST::test_present_members() {
123 // Make sure the struct picks up ompx_hold even if another element of the
124 // struct doesn't have ompx_hold.
125 #pragma omp target map(tofrom : i) map(ompx_hold, tofrom : j)
127 #ifdef USE
128 i++;
129 j++;
130 #endif
134 #endif
136 // CHECK-USE-PPC64LE: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4]
137 // CHECK-USE-PPC64LE: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2023]], i64 [[#0x2020]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]]
138 // CHECK-USE-PPC64LE: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4]
139 // CHECK-USE-PPC64LE: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2427]]]
140 // CHECK-USE-PPC64LE: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4]
141 // CHECK-USE-PPC64LE: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]]
143 // CHECK-USE-I386: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4]
144 // CHECK-USE-I386: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2023]], i64 [[#0x2020]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]]
145 // CHECK-USE-I386: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4]
146 // CHECK-USE-I386: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2427]]]
147 // CHECK-USE-I386: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4]
148 // CHECK-USE-I386: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2020]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]]
150 // CHECK-NOUSE-PPC64LE: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4]
151 // CHECK-NOUSE-PPC64LE: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2003]], i64 [[#0x2000]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]]
152 // CHECK-NOUSE-PPC64LE: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4]
153 // CHECK-NOUSE-PPC64LE: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2407]]]
154 // CHECK-NOUSE-PPC64LE: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4]
155 // CHECK-NOUSE-PPC64LE: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]]
157 // CHECK-NOUSE-I386: @.offload_sizes = private unnamed_addr constant [7 x i64] [i64 0, i64 4, i64 4, i64 4, i64 0, i64 4, i64 4]
158 // CHECK-NOUSE-I386: @.offload_maptypes = private unnamed_addr constant [7 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]], i64 [[#0x2003]], i64 [[#0x2000]], i64 [[#0x5000000002003]], i64 [[#0x5000000002003]]]
159 // CHECK-NOUSE-I386: @.offload_sizes.1 = private unnamed_addr constant [1 x i64] [i64 4]
160 // CHECK-NOUSE-I386: @.offload_maptypes.2 = private unnamed_addr constant [1 x i64] [i64 [[#0x2407]]]
161 // CHECK-NOUSE-I386: @.offload_sizes.3 = private unnamed_addr constant [3 x i64] [i64 0, i64 4, i64 4]
162 // CHECK-NOUSE-I386: @.offload_maptypes.4 = private unnamed_addr constant [3 x i64] [i64 [[#0x2000]], i64 [[#0x1000000002003]], i64 [[#0x1000000002003]]]
164 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@_Z20explicit_maps_singlei
165 // CHECK-USE-PPC64LE-SAME: (i32 noundef signext [[II:%.*]]) #[[ATTR0:[0-9]+]] {
166 // CHECK-USE-PPC64LE-NEXT: entry:
167 // CHECK-USE-PPC64LE-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4
168 // CHECK-USE-PPC64LE-NEXT: [[A:%.*]] = alloca i32, align 4
169 // CHECK-USE-PPC64LE-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
170 // CHECK-USE-PPC64LE-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4
171 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x ptr], align 8
172 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x ptr], align 8
173 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x ptr], align 8
174 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 8
175 // CHECK-USE-PPC64LE-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
176 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 8
177 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 8
178 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 8
179 // CHECK-USE-PPC64LE-NEXT: [[KERNEL_ARGS6:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
180 // CHECK-USE-PPC64LE-NEXT: store i32 [[II]], ptr [[II_ADDR]], align 4
181 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = load i32, ptr [[II_ADDR]], align 4
182 // CHECK-USE-PPC64LE-NEXT: store i32 [[TMP0]], ptr [[A]], align 4
183 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 0
184 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 1
185 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = getelementptr i32, ptr [[J]], i32 1
186 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[TMP1]] to i64
187 // CHECK-USE-PPC64LE-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[I]] to i64
188 // CHECK-USE-PPC64LE-NEXT: [[TMP4:%.*]] = sub i64 [[TMP2]], [[TMP3]]
189 // CHECK-USE-PPC64LE-NEXT: [[TMP5:%.*]] = sdiv exact i64 [[TMP4]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
190 // CHECK-USE-PPC64LE-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 0
191 // CHECK-USE-PPC64LE-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 1
192 // CHECK-USE-PPC64LE-NEXT: [[TMP6:%.*]] = getelementptr i32, ptr [[J2]], i32 1
193 // CHECK-USE-PPC64LE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64
194 // CHECK-USE-PPC64LE-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[I1]] to i64
195 // CHECK-USE-PPC64LE-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
196 // CHECK-USE-PPC64LE-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
197 // CHECK-USE-PPC64LE-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes, i64 56, i1 false)
198 // CHECK-USE-PPC64LE-NEXT: [[TMP11:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
199 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP11]], align 8
200 // CHECK-USE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
201 // CHECK-USE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP12]], align 8
202 // CHECK-USE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
203 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP5]], ptr [[TMP13]], align 8
204 // CHECK-USE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
205 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP14]], align 8
206 // CHECK-USE-PPC64LE-NEXT: [[TMP15:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
207 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP15]], align 8
208 // CHECK-USE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
209 // CHECK-USE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP16]], align 8
210 // CHECK-USE-PPC64LE-NEXT: [[TMP17:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
211 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP17]], align 8
212 // CHECK-USE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
213 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP18]], align 8
214 // CHECK-USE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
215 // CHECK-USE-PPC64LE-NEXT: store ptr [[J]], ptr [[TMP19]], align 8
216 // CHECK-USE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
217 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP20]], align 8
218 // CHECK-USE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
219 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP21]], align 8
220 // CHECK-USE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
221 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP22]], align 8
222 // CHECK-USE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
223 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP23]], align 8
224 // CHECK-USE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
225 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP24]], align 8
226 // CHECK-USE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
227 // CHECK-USE-PPC64LE-NEXT: store ptr [[I1]], ptr [[TMP25]], align 8
228 // CHECK-USE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 4
229 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP10]], ptr [[TMP26]], align 8
230 // CHECK-USE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
231 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP27]], align 8
232 // CHECK-USE-PPC64LE-NEXT: [[TMP28:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
233 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP28]], align 8
234 // CHECK-USE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
235 // CHECK-USE-PPC64LE-NEXT: store ptr [[I1]], ptr [[TMP29]], align 8
236 // CHECK-USE-PPC64LE-NEXT: [[TMP30:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5
237 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP30]], align 8
238 // CHECK-USE-PPC64LE-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
239 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP31]], align 8
240 // CHECK-USE-PPC64LE-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
241 // CHECK-USE-PPC64LE-NEXT: store ptr [[J2]], ptr [[TMP32]], align 8
242 // CHECK-USE-PPC64LE-NEXT: [[TMP33:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6
243 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP33]], align 8
244 // CHECK-USE-PPC64LE-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
245 // CHECK-USE-PPC64LE-NEXT: [[TMP35:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
246 // CHECK-USE-PPC64LE-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
247 // CHECK-USE-PPC64LE-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
248 // CHECK-USE-PPC64LE-NEXT: store i32 2, ptr [[TMP37]], align 4
249 // CHECK-USE-PPC64LE-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
250 // CHECK-USE-PPC64LE-NEXT: store i32 7, ptr [[TMP38]], align 4
251 // CHECK-USE-PPC64LE-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
252 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP34]], ptr [[TMP39]], align 8
253 // CHECK-USE-PPC64LE-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
254 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP35]], ptr [[TMP40]], align 8
255 // CHECK-USE-PPC64LE-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
256 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP36]], ptr [[TMP41]], align 8
257 // CHECK-USE-PPC64LE-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
258 // CHECK-USE-PPC64LE-NEXT: store ptr @.offload_maptypes, ptr [[TMP42]], align 8
259 // CHECK-USE-PPC64LE-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
260 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP43]], align 8
261 // CHECK-USE-PPC64LE-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
262 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP44]], align 8
263 // CHECK-USE-PPC64LE-NEXT: [[TMP45:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
264 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP45]], align 8
265 // CHECK-USE-PPC64LE-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
266 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP46]], align 8
267 // CHECK-USE-PPC64LE-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
268 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP47]], align 4
269 // CHECK-USE-PPC64LE-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
270 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
271 // CHECK-USE-PPC64LE-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
272 // CHECK-USE-PPC64LE-NEXT: store i32 0, ptr [[TMP49]], align 4
273 // CHECK-USE-PPC64LE-NEXT: [[TMP50:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100.region_id, ptr [[KERNEL_ARGS]])
274 // CHECK-USE-PPC64LE-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
275 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP51]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
276 // CHECK-USE-PPC64LE: omp_offload.failed:
277 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100(ptr [[ST1]], ptr [[A]], ptr [[ST2]]) #[[ATTR3:[0-9]+]]
278 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]]
279 // CHECK-USE-PPC64LE: omp_offload.cont:
280 // CHECK-USE-PPC64LE-NEXT: [[TMP52:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
281 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP52]], align 8
282 // CHECK-USE-PPC64LE-NEXT: [[TMP53:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
283 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP53]], align 8
284 // CHECK-USE-PPC64LE-NEXT: [[TMP54:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i64 0, i64 0
285 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP54]], align 8
286 // CHECK-USE-PPC64LE-NEXT: [[TMP55:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
287 // CHECK-USE-PPC64LE-NEXT: [[TMP56:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
288 // CHECK-USE-PPC64LE-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 0
289 // CHECK-USE-PPC64LE-NEXT: store i32 2, ptr [[TMP57]], align 4
290 // CHECK-USE-PPC64LE-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 1
291 // CHECK-USE-PPC64LE-NEXT: store i32 1, ptr [[TMP58]], align 4
292 // CHECK-USE-PPC64LE-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 2
293 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP55]], ptr [[TMP59]], align 8
294 // CHECK-USE-PPC64LE-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 3
295 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP56]], ptr [[TMP60]], align 8
296 // CHECK-USE-PPC64LE-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 4
297 // CHECK-USE-PPC64LE-NEXT: store ptr @.offload_sizes.1, ptr [[TMP61]], align 8
298 // CHECK-USE-PPC64LE-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 5
299 // CHECK-USE-PPC64LE-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP62]], align 8
300 // CHECK-USE-PPC64LE-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 6
301 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP63]], align 8
302 // CHECK-USE-PPC64LE-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 7
303 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP64]], align 8
304 // CHECK-USE-PPC64LE-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 8
305 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP65]], align 8
306 // CHECK-USE-PPC64LE-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 9
307 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP66]], align 8
308 // CHECK-USE-PPC64LE-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 10
309 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP67]], align 4
310 // CHECK-USE-PPC64LE-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 11
311 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP68]], align 4
312 // CHECK-USE-PPC64LE-NEXT: [[TMP69:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 12
313 // CHECK-USE-PPC64LE-NEXT: store i32 0, ptr [[TMP69]], align 4
314 // CHECK-USE-PPC64LE-NEXT: [[TMP70:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114.region_id, ptr [[KERNEL_ARGS6]])
315 // CHECK-USE-PPC64LE-NEXT: [[TMP71:%.*]] = icmp ne i32 [[TMP70]], 0
316 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP71]], label [[OMP_OFFLOAD_FAILED7:%.*]], label [[OMP_OFFLOAD_CONT8:%.*]]
317 // CHECK-USE-PPC64LE: omp_offload.failed7:
318 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114(ptr [[A]]) #[[ATTR3]]
319 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT8]]
320 // CHECK-USE-PPC64LE: omp_offload.cont8:
321 // CHECK-USE-PPC64LE-NEXT: ret void
324 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100
325 // CHECK-USE-PPC64LE-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[ST1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[ST2:%.*]]) #[[ATTR1:[0-9]+]] {
326 // CHECK-USE-PPC64LE-NEXT: entry:
327 // CHECK-USE-PPC64LE-NEXT: [[ST1_ADDR:%.*]] = alloca ptr, align 8
328 // CHECK-USE-PPC64LE-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
329 // CHECK-USE-PPC64LE-NEXT: [[ST2_ADDR:%.*]] = alloca ptr, align 8
330 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[ST1_ADDR]], align 8
331 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
332 // CHECK-USE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[ST2_ADDR]], align 8
333 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = load ptr, ptr [[ST1_ADDR]], align 8
334 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8
335 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = load ptr, ptr [[ST2_ADDR]], align 8
336 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP0]], i32 0, i32 0
337 // CHECK-USE-PPC64LE-NEXT: [[TMP3:%.*]] = load i32, ptr [[I]], align 4
338 // CHECK-USE-PPC64LE-NEXT: [[INC:%.*]] = add nsw i32 [[TMP3]], 1
339 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC]], ptr [[I]], align 4
340 // CHECK-USE-PPC64LE-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP1]], align 4
341 // CHECK-USE-PPC64LE-NEXT: [[INC1:%.*]] = add nsw i32 [[TMP4]], 1
342 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC1]], ptr [[TMP1]], align 4
343 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP0]], i32 0, i32 1
344 // CHECK-USE-PPC64LE-NEXT: [[TMP5:%.*]] = load i32, ptr [[J]], align 4
345 // CHECK-USE-PPC64LE-NEXT: [[INC2:%.*]] = add nsw i32 [[TMP5]], 1
346 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC2]], ptr [[J]], align 4
347 // CHECK-USE-PPC64LE-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP2]], i32 0, i32 0
348 // CHECK-USE-PPC64LE-NEXT: [[TMP6:%.*]] = load i32, ptr [[I3]], align 4
349 // CHECK-USE-PPC64LE-NEXT: [[INC4:%.*]] = add nsw i32 [[TMP6]], 1
350 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC4]], ptr [[I3]], align 4
351 // CHECK-USE-PPC64LE-NEXT: [[J5:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP2]], i32 0, i32 1
352 // CHECK-USE-PPC64LE-NEXT: [[TMP7:%.*]] = load i32, ptr [[J5]], align 4
353 // CHECK-USE-PPC64LE-NEXT: [[INC6:%.*]] = add nsw i32 [[TMP7]], 1
354 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC6]], ptr [[J5]], align 4
355 // CHECK-USE-PPC64LE-NEXT: ret void
358 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114
359 // CHECK-USE-PPC64LE-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1]] {
360 // CHECK-USE-PPC64LE-NEXT: entry:
361 // CHECK-USE-PPC64LE-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8
362 // CHECK-USE-PPC64LE-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8
363 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
364 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
365 // CHECK-USE-PPC64LE-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
366 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC]], ptr [[TMP0]], align 4
367 // CHECK-USE-PPC64LE-NEXT: ret void
370 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@_ZN2ST20test_present_membersEv
371 // CHECK-USE-PPC64LE-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
372 // CHECK-USE-PPC64LE-NEXT: entry:
373 // CHECK-USE-PPC64LE-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
374 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 8
375 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 8
376 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 8
377 // CHECK-USE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 8
378 // CHECK-USE-PPC64LE-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
379 // CHECK-USE-PPC64LE-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
380 // CHECK-USE-PPC64LE-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
381 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
382 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
383 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = getelementptr i32, ptr [[J]], i32 1
384 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[TMP0]] to i64
385 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[I]] to i64
386 // CHECK-USE-PPC64LE-NEXT: [[TMP3:%.*]] = sub i64 [[TMP1]], [[TMP2]]
387 // CHECK-USE-PPC64LE-NEXT: [[TMP4:%.*]] = sdiv exact i64 [[TMP3]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
388 // CHECK-USE-PPC64LE-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes.3, i64 24, i1 false)
389 // CHECK-USE-PPC64LE-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
390 // CHECK-USE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP5]], align 8
391 // CHECK-USE-PPC64LE-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
392 // CHECK-USE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP6]], align 8
393 // CHECK-USE-PPC64LE-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
394 // CHECK-USE-PPC64LE-NEXT: store i64 [[TMP4]], ptr [[TMP7]], align 8
395 // CHECK-USE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
396 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP8]], align 8
397 // CHECK-USE-PPC64LE-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
398 // CHECK-USE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP9]], align 8
399 // CHECK-USE-PPC64LE-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
400 // CHECK-USE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP10]], align 8
401 // CHECK-USE-PPC64LE-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
402 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP11]], align 8
403 // CHECK-USE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
404 // CHECK-USE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP12]], align 8
405 // CHECK-USE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
406 // CHECK-USE-PPC64LE-NEXT: store ptr [[J]], ptr [[TMP13]], align 8
407 // CHECK-USE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
408 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP14]], align 8
409 // CHECK-USE-PPC64LE-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
410 // CHECK-USE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
411 // CHECK-USE-PPC64LE-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
412 // CHECK-USE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
413 // CHECK-USE-PPC64LE-NEXT: store i32 2, ptr [[TMP18]], align 4
414 // CHECK-USE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
415 // CHECK-USE-PPC64LE-NEXT: store i32 3, ptr [[TMP19]], align 4
416 // CHECK-USE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
417 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP15]], ptr [[TMP20]], align 8
418 // CHECK-USE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
419 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP16]], ptr [[TMP21]], align 8
420 // CHECK-USE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
421 // CHECK-USE-PPC64LE-NEXT: store ptr [[TMP17]], ptr [[TMP22]], align 8
422 // CHECK-USE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
423 // CHECK-USE-PPC64LE-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP23]], align 8
424 // CHECK-USE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
425 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP24]], align 8
426 // CHECK-USE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
427 // CHECK-USE-PPC64LE-NEXT: store ptr null, ptr [[TMP25]], align 8
428 // CHECK-USE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
429 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP26]], align 8
430 // CHECK-USE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
431 // CHECK-USE-PPC64LE-NEXT: store i64 0, ptr [[TMP27]], align 8
432 // CHECK-USE-PPC64LE-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
433 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP28]], align 4
434 // CHECK-USE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
435 // CHECK-USE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP29]], align 4
436 // CHECK-USE-PPC64LE-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
437 // CHECK-USE-PPC64LE-NEXT: store i32 0, ptr [[TMP30]], align 4
438 // CHECK-USE-PPC64LE-NEXT: [[TMP31:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125.region_id, ptr [[KERNEL_ARGS]])
439 // CHECK-USE-PPC64LE-NEXT: [[TMP32:%.*]] = icmp ne i32 [[TMP31]], 0
440 // CHECK-USE-PPC64LE-NEXT: br i1 [[TMP32]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
441 // CHECK-USE-PPC64LE: omp_offload.failed:
442 // CHECK-USE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125(ptr [[THIS1]]) #[[ATTR3]]
443 // CHECK-USE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]]
444 // CHECK-USE-PPC64LE: omp_offload.cont:
445 // CHECK-USE-PPC64LE-NEXT: ret void
448 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125
449 // CHECK-USE-PPC64LE-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
450 // CHECK-USE-PPC64LE-NEXT: entry:
451 // CHECK-USE-PPC64LE-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
452 // CHECK-USE-PPC64LE-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
453 // CHECK-USE-PPC64LE-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
454 // CHECK-USE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP0]], i32 0, i32 0
455 // CHECK-USE-PPC64LE-NEXT: [[TMP1:%.*]] = load i32, ptr [[I]], align 4
456 // CHECK-USE-PPC64LE-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
457 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC]], ptr [[I]], align 4
458 // CHECK-USE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP0]], i32 0, i32 1
459 // CHECK-USE-PPC64LE-NEXT: [[TMP2:%.*]] = load i32, ptr [[J]], align 4
460 // CHECK-USE-PPC64LE-NEXT: [[INC1:%.*]] = add nsw i32 [[TMP2]], 1
461 // CHECK-USE-PPC64LE-NEXT: store i32 [[INC1]], ptr [[J]], align 4
462 // CHECK-USE-PPC64LE-NEXT: ret void
465 // CHECK-USE-PPC64LE-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
466 // CHECK-USE-PPC64LE-SAME: () #[[ATTR4:[0-9]+]] {
467 // CHECK-USE-PPC64LE-NEXT: entry:
468 // CHECK-USE-PPC64LE-NEXT: call void @__tgt_register_requires(i64 1)
469 // CHECK-USE-PPC64LE-NEXT: ret void
472 // CHECK-USE-I386-LABEL: define {{[^@]+}}@_Z20explicit_maps_singlei
473 // CHECK-USE-I386-SAME: (i32 noundef [[II:%.*]]) #[[ATTR0:[0-9]+]] {
474 // CHECK-USE-I386-NEXT: entry:
475 // CHECK-USE-I386-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4
476 // CHECK-USE-I386-NEXT: [[A:%.*]] = alloca i32, align 4
477 // CHECK-USE-I386-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
478 // CHECK-USE-I386-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4
479 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x ptr], align 4
480 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x ptr], align 4
481 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x ptr], align 4
482 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 4
483 // CHECK-USE-I386-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
484 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 4
485 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 4
486 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 4
487 // CHECK-USE-I386-NEXT: [[KERNEL_ARGS6:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
488 // CHECK-USE-I386-NEXT: store i32 [[II]], ptr [[II_ADDR]], align 4
489 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = load i32, ptr [[II_ADDR]], align 4
490 // CHECK-USE-I386-NEXT: store i32 [[TMP0]], ptr [[A]], align 4
491 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 0
492 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 1
493 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = getelementptr i32, ptr [[J]], i32 1
494 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[TMP1]] to i64
495 // CHECK-USE-I386-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[I]] to i64
496 // CHECK-USE-I386-NEXT: [[TMP4:%.*]] = sub i64 [[TMP2]], [[TMP3]]
497 // CHECK-USE-I386-NEXT: [[TMP5:%.*]] = sdiv exact i64 [[TMP4]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
498 // CHECK-USE-I386-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 0
499 // CHECK-USE-I386-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 1
500 // CHECK-USE-I386-NEXT: [[TMP6:%.*]] = getelementptr i32, ptr [[J2]], i32 1
501 // CHECK-USE-I386-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64
502 // CHECK-USE-I386-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[I1]] to i64
503 // CHECK-USE-I386-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
504 // CHECK-USE-I386-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
505 // CHECK-USE-I386-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes, i32 56, i1 false)
506 // CHECK-USE-I386-NEXT: [[TMP11:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
507 // CHECK-USE-I386-NEXT: store ptr [[ST1]], ptr [[TMP11]], align 4
508 // CHECK-USE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
509 // CHECK-USE-I386-NEXT: store ptr [[I]], ptr [[TMP12]], align 4
510 // CHECK-USE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
511 // CHECK-USE-I386-NEXT: store i64 [[TMP5]], ptr [[TMP13]], align 4
512 // CHECK-USE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
513 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP14]], align 4
514 // CHECK-USE-I386-NEXT: [[TMP15:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
515 // CHECK-USE-I386-NEXT: store ptr [[ST1]], ptr [[TMP15]], align 4
516 // CHECK-USE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
517 // CHECK-USE-I386-NEXT: store ptr [[I]], ptr [[TMP16]], align 4
518 // CHECK-USE-I386-NEXT: [[TMP17:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
519 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP17]], align 4
520 // CHECK-USE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
521 // CHECK-USE-I386-NEXT: store ptr [[ST1]], ptr [[TMP18]], align 4
522 // CHECK-USE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
523 // CHECK-USE-I386-NEXT: store ptr [[J]], ptr [[TMP19]], align 4
524 // CHECK-USE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
525 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP20]], align 4
526 // CHECK-USE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
527 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[TMP21]], align 4
528 // CHECK-USE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
529 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[TMP22]], align 4
530 // CHECK-USE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
531 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP23]], align 4
532 // CHECK-USE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
533 // CHECK-USE-I386-NEXT: store ptr [[ST2]], ptr [[TMP24]], align 4
534 // CHECK-USE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
535 // CHECK-USE-I386-NEXT: store ptr [[I1]], ptr [[TMP25]], align 4
536 // CHECK-USE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 4
537 // CHECK-USE-I386-NEXT: store i64 [[TMP10]], ptr [[TMP26]], align 4
538 // CHECK-USE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
539 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP27]], align 4
540 // CHECK-USE-I386-NEXT: [[TMP28:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
541 // CHECK-USE-I386-NEXT: store ptr [[ST2]], ptr [[TMP28]], align 4
542 // CHECK-USE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
543 // CHECK-USE-I386-NEXT: store ptr [[I1]], ptr [[TMP29]], align 4
544 // CHECK-USE-I386-NEXT: [[TMP30:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5
545 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP30]], align 4
546 // CHECK-USE-I386-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
547 // CHECK-USE-I386-NEXT: store ptr [[ST2]], ptr [[TMP31]], align 4
548 // CHECK-USE-I386-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
549 // CHECK-USE-I386-NEXT: store ptr [[J2]], ptr [[TMP32]], align 4
550 // CHECK-USE-I386-NEXT: [[TMP33:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6
551 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP33]], align 4
552 // CHECK-USE-I386-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
553 // CHECK-USE-I386-NEXT: [[TMP35:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
554 // CHECK-USE-I386-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
555 // CHECK-USE-I386-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
556 // CHECK-USE-I386-NEXT: store i32 2, ptr [[TMP37]], align 4
557 // CHECK-USE-I386-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
558 // CHECK-USE-I386-NEXT: store i32 7, ptr [[TMP38]], align 4
559 // CHECK-USE-I386-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
560 // CHECK-USE-I386-NEXT: store ptr [[TMP34]], ptr [[TMP39]], align 4
561 // CHECK-USE-I386-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
562 // CHECK-USE-I386-NEXT: store ptr [[TMP35]], ptr [[TMP40]], align 4
563 // CHECK-USE-I386-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
564 // CHECK-USE-I386-NEXT: store ptr [[TMP36]], ptr [[TMP41]], align 4
565 // CHECK-USE-I386-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
566 // CHECK-USE-I386-NEXT: store ptr @.offload_maptypes, ptr [[TMP42]], align 4
567 // CHECK-USE-I386-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
568 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP43]], align 4
569 // CHECK-USE-I386-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
570 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP44]], align 4
571 // CHECK-USE-I386-NEXT: [[TMP45:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
572 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP45]], align 8
573 // CHECK-USE-I386-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
574 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP46]], align 8
575 // CHECK-USE-I386-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
576 // CHECK-USE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP47]], align 4
577 // CHECK-USE-I386-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
578 // CHECK-USE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
579 // CHECK-USE-I386-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
580 // CHECK-USE-I386-NEXT: store i32 0, ptr [[TMP49]], align 4
581 // CHECK-USE-I386-NEXT: [[TMP50:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100.region_id, ptr [[KERNEL_ARGS]])
582 // CHECK-USE-I386-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
583 // CHECK-USE-I386-NEXT: br i1 [[TMP51]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
584 // CHECK-USE-I386: omp_offload.failed:
585 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100(ptr [[ST1]], ptr [[A]], ptr [[ST2]]) #[[ATTR3:[0-9]+]]
586 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]]
587 // CHECK-USE-I386: omp_offload.cont:
588 // CHECK-USE-I386-NEXT: [[TMP52:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
589 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[TMP52]], align 4
590 // CHECK-USE-I386-NEXT: [[TMP53:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
591 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[TMP53]], align 4
592 // CHECK-USE-I386-NEXT: [[TMP54:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i32 0, i32 0
593 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP54]], align 4
594 // CHECK-USE-I386-NEXT: [[TMP55:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
595 // CHECK-USE-I386-NEXT: [[TMP56:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
596 // CHECK-USE-I386-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 0
597 // CHECK-USE-I386-NEXT: store i32 2, ptr [[TMP57]], align 4
598 // CHECK-USE-I386-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 1
599 // CHECK-USE-I386-NEXT: store i32 1, ptr [[TMP58]], align 4
600 // CHECK-USE-I386-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 2
601 // CHECK-USE-I386-NEXT: store ptr [[TMP55]], ptr [[TMP59]], align 4
602 // CHECK-USE-I386-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 3
603 // CHECK-USE-I386-NEXT: store ptr [[TMP56]], ptr [[TMP60]], align 4
604 // CHECK-USE-I386-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 4
605 // CHECK-USE-I386-NEXT: store ptr @.offload_sizes.1, ptr [[TMP61]], align 4
606 // CHECK-USE-I386-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 5
607 // CHECK-USE-I386-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP62]], align 4
608 // CHECK-USE-I386-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 6
609 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP63]], align 4
610 // CHECK-USE-I386-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 7
611 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP64]], align 4
612 // CHECK-USE-I386-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 8
613 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP65]], align 8
614 // CHECK-USE-I386-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 9
615 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP66]], align 8
616 // CHECK-USE-I386-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 10
617 // CHECK-USE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP67]], align 4
618 // CHECK-USE-I386-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 11
619 // CHECK-USE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP68]], align 4
620 // CHECK-USE-I386-NEXT: [[TMP69:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 12
621 // CHECK-USE-I386-NEXT: store i32 0, ptr [[TMP69]], align 4
622 // CHECK-USE-I386-NEXT: [[TMP70:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114.region_id, ptr [[KERNEL_ARGS6]])
623 // CHECK-USE-I386-NEXT: [[TMP71:%.*]] = icmp ne i32 [[TMP70]], 0
624 // CHECK-USE-I386-NEXT: br i1 [[TMP71]], label [[OMP_OFFLOAD_FAILED7:%.*]], label [[OMP_OFFLOAD_CONT8:%.*]]
625 // CHECK-USE-I386: omp_offload.failed7:
626 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114(ptr [[A]]) #[[ATTR3]]
627 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT8]]
628 // CHECK-USE-I386: omp_offload.cont8:
629 // CHECK-USE-I386-NEXT: ret void
632 // CHECK-USE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100
633 // CHECK-USE-I386-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[ST1:%.*]], ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]], ptr noundef nonnull align 4 dereferenceable(8) [[ST2:%.*]]) #[[ATTR1:[0-9]+]] {
634 // CHECK-USE-I386-NEXT: entry:
635 // CHECK-USE-I386-NEXT: [[ST1_ADDR:%.*]] = alloca ptr, align 4
636 // CHECK-USE-I386-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
637 // CHECK-USE-I386-NEXT: [[ST2_ADDR:%.*]] = alloca ptr, align 4
638 // CHECK-USE-I386-NEXT: store ptr [[ST1]], ptr [[ST1_ADDR]], align 4
639 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
640 // CHECK-USE-I386-NEXT: store ptr [[ST2]], ptr [[ST2_ADDR]], align 4
641 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = load ptr, ptr [[ST1_ADDR]], align 4
642 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 4
643 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = load ptr, ptr [[ST2_ADDR]], align 4
644 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP0]], i32 0, i32 0
645 // CHECK-USE-I386-NEXT: [[TMP3:%.*]] = load i32, ptr [[I]], align 4
646 // CHECK-USE-I386-NEXT: [[INC:%.*]] = add nsw i32 [[TMP3]], 1
647 // CHECK-USE-I386-NEXT: store i32 [[INC]], ptr [[I]], align 4
648 // CHECK-USE-I386-NEXT: [[TMP4:%.*]] = load i32, ptr [[TMP1]], align 4
649 // CHECK-USE-I386-NEXT: [[INC1:%.*]] = add nsw i32 [[TMP4]], 1
650 // CHECK-USE-I386-NEXT: store i32 [[INC1]], ptr [[TMP1]], align 4
651 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP0]], i32 0, i32 1
652 // CHECK-USE-I386-NEXT: [[TMP5:%.*]] = load i32, ptr [[J]], align 4
653 // CHECK-USE-I386-NEXT: [[INC2:%.*]] = add nsw i32 [[TMP5]], 1
654 // CHECK-USE-I386-NEXT: store i32 [[INC2]], ptr [[J]], align 4
655 // CHECK-USE-I386-NEXT: [[I3:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP2]], i32 0, i32 0
656 // CHECK-USE-I386-NEXT: [[TMP6:%.*]] = load i32, ptr [[I3]], align 4
657 // CHECK-USE-I386-NEXT: [[INC4:%.*]] = add nsw i32 [[TMP6]], 1
658 // CHECK-USE-I386-NEXT: store i32 [[INC4]], ptr [[I3]], align 4
659 // CHECK-USE-I386-NEXT: [[J5:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP2]], i32 0, i32 1
660 // CHECK-USE-I386-NEXT: [[TMP7:%.*]] = load i32, ptr [[J5]], align 4
661 // CHECK-USE-I386-NEXT: [[INC6:%.*]] = add nsw i32 [[TMP7]], 1
662 // CHECK-USE-I386-NEXT: store i32 [[INC6]], ptr [[J5]], align 4
663 // CHECK-USE-I386-NEXT: ret void
666 // CHECK-USE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114
667 // CHECK-USE-I386-SAME: (ptr noundef nonnull align 4 dereferenceable(4) [[A:%.*]]) #[[ATTR1]] {
668 // CHECK-USE-I386-NEXT: entry:
669 // CHECK-USE-I386-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 4
670 // CHECK-USE-I386-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 4
671 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 4
672 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = load i32, ptr [[TMP0]], align 4
673 // CHECK-USE-I386-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
674 // CHECK-USE-I386-NEXT: store i32 [[INC]], ptr [[TMP0]], align 4
675 // CHECK-USE-I386-NEXT: ret void
678 // CHECK-USE-I386-LABEL: define {{[^@]+}}@_ZN2ST20test_present_membersEv
679 // CHECK-USE-I386-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] align 2 {
680 // CHECK-USE-I386-NEXT: entry:
681 // CHECK-USE-I386-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
682 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 4
683 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 4
684 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 4
685 // CHECK-USE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 4
686 // CHECK-USE-I386-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
687 // CHECK-USE-I386-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
688 // CHECK-USE-I386-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
689 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
690 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
691 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = getelementptr i32, ptr [[J]], i32 1
692 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[TMP0]] to i64
693 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[I]] to i64
694 // CHECK-USE-I386-NEXT: [[TMP3:%.*]] = sub i64 [[TMP1]], [[TMP2]]
695 // CHECK-USE-I386-NEXT: [[TMP4:%.*]] = sdiv exact i64 [[TMP3]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
696 // CHECK-USE-I386-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes.3, i32 24, i1 false)
697 // CHECK-USE-I386-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
698 // CHECK-USE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP5]], align 4
699 // CHECK-USE-I386-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
700 // CHECK-USE-I386-NEXT: store ptr [[I]], ptr [[TMP6]], align 4
701 // CHECK-USE-I386-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
702 // CHECK-USE-I386-NEXT: store i64 [[TMP4]], ptr [[TMP7]], align 4
703 // CHECK-USE-I386-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
704 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP8]], align 4
705 // CHECK-USE-I386-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
706 // CHECK-USE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP9]], align 4
707 // CHECK-USE-I386-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
708 // CHECK-USE-I386-NEXT: store ptr [[I]], ptr [[TMP10]], align 4
709 // CHECK-USE-I386-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
710 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP11]], align 4
711 // CHECK-USE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
712 // CHECK-USE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP12]], align 4
713 // CHECK-USE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
714 // CHECK-USE-I386-NEXT: store ptr [[J]], ptr [[TMP13]], align 4
715 // CHECK-USE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
716 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP14]], align 4
717 // CHECK-USE-I386-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
718 // CHECK-USE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
719 // CHECK-USE-I386-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
720 // CHECK-USE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
721 // CHECK-USE-I386-NEXT: store i32 2, ptr [[TMP18]], align 4
722 // CHECK-USE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
723 // CHECK-USE-I386-NEXT: store i32 3, ptr [[TMP19]], align 4
724 // CHECK-USE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
725 // CHECK-USE-I386-NEXT: store ptr [[TMP15]], ptr [[TMP20]], align 4
726 // CHECK-USE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
727 // CHECK-USE-I386-NEXT: store ptr [[TMP16]], ptr [[TMP21]], align 4
728 // CHECK-USE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
729 // CHECK-USE-I386-NEXT: store ptr [[TMP17]], ptr [[TMP22]], align 4
730 // CHECK-USE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
731 // CHECK-USE-I386-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP23]], align 4
732 // CHECK-USE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
733 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP24]], align 4
734 // CHECK-USE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
735 // CHECK-USE-I386-NEXT: store ptr null, ptr [[TMP25]], align 4
736 // CHECK-USE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
737 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP26]], align 8
738 // CHECK-USE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
739 // CHECK-USE-I386-NEXT: store i64 0, ptr [[TMP27]], align 8
740 // CHECK-USE-I386-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
741 // CHECK-USE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP28]], align 4
742 // CHECK-USE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
743 // CHECK-USE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP29]], align 4
744 // CHECK-USE-I386-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
745 // CHECK-USE-I386-NEXT: store i32 0, ptr [[TMP30]], align 4
746 // CHECK-USE-I386-NEXT: [[TMP31:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125.region_id, ptr [[KERNEL_ARGS]])
747 // CHECK-USE-I386-NEXT: [[TMP32:%.*]] = icmp ne i32 [[TMP31]], 0
748 // CHECK-USE-I386-NEXT: br i1 [[TMP32]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
749 // CHECK-USE-I386: omp_offload.failed:
750 // CHECK-USE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125(ptr [[THIS1]]) #[[ATTR3]]
751 // CHECK-USE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]]
752 // CHECK-USE-I386: omp_offload.cont:
753 // CHECK-USE-I386-NEXT: ret void
756 // CHECK-USE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125
757 // CHECK-USE-I386-SAME: (ptr noundef [[THIS:%.*]]) #[[ATTR1]] {
758 // CHECK-USE-I386-NEXT: entry:
759 // CHECK-USE-I386-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
760 // CHECK-USE-I386-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
761 // CHECK-USE-I386-NEXT: [[TMP0:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
762 // CHECK-USE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[TMP0]], i32 0, i32 0
763 // CHECK-USE-I386-NEXT: [[TMP1:%.*]] = load i32, ptr [[I]], align 4
764 // CHECK-USE-I386-NEXT: [[INC:%.*]] = add nsw i32 [[TMP1]], 1
765 // CHECK-USE-I386-NEXT: store i32 [[INC]], ptr [[I]], align 4
766 // CHECK-USE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[TMP0]], i32 0, i32 1
767 // CHECK-USE-I386-NEXT: [[TMP2:%.*]] = load i32, ptr [[J]], align 4
768 // CHECK-USE-I386-NEXT: [[INC1:%.*]] = add nsw i32 [[TMP2]], 1
769 // CHECK-USE-I386-NEXT: store i32 [[INC1]], ptr [[J]], align 4
770 // CHECK-USE-I386-NEXT: ret void
773 // CHECK-USE-I386-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
774 // CHECK-USE-I386-SAME: () #[[ATTR4:[0-9]+]] {
775 // CHECK-USE-I386-NEXT: entry:
776 // CHECK-USE-I386-NEXT: call void @__tgt_register_requires(i64 1)
777 // CHECK-USE-I386-NEXT: ret void
780 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@_Z20explicit_maps_singlei
781 // CHECK-NOUSE-PPC64LE-SAME: (i32 noundef signext [[II:%.*]]) #[[ATTR0:[0-9]+]] {
782 // CHECK-NOUSE-PPC64LE-NEXT: entry:
783 // CHECK-NOUSE-PPC64LE-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4
784 // CHECK-NOUSE-PPC64LE-NEXT: [[A:%.*]] = alloca i32, align 4
785 // CHECK-NOUSE-PPC64LE-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
786 // CHECK-NOUSE-PPC64LE-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4
787 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x ptr], align 8
788 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x ptr], align 8
789 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x ptr], align 8
790 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 8
791 // CHECK-NOUSE-PPC64LE-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
792 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 8
793 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 8
794 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 8
795 // CHECK-NOUSE-PPC64LE-NEXT: [[KERNEL_ARGS6:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
796 // CHECK-NOUSE-PPC64LE-NEXT: store i32 [[II]], ptr [[II_ADDR]], align 4
797 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP0:%.*]] = load i32, ptr [[II_ADDR]], align 4
798 // CHECK-NOUSE-PPC64LE-NEXT: store i32 [[TMP0]], ptr [[A]], align 4
799 // CHECK-NOUSE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 0
800 // CHECK-NOUSE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 1
801 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP1:%.*]] = getelementptr i32, ptr [[J]], i32 1
802 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[TMP1]] to i64
803 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[I]] to i64
804 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP4:%.*]] = sub i64 [[TMP2]], [[TMP3]]
805 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP5:%.*]] = sdiv exact i64 [[TMP4]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
806 // CHECK-NOUSE-PPC64LE-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 0
807 // CHECK-NOUSE-PPC64LE-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 1
808 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP6:%.*]] = getelementptr i32, ptr [[J2]], i32 1
809 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64
810 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[I1]] to i64
811 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
812 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
813 // CHECK-NOUSE-PPC64LE-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes, i64 56, i1 false)
814 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP11:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
815 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP11]], align 8
816 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
817 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP12]], align 8
818 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
819 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP5]], ptr [[TMP13]], align 8
820 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
821 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP14]], align 8
822 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP15:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
823 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP15]], align 8
824 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
825 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP16]], align 8
826 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP17:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
827 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP17]], align 8
828 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
829 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST1]], ptr [[TMP18]], align 8
830 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
831 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[J]], ptr [[TMP19]], align 8
832 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
833 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP20]], align 8
834 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
835 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP21]], align 8
836 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
837 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP22]], align 8
838 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 3
839 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP23]], align 8
840 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
841 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP24]], align 8
842 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
843 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I1]], ptr [[TMP25]], align 8
844 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 4
845 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP10]], ptr [[TMP26]], align 8
846 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 4
847 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP27]], align 8
848 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP28:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
849 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP28]], align 8
850 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
851 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I1]], ptr [[TMP29]], align 8
852 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP30:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 5
853 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP30]], align 8
854 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
855 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[ST2]], ptr [[TMP31]], align 8
856 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
857 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[J2]], ptr [[TMP32]], align 8
858 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP33:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 6
859 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP33]], align 8
860 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
861 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP35:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
862 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
863 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
864 // CHECK-NOUSE-PPC64LE-NEXT: store i32 2, ptr [[TMP37]], align 4
865 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
866 // CHECK-NOUSE-PPC64LE-NEXT: store i32 7, ptr [[TMP38]], align 4
867 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
868 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP34]], ptr [[TMP39]], align 8
869 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
870 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP35]], ptr [[TMP40]], align 8
871 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
872 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP36]], ptr [[TMP41]], align 8
873 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
874 // CHECK-NOUSE-PPC64LE-NEXT: store ptr @.offload_maptypes, ptr [[TMP42]], align 8
875 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
876 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP43]], align 8
877 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
878 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP44]], align 8
879 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP45:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
880 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP45]], align 8
881 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
882 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP46]], align 8
883 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
884 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP47]], align 4
885 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
886 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
887 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
888 // CHECK-NOUSE-PPC64LE-NEXT: store i32 0, ptr [[TMP49]], align 4
889 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP50:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100.region_id, ptr [[KERNEL_ARGS]])
890 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
891 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP51]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
892 // CHECK-NOUSE-PPC64LE: omp_offload.failed:
893 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100() #[[ATTR3:[0-9]+]]
894 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]]
895 // CHECK-NOUSE-PPC64LE: omp_offload.cont:
896 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP52:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
897 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP52]], align 8
898 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP53:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
899 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[A]], ptr [[TMP53]], align 8
900 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP54:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i64 0, i64 0
901 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP54]], align 8
902 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP55:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
903 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP56:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
904 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 0
905 // CHECK-NOUSE-PPC64LE-NEXT: store i32 2, ptr [[TMP57]], align 4
906 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 1
907 // CHECK-NOUSE-PPC64LE-NEXT: store i32 1, ptr [[TMP58]], align 4
908 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 2
909 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP55]], ptr [[TMP59]], align 8
910 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 3
911 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP56]], ptr [[TMP60]], align 8
912 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 4
913 // CHECK-NOUSE-PPC64LE-NEXT: store ptr @.offload_sizes.1, ptr [[TMP61]], align 8
914 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 5
915 // CHECK-NOUSE-PPC64LE-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP62]], align 8
916 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 6
917 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP63]], align 8
918 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 7
919 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP64]], align 8
920 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 8
921 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP65]], align 8
922 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 9
923 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP66]], align 8
924 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 10
925 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP67]], align 4
926 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 11
927 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP68]], align 4
928 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP69:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 12
929 // CHECK-NOUSE-PPC64LE-NEXT: store i32 0, ptr [[TMP69]], align 4
930 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP70:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114.region_id, ptr [[KERNEL_ARGS6]])
931 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP71:%.*]] = icmp ne i32 [[TMP70]], 0
932 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP71]], label [[OMP_OFFLOAD_FAILED7:%.*]], label [[OMP_OFFLOAD_CONT8:%.*]]
933 // CHECK-NOUSE-PPC64LE: omp_offload.failed7:
934 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114() #[[ATTR3]]
935 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT8]]
936 // CHECK-NOUSE-PPC64LE: omp_offload.cont8:
937 // CHECK-NOUSE-PPC64LE-NEXT: ret void
940 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100
941 // CHECK-NOUSE-PPC64LE-SAME: () #[[ATTR1:[0-9]+]] {
942 // CHECK-NOUSE-PPC64LE-NEXT: entry:
943 // CHECK-NOUSE-PPC64LE-NEXT: ret void
946 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114
947 // CHECK-NOUSE-PPC64LE-SAME: () #[[ATTR1]] {
948 // CHECK-NOUSE-PPC64LE-NEXT: entry:
949 // CHECK-NOUSE-PPC64LE-NEXT: ret void
952 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@_ZN2ST20test_present_membersEv
953 // CHECK-NOUSE-PPC64LE-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
954 // CHECK-NOUSE-PPC64LE-NEXT: entry:
955 // CHECK-NOUSE-PPC64LE-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 8
956 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 8
957 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 8
958 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 8
959 // CHECK-NOUSE-PPC64LE-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 8
960 // CHECK-NOUSE-PPC64LE-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
961 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 8
962 // CHECK-NOUSE-PPC64LE-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 8
963 // CHECK-NOUSE-PPC64LE-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
964 // CHECK-NOUSE-PPC64LE-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
965 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP0:%.*]] = getelementptr i32, ptr [[J]], i32 1
966 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[TMP0]] to i64
967 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[I]] to i64
968 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP3:%.*]] = sub i64 [[TMP1]], [[TMP2]]
969 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP4:%.*]] = sdiv exact i64 [[TMP3]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
970 // CHECK-NOUSE-PPC64LE-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[DOTOFFLOAD_SIZES]], ptr align 8 @.offload_sizes.3, i64 24, i1 false)
971 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
972 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP5]], align 8
973 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
974 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP6]], align 8
975 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
976 // CHECK-NOUSE-PPC64LE-NEXT: store i64 [[TMP4]], ptr [[TMP7]], align 8
977 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 0
978 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP8]], align 8
979 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
980 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP9]], align 8
981 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
982 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[I]], ptr [[TMP10]], align 8
983 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 1
984 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP11]], align 8
985 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
986 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[THIS1]], ptr [[TMP12]], align 8
987 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
988 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[J]], ptr [[TMP13]], align 8
989 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i64 0, i64 2
990 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP14]], align 8
991 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
992 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
993 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
994 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
995 // CHECK-NOUSE-PPC64LE-NEXT: store i32 2, ptr [[TMP18]], align 4
996 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
997 // CHECK-NOUSE-PPC64LE-NEXT: store i32 3, ptr [[TMP19]], align 4
998 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
999 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP15]], ptr [[TMP20]], align 8
1000 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1001 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP16]], ptr [[TMP21]], align 8
1002 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1003 // CHECK-NOUSE-PPC64LE-NEXT: store ptr [[TMP17]], ptr [[TMP22]], align 8
1004 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1005 // CHECK-NOUSE-PPC64LE-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP23]], align 8
1006 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1007 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP24]], align 8
1008 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1009 // CHECK-NOUSE-PPC64LE-NEXT: store ptr null, ptr [[TMP25]], align 8
1010 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1011 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP26]], align 8
1012 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1013 // CHECK-NOUSE-PPC64LE-NEXT: store i64 0, ptr [[TMP27]], align 8
1014 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1015 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP28]], align 4
1016 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1017 // CHECK-NOUSE-PPC64LE-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP29]], align 4
1018 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1019 // CHECK-NOUSE-PPC64LE-NEXT: store i32 0, ptr [[TMP30]], align 4
1020 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP31:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125.region_id, ptr [[KERNEL_ARGS]])
1021 // CHECK-NOUSE-PPC64LE-NEXT: [[TMP32:%.*]] = icmp ne i32 [[TMP31]], 0
1022 // CHECK-NOUSE-PPC64LE-NEXT: br i1 [[TMP32]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1023 // CHECK-NOUSE-PPC64LE: omp_offload.failed:
1024 // CHECK-NOUSE-PPC64LE-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125() #[[ATTR3]]
1025 // CHECK-NOUSE-PPC64LE-NEXT: br label [[OMP_OFFLOAD_CONT]]
1026 // CHECK-NOUSE-PPC64LE: omp_offload.cont:
1027 // CHECK-NOUSE-PPC64LE-NEXT: ret void
1030 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125
1031 // CHECK-NOUSE-PPC64LE-SAME: () #[[ATTR1]] {
1032 // CHECK-NOUSE-PPC64LE-NEXT: entry:
1033 // CHECK-NOUSE-PPC64LE-NEXT: ret void
1036 // CHECK-NOUSE-PPC64LE-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1037 // CHECK-NOUSE-PPC64LE-SAME: () #[[ATTR4:[0-9]+]] {
1038 // CHECK-NOUSE-PPC64LE-NEXT: entry:
1039 // CHECK-NOUSE-PPC64LE-NEXT: call void @__tgt_register_requires(i64 1)
1040 // CHECK-NOUSE-PPC64LE-NEXT: ret void
1043 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@_Z20explicit_maps_singlei
1044 // CHECK-NOUSE-I386-SAME: (i32 noundef [[II:%.*]]) #[[ATTR0:[0-9]+]] {
1045 // CHECK-NOUSE-I386-NEXT: entry:
1046 // CHECK-NOUSE-I386-NEXT: [[II_ADDR:%.*]] = alloca i32, align 4
1047 // CHECK-NOUSE-I386-NEXT: [[A:%.*]] = alloca i32, align 4
1048 // CHECK-NOUSE-I386-NEXT: [[ST1:%.*]] = alloca [[STRUCT_ST:%.*]], align 4
1049 // CHECK-NOUSE-I386-NEXT: [[ST2:%.*]] = alloca [[STRUCT_ST]], align 4
1050 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [7 x ptr], align 4
1051 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [7 x ptr], align 4
1052 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [7 x ptr], align 4
1053 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [7 x i64], align 4
1054 // CHECK-NOUSE-I386-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1055 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS3:%.*]] = alloca [1 x ptr], align 4
1056 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS4:%.*]] = alloca [1 x ptr], align 4
1057 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS5:%.*]] = alloca [1 x ptr], align 4
1058 // CHECK-NOUSE-I386-NEXT: [[KERNEL_ARGS6:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS]], align 8
1059 // CHECK-NOUSE-I386-NEXT: store i32 [[II]], ptr [[II_ADDR]], align 4
1060 // CHECK-NOUSE-I386-NEXT: [[TMP0:%.*]] = load i32, ptr [[II_ADDR]], align 4
1061 // CHECK-NOUSE-I386-NEXT: store i32 [[TMP0]], ptr [[A]], align 4
1062 // CHECK-NOUSE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 0
1063 // CHECK-NOUSE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST1]], i32 0, i32 1
1064 // CHECK-NOUSE-I386-NEXT: [[TMP1:%.*]] = getelementptr i32, ptr [[J]], i32 1
1065 // CHECK-NOUSE-I386-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[TMP1]] to i64
1066 // CHECK-NOUSE-I386-NEXT: [[TMP3:%.*]] = ptrtoint ptr [[I]] to i64
1067 // CHECK-NOUSE-I386-NEXT: [[TMP4:%.*]] = sub i64 [[TMP2]], [[TMP3]]
1068 // CHECK-NOUSE-I386-NEXT: [[TMP5:%.*]] = sdiv exact i64 [[TMP4]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
1069 // CHECK-NOUSE-I386-NEXT: [[I1:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 0
1070 // CHECK-NOUSE-I386-NEXT: [[J2:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[ST2]], i32 0, i32 1
1071 // CHECK-NOUSE-I386-NEXT: [[TMP6:%.*]] = getelementptr i32, ptr [[J2]], i32 1
1072 // CHECK-NOUSE-I386-NEXT: [[TMP7:%.*]] = ptrtoint ptr [[TMP6]] to i64
1073 // CHECK-NOUSE-I386-NEXT: [[TMP8:%.*]] = ptrtoint ptr [[I1]] to i64
1074 // CHECK-NOUSE-I386-NEXT: [[TMP9:%.*]] = sub i64 [[TMP7]], [[TMP8]]
1075 // CHECK-NOUSE-I386-NEXT: [[TMP10:%.*]] = sdiv exact i64 [[TMP9]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
1076 // CHECK-NOUSE-I386-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes, i32 56, i1 false)
1077 // CHECK-NOUSE-I386-NEXT: [[TMP11:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1078 // CHECK-NOUSE-I386-NEXT: store ptr [[ST1]], ptr [[TMP11]], align 4
1079 // CHECK-NOUSE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1080 // CHECK-NOUSE-I386-NEXT: store ptr [[I]], ptr [[TMP12]], align 4
1081 // CHECK-NOUSE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1082 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP5]], ptr [[TMP13]], align 4
1083 // CHECK-NOUSE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1084 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP14]], align 4
1085 // CHECK-NOUSE-I386-NEXT: [[TMP15:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1086 // CHECK-NOUSE-I386-NEXT: store ptr [[ST1]], ptr [[TMP15]], align 4
1087 // CHECK-NOUSE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1088 // CHECK-NOUSE-I386-NEXT: store ptr [[I]], ptr [[TMP16]], align 4
1089 // CHECK-NOUSE-I386-NEXT: [[TMP17:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
1090 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP17]], align 4
1091 // CHECK-NOUSE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1092 // CHECK-NOUSE-I386-NEXT: store ptr [[ST1]], ptr [[TMP18]], align 4
1093 // CHECK-NOUSE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1094 // CHECK-NOUSE-I386-NEXT: store ptr [[J]], ptr [[TMP19]], align 4
1095 // CHECK-NOUSE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
1096 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP20]], align 4
1097 // CHECK-NOUSE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 3
1098 // CHECK-NOUSE-I386-NEXT: store ptr [[A]], ptr [[TMP21]], align 4
1099 // CHECK-NOUSE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 3
1100 // CHECK-NOUSE-I386-NEXT: store ptr [[A]], ptr [[TMP22]], align 4
1101 // CHECK-NOUSE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 3
1102 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP23]], align 4
1103 // CHECK-NOUSE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 4
1104 // CHECK-NOUSE-I386-NEXT: store ptr [[ST2]], ptr [[TMP24]], align 4
1105 // CHECK-NOUSE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 4
1106 // CHECK-NOUSE-I386-NEXT: store ptr [[I1]], ptr [[TMP25]], align 4
1107 // CHECK-NOUSE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 4
1108 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP10]], ptr [[TMP26]], align 4
1109 // CHECK-NOUSE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 4
1110 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP27]], align 4
1111 // CHECK-NOUSE-I386-NEXT: [[TMP28:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 5
1112 // CHECK-NOUSE-I386-NEXT: store ptr [[ST2]], ptr [[TMP28]], align 4
1113 // CHECK-NOUSE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 5
1114 // CHECK-NOUSE-I386-NEXT: store ptr [[I1]], ptr [[TMP29]], align 4
1115 // CHECK-NOUSE-I386-NEXT: [[TMP30:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 5
1116 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP30]], align 4
1117 // CHECK-NOUSE-I386-NEXT: [[TMP31:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 6
1118 // CHECK-NOUSE-I386-NEXT: store ptr [[ST2]], ptr [[TMP31]], align 4
1119 // CHECK-NOUSE-I386-NEXT: [[TMP32:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 6
1120 // CHECK-NOUSE-I386-NEXT: store ptr [[J2]], ptr [[TMP32]], align 4
1121 // CHECK-NOUSE-I386-NEXT: [[TMP33:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 6
1122 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP33]], align 4
1123 // CHECK-NOUSE-I386-NEXT: [[TMP34:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1124 // CHECK-NOUSE-I386-NEXT: [[TMP35:%.*]] = getelementptr inbounds [7 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1125 // CHECK-NOUSE-I386-NEXT: [[TMP36:%.*]] = getelementptr inbounds [7 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1126 // CHECK-NOUSE-I386-NEXT: [[TMP37:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1127 // CHECK-NOUSE-I386-NEXT: store i32 2, ptr [[TMP37]], align 4
1128 // CHECK-NOUSE-I386-NEXT: [[TMP38:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1129 // CHECK-NOUSE-I386-NEXT: store i32 7, ptr [[TMP38]], align 4
1130 // CHECK-NOUSE-I386-NEXT: [[TMP39:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1131 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP34]], ptr [[TMP39]], align 4
1132 // CHECK-NOUSE-I386-NEXT: [[TMP40:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1133 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP35]], ptr [[TMP40]], align 4
1134 // CHECK-NOUSE-I386-NEXT: [[TMP41:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1135 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP36]], ptr [[TMP41]], align 4
1136 // CHECK-NOUSE-I386-NEXT: [[TMP42:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1137 // CHECK-NOUSE-I386-NEXT: store ptr @.offload_maptypes, ptr [[TMP42]], align 4
1138 // CHECK-NOUSE-I386-NEXT: [[TMP43:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1139 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP43]], align 4
1140 // CHECK-NOUSE-I386-NEXT: [[TMP44:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1141 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP44]], align 4
1142 // CHECK-NOUSE-I386-NEXT: [[TMP45:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1143 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP45]], align 8
1144 // CHECK-NOUSE-I386-NEXT: [[TMP46:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1145 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP46]], align 8
1146 // CHECK-NOUSE-I386-NEXT: [[TMP47:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1147 // CHECK-NOUSE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP47]], align 4
1148 // CHECK-NOUSE-I386-NEXT: [[TMP48:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1149 // CHECK-NOUSE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP48]], align 4
1150 // CHECK-NOUSE-I386-NEXT: [[TMP49:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1151 // CHECK-NOUSE-I386-NEXT: store i32 0, ptr [[TMP49]], align 4
1152 // CHECK-NOUSE-I386-NEXT: [[TMP50:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1:[0-9]+]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100.region_id, ptr [[KERNEL_ARGS]])
1153 // CHECK-NOUSE-I386-NEXT: [[TMP51:%.*]] = icmp ne i32 [[TMP50]], 0
1154 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP51]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1155 // CHECK-NOUSE-I386: omp_offload.failed:
1156 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100() #[[ATTR3:[0-9]+]]
1157 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]]
1158 // CHECK-NOUSE-I386: omp_offload.cont:
1159 // CHECK-NOUSE-I386-NEXT: [[TMP52:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
1160 // CHECK-NOUSE-I386-NEXT: store ptr [[A]], ptr [[TMP52]], align 4
1161 // CHECK-NOUSE-I386-NEXT: [[TMP53:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
1162 // CHECK-NOUSE-I386-NEXT: store ptr [[A]], ptr [[TMP53]], align 4
1163 // CHECK-NOUSE-I386-NEXT: [[TMP54:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_MAPPERS5]], i32 0, i32 0
1164 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP54]], align 4
1165 // CHECK-NOUSE-I386-NEXT: [[TMP55:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_BASEPTRS3]], i32 0, i32 0
1166 // CHECK-NOUSE-I386-NEXT: [[TMP56:%.*]] = getelementptr inbounds [1 x ptr], ptr [[DOTOFFLOAD_PTRS4]], i32 0, i32 0
1167 // CHECK-NOUSE-I386-NEXT: [[TMP57:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 0
1168 // CHECK-NOUSE-I386-NEXT: store i32 2, ptr [[TMP57]], align 4
1169 // CHECK-NOUSE-I386-NEXT: [[TMP58:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 1
1170 // CHECK-NOUSE-I386-NEXT: store i32 1, ptr [[TMP58]], align 4
1171 // CHECK-NOUSE-I386-NEXT: [[TMP59:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 2
1172 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP55]], ptr [[TMP59]], align 4
1173 // CHECK-NOUSE-I386-NEXT: [[TMP60:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 3
1174 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP56]], ptr [[TMP60]], align 4
1175 // CHECK-NOUSE-I386-NEXT: [[TMP61:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 4
1176 // CHECK-NOUSE-I386-NEXT: store ptr @.offload_sizes.1, ptr [[TMP61]], align 4
1177 // CHECK-NOUSE-I386-NEXT: [[TMP62:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 5
1178 // CHECK-NOUSE-I386-NEXT: store ptr @.offload_maptypes.2, ptr [[TMP62]], align 4
1179 // CHECK-NOUSE-I386-NEXT: [[TMP63:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 6
1180 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP63]], align 4
1181 // CHECK-NOUSE-I386-NEXT: [[TMP64:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 7
1182 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP64]], align 4
1183 // CHECK-NOUSE-I386-NEXT: [[TMP65:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 8
1184 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP65]], align 8
1185 // CHECK-NOUSE-I386-NEXT: [[TMP66:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 9
1186 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP66]], align 8
1187 // CHECK-NOUSE-I386-NEXT: [[TMP67:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 10
1188 // CHECK-NOUSE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP67]], align 4
1189 // CHECK-NOUSE-I386-NEXT: [[TMP68:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 11
1190 // CHECK-NOUSE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP68]], align 4
1191 // CHECK-NOUSE-I386-NEXT: [[TMP69:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS6]], i32 0, i32 12
1192 // CHECK-NOUSE-I386-NEXT: store i32 0, ptr [[TMP69]], align 4
1193 // CHECK-NOUSE-I386-NEXT: [[TMP70:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114.region_id, ptr [[KERNEL_ARGS6]])
1194 // CHECK-NOUSE-I386-NEXT: [[TMP71:%.*]] = icmp ne i32 [[TMP70]], 0
1195 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP71]], label [[OMP_OFFLOAD_FAILED7:%.*]], label [[OMP_OFFLOAD_CONT8:%.*]]
1196 // CHECK-NOUSE-I386: omp_offload.failed7:
1197 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114() #[[ATTR3]]
1198 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT8]]
1199 // CHECK-NOUSE-I386: omp_offload.cont8:
1200 // CHECK-NOUSE-I386-NEXT: ret void
1203 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l100
1204 // CHECK-NOUSE-I386-SAME: () #[[ATTR1:[0-9]+]] {
1205 // CHECK-NOUSE-I386-NEXT: entry:
1206 // CHECK-NOUSE-I386-NEXT: ret void
1209 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__Z20explicit_maps_singlei_l114
1210 // CHECK-NOUSE-I386-SAME: () #[[ATTR1]] {
1211 // CHECK-NOUSE-I386-NEXT: entry:
1212 // CHECK-NOUSE-I386-NEXT: ret void
1215 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@_ZN2ST20test_present_membersEv
1216 // CHECK-NOUSE-I386-SAME: (ptr noundef nonnull align 4 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] align 2 {
1217 // CHECK-NOUSE-I386-NEXT: entry:
1218 // CHECK-NOUSE-I386-NEXT: [[THIS_ADDR:%.*]] = alloca ptr, align 4
1219 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_BASEPTRS:%.*]] = alloca [3 x ptr], align 4
1220 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_PTRS:%.*]] = alloca [3 x ptr], align 4
1221 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_MAPPERS:%.*]] = alloca [3 x ptr], align 4
1222 // CHECK-NOUSE-I386-NEXT: [[DOTOFFLOAD_SIZES:%.*]] = alloca [3 x i64], align 4
1223 // CHECK-NOUSE-I386-NEXT: [[KERNEL_ARGS:%.*]] = alloca [[STRUCT___TGT_KERNEL_ARGUMENTS:%.*]], align 8
1224 // CHECK-NOUSE-I386-NEXT: store ptr [[THIS]], ptr [[THIS_ADDR]], align 4
1225 // CHECK-NOUSE-I386-NEXT: [[THIS1:%.*]] = load ptr, ptr [[THIS_ADDR]], align 4
1226 // CHECK-NOUSE-I386-NEXT: [[I:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], ptr [[THIS1]], i32 0, i32 0
1227 // CHECK-NOUSE-I386-NEXT: [[J:%.*]] = getelementptr inbounds [[STRUCT_ST]], ptr [[THIS1]], i32 0, i32 1
1228 // CHECK-NOUSE-I386-NEXT: [[TMP0:%.*]] = getelementptr i32, ptr [[J]], i32 1
1229 // CHECK-NOUSE-I386-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[TMP0]] to i64
1230 // CHECK-NOUSE-I386-NEXT: [[TMP2:%.*]] = ptrtoint ptr [[I]] to i64
1231 // CHECK-NOUSE-I386-NEXT: [[TMP3:%.*]] = sub i64 [[TMP1]], [[TMP2]]
1232 // CHECK-NOUSE-I386-NEXT: [[TMP4:%.*]] = sdiv exact i64 [[TMP3]], ptrtoint (ptr getelementptr (i8, ptr null, i32 1) to i64)
1233 // CHECK-NOUSE-I386-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[DOTOFFLOAD_SIZES]], ptr align 4 @.offload_sizes.3, i32 24, i1 false)
1234 // CHECK-NOUSE-I386-NEXT: [[TMP5:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1235 // CHECK-NOUSE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP5]], align 4
1236 // CHECK-NOUSE-I386-NEXT: [[TMP6:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1237 // CHECK-NOUSE-I386-NEXT: store ptr [[I]], ptr [[TMP6]], align 4
1238 // CHECK-NOUSE-I386-NEXT: [[TMP7:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1239 // CHECK-NOUSE-I386-NEXT: store i64 [[TMP4]], ptr [[TMP7]], align 4
1240 // CHECK-NOUSE-I386-NEXT: [[TMP8:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 0
1241 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP8]], align 4
1242 // CHECK-NOUSE-I386-NEXT: [[TMP9:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 1
1243 // CHECK-NOUSE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP9]], align 4
1244 // CHECK-NOUSE-I386-NEXT: [[TMP10:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 1
1245 // CHECK-NOUSE-I386-NEXT: store ptr [[I]], ptr [[TMP10]], align 4
1246 // CHECK-NOUSE-I386-NEXT: [[TMP11:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 1
1247 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP11]], align 4
1248 // CHECK-NOUSE-I386-NEXT: [[TMP12:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 2
1249 // CHECK-NOUSE-I386-NEXT: store ptr [[THIS1]], ptr [[TMP12]], align 4
1250 // CHECK-NOUSE-I386-NEXT: [[TMP13:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 2
1251 // CHECK-NOUSE-I386-NEXT: store ptr [[J]], ptr [[TMP13]], align 4
1252 // CHECK-NOUSE-I386-NEXT: [[TMP14:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_MAPPERS]], i32 0, i32 2
1253 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP14]], align 4
1254 // CHECK-NOUSE-I386-NEXT: [[TMP15:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_BASEPTRS]], i32 0, i32 0
1255 // CHECK-NOUSE-I386-NEXT: [[TMP16:%.*]] = getelementptr inbounds [3 x ptr], ptr [[DOTOFFLOAD_PTRS]], i32 0, i32 0
1256 // CHECK-NOUSE-I386-NEXT: [[TMP17:%.*]] = getelementptr inbounds [3 x i64], ptr [[DOTOFFLOAD_SIZES]], i32 0, i32 0
1257 // CHECK-NOUSE-I386-NEXT: [[TMP18:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 0
1258 // CHECK-NOUSE-I386-NEXT: store i32 2, ptr [[TMP18]], align 4
1259 // CHECK-NOUSE-I386-NEXT: [[TMP19:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 1
1260 // CHECK-NOUSE-I386-NEXT: store i32 3, ptr [[TMP19]], align 4
1261 // CHECK-NOUSE-I386-NEXT: [[TMP20:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 2
1262 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP15]], ptr [[TMP20]], align 4
1263 // CHECK-NOUSE-I386-NEXT: [[TMP21:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 3
1264 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP16]], ptr [[TMP21]], align 4
1265 // CHECK-NOUSE-I386-NEXT: [[TMP22:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 4
1266 // CHECK-NOUSE-I386-NEXT: store ptr [[TMP17]], ptr [[TMP22]], align 4
1267 // CHECK-NOUSE-I386-NEXT: [[TMP23:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 5
1268 // CHECK-NOUSE-I386-NEXT: store ptr @.offload_maptypes.4, ptr [[TMP23]], align 4
1269 // CHECK-NOUSE-I386-NEXT: [[TMP24:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 6
1270 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP24]], align 4
1271 // CHECK-NOUSE-I386-NEXT: [[TMP25:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 7
1272 // CHECK-NOUSE-I386-NEXT: store ptr null, ptr [[TMP25]], align 4
1273 // CHECK-NOUSE-I386-NEXT: [[TMP26:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 8
1274 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP26]], align 8
1275 // CHECK-NOUSE-I386-NEXT: [[TMP27:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 9
1276 // CHECK-NOUSE-I386-NEXT: store i64 0, ptr [[TMP27]], align 8
1277 // CHECK-NOUSE-I386-NEXT: [[TMP28:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 10
1278 // CHECK-NOUSE-I386-NEXT: store [3 x i32] [i32 -1, i32 0, i32 0], ptr [[TMP28]], align 4
1279 // CHECK-NOUSE-I386-NEXT: [[TMP29:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 11
1280 // CHECK-NOUSE-I386-NEXT: store [3 x i32] zeroinitializer, ptr [[TMP29]], align 4
1281 // CHECK-NOUSE-I386-NEXT: [[TMP30:%.*]] = getelementptr inbounds [[STRUCT___TGT_KERNEL_ARGUMENTS]], ptr [[KERNEL_ARGS]], i32 0, i32 12
1282 // CHECK-NOUSE-I386-NEXT: store i32 0, ptr [[TMP30]], align 4
1283 // CHECK-NOUSE-I386-NEXT: [[TMP31:%.*]] = call i32 @__tgt_target_kernel(ptr @[[GLOB1]], i64 -1, i32 -1, i32 0, ptr @.{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125.region_id, ptr [[KERNEL_ARGS]])
1284 // CHECK-NOUSE-I386-NEXT: [[TMP32:%.*]] = icmp ne i32 [[TMP31]], 0
1285 // CHECK-NOUSE-I386-NEXT: br i1 [[TMP32]], label [[OMP_OFFLOAD_FAILED:%.*]], label [[OMP_OFFLOAD_CONT:%.*]]
1286 // CHECK-NOUSE-I386: omp_offload.failed:
1287 // CHECK-NOUSE-I386-NEXT: call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125() #[[ATTR3]]
1288 // CHECK-NOUSE-I386-NEXT: br label [[OMP_OFFLOAD_CONT]]
1289 // CHECK-NOUSE-I386: omp_offload.cont:
1290 // CHECK-NOUSE-I386-NEXT: ret void
1293 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}__ZN2ST20test_present_membersEv_l125
1294 // CHECK-NOUSE-I386-SAME: () #[[ATTR1]] {
1295 // CHECK-NOUSE-I386-NEXT: entry:
1296 // CHECK-NOUSE-I386-NEXT: ret void
1299 // CHECK-NOUSE-I386-LABEL: define {{[^@]+}}@.omp_offloading.requires_reg
1300 // CHECK-NOUSE-I386-SAME: () #[[ATTR4:[0-9]+]] {
1301 // CHECK-NOUSE-I386-NEXT: entry:
1302 // CHECK-NOUSE-I386-NEXT: call void @__tgt_register_requires(i64 1)
1303 // CHECK-NOUSE-I386-NEXT: ret void