[llvm] [ARM] Switch to LiveRegUnits to fix r7 register allocation bug (PR #84474)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 19:52:49 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 34cf6847752a3aad68eaa889ab6e0073a38fc2db ace63ab758c7c66bc98b4dd6a4cfcf2317a03b92 -- llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
index 4550872870..98b223a0cf 100644
--- a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
+++ b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
@@ -711,8 +711,8 @@ bool Thumb1FrameLowering::emitPopSpecialFixUp(MachineBasicBlock &MBB,
   BitVector PopFriendly =
       TRI.getAllocatableSet(MF, TRI.getRegClass(ARM::tGPRRegClassID));
   // R7 may be used as a frame pointer, hence marked as not generally
-  // allocatable, however, if it is not being used as one, there's no reason to not
-  // use it as a temporary for restoring LR.
+  // allocatable, however, if it is not being used as one, there's no reason to
+  // not use it as a temporary for restoring LR.
   if (TRI.getFrameRegister(MF) != ARM::R7)
     PopFriendly.set(ARM::R7);
 

``````````

</details>


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


More information about the llvm-commits mailing list