1
1
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 < %s | FileCheck -check-prefixes=CHECK,GFX908 %s
2
2
; 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
4
4
5
5
; Test undefined behavior where a function ends up needing AGPRs that
6
6
; was marked with "amdgpu-agpr-alloc="="0". There should be no asserts.
9
9
10
10
; ERR: error: <unknown>:0:0: no registers from class available to allocate in function 'kernel_illegal_agpr_use_asm'
11
11
; 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'
13
12
14
13
; CHECK: {{^}}kernel_illegal_agpr_use_asm:
15
14
; CHECK: ; use a0
@@ -32,14 +31,16 @@ define void @func_illegal_agpr_use_asm() #0 {
32
31
}
33
32
34
33
; 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
36
36
37
37
; GFX908: NumVgprs: 5
38
- ; GFX90A: NumVgprs: 36
39
- ; CHECK: NumAgprs: 32
38
+ ; GFX908: NumAgprs: 32
39
+ ; GFX90A: NumVgprs: 35
40
+ ; GFX90A: NumAgprs: 0
40
41
41
42
; GFX908: TotalNumVgprs: 32
42
- ; GFX90A: TotalNumVgprs: 68
43
+ ; GFX90A: TotalNumVgprs: 35
43
44
define amdgpu_kernel void @kernel_calls_mfma.f32.32x32x1f32 (ptr addrspace (1 ) %out , float %a , float %b , <32 x float > %c ) #0 {
44
45
%result = call <32 x float > @llvm.amdgcn.mfma.f32.32x32x1f32 (float %a , float %b , <32 x float > %c , i32 0 , i32 0 , i32 0 )
45
46
store <32 x float > %result , ptr addrspace (1 ) %out
0 commit comments