diff options
| author | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2017-08-09 01:02:19 +0000 |
|---|---|---|
| committer | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2017-08-09 01:02:19 +0000 |
| commit | 52898435970ef0cacf7819500ca9a5f2a79fe23d (patch) | |
| tree | 1abdcc41184c999988fe245380390b122eac59b6 /clang/test | |
| parent | 703035474467d0c84ed80c969ef3c58b7bf8c244 (diff) | |
| download | bcm5719-llvm-52898435970ef0cacf7819500ca9a5f2a79fe23d.tar.gz bcm5719-llvm-52898435970ef0cacf7819500ca9a5f2a79fe23d.zip | |
[OpenMP] Fix bug regarding cubin integration into host binary
when a BindArchAction is used.
This is not a functional change.
Original Diff: D29654
llvm-svn: 310433
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/openmp-offload.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Driver/openmp-offload.c b/clang/test/Driver/openmp-offload.c index f174f6e5069..e9ad2dc0f56 100644 --- a/clang/test/Driver/openmp-offload.c +++ b/clang/test/Driver/openmp-offload.c @@ -660,6 +660,16 @@ /// ########################################################################### +/// Check cubin file generation and usage by nvlink when toolchain has BindArchAction +// RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-CUBIN-DARWIN %s + +// CHK-CUBIN-DARWIN: clang{{.*}}" "-o" "{{.*}}-openmp-nvptx64-nvidia-cuda.s" +// CHK-CUBIN-DARWIN-NEXT: ptxas{{.*}}" "--output-file" "{{.*}}-openmp-nvptx64-nvidia-cuda.cubin" "{{.*}}-openmp-nvptx64-nvidia-cuda.s" +// CHK-CUBIN-DARWIN-NEXT: nvlink" "-o" "{{.*}}-openmp-nvptx64-nvidia-cuda" {{.*}} "openmp-offload-openmp-nvptx64-nvidia-cuda.cubin" + +/// ########################################################################### + /// Check cubin file generation and usage by nvlink // RUN: touch %t1.o // RUN: touch %t2.o @@ -667,3 +677,13 @@ // RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s // CHK-TWOCUBIN: nvlink"{{.*}}"openmp-offload-{{.*}}.cubin" "openmp-offload-{{.*}}.cubin" + +/// ########################################################################### + +/// Check cubin file generation and usage by nvlink when toolchain has BindArchAction +// RUN: touch %t1.o +// RUN: touch %t2.o +// RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda %t1.o %t2.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-TWOCUBIN-DARWIN %s + +// CHK-TWOCUBIN-DARWIN: nvlink"{{.*}}"openmp-offload-{{.*}}.cubin" "openmp-offload-{{.*}}.cubin" |

