• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
2; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
3
4
5;; Kernel function using ptx_kernel calling conv
6
7; CHECK: .entry kernel_func
8define ptx_kernel void @kernel_func(float* %a) {
9; CHECK: ret
10  ret void
11}
12
13;; Device function
14; CHECK: .func device_func
15define void @device_func(float* %a) {
16; CHECK: ret
17  ret void
18}
19
20;; Kernel function using NVVM metadata
21; CHECK: .entry metadata_kernel
22define void @metadata_kernel(float* %a) {
23; CHECK: ret
24  ret void
25}
26
27
28!nvvm.annotations = !{!1}
29
30!1 = !{void (float*)* @metadata_kernel, !"kernel", i32 1}
31