summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-09-22 17:23:09 +0000
committerArtem Belevich <tra@google.com>2015-09-22 17:23:09 +0000
commit2325675143648fdde6457e097a0540474593968f (patch)
tree5acb8701309b4bda2e4efbc5901ec215b51041ff /clang/test
parent9674a64cd9f83b6ad7b8b4d1dab82966ad7e050b (diff)
downloadbcm5719-llvm-2325675143648fdde6457e097a0540474593968f.tar.gz
bcm5719-llvm-2325675143648fdde6457e097a0540474593968f.zip
[CUDA] Fixes minor cuda-related issues in the driver
* Only the last of the --cuda-host-only/--cuda-device-only options has effect. * CudaHostAction always wraps host-side compilation now. * Fixed printing of empty action lists. Differential Revision: http://reviews.llvm.org/D12892 llvm-svn: 248297
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/cuda-options.cu22
1 files changed, 20 insertions, 2 deletions
diff --git a/clang/test/Driver/cuda-options.cu b/clang/test/Driver/cuda-options.cu
index 2ac4fbf34c6..23ba2967e8d 100644
--- a/clang/test/Driver/cuda-options.cu
+++ b/clang/test/Driver/cuda-options.cu
@@ -21,7 +21,7 @@
// Then link things.
// RUN: -check-prefix CUDA-L %s
-// Verify that -cuda-no-device disables device-side compilation and linking
+// Verify that --cuda-host-only disables device-side compilation and linking
// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only %s 2>&1 \
// Make sure we didn't run device-side compilation.
// RUN: | FileCheck -check-prefix CUDA-ND \
@@ -30,13 +30,31 @@
// Linking is allowed to happen, even if we're missing GPU code.
// RUN: -check-prefix CUDA-L %s
-// Verify that -cuda-no-host disables host-side compilation and linking
+// Same test as above, but with preceeding --cuda-device-only to make
+// sure only last option has effect.
+// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only --cuda-host-only %s 2>&1 \
+// Make sure we didn't run device-side compilation.
+// RUN: | FileCheck -check-prefix CUDA-ND \
+// Then compile host side and make sure we don't attempt to incorporate GPU code.
+// RUN: -check-prefix CUDA-H -check-prefix CUDA-H-NI \
+// Linking is allowed to happen, even if we're missing GPU code.
+// RUN: -check-prefix CUDA-L %s
+
+// Verify that --cuda-device-only disables host-side compilation and linking
// RUN: %clang -### -target x86_64-linux-gnu --cuda-device-only %s 2>&1 \
// Compile device-side to PTX assembly
// RUN: | FileCheck -check-prefix CUDA-D1 -check-prefix CUDA-D1NS\
// Make sure there are no host cmpilation or linking.
// RUN: -check-prefix CUDA-NH -check-prefix CUDA-NL %s
+// Same test as above, but with preceeding --cuda-host-only to make
+// sure only last option has effect.
+// RUN: %clang -### -target x86_64-linux-gnu --cuda-host-only --cuda-device-only %s 2>&1 \
+// Compile device-side to PTX assembly
+// RUN: | FileCheck -check-prefix CUDA-D1 -check-prefix CUDA-D1NS\
+// Make sure there are no host cmpilation or linking.
+// RUN: -check-prefix CUDA-NH -check-prefix CUDA-NL %s
+
// Verify that with -S we compile host and device sides to assembly
// and incorporate device code on the host side.
// RUN: %clang -### -target x86_64-linux-gnu -S -c %s 2>&1 \
OpenPOWER on IntegriCloud