3 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs -debug-only=machine-scheduler -o /dev/null < %s 2>&1 | FileCheck %s
5 ; We are only targeting one wave. Check that the machine scheduler doesn't use
6 ; register pressure heuristics to prioritize any candidate instruction.
9 ; CHECK-NOT: REG-EXCESS
11 define amdgpu_kernel void @load_fma_store(ptr addrspace(3) nocapture readonly %arg, ptr addrspace(3) nocapture %arg1) #1 {
13 %tmp0 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 1
14 %tmp1 = load float, ptr addrspace(3) %tmp0, align 4
15 %tmp2 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 2
16 %tmp3 = load float, ptr addrspace(3) %tmp2, align 4
17 %tmp4 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 3
18 %tmp5 = load float, ptr addrspace(3) %tmp4, align 4
19 %tmp6 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 4
20 %tmp7 = load float, ptr addrspace(3) %tmp6, align 4
21 %tmp8 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 5
22 %tmp9 = load float, ptr addrspace(3) %tmp8, align 4
23 %tmp10 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 6
24 %tmp11 = load float, ptr addrspace(3) %tmp10, align 4
25 %tmp12 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 7
26 %tmp13 = load float, ptr addrspace(3) %tmp12, align 4
27 %tmp14 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 8
28 %tmp15 = load float, ptr addrspace(3) %tmp14, align 4
29 %tmp16 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 9
30 %tmp17 = load float, ptr addrspace(3) %tmp16, align 4
31 %tmp18 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 10
32 %tmp19 = load float, ptr addrspace(3) %tmp18, align 4
33 %tmp20 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 11
34 %tmp21 = load float, ptr addrspace(3) %tmp20, align 4
35 %tmp22 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 12
36 %tmp23 = load float, ptr addrspace(3) %tmp22, align 4
37 %tmp24 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 13
38 %tmp25 = load float, ptr addrspace(3) %tmp24, align 4
39 %tmp26 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 14
40 %tmp27 = load float, ptr addrspace(3) %tmp26, align 4
41 %tmp28 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 15
42 %tmp29 = load float, ptr addrspace(3) %tmp28, align 4
43 %tmp30 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 16
44 %tmp31 = load float, ptr addrspace(3) %tmp30, align 4
45 %tmp32 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 17
46 %tmp33 = load float, ptr addrspace(3) %tmp32, align 4
47 %tmp34 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 18
48 %tmp35 = load float, ptr addrspace(3) %tmp34, align 4
49 %tmp36 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 19
50 %tmp37 = load float, ptr addrspace(3) %tmp36, align 4
51 %tmp38 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 20
52 %tmp39 = load float, ptr addrspace(3) %tmp38, align 4
53 %tmp40 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 21
54 %tmp41 = load float, ptr addrspace(3) %tmp40, align 4
55 %tmp42 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 22
56 %tmp43 = load float, ptr addrspace(3) %tmp42, align 4
57 %tmp44 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 23
58 %tmp45 = load float, ptr addrspace(3) %tmp44, align 4
59 %tmp46 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 24
60 %tmp47 = load float, ptr addrspace(3) %tmp46, align 4
61 %tmp48 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 25
62 %tmp49 = load float, ptr addrspace(3) %tmp48, align 4
63 %tmp50 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 26
64 %tmp51 = load float, ptr addrspace(3) %tmp50, align 4
65 %tmp52 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 27
66 %tmp53 = load float, ptr addrspace(3) %tmp52, align 4
67 %tmp54 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 28
68 %tmp55 = load float, ptr addrspace(3) %tmp54, align 4
69 %tmp56 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 29
70 %tmp57 = load float, ptr addrspace(3) %tmp56, align 4
71 %tmp58 = getelementptr inbounds float, ptr addrspace(3) %arg, i32 30
72 %tmp59 = load float, ptr addrspace(3) %tmp58, align 4
73 %tmp60 = tail call float @llvm.fmuladd.f32(float %tmp1, float %tmp3, float %tmp5)
74 %tmp61 = tail call float @llvm.fmuladd.f32(float %tmp7, float %tmp9, float %tmp11)
75 %tmp62 = tail call float @llvm.fmuladd.f32(float %tmp13, float %tmp15, float %tmp17)
76 %tmp63 = tail call float @llvm.fmuladd.f32(float %tmp19, float %tmp21, float %tmp23)
77 %tmp64 = tail call float @llvm.fmuladd.f32(float %tmp25, float %tmp27, float %tmp29)
78 %tmp65 = tail call float @llvm.fmuladd.f32(float %tmp31, float %tmp33, float %tmp35)
79 %tmp66 = tail call float @llvm.fmuladd.f32(float %tmp37, float %tmp39, float %tmp41)
80 %tmp67 = tail call float @llvm.fmuladd.f32(float %tmp43, float %tmp45, float %tmp47)
81 %tmp68 = tail call float @llvm.fmuladd.f32(float %tmp49, float %tmp51, float %tmp53)
82 %tmp69 = tail call float @llvm.fmuladd.f32(float %tmp55, float %tmp57, float %tmp59)
83 %tmp70 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 1
84 store float %tmp60, ptr addrspace(3) %tmp70, align 4
85 %tmp71 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 2
86 store float %tmp61, ptr addrspace(3) %tmp71, align 4
87 %tmp72 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 3
88 store float %tmp62, ptr addrspace(3) %tmp72, align 4
89 %tmp73 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 4
90 store float %tmp63, ptr addrspace(3) %tmp73, align 4
91 %tmp74 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 5
92 store float %tmp64, ptr addrspace(3) %tmp74, align 4
93 %tmp75 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 6
94 store float %tmp65, ptr addrspace(3) %tmp75, align 4
95 %tmp76 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 7
96 store float %tmp66, ptr addrspace(3) %tmp76, align 4
97 %tmp77 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 8
98 store float %tmp67, ptr addrspace(3) %tmp77, align 4
99 %tmp78 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 9
100 store float %tmp68, ptr addrspace(3) %tmp78, align 4
101 %tmp79 = getelementptr inbounds float, ptr addrspace(3) %arg1, i64 10
102 store float %tmp69, ptr addrspace(3) %tmp79, align 4
106 ; Function Attrs: nounwind readnone
107 declare float @llvm.fmuladd.f32(float, float, float) #0
109 attributes #0 = { nounwind readnone }
110 attributes #1 = { "amdgpu-waves-per-eu"="1,1" "amdgpu-flat-work-group-size"="1,256" }