[llvm] [AArch64] Don't emit stack restore for SME ZA non-sibling tail calls (PR #224721)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 02:27:49 PDT 2026
================
----------------
MacDue wrote:
I think you're right that the `ZAMarkerNode` check here is incorrect. It should be safe to place `AArch64ISD::INOUT_ZA_USE` before a tail call in `inout_za` callers, as in that case we won't need to place any action after the call.
The unsafe cases (which I think are already prevented in `isEligibleForTailCallOptimization()`) are:
- a tail call in a new ZA/ZT0 function
- We need to stop ZA before the function returns
- a tail call before with a marker other than `INOUT_ZA_USE` in a "inout" function
- As we need to restore the ZA/ZT0 state after the call.
https://github.com/llvm/llvm-project/pull/224721
More information about the llvm-commits
mailing list