[llvm] [AArch64] SME implementation for agnostic-ZA functions (PR #120150)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 06:19:58 PST 2024


================
@@ -9455,9 +9574,14 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI,
         DAG.getConstant(Intrinsic::aarch64_sme_set_tpidr2, DL, MVT::i32),
         DAG.getConstant(0, DL, MVT::i64));
     TPIDR2.Uses++;
+  } else if (RequiresSaveAllZA) {
+    Result = emitSMEStateSaveRestore(*this, DAG, FuncInfo, DL, Chain,
+                                     /*IsSave=*/false);
+    FuncInfo->setSMESaveBufferUsed();
----------------
paulwalker-arm wrote:

Would it make sense to push this into `emitSMEStateSaveRestore` for when `IsSave=false`? I ask because I'm assuming the "used" is synonymous with "has been restored".

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


More information about the llvm-commits mailing list