Skip to content

Commit a51e2ef

Browse files
authored
[VPlan] Treat VPVector(End)PointerRecipe as single-scalar, if ops are. (#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 #157387 as discovered by John Brawn.
1 parent 25c95eb commit a51e2ef

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)