1; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=kaveri -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s 2 3; GCN-LABEL: {{^}}test: 4; GCN: enable_sgpr_dispatch_ptr = 1 5; GCN: s_load_dword s{{[0-9]+}}, s[4:5], 0x0 6define void @test(i32 addrspace(1)* %out) { 7 %dispatch_ptr = call noalias i8 addrspace(2)* @llvm.amdgcn.dispatch.ptr() #0 8 %header_ptr = bitcast i8 addrspace(2)* %dispatch_ptr to i32 addrspace(2)* 9 %value = load i32, i32 addrspace(2)* %header_ptr 10 store i32 %value, i32 addrspace(1)* %out 11 ret void 12} 13 14declare noalias i8 addrspace(2)* @llvm.amdgcn.dispatch.ptr() #0 15 16attributes #0 = { readnone } 17