[VPlan] Replace getUnderlyingInstr() with type inference (NFC)

Remove an unnecessary use of getUnderlyingInstr().
This commit is contained in:
Florian Hahn 2025-04-10 23:45:09 +01:00
parent 2b984fd0e3
commit 1331f17184
No known key found for this signature in database
GPG Key ID: 3596DCFCBB5C67CC

View File

@ -3379,7 +3379,7 @@ void VPWidenPointerInductionRecipe::execute(VPTransformState &State) {
assert(getInductionDescriptor().getKind() == assert(getInductionDescriptor().getKind() ==
InductionDescriptor::IK_PtrInduction && InductionDescriptor::IK_PtrInduction &&
"Not a pointer induction according to InductionDescriptor!"); "Not a pointer induction according to InductionDescriptor!");
assert(cast<PHINode>(getUnderlyingInstr())->getType()->isPointerTy() && assert(State.TypeAnalysis.inferScalarType(this)->isPointerTy() &&
"Unexpected type."); "Unexpected type.");
assert(!onlyScalarsGenerated(State.VF.isScalable()) && assert(!onlyScalarsGenerated(State.VF.isScalable()) &&
"Recipe should have been replaced"); "Recipe should have been replaced");