[AArch64][SVE] Fix epilogue for SVE when the stack is realigned.
authorSander de Smalen <sander.desmalen@arm.com>
Tue, 28 Jul 2020 11:11:09 +0000 (12:11 +0100)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 28 Jul 2020 14:45:53 +0000 (15:45 +0100)
commitcda2eb3ad2bbe923e74d6eb083af196a0622d800
tree5f3d1a98c27d04fb4770db0cfe13f32be5efa950
parent26b4ef3694973ea2fa656d3d3a7f67f16f135654
[AArch64][SVE] Fix epilogue for SVE when the stack is realigned.

While deallocating the stackframe, the offset used to reload the
callee-saved registers was not pointing to the SVE callee-saves,
but rather to the whole SVE area.

   +--------------+
   | GRP callee   |
   |     saves    |
   +--------------+ <- FP
   | SVE callee   |
   |     saves    |
   +--------------+ <- Should restore SVE callee saves from here
   |  SVE Spills  |
   |  and Locals  |
   +--------------+ <- instead of from here.
   |              |
   :              :
   |              |
   +--------------+ <- SP

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D84539
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/test/CodeGen/AArch64/framelayout-sve.mir