[llvm] [AArch64][SME2] Extend SMEABIPass to handle functions with new ZT0 state (PR #78848)
Kerry McLaughlin via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 04:09:50 PST 2024
================
@@ -49,11 +49,13 @@ SMEAttrs::SMEAttrs(const CallBase &CB) {
SMEAttrs::SMEAttrs(StringRef FuncName) : Bitmask(0) {
if (FuncName == "__arm_tpidr2_save" || FuncName == "__arm_sme_state")
- Bitmask |= (SMEAttrs::SM_Compatible | SMEAttrs::ZA_Preserved |
- SMEAttrs::ZA_NoLazySave);
+ Bitmask |=
+ (SMEAttrs::SM_Compatible | SMEAttrs::ZA_Preserved |
+ SMEAttrs::ZA_NoLazySave | encodeZT0State(StateValue::Preserved));
----------------
kmclaughlin-arm wrote:
I've removed the Preserved attribute from these functions for now, which means we generate a spill/fill of ZT0 around these calls from a `aarch64_new_zt0` function and also call `smstop za`/`smstart za` when the caller does not also have ZA state.
https://github.com/llvm/llvm-project/pull/78848
More information about the llvm-commits
mailing list