diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-05 15:08:53 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-05 15:08:53 +0000 |
commit | fd006c44eeffe1f018f7fda13eacb67a6606ec9c (patch) | |
tree | f109d0337a0888e5048c30920ed8e1cec54a72bd /clang/test/OpenMP/parallel_if_codegen.cpp | |
parent | 00216bca66242fadfd22165d4efd1479d1d2ae82 (diff) | |
download | bcm5719-llvm-fd006c44eeffe1f018f7fda13eacb67a6606ec9c.tar.gz bcm5719-llvm-fd006c44eeffe1f018f7fda13eacb67a6606ec9c.zip |
[OPENMP] Fix emission of the __kmpc_global_thread_num.
Fixed emission of the __kmpc_global_thread_num() so that it is not
messed up with alloca instructions anymore. Plus, fixes emission of the
__kmpc_global_thread_num() functions in the target outlined regions so
that they are not called before runtime is initialized.
llvm-svn: 343856
Diffstat (limited to 'clang/test/OpenMP/parallel_if_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_if_codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/OpenMP/parallel_if_codegen.cpp b/clang/test/OpenMP/parallel_if_codegen.cpp index 49e4bd402ce..ec9fc01561b 100644 --- a/clang/test/OpenMP/parallel_if_codegen.cpp +++ b/clang/test/OpenMP/parallel_if_codegen.cpp @@ -55,9 +55,9 @@ int tmain(T Arg) { // CHECK-LABEL: define {{.*}}i{{[0-9]+}} @main() int main() { -// CHECK: [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num( // CHECK: store i32 0, i32* [[ZERO_ADDR2:%.+]], // CHECK: store i32 0, i32* [[ZERO_ADDR1:%.+]], +// CHECK: [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num( // CHECK: call {{.*}}void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 0, void {{.+}}* [[CAP_FN4:@.+]] to void #pragma omp parallel if (true) fn4(); @@ -96,9 +96,9 @@ int main() { // CHECK: ret void // CHECK-LABEL: define {{.+}} @{{.+}}tmain -// CHECK: [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num( // CHECK: store i32 0, i32* [[ZERO_ADDR2:%.+]], // CHECK: store i32 0, i32* [[ZERO_ADDR1:%.+]], +// CHECK: [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num( // CHECK: call {{.*}}void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 0, void {{.+}}* [[CAP_FN1:@.+]] to void // CHECK: call {{.*}}void @__kmpc_serialized_parallel(%{{.+}}* @{{.+}}, i32 [[GTID]]) // CHECK: call void [[CAP_FN2:@.+]](i32* [[ZERO_ADDR1]], i32* [[ZERO_ADDR1]]) |