[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / AMDGPU / barrier-elimination.ll
blobc526baaab9cdacb55f8247220b3d264206f90022
1 ; RUN: llc -march=amdgcn < %s | FileCheck %s
3 ; CHECK-LABEL: {{^}}unknown_wgs:
4 ; CHECK: s_barrier
5 define amdgpu_kernel void @unknown_wgs() {
6   tail call void @llvm.amdgcn.s.barrier() #0
7   ret void
10 ; CHECK-LABEL: {{^}}flat_wgs_attr_32_128:
11 ; CHECK: s_barrier
12 define amdgpu_kernel void @flat_wgs_attr_32_128() #1 {
13   tail call void @llvm.amdgcn.s.barrier() #0
14   ret void
17 ; CHECK-LABEL: {{^}}flat_wgs_attr_32_64:
18 ; CHECK: :
19 ; CHECK-NEXT: ; wave barrier
20 ; CHECK-NEXT: s_endpgm
21 define amdgpu_kernel void @flat_wgs_attr_32_64() #2 {
22   tail call void @llvm.amdgcn.s.barrier() #0
23   ret void
26 declare void @llvm.amdgcn.s.barrier() #0
28 attributes #0 = { convergent nounwind }
29 attributes #1 = { nounwind "amdgpu-flat-work-group-size"="32,128" }
30 attributes #2 = { nounwind "amdgpu-flat-work-group-size"="32,64" }