diff options
author | Wesley Wiser <wwiser@gmail.com> | 2025-08-03 05:06:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-03 15:36:23 +0530 |
commit | 69bec0afbb8f2aa0021d18ea38768360b16583a9 (patch) | |
tree | 96cd110727ae94edd4e66d724d8b0b9c15c1e8bf /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | d9971be83e5d23631b04b3ce40bfb2be01b6085e (diff) | |
download | llvm-69bec0afbb8f2aa0021d18ea38768360b16583a9.zip llvm-69bec0afbb8f2aa0021d18ea38768360b16583a9.tar.gz llvm-69bec0afbb8f2aa0021d18ea38768360b16583a9.tar.bz2 |
[X86] Correct 32-bit immediate assertion and fix 64-bit lowering for huge frame offsets (#123872)
The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.
Change the assertion into a a reported error as suggested in
https://github.com/llvm/llvm-project/pull/101840#issuecomment-2304992425
by @arsenm
Finally, fix the lowering on 64-bit targets so that offsets larger than
32-bit are correctly addressed and add tests for various reported
issues.
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 f66f546..7b751ba 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -1550,7 +1550,7 @@ void PEIImpl::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) { |