1; RUN: opt -S -mtriple=amdgcn-amd- -amdgpu-annotate-kernel-features %s | FileCheck %s
2
3; Test to verify if the attribute gets propagated across nested function calls
4
5; CHECK: define void @func1() #[[FUNC:[0-9]+]] {
6define void @func1() #0 {
7  ret void
8}
9
10; CHECK: define void @func2() #[[FUNC]] {
11define void @func2() #1 {
12  call void @func1()
13  ret void
14}
15
16; CHECK: define amdgpu_kernel void @kernel3() #[[KERNEL:[0-9]+]] {
17define amdgpu_kernel void @kernel3() #2 {
18  call void @func2()
19  ret void
20}
21
22attributes #2 = { "uniform-work-group-size"="true" }
23
24; CHECK: attributes #[[FUNC]] = { "uniform-work-group-size"="true" }
25; CHECK: attributes #[[KERNEL]] = { "amdgpu-calls" "uniform-work-group-size"="true" }
26