[llvm] [VPlan] Consider address computation cost in VPInterleaveRecipe. (PR #148808)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 06:08:13 PDT 2025
================
@@ -3666,6 +3666,9 @@ InstructionCost VPInterleaveRecipe::computeCost(ElementCount VF,
InsertPos->getOpcode(), WideVecTy, IG->getFactor(), Indices,
IG->getAlign(), AS, Ctx.CostKind, getMask(), NeedsMaskForGaps);
+ // Add the address computation cost.
+ Cost += Ctx.TTI.getAddressComputationCost(WideVecTy);
----------------
david-arm wrote:
Yeah, we also add the cost when calculating gathers and scatters.
https://github.com/llvm/llvm-project/pull/148808
More information about the llvm-commits
mailing list