From d9efcb54c9d4a3068f95b826481ebbee44d236b4 Mon Sep 17 00:00:00 2001 From: bzEq Date: Fri, 8 Sep 2023 15:16:00 +0800 Subject: [PEI][PowerPC] Fix false alarm of stack size limit (#65559) PPC64 allows stack size up to ((2^63)-1) bytes. Currently llc reports ``` warning: stack frame size (4294967568) exceeds limit (4294967295) in function 'main' ``` if the stack allocated is larger than 4G. --- llvm/lib/CodeGen/PrologEpilogInserter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp') diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index fe88a36..6c8be5c 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -293,7 +293,7 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { MachineFrameInfo &MFI = MF.getFrameInfo(); uint64_t StackSize = MFI.getStackSize(); - unsigned Threshold = UINT_MAX; + uint64_t Threshold = TFI->getStackThreshold(); if (MF.getFunction().hasFnAttribute("warn-stack-size")) { bool Failed = MF.getFunction() .getFnAttribute("warn-stack-size") -- cgit v1.1