[llvm] ae0aa2d - [VPlan] Merge cases using getResultType in inferScalarType (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 11 13:02:14 PDT 2025
Author: Florian Hahn
Date: 2025-04-11T21:01:58+01:00
New Revision: ae0aa2dea2dee3af01326e5ff96ab436628f7e2b
URL: https://github.com/llvm/llvm-project/commit/ae0aa2dea2dee3af01326e5ff96ab436628f7e2b
DIFF: https://github.com/llvm/llvm-project/commit/ae0aa2dea2dee3af01326e5ff96ab436628f7e2b.diff
LOG: [VPlan] Merge cases using getResultType in inferScalarType (NFC).
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp b/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
index 142a7080ec761..375d4c9787994 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
@@ -262,7 +262,8 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
return inferScalarType(R->getOperand(0));
})
// VPInstructionWithType must be handled before VPInstruction.
- .Case<VPInstructionWithType, VPWidenIntrinsicRecipe>(
+ .Case<VPInstructionWithType, VPWidenIntrinsicRecipe,
+ VPWidenCastRecipe>(
[](const auto *R) { return R->getResultType(); })
.Case<VPBlendRecipe, VPInstruction, VPWidenRecipe, VPReplicateRecipe,
VPWidenCallRecipe, VPWidenMemoryRecipe, VPWidenSelectRecipe>(
@@ -271,8 +272,6 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
// TODO: Use info from interleave group.
return V->getUnderlyingValue()->getType();
})
- .Case<VPWidenCastRecipe>(
- [](const VPWidenCastRecipe *R) { return R->getResultType(); })
.Case<VPExpandSCEVRecipe>([](const VPExpandSCEVRecipe *R) {
return R->getSCEV()->getType();
})
More information about the llvm-commits
mailing list