@@ -5426,7 +5426,8 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
54265426 TTI::CastContextHint::None, CostKind, RedOp);
54275427
54285428 InstructionCost RedCost = TTI.getMulAccReductionCost (
5429- IsUnsigned, RdxDesc.getRecurrenceType (), ExtType, CostKind);
5429+ IsUnsigned, RdxDesc.getOpcode (), RdxDesc.getRecurrenceType (), ExtType,
5430+ CostKind);
54305431
54315432 if (RedCost.isValid () &&
54325433 RedCost < ExtCost * 2 + MulCost + Ext2Cost + BaseCost)
@@ -5471,7 +5472,8 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
54715472 TTI.getArithmeticInstrCost (Instruction::Mul, VectorTy, CostKind);
54725473
54735474 InstructionCost RedCost = TTI.getMulAccReductionCost (
5474- IsUnsigned, RdxDesc.getRecurrenceType (), ExtType, CostKind);
5475+ IsUnsigned, RdxDesc.getOpcode (), RdxDesc.getRecurrenceType (), ExtType,
5476+ CostKind);
54755477 InstructionCost ExtraExtCost = 0 ;
54765478 if (Op0Ty != LargestOpTy || Op1Ty != LargestOpTy) {
54775479 Instruction *ExtraExtOp = (Op0Ty != LargestOpTy) ? Op0 : Op1;
@@ -5490,7 +5492,8 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
54905492 TTI.getArithmeticInstrCost (Instruction::Mul, VectorTy, CostKind);
54915493
54925494 InstructionCost RedCost = TTI.getMulAccReductionCost (
5493- true , RdxDesc.getRecurrenceType (), VectorTy, CostKind);
5495+ true , RdxDesc.getOpcode (), RdxDesc.getRecurrenceType (), VectorTy,
5496+ CostKind);
54945497
54955498 if (RedCost.isValid () && RedCost < MulCost + BaseCost)
54965499 return I == RetI ? RedCost : 0 ;
0 commit comments