From 857644e1041e9267469145bf07b926cc9760ae5e Mon Sep 17 00:00:00 2001 From: pvanhout Date: Fri, 22 Aug 2025 10:12:03 +0200 Subject: [PATCH] Comments --- llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp | 7 ++++--- llvm/lib/Target/AMDGPU/SOPInstructions.td | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp index 27e2ac537279..00f0c4b9eb8e 100644 --- a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp +++ b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp @@ -590,7 +590,7 @@ public: SIGfx12CacheControl(const GCNSubtarget &ST) : SIGfx11CacheControl(ST) { // GFX12.0 and GFX12.5 memory models greatly overlap, and in some cases // the behavior is the same if assuming GFX12.0 in CU mode. - assert(ST.hasGFX1250Insts() ? ST.isCuModeEnabled() : true); + assert(!ST.hasGFX1250Insts() || ST.isCuModeEnabled()); } bool insertWait(MachineBasicBlock::iterator &MI, SIAtomicScope Scope, @@ -2592,14 +2592,15 @@ bool SIGfx12CacheControl::finalizeStore(MachineInstr &MI, bool Atomic) const { const bool IsRMW = (MI.mayLoad() && MI.mayStore()); bool Changed = false; - // GFX12.5 only: xcnt wait is needed before flat and global atomics stores/rmw + // GFX12.5 only: xcnt wait is needed before flat and global atomics + // stores/rmw. if (Atomic && ST.requiresWaitXCntBeforeAtomicStores() && TII->isFLAT(MI)) { MachineBasicBlock &MBB = *MI.getParent(); BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(S_WAIT_XCNT_soft)).addImm(0); Changed = true; } - // Remaining fixes do not apply to RMWs + // Remaining fixes do not apply to RMWs. if (IsRMW) return Changed; diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td index 8012e9e6bc9b..f00d32c4719e 100644 --- a/llvm/lib/Target/AMDGPU/SOPInstructions.td +++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td @@ -1658,7 +1658,7 @@ let OtherPredicates = [HasImageInsts] in { let SubtargetPredicate = HasWaitXcnt in { - def S_WAIT_XCNT_soft : SOPP_Pseudo<"s_soft_wait_xcnt", (ins s16imm:$simm16), "$simm16">; + def S_WAIT_XCNT_soft : SOPP_Pseudo<"", (ins s16imm:$simm16), "$simm16">; } // Represents the point at which a wave must wait for all outstanding direct loads to LDS.