[all-commits] [llvm/llvm-project] 934303: Add test showing wrong stack restore

David Tellenbach via All-commits all-commits at lists.llvm.org
Wed Sep 23 11:09:01 PDT 2026


  Branch: refs/heads/users/dtellenbach/sme-non-sibling-tailcall
  Home:   https://github.com/llvm/llvm-project
  Commit: 9343035bb45240a5b48d7feb77c19f7fec3e339d
      https://github.com/llvm/llvm-project/commit/9343035bb45240a5b48d7feb77c19f7fec3e339d
  Author: David Tellenbach <dtellenbach at apple.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    A llvm/test/CodeGen/AArch64/sme-za-non-sibling-tailcall.ll

  Log Message:
  -----------
  Add test showing wrong stack restore


  Commit: 2481e34aed7534faaa5c106aeac7b24db204a7f0
      https://github.com/llvm/llvm-project/commit/2481e34aed7534faaa5c106aeac7b24db204a7f0
  Author: David Tellenbach <dtellenbach at apple.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

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

  Log Message:
  -----------
  [AArch64][SME] Drop ZA marker on tail calls and lower as sibling calls

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.


Compare: https://github.com/llvm/llvm-project/compare/c75b4422e993...2481e34aed75

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