[LV] Remove reference of PHI from comment, they are not recorded (NFC).
authorFlorian Hahn <flo@fhahn.com>
Fri, 7 May 2021 20:30:54 +0000 (21:30 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 7 May 2021 20:34:23 +0000 (21:34 +0100)
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.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 9337224..f1cf5c9 100644 (file)
@@ -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);