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

Note that Clang already gives an error diagnostic for this case being 
unimplemented (https://godbolt.org/z/sYWb7sEn7). I've created #227608 to emit 
the error in LLVM as well.

I still think that `requiresZASave` should return `true` if a non-lazy save of 
ZA is required and that optimizations like inlining should [be able to] take 
this case into account, even though we don't support it in codegen yet.




https://github.com/llvm/llvm-project/pull/223393
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to