Artem Belevich | 9674a64 | 2015-09-22 17:23:05 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device \ |
| 2 | // RUN: -fsyntax-only -verify %s |
| 3 | // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device \ |
| 4 | // RUN: -fcuda-target-overloads -fsyntax-only -verify %s |
Eli Bendersky | f2787a0 | 2014-09-30 17:38:34 +0000 | [diff] [blame] | 5 | |
| 6 | #include "Inputs/cuda.h" |
| 7 | |
| 8 | // expected-no-diagnostics |
| 9 | __device__ void __threadfence_system() { |
Artem Belevich | 9674a64 | 2015-09-22 17:23:05 +0000 | [diff] [blame^] | 10 | // This shouldn't produce an error, since __nvvm_membar_sys should be |
| 11 | // __device__ and thus callable from device code. |
Eli Bendersky | f2787a0 | 2014-09-30 17:38:34 +0000 | [diff] [blame] | 12 | __nvvm_membar_sys(); |
| 13 | } |