[llvm] 47258ca - [VPlan] Use VPPhi instead of dyn_cast + opcode check in isPhi (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 11:20:38 PDT 2025
Author: Florian Hahn
Date: 2025-08-05T19:20:12+01:00
New Revision: 47258ca47085ec6be3347690c7dab2b73de0c3a1
URL: https://github.com/llvm/llvm-project/commit/47258ca47085ec6be3347690c7dab2b73de0c3a1
DIFF: https://github.com/llvm/llvm-project/commit/47258ca47085ec6be3347690c7dab2b73de0c3a1.diff
LOG: [VPlan] Use VPPhi instead of dyn_cast + opcode check in isPhi (NFC).
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 47a807794eb3d..e971ba1aac15c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -285,9 +285,7 @@ InstructionCost VPRecipeBase::computeCost(ElementCount VF,
bool VPRecipeBase::isPhi() const {
return (getVPDefID() >= VPFirstPHISC && getVPDefID() <= VPLastPHISC) ||
- (isa<VPInstruction>(this) &&
- cast<VPInstruction>(this)->getOpcode() == Instruction::PHI) ||
- isa<VPIRPhi>(this);
+ isa<VPPhi, VPIRPhi>(this);
}
bool VPRecipeBase::isScalarCast() const {
More information about the llvm-commits
mailing list