[RISCV] Do not grow the stack a second time when we need to realign the stack
authorRoger Ferrer Ibanez <roger.ferrer@bsc.es>
Sat, 9 Jan 2021 16:49:05 +0000 (16:49 +0000)
committerRoger Ferrer Ibanez <roger.ferrer@bsc.es>
Sat, 9 Jan 2021 16:51:09 +0000 (16:51 +0000)
commit524d8fa9a5a5428628a21a91016a52a54a9fe838
tree7b2c9acb40b6e14231c1b2ca510c988862a6fbd4
parent65f578fc0e6fb10bb84f3dea906f8fb1230c1ab3
[RISCV] Do not grow the stack a second time when we need to realign the stack

This is a first change needed to fix a crash in which the emergency
spill splot ends being out of reach. This happens when we run the
register scavenger after we have eliminated the frame indexes. The fix
for the actual crash will come in a later change.

This change removes an extra stack size increase we do in
RISCVFrameLowering::determineFrameLayout.

We don't have to change the size of the stack here as
PEI::calculateFrameObjectOffsets is already doing this with the right
size accounting the extra alignment.

Differential Revision: https://reviews.llvm.org/D89237
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
llvm/test/CodeGen/RISCV/stack-realignment-with-variable-sized-objects.ll
llvm/test/CodeGen/RISCV/stack-realignment.ll