[all-commits] [llvm/llvm-project] 8c7a2c: [AArch64][SME] Allow spills of ZT0 around SME ABI ...
Benjamin Maxwell via All-commits
all-commits at lists.llvm.org
Fri Apr 25 05:33:31 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8c7a2ce01a77c96028fe2c8566f65c45ad9408d3
https://github.com/llvm/llvm-project/commit/8c7a2ce01a77c96028fe2c8566f65c45ad9408d3
Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: 2025-04-25 (Fri, 25 Apr 2025)
Changed paths:
M llvm/lib/IR/Verifier.cpp
M llvm/lib/Target/AArch64/SMEABIPass.cpp
M llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.cpp
M llvm/lib/Target/AArch64/Utils/AArch64SMEAttributes.h
A llvm/test/CodeGen/AArch64/sme-new-zt0-function.ll
M llvm/test/CodeGen/AArch64/sme-zt0-state.ll
M llvm/test/Verifier/sme-attributes.ll
M llvm/unittests/Target/AArch64/SMEAttributesTest.cpp
Log Message:
-----------
[AArch64][SME] Allow spills of ZT0 around SME ABI routines again (#136726)
In #132722 spills of ZT0 were disabled around all SME ABI routines to
avoid a case where ZT0 is spilled before ZA is enabled (resulting in a
crash).
It turns out that the ABI does not promise that routines will preserve
ZT0 (however in practice they do), so generally disabling ZT0 spills for
ABI routines is not correct.
The case where a crash was possible was "aarch64_new_zt0" functions with
ZA disabled on entry and a ZT0 spill around __arm_tpidr2_save. In this
case, ZT0 will be undefined at the call to __arm_tpidr2_save, so this
patch avoids the ZT0 spill by marking the callsite with
"aarch64_zt0_undef". This attribute only applies to callsites and marks
that at the point the call is made ZT0 is not defined, so does not need
preserving.
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