[llvm] [LLVM] [X86] Fix integer overflows in frame layout for huge frames (PR #101840)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 02:20:43 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 2a00bf412efec1f87fed0762ee42dd7a6b809cbb 838e761a49dd08d74407f9dcb66091098ccb19fe --extensions cpp,h -- llvm/lib/CodeGen/PrologEpilogInserter.cpp llvm/lib/Target/X86/X86FrameLowering.cpp llvm/lib/Target/X86/X86RegisterInfo.cpp llvm/lib/Target/X86/X86RegisterInfo.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 9d02e05f47..da286e6a82 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -967,8 +967,9 @@ X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
       RS->enterBasicBlockEnd(MBB);
       RS->backward(std::next(II));
 
-      Register ScratchReg =
-          RS->scavengeRegisterBackwards(X86::GR64RegClass, II, /* RestoreAfter */ false, /* SPAdj */ 0, /* AllowSpill */ true);
+      Register ScratchReg = RS->scavengeRegisterBackwards(
+          X86::GR64RegClass, II, /* RestoreAfter */ false, /* SPAdj */ 0,
+          /* AllowSpill */ true);
       assert(ScratchReg != 0 && "scratch reg was 0");
       RS->setRegUsed(ScratchReg);
 

``````````

</details>


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


More information about the llvm-commits mailing list