================
@@ -708,7 +708,7 @@ AArch64TargetInfo::getVScaleRange(const LangOptions 
&LangOpts) const {
     return std::pair<unsigned, unsigned>(
         LangOpts.VScaleMin ? LangOpts.VScaleMin : 1, LangOpts.VScaleMax);
 
-  if (hasFeature("sve"))
+  if (hasFeature("sve") || hasFeature("sme"))
----------------
davemgreen wrote:

> If the function only has +sme, then vscale_range should only apply to 
> (locally) streaming functions, because non-streaming or streaming-compatible 
> functions cannot use scalable vectors.

vscale_range should be valid on any function, and will only be used if there 
are scalable vectors present. I've had a go at making it only apply to 
streaming functions, but it couldn't pass FunctionDecl to getVScaleRange as 
that would create a layering violation. I'm not sure I prefer this to the 
original that just applied it to all functions, unless you have a better 
suggestion?

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

Reply via email to