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

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 16:25:52 PDT 2023


hjyamauchi created this revision.
hjyamauchi added a reviewer: compnerd.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
hjyamauchi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159238

Files:
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/test/CodeGen/AArch64/wincfi-seh-only-in-epilogue.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159238.554857.patch
Type: text/x-patch
Size: 4718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/1c304eff/attachment.bin>


More information about the llvm-commits mailing list