1 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,GFX10 %s
3 declare i32 @llvm.amdgcn.s.get.waveid.in.workgroup() #0
5 ; GCN-LABEL: {{^}}test_s_get_waveid_in_workgroup:
6 ; GFX10: global_store_dword
7 ; GFX10: s_get_waveid_in_workgroup [[DEST:s[0-9]+]]
8 ; GFX10: s_waitcnt lgkmcnt(0)
9 ; GFX10: v_mov_b32_e32 [[VDEST:v[0-9]+]], [[DEST]]
10 ; GFX10: global_store_dword v[{{[0-9:]+}}], [[VDEST]], off
11 define amdgpu_kernel void @test_s_get_waveid_in_workgroup(i32 addrspace(1)* %out) {
12 ; Make sure %out is loaded and assiciated wait count already inserted
13 store i32 0, i32 addrspace(1)* %out
14 %v = call i32 @llvm.amdgcn.s.get.waveid.in.workgroup()
15 store i32 %v, i32 addrspace(1)* %out
19 attributes #0 = { nounwind }