This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][WinCFI] Handle cases where no SEH opcodes in the prologue but there are some in the epilogue.
ClosedPublic

Authored by hjyamauchi on Aug 30 2023, 4:25 PM.

Details

Summary

Make a decision whether or not to have a startepilogue/endepilogue based on whether we actually insert SEH opcodes in the epilogue, rather than whether we had SEH opcodes in the prologue or not.

This fixes an assert failure when there are no SEH opcodes in the prologue but there are SEH opcodes in the epilogue (for example, when there is no stack frame but there are stack arguments) which was not covered in https://reviews.llvm.org/D88641.

Assertion failed: HasWinCFI == MF.hasWinCFI(), file C:\Users\hiroshi\llvm-project\llvm\lib\Target\AArch64\AArch64FrameLowering.cpp, line 1988

Diff Detail

Event Timeline

hjyamauchi created this revision.Aug 30 2023, 4:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 4:25 PM
hjyamauchi requested review of this revision.Aug 30 2023, 4:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 4:25 PM
compnerd accepted this revision.Aug 30 2023, 4:46 PM
This revision is now accepted and ready to land.Aug 30 2023, 4:46 PM
This revision was landed with ongoing or failed builds.Aug 31 2023, 12:43 PM
This revision was automatically updated to reflect the committed changes.