[llvm] [VPlan] Compute cost of some VPWidenIntOrFpInductions in VPlan (PR #202232)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 06:57:57 PDT 2026
================
@@ -2850,6 +2850,26 @@ bool VPWidenIntOrFpInductionRecipe::isCanonical() const {
getScalarType() == getRegion()->getCanonicalIVType();
}
+InstructionCost
+VPWidenIntOrFpInductionRecipe::computeCost(ElementCount VF,
+ VPCostContext &Ctx) const {
+ // A widened induction generates a vector phi and increments it by the
+ // splatted step each iteration.
+ // TODO: Also handle truncated inductions.
----------------
david-arm wrote:
Might this now be possible after VPInstructionWithType::computeCost function is filled in?
https://github.com/llvm/llvm-project/pull/202232
More information about the llvm-commits
mailing list