1; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-annotate-kernel-features %s | FileCheck %s
2
3; CHECK: define void @func1() #[[FUNC:[0-9]+]] {
4define void @func1() {
5  ret void
6}
7
8; CHECK: define void @func4() #[[FUNC]] {
9define void @func4() {
10  ret void
11}
12
13; CHECK: define void @func2() #[[FUNC]] {
14define void @func2() #0 {
15  call void @func4()
16  call void @func1()
17  ret void
18}
19
20; CHECK: define void @func3() #[[FUNC]] {
21define void @func3() {
22  call void @func1()
23  ret void
24}
25
26; CHECK: define amdgpu_kernel void @kernel3() #[[FUNC:[0-9]+]] {
27define amdgpu_kernel void @kernel3() #0 {
28  call void @func2()
29  call void @func3()
30  ret void
31}
32
33attributes #0 = { "uniform-work-group-size"="false" }
34
35; CHECK: attributes #[[FUNC]] = { "amdgpu-calls" "uniform-work-group-size"="false" }
36