diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2015-07-13 22:54:53 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2015-07-13 22:54:53 +0000 |
commit | f8b5012dfb5210d616d838a558a5dccd7f8f6aae (patch) | |
tree | fa1748382ae9c4e1ba45546c3504fa93d73b9a55 /clang/test/PCH/chain-openmp-threadprivate.cpp | |
parent | 6c40c5e0311539fcfea9bd5ef6e2330d5c4f2199 (diff) | |
download | bcm5719-llvm-f8b5012dfb5210d616d838a558a5dccd7f8f6aae.tar.gz bcm5719-llvm-f8b5012dfb5210d616d838a558a5dccd7f8f6aae.zip |
[OpenMP] Add TLS-based implementation for threadprivate directive.
llvm-svn: 242080
Diffstat (limited to 'clang/test/PCH/chain-openmp-threadprivate.cpp')
-rw-r--r-- | clang/test/PCH/chain-openmp-threadprivate.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/test/PCH/chain-openmp-threadprivate.cpp b/clang/test/PCH/chain-openmp-threadprivate.cpp index a2a885ae8cf..b14f6dc4e6e 100644 --- a/clang/test/PCH/chain-openmp-threadprivate.cpp +++ b/clang/test/PCH/chain-openmp-threadprivate.cpp @@ -1,7 +1,11 @@ // no PCH -// RUN: %clang_cc1 -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -emit-llvm -include %s -include %s %s -o - | FileCheck %s // with PCH -// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s +// no PCH +// RUN: %clang_cc1 -fopenmp -emit-llvm -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS +// with PCH +// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS #if !defined(PASS1) #define PASS1 @@ -16,11 +20,17 @@ int *a = malloc(20); #else // CHECK: call {{.*}} @__kmpc_threadprivate_register( +// CHECK-TLS: @a = {{.*}}thread_local {{.*}}global {{.*}}i32* // CHECK-LABEL: foo +// CHECK-TLS-LABEL: foo int foo() { return *a; // CHECK: call {{.*}} @__kmpc_global_thread_num( // CHECK: call {{.*}} @__kmpc_threadprivate_cached( + // CHECK-TLS: call {{.*}}i32** @_ZTW1a() } + +// CHECK-TLS: define {{.*}}i32** @_ZTW1a() + #endif |