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

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 06:49:45 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);
----------------
kmclaughlin-arm wrote:

Fixed in latest commit

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


More information about the cfe-commits mailing list