[all-commits] [llvm/llvm-project] ad695d: [AArch64] Don't emit stack restore for SME ZA non-...

David Tellenbach via All-commits all-commits at lists.llvm.org
Wed Sep 23 13:54:39 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad695d46e4535f953558705541b71c2d938fb72b
      https://github.com/llvm/llvm-project/commit/ad695d46e4535f953558705541b71c2d938fb72b
  Author: David Tellenbach <dtellenbach at apple.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/sme-za-non-sibling-tailcall.ll
    M llvm/test/CodeGen/AArch64/sme-za-tailcall-fpdiff-align.ll

  Log Message:
  -----------
  [AArch64] Don't emit stack restore for SME ZA non-sibling tail calls (#224721)

A tail call from a function with live ZA state was previously prevented
from being lowered as a sibling call to have a CALLSEQ_START to glue
INOUT_ZA_USE to. This led to bogus stack restores.

We now drop the INOUT_ZA_USE marker on tail calls and can thus lower as
sibling calls if needed to take advantage of the existing correct stack
restore behavior.

This is safe to do since tail calls use TCRETURN and the MachineSMEABI
pass requires live ZA state to stay live across returns anyway.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list