summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
diff options
context:
space:
mode:
authorSergey Kachkov <sergey.kachkov@syntacore.com>2025-11-12 18:31:01 +0300
committerSergey Kachkov <sergey.kachkov@syntacore.com>2025-11-12 18:31:26 +0300
commitecb2b7e496addd05db37e8f5fc2bbf9fccd90cc1 (patch)
treec80cb394e4824802094c0327441a02a81778d70e /llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
parent935a644191b716a8a79e5a1a1ef7acfa4b6dc92c (diff)
[review-suggestions] Replace VPMonotonicPHIRecipe with VPPhiusers/skachkov-sc/monotonic-vectorization
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp b/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
index da9e1f27310e..94b4d5fe7e49 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
@@ -98,7 +98,7 @@ Type *VPTypeAnalysis::inferScalarTypeForRecipe(const VPInstruction *R) {
return inferScalarType(R->getOperand(0));
}
case VPInstruction::ComputeMonotonicResult: {
- auto *PhiR = cast<VPMonotonicPHIRecipe>(R->getOperand(0));
+ auto *PhiR = cast<VPPhi>(R->getOperand(0));
auto *OrigPhi = cast<PHINode>(PhiR->getUnderlyingValue());
return OrigPhi->getType();
}
@@ -281,14 +281,14 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
TypeSwitch<const VPRecipeBase *, Type *>(V->getDefiningRecipe())
.Case<VPActiveLaneMaskPHIRecipe, VPCanonicalIVPHIRecipe,
VPFirstOrderRecurrencePHIRecipe, VPReductionPHIRecipe,
- VPMonotonicPHIRecipe, VPWidenPointerInductionRecipe,
- VPEVLBasedIVPHIRecipe>([this](const auto *R) {
- // Handle header phi recipes, except VPWidenIntOrFpInduction
- // which needs special handling due it being possibly truncated.
- // TODO: consider inferring/caching type of siblings, e.g.,
- // backedge value, here and in cases below.
- return inferScalarType(R->getStartValue());
- })
+ VPWidenPointerInductionRecipe, VPEVLBasedIVPHIRecipe>(
+ [this](const auto *R) {
+ // Handle header phi recipes, except VPWidenIntOrFpInduction
+ // which needs special handling due it being possibly truncated.
+ // TODO: consider inferring/caching type of siblings, e.g.,
+ // backedge value, here and in cases below.
+ return inferScalarType(R->getStartValue());
+ })
.Case<VPWidenIntOrFpInductionRecipe, VPDerivedIVRecipe>(
[](const auto *R) { return R->getScalarType(); })
.Case<VPReductionRecipe, VPPredInstPHIRecipe, VPWidenPHIRecipe,