207
|
1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp %s -emit-llvm -o - -disable-llvm-optzns | FileCheck %s
|
150
|
2
|
|
3 // CHECK: declare !callback ![[cid:[0-9]+]] void @__kmpc_fork_call
|
|
4 // CHECK: declare !callback ![[cid]] void @__kmpc_fork_teams
|
|
5 // CHECK: ![[cid]] = !{![[cidb:[0-9]+]]}
|
|
6 // CHECK: ![[cidb]] = !{i64 2, i64 -1, i64 -1, i1 true}
|
|
7
|
|
8 void work1(int, int);
|
|
9 void work2(int, int);
|
|
10 void work12(int, int);
|
|
11
|
|
12 void foo(int q) {
|
|
13 int p = 2;
|
|
14
|
|
15 #pragma omp parallel firstprivate(q, p)
|
|
16 work1(p, q);
|
|
17
|
|
18 #pragma omp parallel for firstprivate(p, q)
|
|
19 for (int i = 0; i < q; i++)
|
|
20 work2(i, p);
|
|
21
|
|
22 #pragma omp target teams firstprivate(p)
|
|
23 work12(p, p);
|
|
24 }
|