diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-03-08 15:24:08 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-03-08 15:24:08 +0000 |
commit | 2e0cbe509242697caec4a119b323475c4d006486 (patch) | |
tree | d002b306911ee4a3a6bf2c636f784d19a44e907f /clang/test/OpenMP/taskloop_reduction_codegen.cpp | |
parent | 93176a813a92542586356092a7a44e60196a390b (diff) | |
download | bcm5719-llvm-2e0cbe509242697caec4a119b323475c4d006486.tar.gz bcm5719-llvm-2e0cbe509242697caec4a119b323475c4d006486.zip |
[OPENMP] Emit sizes/init ptrs etc. data for task reductions before
using.
We may emit the code in wrong order because of incorrect implementation
of the runtime functions for task reductions. Threadprivate storages may
be initialized after real initialization of the reduction items. Patch
fixes this problem.
llvm-svn: 327008
Diffstat (limited to 'clang/test/OpenMP/taskloop_reduction_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/taskloop_reduction_codegen.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/OpenMP/taskloop_reduction_codegen.cpp b/clang/test/OpenMP/taskloop_reduction_codegen.cpp index 8abd0175b40..2623d932c7f 100644 --- a/clang/test/OpenMP/taskloop_reduction_codegen.cpp +++ b/clang/test/OpenMP/taskloop_reduction_codegen.cpp @@ -199,6 +199,17 @@ sum = 0.0; // CHECK: store float %{{.+}}, float* % // CHECK: ret void +// CHECK-NOT: call i8* @__kmpc_threadprivate_cached( +// CHECK: call i8* @__kmpc_task_reduction_get_th_data( +// CHECK: call i8* @__kmpc_threadprivate_cached( +// CHECK: call i8* @__kmpc_threadprivate_cached( +// CHECK: call i8* @__kmpc_task_reduction_get_th_data( +// CHECK-NOT: call i8* @__kmpc_threadprivate_cached( +// CHECK: call i8* @__kmpc_task_reduction_get_th_data( +// CHECK: call i8* @__kmpc_threadprivate_cached( +// CHECK: call i8* @__kmpc_task_reduction_get_th_data( +// CHECK-NOT: call i8* @__kmpc_threadprivate_cached( + // CHECK-DAG: distinct !DISubprogram(linkageName: "[[TASK]]", scope: ! // CHECK-DAG: !DISubprogram(linkageName: "[[RED_INIT1]]" // CHECK-DAG: !DISubprogram(linkageName: "[[RED_COMB1]]" |