[llvm] [AArch64][SME2] Extend SMEABIPass to handle functions with new ZT0 state (PR #78848)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 01:47:45 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));
----------------
sdesmalen-arm wrote:
`__arm_preserves("zt0")` implies that `__arm_tpidr2_save` and `__arm_sme_state` are Shared-ZA functions, which they are not. I guess you're trying to avoid generating the spill/fill of ZT0 around the call to these functions, but perhaps that should be made part of `ZA_NoLazySave` (which then probably needs a rename).
https://github.com/llvm/llvm-project/pull/78848
More information about the llvm-commits
mailing list