[llvm] [AArch64] Don't inline streaming Fn if caller has no SVE (PR #150595)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 05:09:22 PDT 2025
================
@@ -280,16 +280,22 @@ bool AArch64TTIImpl::areInlineCompatible(const Function *Caller,
if (CallAttrs.callee().isNewZA() || CallAttrs.callee().isNewZT0())
return false;
+ const TargetMachine &TM = getTLI()->getTargetMachine();
+ const FeatureBitset &CallerBits =
+ TM.getSubtargetImpl(*Caller)->getFeatureBits();
+
+ // Cannot inline a streaming function into a non-streaming function,
+ // if the caller has no SVE.
+ if (CallAttrs.requiresSMChange() && !CallerBits.test(AArch64::FeatureSVE))
----------------
MacDue wrote:
I guess in the general case this the features being compatible is checked by `(EffectiveCallerBits & EffectiveCalleeBits) == EffectiveCalleeBits` (below this check). But streaming mode is not a target feature (just a function attribute), so is not included in this check.
https://github.com/llvm/llvm-project/pull/150595
More information about the llvm-commits
mailing list