[llvm] AMDGPU: update GFX11 wmma hazards (PR #76143)
Piotr Sobczak via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 00:00:58 PST 2024
================
@@ -1728,25 +1728,6 @@ bool GCNHazardRecognizer::fixWMMAHazards(MachineInstr *MI) {
return true;
}
- // Src2 of the current wmma instruction overlaps with the dest of the
- // previous wmma.
- const MachineOperand *Src2 =
- TII->getNamedOperand(*MI, AMDGPU::OpName::src2);
- const Register CurSrc2Reg = Src2->isReg() ? Src2->getReg() : Register();
-
- if (CurSrc2Reg != AMDGPU::NoRegister &&
- TRI->regsOverlap(PrevDstReg, CurSrc2Reg)) {
-
- const MachineOperand *Src2Mods =
- TII->getNamedOperand(*MI, AMDGPU::OpName::src2_modifiers);
- const bool NoSrc2Mods =
- (Src2Mods->getImm() & (SISrcMods::NEG | SISrcMods::NEG_HI)) == 0;
- // Exception: there is no hazard if the wmma instructions are of the same
- // type and there is no input modifier on src2 of the current instruction.
- return !(NoSrc2Mods && (TII->pseudoToMCOpcode(I.getOpcode()) ==
- TII->pseudoToMCOpcode(MI->getOpcode())));
- }
-
----------------
piotrAMD wrote:
That was coded according to the spec, but the behavior/spec have recently been clarified: inserting V_NOP in these cases won't help correctness and performance at all.
https://github.com/llvm/llvm-project/pull/76143
More information about the llvm-commits
mailing list