[llvm] [AArch64] Enable other cost kinds for getCmpSelInstrCost. (PR #144375)

Hassnaa Hamdi via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 07:27:27 PDT 2025


================
@@ -4264,11 +4264,6 @@ InstructionCost AArch64TTIImpl::getCmpSelInstrCost(
     unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred,
     TTI::TargetCostKind CostKind, TTI::OperandValueInfo Op1Info,
     TTI::OperandValueInfo Op2Info, const Instruction *I) const {
-  // TODO: Handle other cost kinds.
-  if (CostKind != TTI::TCK_RecipThroughput)
----------------
hassnaaHamdi wrote:

Hi,
I see that code after this removed condition will handle all the CostKind cases not only TCK_RecipThroughput.
Could you plz provide a context about the motivation behind this change ?
Is there a reference for instruction costs that invalidates the current logic and proves the new logic you're providing ?

https://github.com/llvm/llvm-project/pull/144375


More information about the llvm-commits mailing list