[llvm] [AMDGPU] Exec-protect regular VGPR spill saves under narrowed exec (PR #184135)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:45:59 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
index 2c86ab1d7..055199976 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -2463,7 +2463,7 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
       Register ExecCopyReg = MFI->getSGPRForEXECCopy();
       if (ExecCopyReg) {
         TII->insertScratchExecCopy(*MF, *MBB, MI, DL, ExecCopyReg,
-                                  RS->isRegUsed(AMDGPU::SCC));
+                                   RS->isRegUsed(AMDGPU::SCC));
       }
       buildSpillLoadStore(
           *MBB, MI, DL, Opc, Index, VData->getReg(), VData->isKill(), FrameReg,
@@ -2547,8 +2547,7 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
       }
 
       auto *MBB = MI->getParent();
-      bool IsWWMRegSpill =
-          TII->isWWMRegSpillOpcode(MI->getOpcode());
+      bool IsWWMRegSpill = TII->isWWMRegSpillOpcode(MI->getOpcode());
       Register ExecCopyReg =
           IsWWMRegSpill ? MFI->getSGPRForEXECCopy() : Register();
       if (ExecCopyReg) {

``````````

</details>


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


More information about the llvm-commits mailing list