[AArch64] Fix scavenged spill slot base when stack realignment required.
authorGeoff Berry <gberry@codeaurora.org>
Thu, 26 Apr 2018 18:50:45 +0000 (18:50 +0000)
committerGeoff Berry <gberry@codeaurora.org>
Thu, 26 Apr 2018 18:50:45 +0000 (18:50 +0000)
commit08ab8c9544122889a2536606f7ed59f113975d64
tree51face5e7b8c3d6ddbf9311664ac1e889f8be60a
parent3d7b22621c8c06d0f7f49837173359529c55a306
[AArch64] Fix scavenged spill slot base when stack realignment required.

Summary:
Use the FP for scavenged spill slot accesses to prevent corruption of
the callee-save region when the SP is re-aligned.

Based on problem and patch reported by @paulwalker-arm

This is an alternative to solution proposed in D45770

Reviewers: t.p.northover, paulwalker-arm, thegameg, javed.absar

Subscribers: qcolombet, mcrosier, paulwalker-arm, kristof.beyls, rengolin, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D46063

llvm-svn: 330976
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/test/CodeGen/AArch64/spill-stack-realignment.mir [new file with mode: 0644]