diff options
author | Wesley Wiser <wwiser@gmail.com> | 2024-08-19 10:31:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 19:31:20 +0400 |
commit | 0abb7791614947bc24931dd851ade31d02496977 (patch) | |
tree | 4ee2ed803eedcead81d6f000a589f9a936b87f54 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | c7a54bfd1d25330199c96dd0a46cef1644b1b1ce (diff) | |
download | llvm-0abb7791614947bc24931dd851ade31d02496977.zip llvm-0abb7791614947bc24931dd851ade31d02496977.tar.gz llvm-0abb7791614947bc24931dd851ade31d02496977.tar.bz2 |
[LLVM] [X86] Fix integer overflows in frame layout for huge frames (#101840)
Fix 32-bit integer overflows in the X86 target frame layout when dealing
with frames larger than 4gb. When this occurs, we'll scavenge a scratch
register to be able to hold the correct stack offset for frame locals.
This completes reapplying #84114.
Fixes #48911
Fixes #75944
Fixes #87154
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index ee03eaa..c03ea58 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1553,7 +1553,7 @@ void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &MF, // If this instruction has a FrameIndex operand, we need to // use that target machine register info object to eliminate // it. - TRI.eliminateFrameIndex(MI, SPAdj, i); + TRI.eliminateFrameIndex(MI, SPAdj, i, RS); // Reset the iterator if we were at the beginning of the BB. if (AtBeginning) { |