@@ -474,7 +474,8 @@ costShuffleViaVRegSplitting(RISCVTTIImpl &TTI, MVT LegalVT,
474474 return InstructionCost::getInvalid ();
475475}
476476
477- InstructionCost RISCVTTIImpl::getSlideCost (FixedVectorType *Tp, ArrayRef<int > Mask,
477+ InstructionCost RISCVTTIImpl::getSlideCost (FixedVectorType *Tp,
478+ ArrayRef<int > Mask,
478479 TTI::TargetCostKind CostKind) {
479480 // Avoid missing masks
480481 if (Mask.size () <= 2 )
@@ -495,7 +496,7 @@ InstructionCost RISCVTTIImpl::getSlideCost(FixedVectorType *Tp, ArrayRef<int> Ma
495496 assert (SlideAmt != 0 );
496497 if (SlideAmt < 0 )
497498 return SlideAmt > -32 ? RISCV::VSLIDEDOWN_VI : RISCV::VSLIDEDOWN_VX;
498- return SlideAmt < 32 ? RISCV::VSLIDEUP_VI : RISCV::VSLIDEUP_VX;
499+ return SlideAmt < 32 ? RISCV::VSLIDEUP_VI : RISCV::VSLIDEUP_VX;
499500 };
500501
501502 std::pair<int , int > SrcInfo[2 ];
@@ -519,11 +520,13 @@ InstructionCost RISCVTTIImpl::getSlideCost(FixedVectorType *Tp, ArrayRef<int> Ma
519520 unsigned Opcode = getSlideOpcode (SrcInfo[1 ].second );
520521 SecondSlideCost = getRISCVInstructionCost (Opcode, LT.second , CostKind);
521522 } else {
522- SecondSlideCost = getRISCVInstructionCost (RISCV::VMERGE_VVM, LT.second , CostKind);
523+ SecondSlideCost =
524+ getRISCVInstructionCost (RISCV::VMERGE_VVM, LT.second , CostKind);
523525 }
524526
525527 auto EC = Tp->getElementCount ();
526- VectorType *MaskTy = VectorType::get (IntegerType::getInt1Ty (Tp->getContext ()), EC);
528+ VectorType *MaskTy =
529+ VectorType::get (IntegerType::getInt1Ty (Tp->getContext ()), EC);
527530 InstructionCost MaskCost = getConstantPoolLoadCost (MaskTy, CostKind);
528531 return FirstSlideCost + SecondSlideCost + MaskCost;
529532}
0 commit comments