Skip to content

Commit c465a56

Browse files
committed
[VPlan] Handle canonical IVs in ::isSingleScalar. (NFCI)
The canonical IV is always a single scalar. They are already treated as uniform-across-UF-and-VF. This should currently be NFC.
1 parent 113e0c9 commit c465a56

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 (auto *RR = dyn_cast<VPReductionRecipe>(VPV))
199199
return !RR->isPartialReduction();
200-
if (isa<VPVectorPointerRecipe, VPVectorEndPointerRecipe>(VPV))
200+
if (isa<VPCanonicalIVPHIRecipe, VPVectorPointerRecipe,
201+
VPVectorEndPointerRecipe>(VPV))
201202
return true;
202203
if (auto *Expr = dyn_cast<VPExpressionRecipe>(VPV))
203204
return Expr->isSingleScalar();

0 commit comments

Comments
 (0)