20 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GCN,GFX10 %s2 3declare i32 @llvm.amdgcn.s.get.waveid.in.workgroup() #04 5; GCN-LABEL: {{^}}test_s_get_waveid_in_workgroup:6; GFX10: global_store_dword7; 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]], s{{\[[0-9]+:[0-9]+\]$}}11define amdgpu_kernel void @test_s_get_waveid_in_workgroup(ptr addrspace(1) %out) {12; Make sure %out is loaded and assiciated wait count already inserted13 store i32 0, ptr addrspace(1) %out14 %v = call i32 @llvm.amdgcn.s.get.waveid.in.workgroup()15 store i32 %v, ptr addrspace(1) %out16 ret void17}18 19attributes #0 = { nounwind }20