diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-19 18:16:37 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-19 18:16:37 +0000 |
commit | ce90181751246f240302a930ca853cb5b1fb95c5 (patch) | |
tree | d7087c39f14d49e6d921bf65edd7053db94fd111 /clang/test | |
parent | 2bb4a4901bcbe3bb1d7c4b88064fd8c6bcc405e4 (diff) | |
download | bcm5719-llvm-ce90181751246f240302a930ca853cb5b1fb95c5.tar.gz bcm5719-llvm-ce90181751246f240302a930ca853cb5b1fb95c5.zip |
[OPENMP]Mark the loop as started when initialized.
Need to mark the loop as started when the initialization statement is
found. It is required to prevent possible incorrect loop iteraton
variable detection during template instantiation and fix the compiler
crash during the codegen.
llvm-svn: 349657
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp b/clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp index 5f003dd6ccf..2ecb9ca0e24 100644 --- a/clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp +++ b/clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp @@ -53,6 +53,13 @@ tx ftemplate(int n) { } } +#pragma omp target teams distribute parallel for collapse(2) + for(int i = 0; i < n; i++) { + for(int j = 0; j < n; j++) { + c[i][j] = i + j; + } + } + #pragma omp target teams distribute parallel for map(a, v[:N]) for(int i = 0; i < n; i++) a[i] = v[i]; @@ -212,7 +219,11 @@ int bar(int n){ // CHECK: call void @__kmpc_for_static_fini( // CHECK: ret void -// CHECK: define weak void @__omp_offloading_{{.*}}_l56(i[[SZ:64|32]] %{{[^,]+}}, [1000 x i32]* dereferenceable{{.*}}, i32* %{{[^)]+}}) +// CHECK: define weak void @__omp_offloading_{{.*}}_l56(i[[SZ:64|32]] %{{[^,]+}}, [10 x [10 x i32]]* dereferenceable{{.*}}) +// CHECK: call void [[OUTLINED:@__omp_outlined.*]](i32* %{{.+}}, i32* %{{.+}}, i[[SZ]] %{{.*}}, i[[SZ]] %{{.*}}, i[[SZ]] %{{.*}}, [10 x [10 x i32]]* %{{.*}}) +// CHECK: define internal void [[OUTLINED]](i32* noalias %{{.*}}, i32* noalias %{{.*}} i[[SZ]] %{{.+}}, i[[SZ]] %{{.+}}, i[[SZ]] %{{.+}}, [10 x [10 x i32]]* dereferenceable{{.*}}) + +// CHECK: define weak void @__omp_offloading_{{.*}}_l63(i[[SZ:64|32]] %{{[^,]+}}, [1000 x i32]* dereferenceable{{.*}}, i32* %{{[^)]+}}) // CHECK: call void [[OUTLINED:@__omp_outlined.*]](i32* %{{.+}}, i32* %{{.+}}, i[[SZ]] %{{.*}}, i[[SZ]] %{{.*}}, i[[SZ]] %{{.*}}, [1000 x i32]* %{{.*}}, i32* %{{.*}}) // CHECK: define internal void [[OUTLINED]](i32* noalias %{{.*}}, i32* noalias %{{.*}} i[[SZ]] %{{.+}}, i[[SZ]] %{{.+}}, i[[SZ]] %{{.+}}, [1000 x i32]* dereferenceable{{.*}}, i32* %{{.*}}) |