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/task_in_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/task_in_reduction_codegen.cpp')
| -rw-r--r-- | clang/test/OpenMP/task_in_reduction_codegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/OpenMP/task_in_reduction_codegen.cpp b/clang/test/OpenMP/task_in_reduction_codegen.cpp index 30ba9a16e37..39448570175 100644 --- a/clang/test/OpenMP/task_in_reduction_codegen.cpp +++ b/clang/test/OpenMP/task_in_reduction_codegen.cpp @@ -78,9 +78,11 @@ int main(int argc, char **argv) { // CHECK-NEXT: call i8* @__kmpc_task_reduction_get_th_data(i32 [[GTID]], i8* [[TD1]], i8* [[A_PTR]]) // CHECK: [[D_REF:%.+]] = getelementptr inbounds % // CHECK-NEXT: [[D_ADDR:%.+]] = load i16*, i16** [[D_REF]], +// CHECK: call i8* @__kmpc_threadprivate_cached( // CHECK: [[TD2:%.+]] = load i8*, i8** [[TD2_ADDR]], // CHECK-NEXT: [[D_PTR:%.+]] = bitcast i16* [[D_ADDR]] to i8* // CHECK-NEXT: call i8* @__kmpc_task_reduction_get_th_data(i32 [[GTID]], i8* [[TD2]], i8* [[D_PTR]]) // CHECK: add nsw i32 // CHECK: store i32 % +// CHECK-NOT: call i8* @__kmpc_threadprivate_cached( #endif |

