[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 19 11:52:40 PDT 2024


================
@@ -8001,6 +8007,22 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
       }
     }
 
+    // SME functions may require SVE to be available for unwinding, as the
+    // value of VG needs to be preserved across streaming-mode changes.
+    if (CallerFD && (!FD || !FD->getBuiltinID()) &&
+        !Context.getTargetInfo().hasFeature("sve")) {
+      if (CallerFD->hasAttr<ArmLocallyStreamingAttr>())
+        Diag(Loc, diag::warn_sme_locally_streaming_no_sve);
+
+        auto CallerStreamingTy = getArmStreamingFnType(CallerFD);
----------------
efriedma-quic wrote:

Indentation?

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


More information about the cfe-commits mailing list