This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Remove dead code for inserting SEH opcodes for realignment. NFC.
ClosedPublic

Authored by mstorsjo on Oct 12 2022, 2:34 PM.

Details

Summary

If the stack is realigned, we've emitted a frame pointer and
already terminated the SEH prologue, making this dead code since
a07787c9a50c046e45921dd665f5a53a752bbc31.

The immediate to this SEH opcode was entirely bogus - we don't
know how many bytes the AND operation adjusts the SP, and by
doing "NumBytes & andMaskEncoded" (where andMaskEncoded was the
immediate bitpattern for the AND instruction), the immediate to the
opcode was total gibberish.

This hasn't had any practical effect, since the original stack
pointer always was restored from the frame pointer afterwards anyway.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 12 2022, 2:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 2:34 PM
mstorsjo requested review of this revision.Oct 12 2022, 2:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 2:34 PM
This revision is now accepted and ready to land.Oct 12 2022, 3:12 PM