summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_parallel_no_exceptions.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-07 20:57:59 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-07 20:57:59 +0000
commite3b0a19d4f23385448c24de82bbd15d4401f222a (patch)
tree6e7a70c2aa57e4090957e846049af89c9ef29eb3 /clang/test/OpenMP/target_parallel_no_exceptions.cpp
parent00e25c5459dc73eafac570509e141186159d47a9 (diff)
downloadbcm5719-llvm-e3b0a19d4f23385448c24de82bbd15d4401f222a.tar.gz
bcm5719-llvm-e3b0a19d4f23385448c24de82bbd15d4401f222a.zip
[OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.
Summary: For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted. Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, hfinkel, tstellar Reviewed By: ABataev, Hahnfeld Subscribers: rengolin, Hahnfeld, cfe-commits Differential Revision: https://reviews.llvm.org/D29904 llvm-svn: 310306
Diffstat (limited to 'clang/test/OpenMP/target_parallel_no_exceptions.cpp')
-rw-r--r--clang/test/OpenMP/target_parallel_no_exceptions.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/OpenMP/target_parallel_no_exceptions.cpp b/clang/test/OpenMP/target_parallel_no_exceptions.cpp
new file mode 100644
index 00000000000..95189a3ade2
--- /dev/null
+++ b/clang/test/OpenMP/target_parallel_no_exceptions.cpp
@@ -0,0 +1,18 @@
+/// Make sure no exception messages are inclided in the llvm output.
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix CHK-EXCEPTION
+
+void test_increment() {
+#pragma omp target
+ {
+ []() { return; }();
+ }
+}
+
+int main() {
+ test_increment();
+ return 0;
+}
+
+//CHK-EXCEPTION-NOT: invoke
+
OpenPOWER on IntegriCloud