Skip to content

Commit 64fb73e

Browse files
committed
Revert "[AMDGPU][SIInsertWaitCnts] move vmemaccess check"
This reverts commit d3ed9c9.
1 parent 4770a1e commit 64fb73e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,13 +2097,6 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
20972097
Wait.DsCnt = 0;
20982098
}
20992099

2100-
// Since the translation for VMEM addresses occur in-order, we can skip the
2101-
// XCnt if the current instruction is of VMEM type and has a memory
2102-
// dependency with another VMEM instruction in flight.
2103-
if (isVmemAccess(MI)) {
2104-
Wait.XCnt = ~0u;
2105-
}
2106-
21072100
// Verify that the wait is actually needed.
21082101
ScoreBrackets.simplifyWaitcnt(Wait);
21092102

@@ -2175,6 +2168,13 @@ bool SIInsertWaitcnts::generateWaitcnt(AMDGPU::Waitcnt Wait,
21752168
<< "Update Instr: " << *It);
21762169
}
21772170

2171+
// Since the translation for VMEM addresses occur in-order, we can skip the
2172+
// XCnt if the current instruction is of VMEM type and has a memory
2173+
// dependency with another VMEM instruction in flight.
2174+
if (Wait.XCnt != ~0u && isVmemAccess(*It)) {
2175+
Wait.XCnt = ~0u;
2176+
}
2177+
21782178
if (WCG->createNewWaitcnt(Block, It, Wait))
21792179
Modified = true;
21802180

0 commit comments

Comments
 (0)