diff options
| author | Samuel Antao <sfantao@us.ibm.com> | 2016-05-26 17:49:04 +0000 |
|---|---|---|
| committer | Samuel Antao <sfantao@us.ibm.com> | 2016-05-26 17:49:04 +0000 |
| commit | ec172c6da02111b2e1150b3bd94578789d4fbd14 (patch) | |
| tree | 86d58f9d1449977bacb1d6e03886ad0461602716 /clang/test/OpenMP/target_update_ast_print.cpp | |
| parent | d6e6bf1808f54cd755847aed3a4ee40b27102cb5 (diff) | |
| download | bcm5719-llvm-ec172c6da02111b2e1150b3bd94578789d4fbd14.tar.gz bcm5719-llvm-ec172c6da02111b2e1150b3bd94578789d4fbd14.zip | |
[OpenMP] Parsing and sema support for the from clause
Summary:
The patch contains the parsing and sema support for the `from` clause.
Patch based on the original post by Kelvin Li.
Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev
Subscribers: caomhin, cfe-commits
Differential Revision: http://reviews.llvm.org/D18488
llvm-svn: 270882
Diffstat (limited to 'clang/test/OpenMP/target_update_ast_print.cpp')
| -rw-r--r-- | clang/test/OpenMP/target_update_ast_print.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/OpenMP/target_update_ast_print.cpp b/clang/test/OpenMP/target_update_ast_print.cpp index 253dad2db8c..fcb8625d7b2 100644 --- a/clang/test/OpenMP/target_update_ast_print.cpp +++ b/clang/test/OpenMP/target_update_ast_print.cpp @@ -14,20 +14,25 @@ T foo(T targ, U uarg) { U b; int l; #pragma omp target update to(a) if(l>5) device(l) + +#pragma omp target update from(b) if(l<5) device(l-1) return a + targ + (T)b; } // CHECK: static int a; // CHECK-NEXT: float b; // CHECK-NEXT: int l; // CHECK-NEXT: #pragma omp target update to(a) if(l > 5) device(l) +// CHECK-NEXT: #pragma omp target update from(b) if(l < 5) device(l - 1) // CHECK: static char a; // CHECK-NEXT: float b; // CHECK-NEXT: int l; // CHECK-NEXT: #pragma omp target update to(a) if(l > 5) device(l) +// CHECK-NEXT: #pragma omp target update from(b) if(l < 5) device(l - 1) // CHECK: static T a; // CHECK-NEXT: U b; // CHECK-NEXT: int l; // CHECK-NEXT: #pragma omp target update to(a) if(l > 5) device(l) +// CHECK-NEXT: #pragma omp target update from(b) if(l < 5) device(l - 1) int main(int argc, char **argv) { static int a; @@ -39,6 +44,8 @@ int main(int argc, char **argv) { // CHECK-NEXT: float f; #pragma omp target update to(a) if(f>0.0) device(n) // CHECK-NEXT: #pragma omp target update to(a) if(f > 0.) device(n) +#pragma omp target update from(f) if(f<0.0) device(n+1) + // CHECK-NEXT: #pragma omp target update from(f) if(f < 0.) device(n + 1) return foo(argc, f) + foo(argv[0][0], f) + a; } |

