diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h --- a/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -1290,7 +1290,7 @@ /// Calculate the cost of an extended reduction pattern, similar to /// getArithmeticReductionCost of a reduction with an extension. /// This is the cost of as: - /// ResTy vecreduce(ext(Ty A)). + /// ResTy vecreduce.opcode(ext(Ty A)). InstructionCost getExtendedReductionCost( unsigned Opcode, bool IsUnsigned, Type *ResTy, VectorType *Ty, Optional FMF, diff --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h --- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h +++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h @@ -2329,7 +2329,7 @@ Optional FMF, TTI::TargetCostKind CostKind) { // Without any native support, this is equivalent to the cost of - // vecreduce.op(ext). + // vecreduce.opcode(ext(Ty A)). VectorType *ExtTy = VectorType::get(ResTy, Ty); InstructionCost RedCost = thisT()->getArithmeticReductionCost(Opcode, ExtTy, FMF, CostKind); @@ -2344,7 +2344,8 @@ VectorType *Ty, TTI::TargetCostKind CostKind) { // Without any native support, this is equivalent to the cost of - // vecreduce.add(mul(ext, ext)). + // vecreduce.add(mul(ext(Ty A), ext(Ty B))) or + // vecreduce.add(mul(A, B)). VectorType *ExtTy = VectorType::get(ResTy, Ty); InstructionCost RedCost = thisT()->getArithmeticReductionCost( Instruction::Add, ExtTy, None, CostKind);