summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCUDA/ptx-kernels.cu
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCUDA/ptx-kernels.cu')
-rw-r--r--clang/test/CodeGenCUDA/ptx-kernels.cu12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCUDA/ptx-kernels.cu b/clang/test/CodeGenCUDA/ptx-kernels.cu
new file mode 100644
index 0000000..ecca851
--- /dev/null
+++ b/clang/test/CodeGenCUDA/ptx-kernels.cu
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -triple ptx32-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s
+
+#include "../SemaCUDA/cuda.h"
+
+// CHECK: define ptx_device{{.*}}device_function
+__device__ void device_function() {}
+
+// CHECK: define ptx_kernel{{.*}}global_function
+__global__ void global_function() {
+ // CHECK: call ptx_device{{.*}}device_function
+ device_function();
+}