diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2018-05-02 14:20:50 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-05-02 14:20:50 +0000 |
| commit | 18fa2323b681aae4c4e3810f2c4a1f2c2baadbb3 (patch) | |
| tree | bdfad71db1deecf791573ae4bfcd70278f80eda2 /clang/test/OpenMP/nvptx_parallel_codegen.cpp | |
| parent | 0f1da8f3657af45228ccd7461005f393b7ca9fe0 (diff) | |
| download | bcm5719-llvm-18fa2323b681aae4c4e3810f2c4a1f2c2baadbb3.tar.gz bcm5719-llvm-18fa2323b681aae4c4e3810f2c4a1f2c2baadbb3.zip | |
[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
Diffstat (limited to 'clang/test/OpenMP/nvptx_parallel_codegen.cpp')
| -rw-r--r-- | clang/test/OpenMP/nvptx_parallel_codegen.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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, |

