summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCUDA/builtins.cu
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-08-20 18:28:56 +0000
committerArtem Belevich <tra@google.com>2015-08-20 18:28:56 +0000
commit7230a22d5e6d4d3dbeba8c9943a357cfa209415d (patch)
treef6c7e72bcbe5f7b441f4634a780154180f86e01f /clang/test/SemaCUDA/builtins.cu
parent10fcea5d4b9b6f9df529f58a30eb9dd6c722b07e (diff)
downloadbcm5719-llvm-7230a22d5e6d4d3dbeba8c9943a357cfa209415d.tar.gz
bcm5719-llvm-7230a22d5e6d4d3dbeba8c9943a357cfa209415d.zip
Revert r245496 "[CUDA] Add appropriate host/device attribute to builtins."
It's breaking internal test. llvm-svn: 245592
Diffstat (limited to 'clang/test/SemaCUDA/builtins.cu')
-rw-r--r--clang/test/SemaCUDA/builtins.cu35
1 files changed, 0 insertions, 35 deletions
diff --git a/clang/test/SemaCUDA/builtins.cu b/clang/test/SemaCUDA/builtins.cu
deleted file mode 100644
index 80b9d69980b..00000000000
--- a/clang/test/SemaCUDA/builtins.cu
+++ /dev/null
@@ -1,35 +0,0 @@
-// Tests that target-specific builtins have appropriate host/device
-// attributes and that CUDA call restrictions are enforced. Also
-// verify that non-target builtins can be used from both host and
-// device functions.
-//
-// REQUIRES: x86-registered-target
-// REQUIRES: nvptx-registered-target
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s
-// RUN: %clang_cc1 -triple nvptx64-unknown-cuda -fcuda-is-device \
-// RUN: -fsyntax-only -verify %s
-
-
-#ifdef __CUDA_ARCH__
-// Device-side builtins are not allowed to be called from host functions.
-void hf() {
- int x = __builtin_ptx_read_tid_x(); // expected-note {{'__builtin_ptx_read_tid_x' declared here}}
- // expected-error@-1 {{reference to __device__ function '__builtin_ptx_read_tid_x' in __host__ function}}
- x = __builtin_abs(1);
-}
-__attribute__((device)) void df() {
- int x = __builtin_ptx_read_tid_x();
- x = __builtin_abs(1);
-}
-#else
-// Host-side builtins are not allowed to be called from device functions.
-__attribute__((device)) void df() {
- int x = __builtin_ia32_rdtsc(); // expected-note {{'__builtin_ia32_rdtsc' declared here}}
- // expected-error@-1 {{reference to __host__ function '__builtin_ia32_rdtsc' in __device__ function}}
- x = __builtin_abs(1);
-}
-void hf() {
- int x = __builtin_ia32_rdtsc();
- x = __builtin_abs(1);
-}
-#endif
OpenPOWER on IntegriCloud