Skip to content

Commit 44c1c74

Browse files
fhahnaugusto2112
authored andcommitted
[VPlan] Treat VPVector(End)PointerRecipe as single-scalar, if ops are. (llvm#169249)
VPVector(End)PointerRecipes are single-scalar if all their operands are. This should be effectively NFC currently, but it should re-enable cost checking for some more VPWidenMemoryRecipe after llvm#157387 as discovered by John Brawn.
1 parent 23dcac6 commit 44c1c74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
197197
all_of(VPI->operands(), isSingleScalar));
198198
if (isa<VPPartialReductionRecipe>(VPV))
199199
return false;
200-
if (isa<VPReductionRecipe>(VPV))
200+
if (isa<VPReductionRecipe, VPVectorPointerRecipe, VPVectorEndPointerRecipe>(
201+
VPV))
201202
return true;
202203
if (auto *Expr = dyn_cast<VPExpressionRecipe>(VPV))
203204
return Expr->isSingleScalar();

0 commit comments

Comments
 (0)