[llvm] 1331f17 - [VPlan] Replace getUnderlyingInstr() with type inference (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 15:46:12 PDT 2025
Author: Florian Hahn
Date: 2025-04-10T23:45:09+01:00
New Revision: 1331f171846c4a5620c7a049d9b05d70c8d674a3
URL: https://github.com/llvm/llvm-project/commit/1331f171846c4a5620c7a049d9b05d70c8d674a3
DIFF: https://github.com/llvm/llvm-project/commit/1331f171846c4a5620c7a049d9b05d70c8d674a3.diff
LOG: [VPlan] Replace getUnderlyingInstr() with type inference (NFC)
Remove an unnecessary use of getUnderlyingInstr().
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 7e4800a324e38..981765a995a03 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -3379,7 +3379,7 @@ void VPWidenPointerInductionRecipe::execute(VPTransformState &State) {
assert(getInductionDescriptor().getKind() ==
InductionDescriptor::IK_PtrInduction &&
"Not a pointer induction according to InductionDescriptor!");
- assert(cast<PHINode>(getUnderlyingInstr())->getType()->isPointerTy() &&
+ assert(State.TypeAnalysis.inferScalarType(this)->isPointerTy() &&
"Unexpected type.");
assert(!onlyScalarsGenerated(State.VF.isScalable()) &&
"Recipe should have been replaced");
More information about the llvm-commits
mailing list