[llvm-branch-commits] [llvm] [AArch64][SME] Support agnostic ZA functions in the MachineSMEABIPass (PR #149064)
Sander de Smalen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 1 07:39:52 PDT 2025
================
@@ -9115,9 +9115,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
bool UseNewSMEABILowering = getTM().useNewSMEABILowering();
bool IsAgnosticZAFunction = CallAttrs.caller().hasAgnosticZAInterface();
auto ZAMarkerNode = [&]() -> std::optional<unsigned> {
- // TODO: Handle agnostic ZA functions.
- if (!UseNewSMEABILowering || IsAgnosticZAFunction)
+ if (!UseNewSMEABILowering)
----------------
sdesmalen-arm wrote:
I know this is a style-thing, but I find this lambda more confusing than just writing:
```
std::optional<unsigned> ZAMarkerNode = std::nullopt;
if (UseNewSMEABILowering) {
if (CallAttrs.requiresLazySave() || CallAttrs.requiresPreservingAllZAState())
ZAMarkerNode = AArch64ISD::REQUIRES_ZA_SAVE;
else if (CallAttrs.caller().hasZAState() || CallAttrs.caller().hasZT0State())
ZAMarkerNode = AArch64ISD::INOUT_ZA_USE;
}
```
https://github.com/llvm/llvm-project/pull/149064
More information about the llvm-branch-commits
mailing list