Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/AMDGPU/call-graph-register-usage.ll
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
; Make sure there's no assert when a sgpr96 is used. | ; Make sure there's no assert when a sgpr96 is used. | ||||
; GCN-LABEL: {{^}}count_use_sgpr96_external_call | ; GCN-LABEL: {{^}}count_use_sgpr96_external_call | ||||
; GCN: ; sgpr96 s[{{[0-9]+}}:{{[0-9]+}}] | ; GCN: ; sgpr96 s[{{[0-9]+}}:{{[0-9]+}}] | ||||
; CI: NumSgprs: 48 | ; CI: NumSgprs: 48 | ||||
; VI-NOBUG: NumSgprs: 48 | ; VI-NOBUG: NumSgprs: 48 | ||||
; VI-BUG: NumSgprs: 96 | ; VI-BUG: NumSgprs: 96 | ||||
; GCN: NumVgprs: 24 | ; GCN: NumVgprs: 32 | ||||
define amdgpu_kernel void @count_use_sgpr96_external_call() { | define amdgpu_kernel void @count_use_sgpr96_external_call() { | ||||
entry: | entry: | ||||
tail call void asm sideeffect "; sgpr96 $0", "s"(<3 x i32> <i32 10, i32 11, i32 12>) #1 | tail call void asm sideeffect "; sgpr96 $0", "s"(<3 x i32> <i32 10, i32 11, i32 12>) #1 | ||||
call void @external() | call void @external() | ||||
ret void | ret void | ||||
} | } | ||||
; Make sure there's no assert when a sgpr160 is used. | ; Make sure there's no assert when a sgpr160 is used. | ||||
; GCN-LABEL: {{^}}count_use_sgpr160_external_call | ; GCN-LABEL: {{^}}count_use_sgpr160_external_call | ||||
; GCN: ; sgpr160 s[{{[0-9]+}}:{{[0-9]+}}] | ; GCN: ; sgpr160 s[{{[0-9]+}}:{{[0-9]+}}] | ||||
; CI: NumSgprs: 48 | ; CI: NumSgprs: 48 | ||||
; VI-NOBUG: NumSgprs: 48 | ; VI-NOBUG: NumSgprs: 48 | ||||
; VI-BUG: NumSgprs: 96 | ; VI-BUG: NumSgprs: 96 | ||||
; GCN: NumVgprs: 24 | ; GCN: NumVgprs: 32 | ||||
define amdgpu_kernel void @count_use_sgpr160_external_call() { | define amdgpu_kernel void @count_use_sgpr160_external_call() { | ||||
entry: | entry: | ||||
tail call void asm sideeffect "; sgpr160 $0", "s"(<5 x i32> <i32 10, i32 11, i32 12, i32 13, i32 14>) #1 | tail call void asm sideeffect "; sgpr160 $0", "s"(<5 x i32> <i32 10, i32 11, i32 12, i32 13, i32 14>) #1 | ||||
call void @external() | call void @external() | ||||
ret void | ret void | ||||
} | } | ||||
; Make sure there's no assert when a vgpr160 is used. | ; Make sure there's no assert when a vgpr160 is used. | ||||
; GCN-LABEL: {{^}}count_use_vgpr160_external_call | ; GCN-LABEL: {{^}}count_use_vgpr160_external_call | ||||
; GCN: ; vgpr160 v[{{[0-9]+}}:{{[0-9]+}}] | ; GCN: ; vgpr160 v[{{[0-9]+}}:{{[0-9]+}}] | ||||
; CI: NumSgprs: 48 | ; CI: NumSgprs: 48 | ||||
; VI-NOBUG: NumSgprs: 48 | ; VI-NOBUG: NumSgprs: 48 | ||||
; VI-BUG: NumSgprs: 96 | ; VI-BUG: NumSgprs: 96 | ||||
; GCN: NumVgprs: 24 | ; GCN: NumVgprs: 32 | ||||
define amdgpu_kernel void @count_use_vgpr160_external_call() { | define amdgpu_kernel void @count_use_vgpr160_external_call() { | ||||
entry: | entry: | ||||
tail call void asm sideeffect "; vgpr160 $0", "v"(<5 x i32> <i32 10, i32 11, i32 12, i32 13, i32 14>) #1 | tail call void asm sideeffect "; vgpr160 $0", "v"(<5 x i32> <i32 10, i32 11, i32 12, i32 13, i32 14>) #1 | ||||
call void @external() | call void @external() | ||||
ret void | ret void | ||||
} | } | ||||
attributes #0 = { nounwind noinline norecurse } | attributes #0 = { nounwind noinline norecurse } | ||||
attributes #1 = { nounwind noinline norecurse } | attributes #1 = { nounwind noinline norecurse } | ||||
attributes #2 = { nounwind noinline } | attributes #2 = { nounwind noinline } |