[Hexagon] Require PS_aligna whenever variable-sized objects are present

This commit is contained in:
Krzysztof Parzyszek 2019-11-08 19:05:28 -06:00
parent 228dd96c6f
commit 0a58ef5eb5
1 changed files with 3 additions and 3 deletions

View File

@ -2388,9 +2388,9 @@ bool HexagonFrameLowering::needsAligna(const MachineFunction &MF) const {
const MachineFrameInfo &MFI = MF.getFrameInfo();
if (!MFI.hasVarSizedObjects())
return false;
unsigned MaxA = MFI.getMaxAlignment();
if (MaxA <= getStackAlignment())
return false;
// Do not check for max stack object alignment here, because the stack
// may not be complete yet. Assume that we will need PS_aligna if there
// are variable-sized objects.
return true;
}