[llvm] Negative frame indicies as register. (PR #164459)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 10:14:40 PDT 2025


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,h -- llvm/include/llvm/CodeGen/Register.h llvm/lib/CodeGen/ReachingDefAnalysis.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/include/llvm/CodeGen/Register.h b/llvm/include/llvm/CodeGen/Register.h
index 961d6fe74..9aa30e9f3 100644
--- a/llvm/include/llvm/CodeGen/Register.h
+++ b/llvm/include/llvm/CodeGen/Register.h
@@ -38,7 +38,8 @@ public:
                 "Reg isn't large enough to hold full range.");
   static constexpr unsigned MaxFrameIndexBitwidth = 30;
   static constexpr unsigned FirstStackSlot = 1u << MaxFrameIndexBitwidth;
-  static const unsigned StackSlotMask = (unsigned)(-1) >> (CHAR_BIT * sizeof(unsigned) - MaxFrameIndexBitwidth);
+  static const unsigned StackSlotMask =
+      (unsigned)(-1) >> (CHAR_BIT * sizeof(unsigned) - MaxFrameIndexBitwidth);
   static_assert(FirstStackSlot >= MCRegister::LastPhysicalReg);
   static constexpr unsigned VirtualRegFlag = 1u << 31;
 

``````````

</details>


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


More information about the llvm-commits mailing list