[VPlan] Use TypeAnalysis instead of underlying instr in VPPredInst (NFC)

Removes another unnecessary use of the underlying instructions during
VPlan execution.
This commit is contained in:
Florian Hahn 2025-04-12 20:54:26 +01:00
parent 995fd47944
commit 4fa3b2a184
No known key found for this signature in database
GPG Key ID: C8B0D7090F9127E6

View File

@ -2642,7 +2642,7 @@ void VPPredInstPHIRecipe::execute(VPTransformState &State) {
if (vputils::onlyFirstLaneUsed(this) && !State.Lane->isFirstLane())
return;
Type *PredInstType = getOperand(0)->getUnderlyingValue()->getType();
Type *PredInstType = State.TypeAnalysis.inferScalarType(getOperand(0));
PHINode *Phi = State.Builder.CreatePHI(PredInstType, 2);
Phi->addIncoming(PoisonValue::get(ScalarPredInst->getType()),
PredicatingBB);