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
42 #elif defined(BLOCKS)
75 #elif defined(BLOCKS)
93 // BLOCKS: [[SS_TY:%.+]] = type { i{{[0-9]+}}, i8
224 #elif defined(BLOCKS)
225 // BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
226 // BLOCKS-LABEL: @main
227 // BLOCKS: call
228 // BLOCKS: call void {{%.+}}(i8
230 // BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
231 // BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 0, {{.+}}* [[OMP_REGION:@.+]] to {{.+}})
235 // BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* noalias %{{.+}}, i32* noalias %{{.+}})
236 // BLOCKS: alloca i{{[0-9]+}},
237 // BLOCKS: [[G_START_ADDR:%.+]] = alloca i{{[0-9]+}},
238 // BLOCKS: alloca i{{[0-9]+}},
239 // BLOCKS: alloca i{{[0-9]+}},
240 // BLOCKS: alloca i{{[0-9]+}},
241 // BLOCKS: alloca i{{[0-9]+}},
242 // BLOCKS: alloca i{{[0-9]+}},
243 // BLOCKS: alloca i{{[0-9]+}},
244 // BLOCKS: [[G_PRIVATE_ADDR:%.+]] = alloca i{{[0-9]+}},
245 // BLOCKS: [[GTID_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** %{{.+}}
246 // BLOCKS: [[GTID:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[GTID_REF]]
247 // BLOCKS: call {{.+}} @__kmpc_for_static_init_4(%{{.+}}* @{{.+}}, i32 [[GTID]], i32 34, i32* [[IS_LAST_ADDR:%.+]], i32* %{{.+}}, i32* %{{.+}}, i32* %{{.+}}, i32 1, i32 1)
248 // BLOCKS: [[VAL:%.+]] = load i32, i32* [[G_START_ADDR]]
249 // BLOCKS: [[CNT:%.+]] = load i32, i32*
250 // BLOCKS: [[MUL:%.+]] = mul nsw i32 [[CNT]], 5
251 // BLOCKS: [[ADD:%.+]] = add nsw i32 [[VAL]], [[MUL]]
252 // BLOCKS: store i32 [[ADD]], i32* [[G_PRIVATE_ADDR]],
253 // BLOCKS: [[VAL:%.+]] = load i32, i32* [[G_PRIVATE_ADDR]],
254 // BLOCKS: [[ADD:%.+]] = add nsw i32 [[VAL]], 5
255 // BLOCKS: store i32 [[ADD]], i32* [[G_PRIVATE_ADDR]],
256 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
257 // BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
258 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
259 // BLOCKS: call void {{%.+}}(i8
260 // BLOCKS: call void @__kmpc_for_static_fini(%{{.+}}* @{{.+}}, i32 [[GTID]])
263 // BLOCKS: call void @__kmpc_barrier(%{{.+}}* @{{.+}}, i{{[0-9]+}} [[GTID]])
267 // BLOCKS: define {{.+}} void {{@.+}}(i8*
270 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
271 // BLOCKS: store i{{[0-9]+}} 2, i{{[0-9]+}}*
272 // BLOCKS-NOT: [[G]]{{[[^:word:]]}}
273 // BLOCKS: ret
278 // BLOCKS: define {{.+}} @{{.+}}([[SS_TY]]*
279 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 0
280 // BLOCKS: store i{{[0-9]+}} 0, i{{[0-9]+}}* %
281 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 1
282 // BLOCKS: store i8
283 // BLOCKS: getelementptr inbounds [[SS_TY]], [[SS_TY]]* %{{.+}}, i32 0, i32 2
284 // BLOCKS: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[SS_TY]]*)* [[SS_MICROTASK:@.+]] to void
285 // BLOCKS: ret
287 // BLOCKS: define internal void [[SS_MICROTASK]](i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}})
288 // BLOCKS: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %{{.*}}, i32 0, i32 0
289 // BLOCKS-NOT: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %{{.*}}, i32 0, i32 1
290 // BLOCKS: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %{{.*}}, i32 0, i32 2
291 // BLOCKS: call void @__kmpc_for_static_init_4(
292 // BLOCKS-NOT: getelementptr {{.*}}[[SS_TY]], [[SS_TY]]*
293 // BLOCKS: call{{.*}} void
294 // BLOCKS: call void @__kmpc_for_static_fini(
295 // BLOCKS: br i1
296 // BLOCKS: [[B_REF:%.+]] = getelementptr {{.*}}[[SS_TY]], [[SS_TY]]* %{{.*}}, i32 0, i32 1
297 // BLOCKS: store i8 %{{.+}}, i8* [[B_REF]],
298 // BLOCKS: br label
299 // BLOCKS: ret void
301 // BLOCKS: define internal void @{{.+}}(i{{[0-9]+}}* noalias [[GTID_ADDR:%.+]], i{{[0-9]+}}* noalias %{{.+}}, [[SS_TY]]* %{{.+}}, i32* {{.+}}, i32* {{.+}}, i32* {{.+}})
302 // BLOCKS: alloca i{{[0-9]+}},
303 // BLOCKS: alloca i{{[0-9]+}},
304 // BLOCKS: alloca i{{[0-9]+}},
305 // BLOCKS: alloca i{{[0-9]+}},
306 // BLOCKS: alloca i{{[0-9]+}},
307 // BLOCKS: alloca i{{[0-9]+}},
308 // BLOCKS: alloca i{{[0-9]+}},
309 // BLOCKS: alloca i{{[0-9]+}},
310 // BLOCKS: alloca i{{[0-9]+}},
311 // BLOCKS: [[A_PRIV:%.+]] = alloca i{{[0-9]+}},
312 // BLOCKS: [[B_PRIV:%.+]] = alloca i{{[0-9]+}},
313 // BLOCKS: [[C_PRIV:%.+]] = alloca i{{[0-9]+}},
314 // BLOCKS: store i{{[0-9]+}}* [[A_PRIV]], i{{[0-9]+}}** [[REFA:%.+]],
315 // BLOCKS: store i{{[0-9]+}}* [[C_PRIV]], i{{[0-9]+}}** [[REFC:%.+]],
316 // BLOCKS: call void @__kmpc_for_static_init_4(
317 // BLOCKS: [[A_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFA]],
318 // BLOCKS-NEXT: [[A_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[A_PRIV]],
319 // BLOCKS-NEXT: [[INC:%.+]] = add nsw i{{[0-9]+}} [[A_VAL]], 1
320 // BLOCKS-NEXT: store i{{[0-9]+}} [[INC]], i{{[0-9]+}}* [[A_PRIV]],
321 // BLOCKS-NEXT: [[B_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[B_PRIV]],
322 // BLOCKS-NEXT: [[DEC:%.+]] = add nsw i{{[0-9]+}} [[B_VAL]], -1
323 // BLOCKS-NEXT: store i{{[0-9]+}} [[DEC]], i{{[0-9]+}}* [[B_PRIV]],
324 // BLOCKS-NEXT: [[C_PRIV:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[REFC]],
325 // BLOCKS-NEXT: [[C_VAL:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[C_PRIV]],
326 // BLOCKS-NEXT: [[DIV:%.+]] = sdiv i{{[0-9]+}} [[C_VAL]], 1
327 // BLOCKS-NEXT: store i{{[0-9]+}} [[DIV]], i{{[0-9]+}}* [[C_PRIV]],
328 // BLOCKS: call void @__kmpc_for_static_fini(
329 // BLOCKS: br i1
330 // BLOCKS: br label
331 // BLOCKS: ret void