[all-commits] [llvm/llvm-project] 4e01a0: [AArch64] Fixes for Windows varargs handling. (#13...

Eli Friedman via All-commits all-commits at lists.llvm.org
Fri May 16 11:31:13 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e01a07cffc43f720ed527969ba70c396940ce2e
      https://github.com/llvm/llvm-project/commit/4e01a07cffc43f720ed527969ba70c396940ce2e
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2025-05-16 (Fri, 16 May 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/arm64ec-hybrid-patchable.ll
    M llvm/test/CodeGen/AArch64/arm64ec-varargs.ll
    M llvm/test/CodeGen/AArch64/darwinpcs-tail.ll
    M llvm/test/CodeGen/AArch64/vararg-tallcall.ll
    M llvm/test/CodeGen/AArch64/win64_vararg2.ll

  Log Message:
  -----------
  [AArch64] Fixes for Windows varargs handling. (#139972)

Omit spills when va_start is not present, like we do on other targets.
In most situations this is just an optimization, but for thunks in
arm64ec, we need this because it's illegal to reference varargs in a
thunk.

Fix the bug that prevented omitting vararg spills from working properly:
we need to avoid interfering with musttail handling. (This is not a
Windows-only issue, but it mostly affects Windows because musttail
thunks are mostly used for the Microsoft C++ ABI.)

On arm64ec, don't set x4 and x5 for musttail thunks; forward them from
the caller.

Fixes #139856 .



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