1 ; RUN: llc -mtriple=amdgcn--amdhsa -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 declare i64 @llvm.amdgcn.dispatch.id() #1
5 ; GCN-LABEL: {{^}}dispatch_id:
7 ; GCN-DAG: v_mov_b32_e32 v[[LO:[0-9]+]], s6
8 ; GCN-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], s7
9 ; GCN: flat_store_dwordx2 v{{\[[0-9]+:[0-9]+\]}}, v[[[LO]]:[[HI]]]
10 ; GCN: .amdhsa_user_sgpr_dispatch_id 1
11 define amdgpu_kernel void @dispatch_id(ptr addrspace(1) %out) #0 {
12 %tmp0 = call i64 @llvm.amdgcn.dispatch.id()
13 store i64 %tmp0, ptr addrspace(1) %out
17 attributes #0 = { nounwind }
18 attributes #1 = { nounwind readnone }
20 !llvm.module.flags = !{!0}
21 !0 = !{i32 1, !"amdgpu_code_object_version", i32 400}