1 ; RUN: llc -march=amdgcn -mcpu=gfx908 -debug-only=machine-scheduler -verify-machineinstrs < %s 2>&1 | FileCheck -enable-var-scope %s
4 declare <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half>, <4 x half>, <32 x float>, i32, i32, i32)
6 ; CHECK: CritRes: {{[0-9]+}} HWXDL
7 ; CHECK: Picking: Cand SU([[nid:[0-9]+]]) RES-DEMAND
8 ; CHECK: Scheduling SU([[nid]]) {{.*}} V_MFMA_F32_32X32X4F16
9 define amdgpu_kernel void @schedule-xdl-resource(ptr addrspace(1) %in, ptr addrspace(1) %out, ptr addrspace(3) %lds, i32 %stride) #0 {
10 %in_ptr.1 = getelementptr <32 x float>, ptr addrspace(1) %in, i32 %stride
11 %in_ptr.2 = getelementptr <32 x float>, ptr addrspace(1) %in_ptr.1, i32 %stride
12 %in_ptr.3 = getelementptr <32 x float>, ptr addrspace(1) %in_ptr.2, i32 %stride
13 %in.load.1 = load <32 x float>, ptr addrspace (1) %in_ptr.1
14 %in.load.2 = load <32 x float>, ptr addrspace (1) %in_ptr.2
15 %in.load.3 = load <32 x float>, ptr addrspace (1) %in_ptr.3
16 %lds_ptr.1 = getelementptr <4 x half>, ptr addrspace(3) %lds, i32 %stride
17 %lds_ptr.2 = getelementptr <4 x half>, ptr addrspace(3) %lds_ptr.1, i32 %stride
18 %lds_ptr.3 = getelementptr <4 x half>, ptr addrspace(3) %lds_ptr.2, i32 %stride
19 %lds.load.1 = load <4 x half>, ptr addrspace(3) %lds_ptr.1
20 %lds.load.2 = load <4 x half>, ptr addrspace(3) %lds_ptr.2
21 %lds.load.3 = load <4 x half>, ptr addrspace(3) %lds_ptr.3
22 %mai.1 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.1, <4 x half> %lds.load.1, <32 x float> %in.load.1, i32 1, i32 1, i32 1)
23 %mai.2 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.2, <4 x half> %lds.load.2, <32 x float> %in.load.2, i32 1, i32 1, i32 1)
24 %mai.3 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.3, <4 x half> %lds.load.3, <32 x float> %in.load.3, i32 1, i32 1, i32 1)
25 %mai.4 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.1, <4 x half> %lds.load.1, <32 x float> %in.load.1, i32 2, i32 2, i32 2)
26 %mai.5 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.2, <4 x half> %lds.load.2, <32 x float> %in.load.2, i32 2, i32 2, i32 2)
27 %mai.6 = tail call <32 x float> @llvm.amdgcn.mfma.f32.32x32x4f16(<4 x half> %lds.load.3, <4 x half> %lds.load.3, <32 x float> %in.load.3, i32 2, i32 2, i32 2)
28 %out_ptr.1 = getelementptr <32 x float>, ptr addrspace(1) %out, i32 %stride
29 %out_ptr.2 = getelementptr <32 x float>, ptr addrspace(1) %out_ptr.1, i32 %stride
30 %out_ptr.3 = getelementptr <32 x float>, ptr addrspace(1) %out_ptr.2, i32 %stride
31 %out_ptr.4 = getelementptr <32 x float>, ptr addrspace(1) %out_ptr.3, i32 %stride
32 %out_ptr.5 = getelementptr <32 x float>, ptr addrspace(1) %out_ptr.4, i32 %stride
33 %out_ptr.6 = getelementptr <32 x float>, ptr addrspace(1) %out_ptr.5, i32 %stride
34 store <32 x float> %mai.1, ptr addrspace(1) %out_ptr.1
35 store <32 x float> %mai.2, ptr addrspace(1) %out_ptr.2
36 store <32 x float> %mai.3, ptr addrspace(1) %out_ptr.3
37 store <32 x float> %mai.4, ptr addrspace(1) %out_ptr.4
38 store <32 x float> %mai.5, ptr addrspace(1) %out_ptr.5
39 store <32 x float> %mai.6, ptr addrspace(1) %out_ptr.6
44 attributes #0 = { nounwind "amdgpu-waves-per-eu"="1,1" }