[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 13:19:05 PDT 2024


================
@@ -10519,8 +10521,10 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
     auto GetVectorCost = [&](InstructionCost CommonCost) {
       auto *MaskTy = getWidenedType(Builder.getInt1Ty(), VL.size());
 
-      InstructionCost VecCost = TTI->getCmpSelInstrCost(
-          E->getOpcode(), VecTy, MaskTy, VecPred, CostKind, VL0);
+      InstructionCost VecCost =
+          TTI->getCmpSelInstrCost(E->getOpcode(), VecTy, MaskTy, VecPred,
+                                  CostKind, getOperandInfo(E->getOperand(0)),
+                                  getOperandInfo(E->getOperand(1)), VL0);
----------------
preames wrote:

Can you rephrase?  I can't figure out your intent.  My best guess is that you want me to split the patch into an SLP portion and a TTI portion?  Is that what you meant?

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


More information about the llvm-commits mailing list