[llvm] [LoopVectorizer] Prune VFs based on plan register pressure (PR #132190)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 09:00:17 PDT 2025


================
@@ -7801,6 +7598,15 @@ VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
 
       InstructionCost Cost = cost(*P, VF);
       VectorizationFactor CurrentFactor(VF, Cost, ScalarCost);
+
+      // Make sure that the VF doesn't use more than the number of available
+      // registers
----------------
sdesmalen-arm wrote:

nit: this comment can be dropped, because the code below says as much.

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


More information about the llvm-commits mailing list