summaryrefslogtreecommitdiff
path: root/test/OpenMP/task_codegen.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-02 12:46:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-02 12:46:48 +0000
commitb5ea630dfd1a0d3e5c08d8959158608dd213d9aa (patch)
tree414ded0ca2d2732345c4d423b8f3cd326d9097e8 /test/OpenMP/task_codegen.c
parent4bc3002fe03f32a9d85720bece65eeda40c75742 (diff)
Notes
Diffstat (limited to 'test/OpenMP/task_codegen.c')
-rw-r--r--test/OpenMP/task_codegen.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/OpenMP/task_codegen.c b/test/OpenMP/task_codegen.c
new file mode 100644
index 000000000000..579a6f1b9229
--- /dev/null
+++ b/test/OpenMP/task_codegen.c
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// expected-no-diagnostics
+#ifndef HEADER
+#define HEADER
+
+void foo();
+
+// CHECK-LABEL: @main
+int main() {
+ // CHECK: call i32 @__kmpc_global_thread_num(
+ // CHECK: call i8* @__kmpc_omp_task_alloc(
+ // CHECK: call i32 @__kmpc_omp_task(
+#pragma omp task
+ {
+#pragma omp taskgroup
+ {
+#pragma omp task
+ foo();
+ }
+ }
+ // CHECK: ret i32 0
+ return 0;
+}
+// CHECK: call void @__kmpc_taskgroup(
+// CHECK: call i8* @__kmpc_omp_task_alloc(
+// CHECK: call i32 @__kmpc_omp_task(
+// CHECK: call void @__kmpc_end_taskgroup(
+#endif