This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Fix calculation restore point for SVE callee saves.
ClosedPublic

Authored by sdesmalen on Aug 17 2020, 12:19 PM.

Details

Summary

This fixes an issue where the restore point of callee-saves in the
function epilogues was incorrectly calculated when the basic block
consisted of only a RET instruction. This caused dealloc instructions
to be inserted in between the block of callee-save restore instructions,
rather than before it.

Diff Detail

Event Timeline

sdesmalen created this revision.Aug 17 2020, 12:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 12:19 PM
sdesmalen requested review of this revision.Aug 17 2020, 12:19 PM
paulwalker-arm accepted this revision.Aug 18 2020, 4:18 AM

Just a couple of typos to fix before landing the patch.

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
1696–1697

Not due to this patch but since you're here can you remove the extra ";" please?

1702

I'm guessing the rouge >> is a tab character that should be removed.

This revision is now accepted and ready to land.Aug 18 2020, 4:18 AM
efriedma added inline comments.Aug 18 2020, 1:55 PM
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
1697–1699

Can we simplify this to something like while (RestoreBegin != MBB.begin() && IsSVECalleeSave(std::prev(RestoreBegin)) --RestoreBegin;, instead of bouncing around in both directions?

This revision was automatically updated to reflect the committed changes.
sdesmalen marked 3 inline comments as done.

Addressed review comments before committing.