[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:31:14 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);
----------------
alexey-bataev wrote:
Kind of. Use default values here and use actual operand info in a separate patch
https://github.com/llvm/llvm-project/pull/109824
    
    
More information about the llvm-commits
mailing list