If a function has no stack frame at all, dynamic realignment isn't necessary.

llvm-svn: 86057
This commit is contained in:
Jim Grosbach 2009-11-04 22:41:51 +00:00
parent cc58cc1d56
commit 2c7fd8f1db
1 changed files with 1 additions and 0 deletions

View File

@ -514,6 +514,7 @@ needsStackRealignment(const MachineFunction &MF) const {
unsigned StackAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
return (RealignStack &&
!AFI->isThumb1OnlyFunction() &&
AFI->hasStackFrame() &&
(MFI->getMaxAlignment() > StackAlign) &&
!MFI->hasVarSizedObjects());
}