1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2
3; GCN-LABEL: {{^}}test_wave_barrier:
4; GCN-DAG: ; wave barrier
5; GCN-NOT: s_barrier
6
7define amdgpu_kernel void @test_wave_barrier() #0 {
8entry:
9  call void @llvm.amdgcn.wave.barrier() #1
10  ret void
11}
12
13; Check for verifier error from interpreting wave_barrier as a control
14; flow barrier.
15
16; GCN-LABEL: {{^}}test_wave_barrier_is_not_isBarrier:
17; GCN-DAG: ; wave barrier
18; GCN-NOT: s_barrier
19define amdgpu_kernel void @test_wave_barrier_is_not_isBarrier() #0 {
20entry:
21  call void @llvm.amdgcn.wave.barrier() #1
22  unreachable
23}
24
25declare void @llvm.amdgcn.wave.barrier() #1
26
27attributes #0 = { nounwind }
28attributes #1 = { convergent nounwind }
29