[llvm] [AArch64] Disable variadic tail-calls for ARM64EC (PR #78914)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 13:49:03 PST 2024


efriedma-quic wrote:

> The issue I ran into is that even when zero arguments are passed, the callee will still write the nonstack params to [x4-0x20,x4], so either x4 needs to point to 0x20 bytes of allocated stack space or the current SP, neither is the case in a tail call.

"Current SP" is meaningful for a tail-call; it's just the SP on entry.  I guess the current code doesn't compute that correctly, but it's very easy to fix; we do a similar computation elsewhere (see https://github.com/llvm/llvm-project/blob/6c98c5bd99b4c71a7895337cd4e437e023c2ec7a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp#L7951).

https://github.com/llvm/llvm-project/pull/78914


More information about the llvm-commits mailing list