[llvm] [LLVM] [X86] Fix integer overflows in frame layout for huge frames (PR #101840)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 00:38:42 PDT 2024
================
@@ -4140,6 +4141,14 @@ void X86FrameLowering::processFunctionBeforeFrameFinalized(
// emitPrologue if it gets called and emits CFI.
MF.setHasWinCFI(false);
+ MachineFrameInfo &MFI = MF.getFrameInfo();
+ // If the frame is big enough that we might need to scavenge a register to
+ // handle huge offsets, reserve a stack slot for that now.
+ if (STI.is64Bit() && !isInt<32>(MFI.estimateStackSize(MF))) {
----------------
arsenm wrote:
Don't see the point in checking for 64-bit, just check the value
https://github.com/llvm/llvm-project/pull/101840
More information about the llvm-commits
mailing list