[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 03:22:07 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 don't really get the motiviation. Isn't it clearer to keep the purpose of the function as simple as possible, and have it handle all VMEM instructions without exceptions?
If there _are_ some exceptions we should probably have an assert for them, but that would probably make the code at least as complex as not having the exceptions in the first place.
https://github.com/llvm/llvm-project/pull/166139
More information about the llvm-commits
mailing list