Lines Matching full:blocks
5 // RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck -check-prefix=BLOCKS %s
35 #elif defined(BLOCKS)
62 #elif defined(BLOCKS)
78 // BLOCKS: [[SS_TY:%.+]] = type { i{{[0-9]+}}, i8
203 #elif defined(BLOCKS)
204 // BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
205 // BLOCKS-LABEL: @main
206 // BLOCKS: call
207 // BLOCKS: call void {{%.+}}(i8
209 // BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
210 // BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i32* [[G]])
213 // BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable(4) %{{.+}})
214 // BLOCKS: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
217 // BLOCKS: [[RED_LIST:%.+]] = alloca [1 x i8*],
219 // BLOCKS: [[G_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[G_REF_ADDR:%.+]]
220 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], align 128
222 // BLOCKS: store i{{[0-9]+}} 1, i{{[0-9]+}}* [[G_PRIVATE_ADDR]], align 128
223 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
224 // BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
225 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
226 // BLOCKS: call void {{%.+}}(i8
228 // BLOCKS: [[G_PRIV_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST]], i64 0, i64 0
229 // BLOCKS: [[BITCAST:%.+]] = bitcast i32* [[G_PRIVATE_ADDR]] to i8*
230 // BLOCKS: store i8* [[BITCAST]], i8** [[G_PRIV_REF]],
231 // BLOCKS: call i32 @__kmpc_reduce_nowait(
232 // BLOCKS: switch i32 %{{.+}}, label %[[REDUCTION_DONE:.+]] [
233 // BLOCKS: i32 1, label %[[CASE1:.+]]
234 // BLOCKS: i32 2, label %[[CASE2:.+]]
235 // BLOCKS: [[CASE1]]
236 // BLOCKS: [[G_VAL:%.+]] = load i32, i32* [[G_REF]]
237 // BLOCKS: [[G_PRIV_VAL:%.+]] = load i32, i32* [[G_PRIVATE_ADDR]]
238 // BLOCKS: [[ADD:%.+]] = add nsw i32 [[G_VAL]], [[G_PRIV_VAL]]
239 // BLOCKS: store i32 [[ADD]], i32* [[G_REF]]
240 // BLOCKS: call void @__kmpc_end_reduce_nowait(
241 // BLOCKS: br label %[[REDUCTION_DONE]]
242 // BLOCKS: [[CASE2]]
243 // BLOCKS: [[G_PRIV_VAL:%.+]] = load i32, i32* [[G_PRIVATE_ADDR]]
244 // BLOCKS: atomicrmw add i32* [[G_REF]], i32 [[G_PRIV_VAL]] monotonic
245 // BLOCKS: br label %[[REDUCTION_DONE]]
246 // BLOCKS: [[REDUCTION_DONE]]
247 // BLOCKS: ret void
249 // BLOCKS: define {{.+}} void {{@.+}}(i8*
251 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
252 // BLOCKS: store i{{[0-9]+}} 2, i{{[0-9]+}}*
253 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
254 // BLOCKS: ret
259 // BLOCKS: define {{.+}} @{{.+}}([[SS_TY]]*
260 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
261 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* %
262 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
263 // BLOCKS: store i8
264 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
265 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
266 // BLOCKS-NOT: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
267 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
268 // BLOCKS: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 4, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[SS_TY]]*, i32*, i32*, i32*)* [[SS_MICROTASK:@.+]] to void
269 // BLOCKS: [[B_REF:%.+]] = getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %{{.*}}, i32 0, i32 1
270 // BLOCKS: store i8 %{{.+}}, i8* [[B_REF]],
271 // BLOCKS: ret
273 // BLOCKS: define internal void [[SS_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, i32* {{.+}}, i32* {{.+}}, i32* {{.+}})
274 // BLOCKS-NOT: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %
275 // BLOCKS: call{{.*}} void
276 // BLOCKS: ret void
278 // BLOCKS: define internal void @{{.+}}(i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, i32* {{.+}}, i32* {{.+}}, i32* {{.+}})
279 // BLOCKS: [[A_PRIV:%.+]] = alloca i{{[0-9]+}},
280 // BLOCKS: [[B_PRIV:%.+]] = alloca i{{[0-9]+}},
281 // BLOCKS: [[C_PRIV:%.+]] = alloca i{{[0-9]+}},
282 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* [[A_PRIV]],
283 // BLOCKS: store i{{[0-9]+}}* [[A_PRIV]], i{{[0-9]+}}** [[REFA:%.+]],
284 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* [[B_PRIV]],
285 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* [[C_PRIV]],
286 // BLOCKS: store i{{[0-9]+}}* [[C_PRIV]], i{{[0-9]+}}** [[REFC:%.+]],
287 // BLOCKS: [[A_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFA]],
288 // BLOCKS-NEXT: [[A_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A_PRIV]],
289 // BLOCKS-NEXT: [[INC:%.+]] = add nsw i{{[0-9]+}} [[A_VAL]], 1
290 // BLOCKS-NEXT: store i{{[0-9]+}} [[INC]], i{{[0-9]+}}* [[A_PRIV]],
291 // BLOCKS-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_PRIV]],
292 // BLOCKS-NEXT: [[DEC:%.+]] = add nsw i{{[0-9]+}} [[B_VAL]], -1
293 // BLOCKS-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_PRIV]],
294 // BLOCKS-NEXT: [[C_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFC]],
295 // BLOCKS-NEXT: [[C_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[C_PRIV]],
296 // BLOCKS-NEXT: [[DIV:%.+]] = sdiv i{{[0-9]+}} [[C_VAL]], 1
297 // BLOCKS-NEXT: store i{{[0-9]+}} [[DIV]], i{{[0-9]+}}* [[C_PRIV]],
298 // BLOCKS: call i32 @__kmpc_reduce_nowait(
299 // BLOCKS: ret void