[llvm] [AMDGPU] Enable volatile and non-temporal for loads to LDS (PR #153244)
Robert Imschweiler via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 20 07:37:30 PDT 2025
================
@@ -937,6 +951,43 @@ std::optional<SIMemOpInfo> SIMemOpAccess::getAtomicCmpxchgOrRmwInfo(
return constructFromMIWithMMO(MI);
}
+std::optional<std::tuple<SIMemOpInfo, SIMemOp>>
+SIMemOpAccess::getLdsLoadStoreInfo(
+ const MachineBasicBlock::iterator &MI) const {
+ assert(MI->getDesc().TSFlags & SIInstrFlags::maybeAtomic);
+
+ if (!(MI->mayLoad() && MI->mayStore()))
+ return std::nullopt;
+
+ // An LDS DMA will have exactly two memory operands.
+ if (MI->getNumMemOperands() != 2)
+ return std::nullopt;
----------------
ro-i wrote:
ig isLDSDMA()? https://github.com/llvm/llvm-project/blob/c50ed05cada308dea282e026cc782a9ea3ab0c29/llvm/lib/Target/AMDGPU/SIInstrInfo.h#L594
https://github.com/llvm/llvm-project/pull/153244
More information about the llvm-commits
mailing list