================
@@ -7516,28 +7516,23 @@ void Sema::checkCall(NamedDecl *FDecl, const 
FunctionProtoType *Proto,
       }
     }
 
-    auto *CallerFD = dyn_cast<FunctionDecl>(CurContext);
-    bool IsCalleeStreaming =
-        (ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask);
-    bool IsCalleeStreamingCompatible =
-        (ExtInfo.AArch64SMEAttributes &
-         FunctionType::SME_PStateSMCompatibleMask);
-    bool IsBuiltin = (FD && FD->getBuiltinID());
-    AnyScalableArgsOrRet |= Proto->getReturnType()->isSizelessVectorType();
-
-    // If the caller is a function and the callee has a different
-    // non-compitable streaming attribute. If it passed any VL-based arguments
-    // or return VL-based value, then warn that the streaming and non-streaming
-    // vector lengths may be different.
-    if (CallerFD && !IsBuiltin && AnyScalableArgsOrRet) {
-      ArmStreamingType CallerFnType = getArmStreamingFnType(CallerFD);
-      if ((CallerFnType != ArmStreaming &&
-           CallerFnType != ArmStreamingCompatible && IsCalleeStreaming) ||
-          (CallerFnType == ArmStreaming && !IsCalleeStreaming &&
-           !IsCalleeStreamingCompatible) ||
-          (CallerFnType == ArmStreamingCompatible &&
-           (IsCalleeStreaming || !IsCalleeStreamingCompatible)))
-        Diag(Loc, diag::warn_sme_streaming_pass_return_vl_to_non_streaming);
+    // If the call requires a streaming-mode change and has scalable vector
+    // arguments or return values, then warn the user that the streaming and
+    // non-streaming vector lengths may be different.
+    bool IsBuiltin = FD && FD->getBuiltinID();
----------------
sdesmalen-arm wrote:

minor nit: this definition can be moved to inside the `if (auto *CallerFD = 
..)` block.

https://github.com/llvm/llvm-project/pull/79842
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to