[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 01:05:05 PST 2023
================
@@ -3168,11 +3168,70 @@ static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall,
<< TheCall->getSourceRange() << "streaming compatible";
return;
}
+
+ if (FnType == ArmNonStreaming && BuiltinType == ArmStreaming) {
+ S.Diag(TheCall->getBeginLoc(), diag::warn_attribute_arm_sm_incompat_builtin)
+ << TheCall->getSourceRange() << "non-streaming";
+ }
+}
----------------
sdesmalen-arm wrote:
I think this functionality is big enough to warrant it own PR, such that we have:
* One PR for testing the compatibility of streaming-mode for both SVE and SME.
* One PR for testing that the calling function of a ZA-using builtin has ZA state.
https://github.com/llvm/llvm-project/pull/74064
More information about the cfe-commits
mailing list