[llvm] Fix an assert failure with a funclet in a swifttailcc function. (PR #78806)
Hiroshi Yamauchi via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 16:43:33 PST 2024
================
@@ -2590,9 +2590,11 @@ StackOffset AArch64FrameLowering::resolveFrameOffsetReference(
// via the frame pointer, so we have to use the FP in the parent
// function.
(void) Subtarget;
+ // swifttailcc uses FP
assert(
- Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()) &&
- "Funclets should only be present on Win64");
+ (Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()) ||
+ MF.getFunction().getCallingConv() == CallingConv::SwiftTail) &&
+ "Funclets should only be present on Win64 or swifttailcc");
----------------
hjyamauchi wrote:
swiftcc is already covered by isCallingConvWin64. I think this is checking that the particular cc uses a frame pointer, which swifttailcc does, and being relatively a recent addition, it wasn't covered by this code.
https://github.com/llvm/llvm-project/pull/78806
More information about the llvm-commits
mailing list