Skip to content

Commit ae0aa2d

Browse files
committed
[VPlan] Merge cases using getResultType in inferScalarType (NFC).
1 parent 72144d1 commit ae0aa2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
262262
return inferScalarType(R->getOperand(0));
263263
})
264264
// VPInstructionWithType must be handled before VPInstruction.
265-
.Case<VPInstructionWithType, VPWidenIntrinsicRecipe>(
265+
.Case<VPInstructionWithType, VPWidenIntrinsicRecipe,
266+
VPWidenCastRecipe>(
266267
[](const auto *R) { return R->getResultType(); })
267268
.Case<VPBlendRecipe, VPInstruction, VPWidenRecipe, VPReplicateRecipe,
268269
VPWidenCallRecipe, VPWidenMemoryRecipe, VPWidenSelectRecipe>(
@@ -271,8 +272,6 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
271272
// TODO: Use info from interleave group.
272273
return V->getUnderlyingValue()->getType();
273274
})
274-
.Case<VPWidenCastRecipe>(
275-
[](const VPWidenCastRecipe *R) { return R->getResultType(); })
276275
.Case<VPExpandSCEVRecipe>([](const VPExpandSCEVRecipe *R) {
277276
return R->getSCEV()->getType();
278277
})

0 commit comments

Comments
 (0)