Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[LoopVectorizer][NFC] Update comment regarding VF register pressure.#149478

Merged
NickGuy-Arm merged 1 commit intollvm:mainfrom
NickGuy-Arm:main
Jul 18, 2025
Merged

[LoopVectorizer][NFC] Update comment regarding VF register pressure.#149478
NickGuy-Arm merged 1 commit intollvm:mainfrom
NickGuy-Arm:main

Conversation

@NickGuy-Arm
Copy link
Copy Markdown
Contributor

No description provided.

@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Jul 18, 2025

@llvm/pr-subscribers-vectorizers

@llvm/pr-subscribers-llvm-transforms

Author: Nicholas Guy (NickGuy-Arm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/149478.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+3-2)
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;

@NickGuy-Arm NickGuy-Arm merged commit 534b9cd into llvm:main Jul 18, 2025
10 of 12 checks passed
Copy link
Copy Markdown
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants