[llvm] 534b9cd - [LoopVectorizer][NFC] Update comment regarding VF register pressure. (#149478)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 01:55:04 PDT 2025


Author: Nicholas Guy
Date: 2025-07-18T09:55:00+01:00
New Revision: 534b9cdddde2d4f11516a8f689c6ba23a29b8bdc

URL: https://github.com/llvm/llvm-project/commit/534b9cdddde2d4f11516a8f689c6ba23a29b8bdc
DIFF: https://github.com/llvm/llvm-project/commit/534b9cdddde2d4f11516a8f689c6ba23a29b8bdc.diff

LOG: [LoopVectorizer][NFC] Update comment regarding VF register pressure. (#149478)

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index da3532b2f3385..f142e0796b52a 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4278,8 +4278,9 @@ VectorizationFactor LoopVectorizationPlanner::selectVectorizationFactor() {
       if (VF.isScalar())
         continue;
 
-      /// If the VF was proposed due to MaxBandwidth, don't consider the VF if
-      /// it exceeds the number of registers for the target.
+      /// If the register pressure needs to be considered for VF,
+      /// don't consider the VF as valid if it exceeds the number
+      /// of registers for the target.
       if (CM.shouldCalculateRegPressureForVF(VF) &&
           RUs[I].exceedsMaxNumRegs(TTI, ForceTargetNumVectorRegs))
         continue;


        


More information about the llvm-commits mailing list