[llvm] [TTI][RISCV] Model cost of loading constants arms of selects and compares (PR #109824)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 13:06:22 PDT 2024
================
@@ -10760,11 +10764,14 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
TTIRef.getArithmeticInstrCost(E->getAltOpcode(), VecTy, CostKind);
} else if (auto *CI0 = dyn_cast<CmpInst>(VL0)) {
auto *MaskTy = getWidenedType(Builder.getInt1Ty(), VL.size());
- VecCost = TTIRef.getCmpSelInstrCost(E->getOpcode(), VecTy, MaskTy,
- CI0->getPredicate(), CostKind, VL0);
+ VecCost = TTIRef.getCmpSelInstrCost(
+ E->getOpcode(), VecTy, MaskTy, CI0->getPredicate(), CostKind,
+ {TTI::OK_AnyValue, TTI::OP_None}, {TTI::OK_AnyValue, TTI::OP_None},
----------------
alexey-bataev wrote:
Yes, better to start with the generic approach and tune then in the follow up patch(es)
https://github.com/llvm/llvm-project/pull/109824
More information about the llvm-commits
mailing list