[llvm] [AMDGPU] SILowerSGPRSpills: do not update MRI reserve registers (PR #77888)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 00:26:11 PST 2024


================
@@ -1,5 +1,5 @@
 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
-# RUN: llc -mtriple=amdgcn-unknown-amdpal -mcpu=gfx1030 -start-before=si-lower-sgpr-spills -stop-after=prologepilog -verify-machineinstrs --stress-regalloc=2 -o - %s | FileCheck -check-prefix GCN %s
+# RUN: llc -mtriple=amdgcn-unknown-amdpal -mcpu=gfx1030 -start-before=si-lower-sgpr-spills -stop-after=prologepilog -verify-machineinstrs --stress-regalloc=5 -o - %s | FileCheck -check-prefix GCN %s
----------------
perlfu wrote:

To preempt an obvious follow up question: "how does SILowerSGPRSpill exceed the register limit?"
`allocateSGPRSpillToVGPRLane` uses `findUnusedRegister` which does not consult the allocation in `RegisterClassInfo` which imposes the limit.

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


More information about the llvm-commits mailing list