1; RUN: llc -march=amdgcn < %s | FileCheck %s
2; RUN: llc -march=amdgcn < %s -global-isel | FileCheck %s
3
4; CHECK-LABEL: {{^}}unknown_wgs:
5; CHECK: s_barrier
6define amdgpu_kernel void @unknown_wgs() {
7  tail call void @llvm.amdgcn.s.barrier() #0
8  ret void
9}
10
11; CHECK-LABEL: {{^}}flat_wgs_attr_32_128:
12; CHECK: s_barrier
13define amdgpu_kernel void @flat_wgs_attr_32_128() #1 {
14  tail call void @llvm.amdgcn.s.barrier() #0
15  ret void
16}
17
18; CHECK-LABEL: {{^}}flat_wgs_attr_32_64:
19; CHECK: :
20; CHECK-NEXT: ; wave barrier
21; CHECK-NEXT: s_endpgm
22define amdgpu_kernel void @flat_wgs_attr_32_64() #2 {
23  tail call void @llvm.amdgcn.s.barrier() #0
24  ret void
25}
26
27declare void @llvm.amdgcn.s.barrier() #0
28
29attributes #0 = { convergent nounwind }
30attributes #1 = { nounwind "amdgpu-flat-work-group-size"="32,128" }
31attributes #2 = { nounwind "amdgpu-flat-work-group-size"="32,64" }
32