[llvm] 75b9997 - [LV] Remove reference of PHI from comment, they are not recorded (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 13:35:49 PDT 2021


Author: Florian Hahn
Date: 2021-05-07T21:34:23+01:00
New Revision: 75b9997760c69968863740ded6c89d4faf29ca7f

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

LOG: [LV] Remove reference of PHI from comment, they are not recorded (NFC).

The comment incorrectly states that the PHI is recorded. That's not
accurate, only the recipe for the incoming value is recorded.

Suggested post-commit for 4ba8720f8844.

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 933722480343..f1cf5c9f78db 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8900,11 +8900,10 @@ VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
              Phi->getIncomingValueForBlock(OrigLoop->getLoopPreheader()));
       VPValue *StartV = Operands[0];
 
-      // Record the PHI and the incoming value from the backedge, so we can add
-      // the incoming value from the backedge after all recipes have been
-      // created.
       auto *PhiRecipe = new VPWidenPHIRecipe(Phi, RdxDesc, *StartV);
       PhisToFix.push_back(PhiRecipe);
+      // Record the incoming value from the backedge, so we can add the incoming
+      // value from the backedge after all recipes have been created.
       recordRecipeOf(cast<Instruction>(
           Phi->getIncomingValueForBlock(OrigLoop->getLoopLatch())));
       return toVPRecipeResult(PhiRecipe);


        


More information about the llvm-commits mailing list