Skip to content

Commit 4198649

Browse files
rampitecstepthomas
andauthored
[AMDGPU] Use encodeFieldVaVdst in hazard recognizer. NFCI. (#153881)
Co-authored-by: Stephen Thomas <[email protected]> --------- Co-authored-by: Stephen Thomas <[email protected]>
1 parent 5178aef commit 4198649

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,7 @@ bool GCNHazardRecognizer::fixVALUPartialForwardingHazard(MachineInstr *MI) {
17491749

17501750
BuildMI(*MI->getParent(), MI, MI->getDebugLoc(),
17511751
TII.get(AMDGPU::S_WAITCNT_DEPCTR))
1752-
.addImm(0x0fff);
1752+
.addImm(AMDGPU::DepCtr::encodeFieldVaVdst(0));
17531753

17541754
return true;
17551755
}
@@ -1799,7 +1799,7 @@ bool GCNHazardRecognizer::fixVALUTransUseHazard(MachineInstr *MI) {
17991799
if (SIInstrInfo::isVMEM(I) || SIInstrInfo::isDS(I) ||
18001800
SIInstrInfo::isEXP(I) ||
18011801
(I.getOpcode() == AMDGPU::S_WAITCNT_DEPCTR &&
1802-
I.getOperand(0).getImm() == 0x0fff))
1802+
AMDGPU::DepCtr::decodeFieldVaVdst(I.getOperand(0).getImm()) == 0))
18031803
return HazardExpired;
18041804

18051805
// Track registers writes

0 commit comments

Comments
 (0)