1; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s
2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
3
4; GCN-LABEL: {{^}}main:
5; GCN: s_mov_b32 m0, s0
6; VI-NEXT: s_nop 0
7; GCN-NEXT: sendmsg(MSG_GS_DONE, GS_OP_NOP)
8; GCN-NEXT: s_endpgm
9
10define amdgpu_gs void @main(i32 inreg %a) #0 {
11  call void @llvm.SI.sendmsg(i32 3, i32 %a)
12  ret void
13}
14
15declare void @llvm.SI.sendmsg(i32, i32) #0
16
17attributes #0 = { nounwind }
18