summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_for_ast_print.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-07-30 11:36:16 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-07-30 11:36:16 +0000
commit10e775f4a882ec49e374bbeca567e91547d78312 (patch)
treecced55f964fdfb8e5d538d246c1ec312c6356912 /clang/test/OpenMP/parallel_for_ast_print.cpp
parent3cc4a250a6a4c533097ce1e1ff272d07c30b0465 (diff)
downloadbcm5719-llvm-10e775f4a882ec49e374bbeca567e91547d78312.tar.gz
bcm5719-llvm-10e775f4a882ec49e374bbeca567e91547d78312.zip
[OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive. 'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest. Patch adds parsing and semantic analysis for this optional argument. llvm-svn: 243635
Diffstat (limited to 'clang/test/OpenMP/parallel_for_ast_print.cpp')
-rw-r--r--clang/test/OpenMP/parallel_for_ast_print.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/test/OpenMP/parallel_for_ast_print.cpp b/clang/test/OpenMP/parallel_for_ast_print.cpp
index f2899ee16ef..f3025ced3b5 100644
--- a/clang/test/OpenMP/parallel_for_ast_print.cpp
+++ b/clang/test/OpenMP/parallel_for_ast_print.cpp
@@ -21,14 +21,24 @@ T tmain(T argc) {
a = 2;
// CHECK-NEXT: for (int i = 0; i < 2; ++i)
// CHECK-NEXT: a = 2;
-#pragma omp parallel for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered if (argc) num_threads(N) default(shared) shared(e) reduction(+ : h)
+#pragma omp parallel for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered(N) if (argc) num_threads(N) default(shared) shared(e) reduction(+ : h)
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
for (int i = 0; i < 10; ++i)
for (int j = 0; j < 10; ++j)
for (int j = 0; j < 10; ++j)
for (int j = 0; j < 10; ++j)
for (int j = 0; j < 10; ++j)
foo();
- // CHECK-NEXT: #pragma omp parallel for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered if(argc) num_threads(N) default(shared) shared(e) reduction(+: h)
+ // CHECK-NEXT: #pragma omp parallel for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered(N) if(argc) num_threads(N) default(shared) shared(e) reduction(+: h)
+ // CHECK-NEXT: for (int i = 0; i < 10; ++i)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
// CHECK-NEXT: for (int i = 0; i < 10; ++i)
// CHECK-NEXT: for (int j = 0; j < 10; ++j)
// CHECK-NEXT: for (int j = 0; j < 10; ++j)
OpenPOWER on IntegriCloud