[llvm] [AMDGPU] Mark ASYNCMARK as meta instruction to fix hazard cycle miscounting (PR #189981)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 18:58:48 PDT 2026
================
@@ -3263,7 +3263,9 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF,
E = Block.instr_end();
Iter != E; ++Iter) {
MachineInstr &Inst = *Iter;
- if (Inst.isMetaInstruction())
+ // ASYNCMARK is meta instr but needs processing by
+ // generateWaitcntInstBefore and recordAsyncMark for vmcnt tracking.
+ if (Inst.isMetaInstruction() && Inst.getOpcode() != AMDGPU::ASYNCMARK)
----------------
ssahasra wrote:
This matches the assert above. I think it's worth capturing this as a static function with a useful name like `isIgnoredSomethingSomething()`. Then that function can be called in both places.
https://github.com/llvm/llvm-project/pull/189981
More information about the llvm-commits
mailing list