[llvm] [AMDGPU][NFC][SIInsertWaitcnts] Remove redundant checks for invalidate instructions (PR #166139)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 06:42:52 PST 2025


================
@@ -530,16 +544,6 @@ class SIInsertWaitcnts {
   // Return the appropriate VMEM_*_ACCESS type for Inst, which must be a VMEM
   // instruction.
   WaitEventType getVmemWaitEventType(const MachineInstr &Inst) const {
-    switch (Inst.getOpcode()) {
----------------
jayfoad wrote:

I'd prefer to keep getVmemWaitEventType general and instead look at why 2268 handles invalidate instructions specially. I think it could probably use the more general VMEM handling case at line 2277 except that it probably does not want to set IsVMEMAccess, because I think that really means "is this a VMEM access that increments Xcnt", and I guess invalidates do not increment Xcnt because they do not specify any address to translate.

https://github.com/llvm/llvm-project/pull/166139


More information about the llvm-commits mailing list