diff --git a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h --- a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h +++ b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h @@ -131,7 +131,6 @@ unsigned PreEmitNoopsCommon(MachineInstr *); void AdvanceCycle() override; void RecedeCycle() override; - bool ShouldPreferAnother(SUnit *SU) override; void Reset() override; }; diff --git a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp --- a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp +++ b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp @@ -2136,28 +2136,4 @@ } return WaitStatesNeeded; -} - -bool GCNHazardRecognizer::ShouldPreferAnother(SUnit *SU) { - if (!SU->isInstr()) - return false; - - const MachineInstr *MAI = nullptr; - auto IsMFMAFn = [&MAI](const MachineInstr &MI) { - MAI = nullptr; - if (SIInstrInfo::isMAI(MI) && - MI.getOpcode() != AMDGPU::V_ACCVGPR_WRITE_B32_e64 && - MI.getOpcode() != AMDGPU::V_ACCVGPR_READ_B32_e64) - MAI = &MI; - return MAI != nullptr; - }; - - MachineInstr *MI = SU->getInstr(); - if (IsMFMAFn(*MI)) { - int W = getWaitStatesSince(IsMFMAFn, 16); - if (MAI) - return W < (int)TSchedModel.computeInstrLatency(MAI); - } - - return false; -} +} \ No newline at end of file diff --git a/llvm/test/CodeGen/AMDGPU/sched-prefer-non-mfma.mir b/llvm/test/CodeGen/AMDGPU/sched-prefer-non-mfma.mir deleted file mode 100644 --- a/llvm/test/CodeGen/AMDGPU/sched-prefer-non-mfma.mir +++ /dev/null @@ -1,18 +0,0 @@ -# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass post-RA-sched -amdgpu-disable-power-sched -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s - -# GCN-LABEL: name: unrelated_mfma -# GCN: V_MFMA_F32_32X32X1F32 -# GCN: S_CMP_LG_U32 -# GCN: V_MFMA_F32_32X32X1F32 - ---- -name: unrelated_mfma -body: | - bb.0.entry: - renamable $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7_agpr8_agpr9_agpr10_agpr11_agpr12_agpr13_agpr14_agpr15_agpr16_agpr17_agpr18_agpr19_agpr20_agpr21_agpr22_agpr23_agpr24_agpr25_agpr26_agpr27_agpr28_agpr29_agpr30_agpr31 = V_MFMA_F32_32X32X1F32_e64 $vgpr67, $vgpr66, $agpr0_agpr1_agpr2_agpr3_agpr4_agpr5_agpr6_agpr7_agpr8_agpr9_agpr10_agpr11_agpr12_agpr13_agpr14_agpr15_agpr16_agpr17_agpr18_agpr19_agpr20_agpr21_agpr22_agpr23_agpr24_agpr25_agpr26_agpr27_agpr28_agpr29_agpr30_agpr31, 0, 0, 0, implicit $mode, implicit $exec - renamable $agpr32_agpr33_agpr34_agpr35_agpr36_agpr37_agpr38_agpr39_agpr40_agpr41_agpr42_agpr43_agpr44_agpr45_agpr46_agpr47_agpr48_agpr49_agpr50_agpr51_agpr52_agpr53_agpr54_agpr55_agpr56_agpr57_agpr58_agpr59_agpr60_agpr61_agpr62_agpr63 = V_MFMA_F32_32X32X1F32_e64 $vgpr69, $vgpr68, killed $agpr32_agpr33_agpr34_agpr35_agpr36_agpr37_agpr38_agpr39_agpr40_agpr41_agpr42_agpr43_agpr44_agpr45_agpr46_agpr47_agpr48_agpr49_agpr50_agpr51_agpr52_agpr53_agpr54_agpr55_agpr56_agpr57_agpr58_agpr59_agpr60_agpr61_agpr62_agpr63, 0, 0, 0, implicit $mode, implicit $exec - renamable $sgpr2 = S_ADD_U32 renamable $sgpr2, 4, implicit-def $scc - renamable $sgpr3 = S_ADDC_U32 renamable $sgpr3, 0, implicit-def dead $scc, implicit killed $scc - S_CMP_LG_U32 renamable $sgpr2, 64, implicit-def $scc - -...