1; RUN: opt -S -mtriple=amdgcn-amd- -amdgpu-annotate-kernel-features %s | FileCheck %s
2
3; Two kernels with different values of the uniform-work-group-attribute call the same function
4
5; CHECK: define void @func() #[[FUNC:[0-9]+]] {
6define void @func() #0 {
7  ret void
8}
9
10; CHECK: define amdgpu_kernel void @kernel1() #[[KERNEL1:[0-9]+]] {
11define amdgpu_kernel void @kernel1() #1 {
12  call void @func()
13  ret void
14}
15
16; CHECK: define amdgpu_kernel void @kernel2() #[[KERNEL2:[0-9]+]] {
17define amdgpu_kernel void @kernel2() #2 {
18  call void @func()
19  ret void
20}
21
22attributes #1 = { "uniform-work-group-size"="true" }
23
24; CHECK: attributes #[[FUNC]] = { "uniform-work-group-size"="false" }
25; CHECK: attributes #[[KERNEL1]] = { "amdgpu-calls" "uniform-work-group-size"="true" }
26; CHECK: attributes #[[KERNEL2]] = { "amdgpu-calls" "uniform-work-group-size"="false" }
27