1 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-propagate-attributes-late %s | FileCheck %s
2 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-propagate-attributes-late %s | FileCheck %s
4 ; CHECK: define internal void @max_flat_1_1024() #0 {
5 define internal void @max_flat_1_1024() #0 {
9 ; CHECK: define internal void @max_flat_1_256() #1 {
10 define internal void @max_flat_1_256() #1 {
14 ; CHECK: define amdgpu_kernel void @kernel_1_256_call_default() #1 {
15 define amdgpu_kernel void @kernel_1_256_call_default() #1 {
20 ; CHECK: define amdgpu_kernel void @kernel_1_256_call_1_256() #1 {
21 define amdgpu_kernel void @kernel_1_256_call_1_256() #1 {
22 call void @max_flat_1_256()
26 ; CHECK: define amdgpu_kernel void @kernel_1_256_call_64_64() #1 {
27 define amdgpu_kernel void @kernel_1_256_call_64_64() #1 {
28 call void @max_flat_64_64()
32 ; CHECK: define internal void @max_flat_64_64() #2 {
33 define internal void @max_flat_64_64() #2 {
37 ; CHECK: define internal void @default() #2 {
38 define internal void @default() #3 {
42 attributes #0 = { noinline "amdgpu-flat-work-group-size"="1,1024" }
43 attributes #1 = { noinline "amdgpu-flat-work-group-size"="1,256" }
44 attributes #2 = { noinline "amdgpu-flat-work-group-size"="64,64" }
45 attributes #3 = { noinline }
47 ; CHECK: attributes #0 = { noinline "amdgpu-flat-work-group-size"="1,1024"
48 ; CHECK-NEXT: attributes #1 = { noinline "amdgpu-flat-work-group-size"="1,256"
49 ; CHECK-NEXT: attributes #2 = { noinline "amdgpu-flat-work-group-size"="1,256"