[llvm-branch-commits] [llvm] [AMDGPU] Don't spill an SGPR while SCC is live in frame index lowering (PR #224080)

Domenic Nutile via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 21 14:03:55 PDT 2026


================
@@ -3641,8 +3659,9 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
 
         if (Offset) {
           int64_t ScaledOffset = -Offset * ST.getWavefrontSize();
-          bool SCCLiveAfterMI = MI->definesRegister(AMDGPU::SCC, this) &&
-                                !MI->registerDefIsDead(AMDGPU::SCC, this);
+          bool SCCLiveAfterMI = MI->definesRegister(AMDGPU::SCC, this)
----------------
saxlungs wrote:

Good call, I was able to simplify and hoist it, simplified the logic a good bit

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


More information about the llvm-branch-commits mailing list