[llvm] [AMDGPU] Classify FLAT instructions as VMEM (PR #137148)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 03:13:45 PDT 2025
================
@@ -2454,8 +2454,8 @@ bool SIInsertWaitcnts::isPreheaderToFlush(
}
bool SIInsertWaitcnts::isVMEMOrFlatVMEM(const MachineInstr &MI) const {
- return SIInstrInfo::isVMEM(MI) ||
- (SIInstrInfo::isFLAT(MI) && mayAccessVMEMThroughFlat(MI));
+ return (SIInstrInfo::isFLAT(MI) && mayAccessVMEMThroughFlat(MI)) ||
+ SIInstrInfo::isVMEM(MI);
----------------
arsenm wrote:
This amounts to just isVMEM. I'm not sure why this is bothering to specially handle the case where a flat instruction is statically known to only access LDS. I think the only way that would happen is if we had a volatile flat access to an LDS variable, which is mildly useful.
This should probably be something like if (isFLAT()) return mayAccessVMEMThroughFlat(); else // other non-flat cases
https://github.com/llvm/llvm-project/pull/137148
More information about the llvm-commits
mailing list