[llvm] [LoopVectorize][NFC] Centralize the setting of CostKind (PR #121937)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 07:12:04 PST 2025
================
@@ -1141,9 +1138,8 @@ InstructionCost VPHistogramRecipe::computeCost(ElementCount VF,
{PtrTy, IncTy, MaskTy});
// Add the costs together with the add/sub operation.
- return Ctx.TTI.getIntrinsicInstrCost(
- ICA, TargetTransformInfo::TCK_RecipThroughput) +
- MulCost + Ctx.TTI.getArithmeticInstrCost(Opcode, VTy);
+ return Ctx.TTI.getIntrinsicInstrCost(ICA, Ctx.CostKind) + MulCost +
----------------
david-arm wrote:
I think the Ctx.TTI.getArithmeticInstrCost calls on lines 1125 and 1142 also need updating.
https://github.com/llvm/llvm-project/pull/121937
More information about the llvm-commits
mailing list