[llvm] [AArch64][SME2] Preserve ZT0 state around function calls (PR #78321)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 04:12:31 PST 2024


================
@@ -8074,14 +8105,20 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
                                  PStateSM, false);
   }
 
+  if ((RequiresLazySave && !CalleeAttrs.preservesZA()) || ToggleZA)
----------------
sdesmalen-arm wrote:

Sorry for not thinking ahead on this one, but seeing this I just wondered if it would be easier to have two interfaces:
* `CallerAttrs.requiresDisablingZABeforeCall(CalleeAttrs)`
* `CallerAttrs.requiresEnablingZAAfterCall(CalleeAttrs)`

instead of `requiresZAToggle`?

https://github.com/llvm/llvm-project/pull/78321


More information about the llvm-commits mailing list