Skip to content

Commit 1331f17

Browse files
committed
[VPlan] Replace getUnderlyingInstr() with type inference (NFC)
Remove an unnecessary use of getUnderlyingInstr().
1 parent 2b984fd commit 1331f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3379,7 +3379,7 @@ void VPWidenPointerInductionRecipe::execute(VPTransformState &State) {
33793379
assert(getInductionDescriptor().getKind() ==
33803380
InductionDescriptor::IK_PtrInduction &&
33813381
"Not a pointer induction according to InductionDescriptor!");
3382-
assert(cast<PHINode>(getUnderlyingInstr())->getType()->isPointerTy() &&
3382+
assert(State.TypeAnalysis.inferScalarType(this)->isPointerTy() &&
33833383
"Unexpected type.");
33843384
assert(!onlyScalarsGenerated(State.VF.isScalable()) &&
33853385
"Recipe should have been replaced");

0 commit comments

Comments
 (0)