diff options
author | Artem Belevich <tra@google.com> | 2015-08-20 18:28:56 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2015-08-20 18:28:56 +0000 |
commit | 7230a22d5e6d4d3dbeba8c9943a357cfa209415d (patch) | |
tree | f6c7e72bcbe5f7b441f4634a780154180f86e01f /clang/test/SemaCUDA/builtins.cu | |
parent | 10fcea5d4b9b6f9df529f58a30eb9dd6c722b07e (diff) | |
download | bcm5719-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.cu | 35 |
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 |