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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 08:02:36 PDT 2025


================
@@ -4384,7 +4393,10 @@ VectorizationFactor LoopVectorizationPlanner::selectVectorizationFactor() {
 
       /// Don't consider the VF if it exceeds the number of registers for the
       /// target.
-      if (RU.exceedsMaxNumRegs(TTI))
+      if (CM.useMaxBandwidth(VF.isScalable()
+                                 ? TargetTransformInfo::RGK_ScalableVector
+                                 : TargetTransformInfo::RGK_FixedWidthVector) &&
+          RU.exceedsMaxNumRegs(TTI))
----------------
fhahn wrote:

I think this is the only use of RU, would be good to skip the register pressure computation when it's not needed

Same below

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


More information about the llvm-commits mailing list