Skip to content

Commit fb6364c

Browse files
committed
Refactor. NFC.
1 parent 8042095 commit fb6364c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,10 +1296,10 @@ void WaitcntBrackets::applyXcnt(const AMDGPU::Waitcnt &Wait) {
12961296
// SMEM can return out of order, so only omit XCNT wait if we are waiting till
12971297
// zero.
12981298
if (Wait.KmCnt == 0 && hasPendingEvent(SMEM_GROUP)) {
1299-
if (hasMixedPendingEvents(X_CNT))
1300-
PendingEvents &= ~(1 << SMEM_GROUP);
1301-
else
1299+
if (!hasMixedPendingEvents(X_CNT))
13021300
applyWaitcnt(X_CNT, 0);
1301+
else
1302+
PendingEvents &= ~(1 << SMEM_GROUP);
13031303
return;
13041304
}
13051305

@@ -1308,10 +1308,10 @@ void WaitcntBrackets::applyXcnt(const AMDGPU::Waitcnt &Wait) {
13081308
// decremented to the same number as LOADCnt.
13091309
if (Wait.LoadCnt != ~0u && hasPendingEvent(VMEM_GROUP) &&
13101310
!hasPendingEvent(STORE_CNT)) {
1311-
if (hasMixedPendingEvents(X_CNT))
1312-
PendingEvents &= ~(1 << VMEM_GROUP);
1313-
else
1311+
if (!hasMixedPendingEvents(X_CNT))
13141312
applyWaitcnt(X_CNT, std::min(Wait.XCnt, Wait.LoadCnt));
1313+
else
1314+
PendingEvents &= ~(1 << VMEM_GROUP);
13151315
return;
13161316
}
13171317

0 commit comments

Comments
 (0)