[llvm] b1115f8 - [LV] Use LatchVPBB directly instead of going through region (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 12:08:48 PDT 2023


Author: Florian Hahn
Date: 2023-10-13T20:08:31+01:00
New Revision: b1115f8ccefb380824a9d997622cc84fc0d84a89

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

LOG: [LV] Use LatchVPBB directly instead of going through region (NFC).

Split off from D158333.

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 88f064b6d57cebc..2ca7e75f97f0f02 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8918,8 +8918,7 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
   // ---------------------------------------------------------------------------
 
   // Adjust the recipes for any inloop reductions.
-  adjustRecipesForReductions(cast<VPBasicBlock>(TopRegion->getExiting()), Plan,
-                             RecipeBuilder, Range.Start);
+  adjustRecipesForReductions(LatchVPBB, Plan, RecipeBuilder, Range.Start);
 
   // Interleave memory: for each Interleave Group we marked earlier as relevant
   // for this VPlan, replace the Recipes widening its memory instructions with a


        


More information about the llvm-commits mailing list