[llvm] 4cf7796 - [VPlan] Mark DerivedIV unconditionally single-scalar (NFC) (#189706)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 23:57:32 PDT 2026
Author: Ramkumar Ramachandra
Date: 2026-04-19T07:57:27+01:00
New Revision: 4cf7796dfb540215f06ba9ad5fe92534f8ab034b
URL: https://github.com/llvm/llvm-project/commit/4cf7796dfb540215f06ba9ad5fe92534f8ab034b
DIFF: https://github.com/llvm/llvm-project/commit/4cf7796dfb540215f06ba9ad5fe92534f8ab034b.diff
LOG: [VPlan] Mark DerivedIV unconditionally single-scalar (NFC) (#189706)
The result must be single-scalar, independently of operands. The patch
is an NFC because all operands happen to be single-scalar currently.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
index 9f73ba77039c2..17d2b9c839950 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
@@ -372,7 +372,7 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
return Rep->isSingleScalar() || (preservesUniformity(Rep->getOpcode()) &&
all_of(Rep->operands(), isSingleScalar));
}
- if (isa<VPWidenGEPRecipe, VPDerivedIVRecipe, VPBlendRecipe>(VPV))
+ if (isa<VPWidenGEPRecipe, VPBlendRecipe>(VPV))
return all_of(VPV->getDefiningRecipe()->operands(), isSingleScalar);
if (auto *WidenR = dyn_cast<VPWidenRecipe>(VPV)) {
return preservesUniformity(WidenR->getOpcode()) &&
@@ -385,7 +385,7 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
if (auto *RR = dyn_cast<VPReductionRecipe>(VPV))
return !RR->isPartialReduction();
if (isa<VPCanonicalIVPHIRecipe, VPVectorPointerRecipe,
- VPVectorEndPointerRecipe>(VPV))
+ VPVectorEndPointerRecipe, VPDerivedIVRecipe>(VPV))
return true;
if (auto *Expr = dyn_cast<VPExpressionRecipe>(VPV))
return Expr->isSingleScalar();
More information about the llvm-commits
mailing list