Skip to content

Commit 4fa3b2a

Browse files
committed
[VPlan] Use TypeAnalysis instead of underlying instr in VPPredInst (NFC)
Removes another unnecessary use of the underlying instructions during VPlan execution.
1 parent 995fd47 commit 4fa3b2a

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
@@ -2642,7 +2642,7 @@ void VPPredInstPHIRecipe::execute(VPTransformState &State) {
26422642
if (vputils::onlyFirstLaneUsed(this) && !State.Lane->isFirstLane())
26432643
return;
26442644

2645-
Type *PredInstType = getOperand(0)->getUnderlyingValue()->getType();
2645+
Type *PredInstType = State.TypeAnalysis.inferScalarType(getOperand(0));
26462646
PHINode *Phi = State.Builder.CreatePHI(PredInstType, 2);
26472647
Phi->addIncoming(PoisonValue::get(ScalarPredInst->getType()),
26482648
PredicatingBB);

0 commit comments

Comments
 (0)