[llvm] [Analysis] Use BaseT::getArithmeticInstrCost() as the base cost for RecipThroughput (PR #176515)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 07:43:12 PST 2026
================
@@ -1058,9 +1058,13 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
bool IsFloat = Ty->isFPOrFPVectorTy();
- // Assume that floating point arithmetic operations cost twice as much as
- // integer operations.
- InstructionCost OpCost = (IsFloat ? 2 : 1);
+ InstructionCost OpCost;
+ if (IsFloat)
+ // Should update to Expensive? For now just want to modify integer costing
----------------
RKSimon wrote:
@bababuck What x86 changes do you mean? These things have grown as the middle-end have become more cost driven - LV/SLP/VectorCombine especially - we now accumulate costs a lot more so "Free/Basic/Expensive" just doesn't work.
https://github.com/llvm/llvm-project/pull/176515
More information about the llvm-commits
mailing list