11; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 < %s | FileCheck -check-prefixes=CHECK,GFX908 %s
22; RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a < %s 2> %t.err | FileCheck -check-prefixes=CHECK,GFX90A %s
3- ; RUN: FileCheck -check-prefix=ERR < %t.err %s
3+ ; RUN: FileCheck --implicit-check-not=error - check-prefix=ERR < %t.err %s
44
55; Test undefined behavior where a function ends up needing AGPRs that
66; was marked with "amdgpu-agpr-alloc="="0". There should be no asserts.
99
1010; ERR: error: <unknown>:0:0: no registers from class available to allocate in function 'kernel_illegal_agpr_use_asm'
1111; ERR: error: <unknown>:0:0: no registers from class available to allocate in function 'func_illegal_agpr_use_asm'
12- ; ERR: error: <unknown>:0:0: no registers from class available to allocate in function 'kernel_calls_mfma.f32.32x32x1f32'
1312
1413; CHECK: {{^}}kernel_illegal_agpr_use_asm:
1514; CHECK: ; use a0
@@ -32,14 +31,16 @@ define void @func_illegal_agpr_use_asm() #0 {
3231}
3332
3433; CHECK-LABEL: {{^}}kernel_calls_mfma.f32.32x32x1f32:
35- ; CHECK: v_accvgpr_write_b32
34+ ; GFX908: v_accvgpr_write_b32
35+ ; GFX90A-NOT: v_accvgpr_write_b32
3636
3737; GFX908: NumVgprs: 5
38- ; GFX90A: NumVgprs: 36
39- ; CHECK: NumAgprs: 32
38+ ; GFX908: NumAgprs: 32
39+ ; GFX90A: NumVgprs: 35
40+ ; GFX90A: NumAgprs: 0
4041
4142; GFX908: TotalNumVgprs: 32
42- ; GFX90A: TotalNumVgprs: 68
43+ ; GFX90A: TotalNumVgprs: 35
4344define amdgpu_kernel void @kernel_calls_mfma.f32.32x32x1f32 (ptr addrspace (1 ) %out , float %a , float %b , <32 x float > %c ) #0 {
4445 %result = call <32 x float > @llvm.amdgcn.mfma.f32.32x32x1f32 (float %a , float %b , <32 x float > %c , i32 0 , i32 0 , i32 0 )
4546 store <32 x float > %result , ptr addrspace (1 ) %out
0 commit comments