Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/AMDGPU/callee-special-input-sgprs.ll
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri --amdhsa-code-object-version=2 -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -enable-var-scope -check-prefixes=GCN,CIVI %s | ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=kaveri -amdgpu-fixed-function-abi=0 --amdhsa-code-object-version=2 -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -enable-var-scope -check-prefixes=GCN,CIVI %s | ||||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --amdhsa-code-object-version=2 -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -enable-var-scope -check-prefixes=GCN,GFX9 %s | ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -amdgpu-fixed-function-abi=0 --amdhsa-code-object-version=2 -enable-ipra=0 -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -enable-var-scope -check-prefixes=GCN,GFX9 %s | ||||
; GCN-LABEL: {{^}}use_dispatch_ptr: | ; GCN-LABEL: {{^}}use_dispatch_ptr: | ||||
; GCN: s_load_dword s{{[0-9]+}}, s[4:5] | ; GCN: s_load_dword s{{[0-9]+}}, s[4:5] | ||||
define hidden void @use_dispatch_ptr() #1 { | define hidden void @use_dispatch_ptr() #1 { | ||||
%dispatch_ptr = call noalias i8 addrspace(4)* @llvm.amdgcn.dispatch.ptr() #0 | %dispatch_ptr = call noalias i8 addrspace(4)* @llvm.amdgcn.dispatch.ptr() #0 | ||||
%header_ptr = bitcast i8 addrspace(4)* %dispatch_ptr to i32 addrspace(4)* | %header_ptr = bitcast i8 addrspace(4)* %dispatch_ptr to i32 addrspace(4)* | ||||
%value = load volatile i32, i32 addrspace(4)* %header_ptr | %value = load volatile i32, i32 addrspace(4)* %header_ptr | ||||
ret void | ret void | ||||
} | } | ||||
; GCN-LABEL: {{^}}kern_indirect_use_dispatch_ptr: | ; GCN-LABEL: {{^}}kern_indirect_use_dispatch_ptr: | ||||
; GCN: enable_sgpr_dispatch_ptr = 1 | ; GCN: enable_sgpr_dispatch_ptr = 1 | ||||
; GCN-NOT: s[4:5] | ; GCN-NOT: s[4:5] | ||||
; GCN-NOT: s4 | ; GCN-NOT: s4 | ||||
arsenm: This test should force use the variable ABI. We already have a dedicated test for the fixed ABI… | |||||
; GCN-NOT: s5 | ; GCN-NOT: s5 | ||||
define amdgpu_kernel void @kern_indirect_use_dispatch_ptr(i32) #1 { | define amdgpu_kernel void @kern_indirect_use_dispatch_ptr(i32) #1 { | ||||
call void @use_dispatch_ptr() | call void @use_dispatch_ptr() | ||||
ret void | ret void | ||||
} | } | ||||
; GCN-LABEL: {{^}}use_queue_ptr: | ; GCN-LABEL: {{^}}use_queue_ptr: | ||||
; GCN: s_load_dword s{{[0-9]+}}, s[4:5] | ; GCN: s_load_dword s{{[0-9]+}}, s[4:5] | ||||
▲ Show 20 Lines • Show All 571 Lines • Show Last 20 Lines |
This test should force use the variable ABI. We already have a dedicated test for the fixed ABI for these inputs (callee-special-input-sgprs-fixed-abi.ll)