[llvm] [AMDGPU] Avoid wmma bank conflict for GFX11 and GFX12 (PR #205530)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 20:57:29 PDT 2026


================
@@ -617,6 +617,19 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunctionInfo,
   // load/store is enabled.
   IndexedMap<uint32_t, VGPRBlock2IndexFunctor> MaskForVGPRBlockOps;
 
+  // Maps each virtual register that is an operand of a bank-sensitive v_wmma_*
+  // (matrix sources a multiple of 128 bits) to that instruction's other operand
+  // registers. Populated once by GCNPreRAOptimizations and consumed by
+  // SIRegisterInfo::getRegAllocationHints for VGPR bank-conflict avoidance, so
+  // the hint hook does not rescan the function for every virtual register.
+  DenseMap<Register, SmallVector<Register, 3>> WMMABankSiblings;
----------------
Shoreshen wrote:

Hi @arsenm @shiltian I just got assigned to this issue and didn't notice.. I think it is [#192140](https://github.com/llvm/llvm-project/pull/192140) right?

I had a look of the code, I think the main difference is `Order` is pushed continuously into `Hints`, which create extra gaps between VGPR bank and eventually may creating extra `SI_SPILL_V256`

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


More information about the llvm-commits mailing list