[llvm] [AMDGPU] Enable volatile and non-temporal for loads to LDS (PR #153244)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 06:54:32 PDT 2025


================
@@ -1039,8 +1090,8 @@ bool SIGfx6CacheControl::enableVolatileAndOrNonTemporal(
     bool IsVolatile, bool IsNonTemporal, bool IsLastUse = false) const {
   // Only handle load and store, not atomic read-modify-write insructions. The
   // latter use glc to indicate if the atomic returns a result and so must not
-  // be used for cache control.
-  assert(MI->mayLoad() ^ MI->mayStore());
+  // be used for cache control. There used to be a load ^ store assert here,
----------------
Pierre-vh wrote:

I don't think this needs to be stated in a comment, the assert can just be removed.
Alternatively if you add a helper to tell LDS DMA instructions apart, you could expand the assert to check `|| isLDSDMA(..)`

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


More information about the llvm-commits mailing list