[llvm] eb59fe8 - [VPlan] Remove redundant assignment in VPReductionPHIRecipe (NFC)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 13:33:01 PST 2024


Author: Florian Hahn
Date: 2024-12-17T21:32:40Z
New Revision: eb59fe8d04a594da4ac0cdba2bb2ca828adcf833

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

LOG: [VPlan] Remove redundant assignment in VPReductionPHIRecipe (NFC)

Suggested post-commit for 0e528ac404e13ed2d952a2d83aaf8383293c851e.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 7239ecefbde56f..7f8c560270bc0c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3413,7 +3413,7 @@ void VPReductionPHIRecipe::execute(VPTransformState &State) {
     // TODO: The sentinel value is not always necessary. When the start value is
     // a constant, and smaller than the start value of the induction variable,
     // the start value can be directly used to initialize the reduction phi.
-    StartV = Iden = StartV;
+    Iden = StartV;
     if (!ScalarPHI) {
       IRBuilderBase::InsertPointGuard IPBuilder(Builder);
       Builder.SetInsertPoint(VectorPH->getTerminator());


        


More information about the llvm-commits mailing list