[llvm] [AMDGPU] Fix end() iterator dereference in SILowerSGPRSpills (PR #88828)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 18:55:19 PDT 2024
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 0287a5cc4e2a5ded1ae2e4079f91052e6a6b8d9b 1d317f1b3e81cb0eac2b94825e384922a18ff74c -- llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp b/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
index 197c06f8b9..0042282fa0 100644
--- a/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
@@ -301,9 +301,8 @@ void SILowerSGPRSpills::extendWWMVirtRegLiveness(MachineFunction &MF,
? InsertBefore->getDebugLoc()
: DebugLoc();
for (auto Reg : MFI->getSGPRSpillVGPRs()) {
- auto MIB =
- BuildMI(*RestoreBlock, InsertBefore, DL,
- TII->get(TargetOpcode::KILL));
+ auto MIB = BuildMI(*RestoreBlock, InsertBefore, DL,
+ TII->get(TargetOpcode::KILL));
MIB.addReg(Reg);
if (LIS)
LIS->InsertMachineInstrInMaps(*MIB);
``````````
</details>
https://github.com/llvm/llvm-project/pull/88828
More information about the llvm-commits
mailing list