annotate clang/test/CodeGenCUDA/kernel-arg-name-metadata.cu @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fhip-kernel-arg-name \
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 // RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3 // RUN: | FileCheck %s
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5 // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6 // RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7 // RUN: | FileCheck -check-prefix=NEG %s
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 #include "Inputs/cuda.h"
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
10
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
11 // CHECK: define{{.*}} amdgpu_kernel void @_Z6kerneliPf({{.*}} !kernel_arg_name [[MD:![0-9]+]]
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
12 // NEG-NOT: define{{.*}} amdgpu_kernel void @_Z6kerneliPf({{.*}} !kernel_arg_name
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
13 __global__ void kernel(int arg1, float *arg2) {
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
14 }
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
15
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
16 // CHECK: [[MD]] = !{!"arg1", !"arg2"}