[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 4 06:10:50 PST 2024
================
@@ -7531,19 +7531,15 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
// vector lengths may be different.
if (CallerFD && Context.getTargetInfo().hasFeature("sme") && !IsBuiltin) {
ArmStreamingType CallerFnType = getArmStreamingFnType(CallerFD);
- if (CallerFnType != ArmStreaming &&
- CallerFnType != ArmStreamingCompatible) {
- if (IsCalleeStreaming && AnyScalableArgsOrRet)
- Diag(Loc, diag::warn_sme_streaming_pass_return_vl_to_non_streaming);
- } else if (CallerFnType == ArmStreaming && !IsCalleeStreaming &&
- !IsCalleeStreamingCompatible) {
- if (AnyScalableArgsOrRet)
- Diag(Loc, diag::warn_sme_streaming_pass_return_vl_to_non_streaming);
- } else if (CallerFnType == ArmStreamingCompatible) {
- if ((IsCalleeStreaming || !IsCalleeStreamingCompatible) &&
- AnyScalableArgsOrRet)
- Diag(Loc, diag::warn_sme_streaming_pass_return_vl_to_non_streaming);
- }
+ if ((CallerFnType != ArmStreaming &&
+ CallerFnType != ArmStreamingCompatible && IsCalleeStreaming &&
+ AnyScalableArgsOrRet) ||
----------------
sdesmalen-arm wrote:
Can you factor out `AnyScalableArgsOrRet`?
https://github.com/llvm/llvm-project/pull/79842
More information about the cfe-commits
mailing list