[AArch64] Don't merge sp decrement into later stores when using WinCFI
authorMartin Storsjö <martin@martin.st>
Tue, 29 Sep 2020 07:09:22 +0000 (10:09 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 1 Oct 2020 16:03:27 +0000 (19:03 +0300)
commitf4b9dfd9bc414a316d997a314b05ac7f9258a722
tree34ae5a190a354d5be0c12eca7d123426e235287b
parent51e74e21aae8b4e885e23d3f15922a58bc173c34
[AArch64] Don't merge sp decrement into later stores when using WinCFI

This matches the corresponding existing case in
AArch64LoadStoreOpt::findMatchingUpdateInsnForward.

Both cases could also be modified to check
MBBI->getFlag(FrameSetup/FrameDestroy) instead of forbidding any
optimization involving SP, but the effect is probably pretty much
the same.

Differential Revision: https://reviews.llvm.org/D88541
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
llvm/test/CodeGen/AArch64/arm64-windows-calls.ll