diff options
author | Carlo Bertolli <cbertol@us.ibm.com> | 2016-04-29 01:37:30 +0000 |
---|---|---|
committer | Carlo Bertolli <cbertol@us.ibm.com> | 2016-04-29 01:37:30 +0000 |
commit | 6eee9061ac1ce26c7a882faf6bb69c73ad332fa0 (patch) | |
tree | f293d254cfa332a86396836abd6f414632e82fe3 /clang/test | |
parent | 78b8bc29db8177ad133a4d04de45fe14bcf220bd (diff) | |
download | bcm5719-llvm-6eee9061ac1ce26c7a882faf6bb69c73ad332fa0.tar.gz bcm5719-llvm-6eee9061ac1ce26c7a882faf6bb69c73ad332fa0.zip |
[OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets
http://reviews.llvm.org/D18474
This patch fixes a bug in code generation of the correct OpenMP runtime library call in presence of target and teams, when target is separated by teams with multiple curly brackets. The current implementation will not be able to see the teams directive inside target and issue a call to tgt_target instead of the correct one tgt_target_teams.
llvm-svn: 267972
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/OpenMP/teams_codegen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/OpenMP/teams_codegen.cpp b/clang/test/OpenMP/teams_codegen.cpp index 1d616c37815..c26b5862575 100644 --- a/clang/test/OpenMP/teams_codegen.cpp +++ b/clang/test/OpenMP/teams_codegen.cpp @@ -29,6 +29,16 @@ int teams_argument_global_local(int a){ ++comp; } + // CK1: call i32 @__tgt_target_teams(i32 -1, i8* @{{[^,]+}}, i32 1, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 0, i32 0) + // CK1: call void @{{.+}}(i{{64|32}} %{{.+}}) + #pragma omp target + {{{ + #pragma omp teams + { + ++comp; + } + }}} + // CK1-DAG: call i32 @__tgt_target_teams(i32 -1, i8* @{{[^,]+}}, i32 2, i8** %{{[^,]+}}, i8** %{{[^,]+}}, i{{64|32}}* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32* {{.+}}@{{[^,]+}}, i32 0, i32 0), i32 [[NT:%[^,]+]], i32 0) // CK1-DAG: [[NT]] = load i32, i32* [[NTA:%[^,]+]], |