[llvm] [VPlan] Mark DerivedIV unconditionally single-scalar (NFC) (PR #189706)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 10:46:09 PDT 2026


================
@@ -384,14 +384,12 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
             all_of(VPI->operands(), isSingleScalar));
   if (auto *RR = dyn_cast<VPReductionRecipe>(VPV))
     return !RR->isPartialReduction();
-  if (isa<VPCanonicalIVPHIRecipe, VPVectorPointerRecipe,
-          VPVectorEndPointerRecipe>(VPV))
-    return true;
   if (auto *Expr = dyn_cast<VPExpressionRecipe>(VPV))
     return Expr->isSingleScalar();
 
   // VPExpandSCEVRecipes must be placed in the entry and are always uniform.
-  return isa<VPExpandSCEVRecipe>(VPV);
+  return isa<VPExpandSCEVRecipe, VPCanonicalIVPHIRecipe, VPVectorPointerRecipe,
+             VPVectorEndPointerRecipe, VPDerivedIVRecipe>(VPV);
----------------
eas wrote:

IMO, split IVs/vector-pointers into a (two?) separate `if (isa<..>(...)) return true;` as the `VPExpandSCEVRecipes` comment is unrelated to them.

https://github.com/llvm/llvm-project/pull/189706


More information about the llvm-commits mailing list