[llvm] [AArch64][SVE] Enable max vector bandwidth for SVE (PR #109671)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 07:53:44 PDT 2024


================
@@ -333,8 +333,10 @@ AArch64TTIImpl::getInlineCallPenalty(const Function *F, const CallBase &Call,
 bool AArch64TTIImpl::shouldMaximizeVectorBandwidth(
     TargetTransformInfo::RegisterKind K) const {
   assert(K != TargetTransformInfo::RGK_Scalar);
-  return (K == TargetTransformInfo::RGK_FixedWidthVector &&
-          ST->isNeonAvailable());
+  return ((K == TargetTransformInfo::RGK_FixedWidthVector &&
+           ST->isNeonAvailable()) ||
+          (K == TargetTransformInfo::RGK_ScalableVector &&
+           ST->isSVEorStreamingSVEAvailable()));
----------------
paulwalker-arm wrote:

At this stage can this be just `return true;`?

The original feature check was likely to block max bandwidth when using SVE for fixed length vectors. However, if SVE is good for max bandwidth scalable vectors, then I would expect it to be good enough for fixed length as well.

https://github.com/llvm/llvm-project/pull/109671


More information about the llvm-commits mailing list