[llvm] [LoopVectorizer][NFC] Update comment regarding VF register pressure. (PR #149478)
Nicholas Guy via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 18 01:54:33 PDT 2025
https://github.com/NickGuy-Arm created https://github.com/llvm/llvm-project/pull/149478
None
>From 554efd52bce069d1d5b54164a64dca24d2790b38 Mon Sep 17 00:00:00 2001
From: Nick Guy <nicholas.guy at arm.com>
Date: Fri, 18 Jul 2025 09:48:55 +0100
Subject: [PATCH] [LoopVectorizer][NFC] Update comment regarding VF register
pressure.
---
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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