[clang] [llvm] [AArch64][SME] Allow more inlining when SME attributes are incompatible. (PR #223393)

Benjamin Maxwell via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 07:49:49 PDT 2026


================
@@ -200,7 +200,9 @@ class SMECallAttrs {
   }
 
   bool requiresZASave() const {
-    return requiresLazySave() || requiresPreservingAllZAState();
+    return requiresLazySave() || requiresPreservingAllZAState() ||
+           (caller().hasZAState() && callee().hasSharedZAInterface() &&
+            !callee().sharesZA());
----------------
MacDue wrote:

This change looks a bit odd. Codegen-wise I don't think we really support this case, if you share have a shared ZA-interface you must share ZA (and we don't emit a save). I think this case would require a non-lazy save to actually support (see https://godbolt.org/z/a516c6Yrq).

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


More information about the cfe-commits mailing list