Skip to content

Commit 8cd917b

Browse files
authored
[AMDGPU] Skip debug uses in SIInsertWaitcnts::shouldFlushVmCnt (#160818)
1 parent beed796 commit 8cd917b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2730,7 +2730,7 @@ bool SIInsertWaitcnts::shouldFlushVmCnt(MachineLoop *ML,
27302730
HasVMemStore = true;
27312731
}
27322732
for (const MachineOperand &Op : MI.all_uses()) {
2733-
if (!TRI->isVectorRegister(*MRI, Op.getReg()))
2733+
if (Op.isDebug() || !TRI->isVectorRegister(*MRI, Op.getReg()))
27342734
continue;
27352735
RegInterval Interval = Brackets.getRegInterval(&MI, MRI, TRI, Op);
27362736
// Vgpr use

llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX9 %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s -debugify-and-strip-all-safe | FileCheck -check-prefix=GFX9 %s
23
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX10 %s
34
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX12 %s
45

0 commit comments

Comments
 (0)