[llvm] [TTI][RISCV] Model cost of loading constants arms of selects and compares (PR #109824)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 11:48:51 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},
----------------
preames wrote:
Need to? No. It's not correctness related. However doing so would be likely reasonable. I'd plan to do a follow up to adjust other call sites, I started with the subset required by the original test and printing the cost model.
https://github.com/llvm/llvm-project/pull/109824
More information about the llvm-commits
mailing list