[llvm] [AMDGPU] Detect VALU-after-MFMA hazard in post-RA scheduler's getHazardType (PR #184084)
Anshil Gandhi via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 05:45:12 PST 2026
================
@@ -234,6 +234,10 @@ GCNHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
checkMAIVALUHazards(MI) > 0)
return HazardType;
+ if (SIInstrInfo::isVALU(*MI) && !SIInstrInfo::isMFMA(*MI) &&
+ checkVALUImmediatelyAfterMFMAHazard(MI) > 0)
+ return HazardType;
----------------
gandhi56 wrote:
A VALU instruction cannot be coexecuted during the first pass of an 8-pass MFMA execution. on hardware. So the hazard recognizer should signal a NoopHazard because MFMA does not necessarily occupy HWVALU and the scheduler also needs to realize the coexec model.
So forcefully returning a NoopHazard would make more sense, right?
https://github.com/llvm/llvm-project/pull/184084
More information about the llvm-commits
mailing list