Skip to content

Commit 47258ca

Browse files
committed
[VPlan] Use VPPhi instead of dyn_cast + opcode check in isPhi (NFC).
1 parent e3ededa commit 47258ca

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,7 @@ InstructionCost VPRecipeBase::computeCost(ElementCount VF,
285285

286286
bool VPRecipeBase::isPhi() const {
287287
return (getVPDefID() >= VPFirstPHISC && getVPDefID() <= VPLastPHISC) ||
288-
(isa<VPInstruction>(this) &&
289-
cast<VPInstruction>(this)->getOpcode() == Instruction::PHI) ||
290-
isa<VPIRPhi>(this);
288+
isa<VPPhi, VPIRPhi>(this);
291289
}
292290

293291
bool VPRecipeBase::isScalarCast() const {

0 commit comments

Comments
 (0)