[llvm] [AMDGPU][WIP] Optimize SGPR spills (PR #93668)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 23:18:06 PDT 2024


================
@@ -1775,10 +1775,13 @@ bool SIRegisterInfo::spillSGPR(MachineBasicBlock::iterator MI, int Index,
 
   if (SpillToVGPR) {
 
+    // Since stack slot coloring pass is trying to optimize SGPR spills,
+    // VGPR lanes (mapped from spill stack slot) may be shared for unequal SGPR
+    // spills. This accounts for number of VGPR lanes alloted equal to the
+    // largest SGPR being spilled in them.
     assert(SB.NumSubRegs <= VGPRSpills.size() &&
-           "Num of VGPR lanes should be greater or equal to num of SGPRs "
-           "spilled, as Stack Slot Coloring pass assigns different SGPR spills "
-           "into same stack slots");
+           "Num of VGPR lanes mapped should be greater or equal to num of "
----------------
cdevadas wrote:

I guess it is more appropriate to use 'shouldn't be less than' instead of 'should be greater or equal'

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


More information about the llvm-commits mailing list