Skip to content

Commit 190f3fb

Browse files
committed
[AMDGPU] Precommit s_setprio scheduling test. NFC.
1 parent 5e28923 commit 190f3fb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
; RUN: llc -march=amdgcn -mcpu=gfx908 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN %s
2+
3+
declare void @llvm.amdgcn.s.setprio(i16)
4+
declare <4 x float> @llvm.amdgcn.mfma.f32.4x4x1f32(float, float, <4 x float>, i32, i32, i32)
5+
6+
; FIXME: setprio shall surround mfma instructions
7+
8+
; GCN-LABEL: {{^}}test_mfma_f32_4x4x1f32:
9+
; GCN: s_setprio 1
10+
; GCN: s_setprio 0
11+
; GCN: v_mfma
12+
; GCN: v_mfma
13+
define amdgpu_kernel void @test_mfma_f32_4x4x1f32(<4 x float> addrspace(1)* %arg) #0 {
14+
bb:
15+
%in.1 = load <4 x float>, <4 x float> addrspace(1)* %arg
16+
call void @llvm.amdgcn.s.setprio(i16 1)
17+
%mai.1 = tail call <4 x float> @llvm.amdgcn.mfma.f32.4x4x1f32(float 1.0, float 2.0, <4 x float> %in.1, i32 0, i32 0, i32 0)
18+
%mai.2 = tail call <4 x float> @llvm.amdgcn.mfma.f32.4x4x1f32(float 3.0, float 4.0, <4 x float> %mai.1, i32 0, i32 0, i32 0)
19+
call void @llvm.amdgcn.s.setprio(i16 0)
20+
store <4 x float> %mai.2, <4 x float> addrspace(1)* %arg
21+
ret void
22+
}

0 commit comments

Comments
 (0)