From 18fa2323b681aae4c4e3810f2c4a1f2c2baadbb3 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 2 May 2018 14:20:50 +0000 Subject: [OPENMP] Emit names of the globals depending on target. Some symbols are not allowed to be used as names on some targets. Patch ries to unify the emission of the names of LLVM globals so they could be used on different targets. llvm-svn: 331358 --- clang/test/OpenMP/nvptx_parallel_codegen.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'clang/test/OpenMP/nvptx_parallel_codegen.cpp') diff --git a/clang/test/OpenMP/nvptx_parallel_codegen.cpp b/clang/test/OpenMP/nvptx_parallel_codegen.cpp index 932454a6f84..f8f91e87245 100644 --- a/clang/test/OpenMP/nvptx_parallel_codegen.cpp +++ b/clang/test/OpenMP/nvptx_parallel_codegen.cpp @@ -51,6 +51,14 @@ tx ftemplate(int n) { b[2] += 1; } + #pragma omp target + { + #pragma omp parallel + { + #pragma omp critical + ++a; + } + } return a; } @@ -62,7 +70,9 @@ int bar(int n){ return a; } - // CHECK-NOT: define {{.*}}void {{@__omp_offloading_.+template.+l17}}_worker() +// CHECK: @"_gomp_critical_user_$var" = common global [8 x i32] zeroinitializer + +// CHECK-NOT: define {{.*}}void {{@__omp_offloading_.+template.+l17}}_worker() // CHECK-LABEL: define {{.*}}void {{@__omp_offloading_.+template.+l26}}_worker() // CHECK-DAG: [[OMP_EXEC_STATUS:%.+]] = alloca i8, -- cgit v1.2.3