Skip to content

Commit 1d6e918

Browse files
committed
Rebase and add comment about external operand replacement
1 parent 1ae4d37 commit 1d6e918

File tree

2 files changed

+153
-153
lines changed

2 files changed

+153
-153
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,6 @@ VPExpressionRecipe::VPExpressionRecipe(
27942794
// create new temporary VPValues for all operands defined by a recipe outside
27952795
// the expression. The original operands are added as operands of the
27962796
// VPExpressionRecipe itself.
2797-
27982797
for (auto *R : ExpressionRecipes) {
27992798
for (const auto &[Idx, Op] : enumerate(R->operands())) {
28002799
auto *Def = Op->getDefiningRecipe();
@@ -2805,6 +2804,8 @@ VPExpressionRecipe::VPExpressionRecipe(
28052804
}
28062805
}
28072806

2807+
// Replace each external operand with the first one created for it in
2808+
// LiveInPlaceholders.
28082809
for (auto *R : ExpressionRecipes)
28092810
for (auto const &[LiveIn, Tmp] : zip(operands(), LiveInPlaceholders))
28102811
R->replaceUsesOfWith(LiveIn, Tmp);

0 commit comments

Comments
 (0)