[llvm] [LV] Fix MVE regression from #132190 (PR #141736)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 07:29:24 PDT 2025


================
@@ -3944,6 +3948,14 @@ LoopVectorizationCostModel::computeMaxVF(ElementCount UserVF, unsigned UserIC) {
   return FixedScalableVFPair::getNone();
 }
 
+bool LoopVectorizationCostModel::useMaxBandwidth(
+    TargetTransformInfo::RegisterKind RegKind) {
+  return MaximizeBandwidth || (MaximizeBandwidth.getNumOccurrences() == 0 &&
+                               (TTI.shouldMaximizeVectorBandwidth(RegKind) ||
+                                (UseWiderVFIfCallVariantsPresent &&
+                                 Legal->hasVectorCallVariants())));
----------------
lukel97 wrote:

@preames @wangpc-pp @topperc Making a note here that after this patch we'll likely regress cases like this unless we opt into shouldMaximizeVectorBandwidth https://godbolt.org/z/WcbWGooa4

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


More information about the llvm-commits mailing list