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

I'm not sure this is the right place to make that change. This will make 
codegen insert a lazy-save before the call, which means we'll enter a function 
with a shared-ZA interface in the dormant mode. 

I somewhat think we should just emit an error in this case as it's not 
supported and is really a silent miscompile. 

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