diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-16 14:01:00 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-08-16 14:01:00 +0000 |
commit | aee18557f7b2c9b446ffd8718a9938d8c8069526 (patch) | |
tree | b57d6759279ee5804282812dbb6adcea6dd75900 /clang/test/OpenMP/parallel_sections_codegen.cpp | |
parent | ff64aa514b707cb42013f9389bac7535c7d2cef4 (diff) | |
download | bcm5719-llvm-aee18557f7b2c9b446ffd8718a9938d8c8069526.tar.gz bcm5719-llvm-aee18557f7b2c9b446ffd8718a9938d8c8069526.zip |
[OPRNMP] Fix for PR33445: ICE: OpenMP target containing ordered for.
If exceptions are enabled, there may be a problem with the codegen of
the finalization functions from OpenMP runtime. It happens because of
the problem with the getting of thread identifier value. Patch tries to
fix it by using the result of the call of function
__kmpc_global_thread_num() rather than loading of value of outlined
function parameter.
llvm-svn: 311007
Diffstat (limited to 'clang/test/OpenMP/parallel_sections_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_sections_codegen.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/test/OpenMP/parallel_sections_codegen.cpp b/clang/test/OpenMP/parallel_sections_codegen.cpp index 6fc687d0c50..afbc6e4d5ef 100644 --- a/clang/test/OpenMP/parallel_sections_codegen.cpp +++ b/clang/test/OpenMP/parallel_sections_codegen.cpp @@ -28,9 +28,7 @@ int main() { { // CHECK: store i32 0, i32* [[LB_PTR:%.+]], // CHECK: store i32 1, i32* [[UB_PTR:%.+]], -// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]], -// CHECK: [[GTID:%.+]] = load i32, i32* [[GTID_REF]], -// CHECK: call void @__kmpc_for_static_init_4(%{{.+}}* @{{.+}}, i32 [[GTID]], i32 34, i32* [[IS_LAST_PTR:%.+]], i32* [[LB_PTR]], i32* [[UB_PTR]], i32* [[STRIDE_PTR:%.+]], i32 1, i32 1) +// CHECK: call void @__kmpc_for_static_init_4(%{{.+}}* @{{.+}}, i32 [[GTID:%.+]], i32 34, i32* [[IS_LAST_PTR:%.+]], i32* [[LB_PTR]], i32* [[UB_PTR]], i32* [[STRIDE_PTR:%.+]], i32 1, i32 1) // <<UB = min(UB, GlobalUB);>> // CHECK: [[UB:%.+]] = load i32, i32* [[UB_PTR]] // CHECK: [[CMP:%.+]] = icmp slt i32 [[UB]], 1 @@ -76,7 +74,7 @@ int main() { // CHECK-LABEL: tmain // CHECK: call void {{.*}} @__kmpc_fork_call( -// CHECK-NOT: __kmpc_global_thread_num +// CHECK: __kmpc_global_thread_num // CHECK: call void @__kmpc_for_static_init_4( // CHECK: invoke void @{{.*}}foo{{.*}}() // CHECK-NEXT: unwind label %[[TERM_LPAD:.+]] |