[llvm] 8cd917b - [AMDGPU] Skip debug uses in SIInsertWaitcnts::shouldFlushVmCnt (#160818)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 00:39:15 PDT 2025
Author: Jay Foad
Date: 2025-09-26T08:39:11+01:00
New Revision: 8cd917bc80eb9882cdc38d49ed82d855820d7e6c
URL: https://github.com/llvm/llvm-project/commit/8cd917bc80eb9882cdc38d49ed82d855820d7e6c
DIFF: https://github.com/llvm/llvm-project/commit/8cd917bc80eb9882cdc38d49ed82d855820d7e6c.diff
LOG: [AMDGPU] Skip debug uses in SIInsertWaitcnts::shouldFlushVmCnt (#160818)
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 7ec98851d0bef..f291191dbfd5c 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -2730,7 +2730,7 @@ bool SIInsertWaitcnts::shouldFlushVmCnt(MachineLoop *ML,
HasVMemStore = true;
}
for (const MachineOperand &Op : MI.all_uses()) {
- if (!TRI->isVectorRegister(*MRI, Op.getReg()))
+ if (Op.isDebug() || !TRI->isVectorRegister(*MRI, Op.getReg()))
continue;
RegInterval Interval = Brackets.getRegInterval(&MI, MRI, TRI, Op);
// Vgpr use
diff --git a/llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir b/llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir
index 0ddd2aa285b26..0d54bfaed8130 100644
--- a/llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir
+++ b/llvm/test/CodeGen/AMDGPU/waitcnt-vmcnt-loop.mir
@@ -1,4 +1,5 @@
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX9 %s
+# 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
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX10 %s
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX12 %s
More information about the llvm-commits
mailing list