https://gcc.gnu.org/g:91f175c187adea112debb4bf415fc1e7447f3127
commit r16-9320-g91f175c187adea112debb4bf415fc1e7447f3127 Author: Alice Carlotti <[email protected]> Date: Thu Apr 16 12:37:53 2026 +0100 aarch64: Extend comment about saving/restoring zt0 Explain why aarch64_start_call_args only needs to save and restore zt0 if the callee shares ZA state. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_start_call_args): Extend comment. Diff: --- gcc/config/aarch64/aarch64.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 361b82ccd82d..ab8c6d0dff6e 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -12204,7 +12204,8 @@ aarch64_start_call_args (cumulative_args_t ca_v) emit_insn (gen_aarch64_start_private_za_call ()); /* If this is a call to a shared-ZA function that doesn't share ZT0, - save and restore ZT0 around the call. */ + save and restore ZT0 around the call. If ZA is not shared, then the + save/restore is instead emitted by aarch64_mode_emit_local_sme_state. */ if (aarch64_cfun_has_state ("zt0") && (ca->isa_mode & AARCH64_ISA_MODE_ZA_ON) && ca->shared_zt0_flags == 0)
