This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix prologue/epilogue for pacbti-m leaf functions
ClosedPublic

Authored by john.brawn on Aug 14 2023, 6:34 AM.

Details

Summary

R12 is callee-saved in functions with pacbti-m enabled, but this is done in assignCalleeSavedSpillSlots, meaning that in determineCalleeSaves we have to manually set CanEliminateFrame.

This fixes a bug where in leaf functions with no other callee-saved registers the aut instruction wouldn't be emitted and stack offsets of arguments passed on the stack would be incorrect.

Diff Detail

Event Timeline

john.brawn created this revision.Aug 14 2023, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 6:34 AM
john.brawn requested review of this revision.Aug 14 2023, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 6:34 AM
olista01 accepted this revision.Aug 29 2023, 9:20 AM
olista01 added a subscriber: olista01.

LGTM

This revision is now accepted and ready to land.Aug 29 2023, 9:20 AM
This revision was automatically updated to reflect the committed changes.