Lines Matching defs:LT
485 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Tp);
492 *this, LT.second, ST->getRealVLen(), Tp, Mask, CostKind);
499 if (Mask.size() >= 2 && LT.second.isFixedLengthVector()) {
500 MVT EltTp = LT.second.getVectorElementType();
511 return 2 * LT.first * TLI->getLMULCost(LT.second);
518 return LT.first * getRISCVInstructionCost(RISCV::VNSRL_WI,
519 LT.second, CostKind);
523 if (LT.second.getScalarSizeInBits() != 1 &&
548 if (LT.second.isFixedLengthVector() && LT.first == 1 &&
549 (LT.second.getScalarSizeInBits() != 8 ||
550 LT.second.getVectorNumElements() <= 256)) {
551 VectorType *IdxTy = getVRGatherIndexType(LT.second, *ST, Tp->getContext());
554 getRISCVInstructionCost(RISCV::VRGATHER_VV, LT.second, CostKind);
563 if (LT.second.isFixedLengthVector() && LT.first == 1 &&
564 (LT.second.getScalarSizeInBits() != 8 ||
565 LT.second.getVectorNumElements() <= 256)) {
568 VectorType *IdxTy = getVRGatherIndexType(LT.second, *ST, C);
574 LT.second, CostKind) +
583 if (!Mask.empty() && LT.first.isValid() && LT.first != 1 &&
584 LT.second.isFixedLengthVector() &&
585 LT.second.getVectorElementType().getSizeInBits() ==
587 LT.second.getVectorNumElements() <
591 static_cast<unsigned>(*LT.first.getValue())) {
592 unsigned NumRegs = *LT.first.getValue();
659 return LT.first *
660 getRISCVInstructionCost(RISCV::VSLIDEDOWN_VI, LT.second, CostKind);
665 return LT.first *
666 getRISCVInstructionCost(RISCV::VSLIDEUP_VI, LT.second, CostKind);
677 return LT.first *
679 LT.second, CostKind));
684 if (LT.second.getScalarSizeInBits() == 1) {
691 return LT.first *
693 LT.second, CostKind));
704 return LT.first *
708 LT.second, CostKind));
714 return LT.first *
715 getRISCVInstructionCost(RISCV::VMV_V_X, LT.second, CostKind);
720 return LT.first *
721 getRISCVInstructionCost(RISCV::VRGATHER_VI, LT.second, CostKind);
725 // TODO: Multiplying by LT.first implies this legalizes into multiple copies
732 return LT.first * getRISCVInstructionCost(Opcodes, LT.second, CostKind);
750 if (LT.second.isFixedLengthVector())
752 LenCost = isInt<5>(LT.second.getVectorNumElements() - 1) ? 0 : 1;
754 if (LT.second.isFixedLengthVector() &&
755 isInt<5>(LT.second.getVectorNumElements() - 1))
758 getRISCVInstructionCost(Opcodes, LT.second, CostKind);
761 return LT.first * (LenCost + GatherCost + ExtendCost);
785 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
786 if (Insert && !Extract && LT.first.isValid() && LT.second.isVector()) {
797 assert(LT.second.isFixedLengthVector());
798 MVT ContainerVT = TLI->getContainerForFixedLengthVector(LT.second);
802 getRISCVInstructionCost(RISCV::VSLIDE1DOWN_VX, LT.second, CostKind);
833 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(VTy);
835 if (LT.second.isVector()) {
850 return LT.first * Cost;
1083 auto LT = getTypeLegalizationCost(RetTy);
1084 if (!LT.second.isVector() && TLI->isOperationCustom(ISD::FCEIL, LT.second))
1085 return LT.first * 8;
1092 auto LT = getTypeLegalizationCost(RetTy);
1093 if (LT.second.isScalarInteger() && ST->hasStdExtZbb())
1094 return LT.first;
1096 if (ST->hasVInstructions() && LT.second.isVector()) {
1112 return LT.first * getRISCVInstructionCost(Op, LT.second, CostKind);
1120 auto LT = getTypeLegalizationCost(RetTy);
1121 if (ST->hasVInstructions() && LT.second.isVector()) {
1137 return LT.first * getRISCVInstructionCost(Op, LT.second, CostKind);
1142 auto LT = getTypeLegalizationCost(RetTy);
1143 if (ST->hasVInstructions() && LT.second.isVector()) {
1149 if (LT.second.getVectorElementType() == MVT::bf16 ||
1150 (LT.second.getVectorElementType() == MVT::f16 &&
1152 return LT.first * getRISCVInstructionCost(RISCV::VAND_VX, LT.second,
1156 return LT.first *
1157 getRISCVInstructionCost(RISCV::VFSGNJX_VV, LT.second, CostKind);
1162 auto LT = getTypeLegalizationCost(RetTy);
1163 if (ST->hasVInstructions() && LT.second.isVector()) {
1166 MVT ConvType = LT.second;
1167 MVT FsqrtType = LT.second;
1170 if (LT.second.getVectorElementType() == MVT::bf16) {
1171 if (LT.second == MVT::nxv32bf16) {
1182 } else if (LT.second.getVectorElementType() == MVT::f16 &&
1184 if (LT.second == MVT::nxv32f16) {
1199 return LT.first * (getRISCVInstructionCost(FsqrtOp, FsqrtType, CostKind) +
1207 auto LT = getTypeLegalizationCost(RetTy);
1208 if (ST->hasVInstructions() && ST->hasStdExtZvbb() && LT.second.isVector()) {
1221 return LT.first * getRISCVInstructionCost(Op, LT.second, CostKind);
1226 auto LT = getTypeLegalizationCost(RetTy);
1227 if (ST->hasVInstructions() && LT.second.isVector()) {
1230 return LT.first *
1232 LT.second, CostKind);
1240 auto LT = getTypeLegalizationCost(ExpRetTy);
1245 return LT.first *
1247 LT.second, CostKind);
1253 auto LT = getTypeLegalizationCost(RetTy);
1255 // (LT.first - 1) vector adds.
1257 return getRISCVInstructionCost(RISCV::VID_V, LT.second, CostKind) +
1258 (LT.first - 1) *
1259 getRISCVInstructionCost(RISCV::VADD_VX, LT.second, CostKind);
1260 return 1 + (LT.first - 1);
1285 auto LT = getTypeLegalizationCost(RetTy);
1286 if (TLI->isOperationCustom(ISD::VP_FRINT, LT.second))
1287 return Cost * LT.first;
1293 auto LT = getTypeLegalizationCost(RetTy);
1294 if (TLI->isOperationCustom(ISD::VP_FRINT, LT.second))
1295 return Cost * LT.first;
1306 auto LT = getTypeLegalizationCost(RetTy);
1308 if (TLI->isOperationCustom(VPISD, LT.second))
1309 return Cost * LT.first;
1331 auto LT = getTypeLegalizationCost(RetTy);
1333 if (!ST->hasVInstructions() || LT.second.getScalarType() == MVT::i1)
1335 return LT.first * getRISCVInstructionCost(LT.second.isFloatingPoint()
1338 LT.second, CostKind);
1343 if (auto LT = getTypeLegalizationCost(RetTy);
1344 LT.second.isVector()) {
1345 MVT EltTy = LT.second.getVectorElementType();
1348 return LT.first * Entry->Cost;
1571 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
1624 return ExtraCost + getRISCVInstructionCost(Opcodes, LT.second, CostKind);
1660 (LT.first > 1) ? (LT.first - 1) *
1661 getRISCVInstructionCost(SplitOp, LT.second, CostKind)
1663 return SplitCost + getRISCVInstructionCost(Opcodes, LT.second, CostKind);
1684 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
1690 if (LT.second == MVT::v1i1)
1691 return getRISCVInstructionCost(RISCV::VFIRST_M, LT.second, CostKind) +
1708 // the sequences are (LT.first-2) * vmand, vmnand, vcpop and seqz.
1709 return ((LT.first > 2) ? (LT.first - 2) : 0) *
1710 getRISCVInstructionCost(RISCV::VMAND_MM, LT.second, CostKind) +
1711 getRISCVInstructionCost(RISCV::VMNAND_MM, LT.second, CostKind) +
1712 getRISCVInstructionCost(RISCV::VCPOP_M, LT.second, CostKind) +
1721 return (LT.first - 1) *
1722 getRISCVInstructionCost(RISCV::VMXOR_MM, LT.second, CostKind) +
1723 getRISCVInstructionCost(RISCV::VCPOP_M, LT.second, CostKind) + 1;
1731 return (LT.first - 1) *
1732 getRISCVInstructionCost(RISCV::VMOR_MM, LT.second, CostKind) +
1733 getRISCVInstructionCost(RISCV::VCPOP_M, LT.second, CostKind) +
1763 if ((LT.second.getVectorElementType() == MVT::f16 &&
1765 LT.second.getVectorElementType() == MVT::bf16)
1769 for (unsigned i = 0; i < LT.first.getValue(); i++)
1772 return getRISCVInstructionCost(Opcodes, LT.second, CostKind);
1780 (LT.first > 1) ? (LT.first - 1) *
1781 getRISCVInstructionCost(SplitOp, LT.second, CostKind)
1783 return SplitCost + getRISCVInstructionCost(Opcodes, LT.second, CostKind);
1802 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(ValTy);
1805 LT.second.isFixedLengthVector() && LT.second.getScalarType() == MVT::i1) {
1808 return LT.first *
1809 getRISCVInstructionCost(RISCV::VCPOP_M, LT.second, CostKind);
1812 if (ResTy->getScalarSizeInBits() != 2 * LT.second.getScalarSizeInBits())
1816 return (LT.first - 1) +
1856 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Src);
1859 InstructionCost Cost = LT.first;
1868 if (Src->isVectorTy() && LT.second.isVector() &&
1870 LT.second.getSizeInBits()))
1879 // handles the LT.first term for us.
1880 if (LT.second.isVector() && CostKind != TTI::TCK_CodeSize)
1881 BaseCost *= TLI->getLMULCost(LT.second);
1919 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(ValTy);
1927 LT.first *
1930 LT.second, CostKind);
1934 LT.first * getRISCVInstructionCost(RISCV::VMERGE_VVM, LT.second,
1944 MVT InterimVT = LT.second.changeVectorElementType(MVT::i8);
1946 LT.first *
1949 LT.first * getRISCVInstructionCost(
1951 LT.second, CostKind);
1958 LT.first * getRISCVInstructionCost(
1960 LT.second, CostKind);
1967 return ConstantMatCost + LT.first * getRISCVInstructionCost(RISCV::VMSLT_VV,
1968 LT.second,
1978 getRISCVInstructionCost(RISCV::VMXOR_MM, LT.second, CostKind);
1998 LT.first * getRISCVInstructionCost(
2000 LT.second, CostKind);
2007 LT.first *
2009 LT.second, CostKind);
2018 LT.first *
2019 getRISCVInstructionCost(RISCV::VMFLT_VV, LT.second, CostKind);
2066 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Val);
2069 if (!LT.second.isVector()) {
2091 if (LT.second.isScalableVector() && !LT.first.isValid())
2092 return LT.first;
2128 if (LT.second.isFixedLengthVector()) {
2129 unsigned Width = LT.second.getVectorNumElements();
2136 unsigned EltSize = LT.second.getScalarSizeInBits();
2151 if (LT.first > 1 &&
2152 ((Index == -1U) || (Index >= LT.second.getVectorMinNumElements() &&
2153 LT.second.isScalableVector()))) {
2222 std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Ty);
2225 if (!LT.second.isVector())
2233 if ((LT.second.getVectorElementType() == MVT::f16 ||
2234 LT.second.getVectorElementType() == MVT::bf16) &&
2235 TLI->getOperationAction(ISDOpcode, LT.second) ==
2237 MVT PromotedVT = TLI->getTypeToPromoteTo(ISDOpcode, LT.second);
2239 Type *LegalTy = EVT(LT.second).getTypeForEVT(Ty->getContext());
2241 CastCost += LT.first * Args.size() *
2246 LT.first * getCastInstrCost(Instruction::FPTrunc, LegalTy, PromotedTy,
2249 LT.second = PromotedVT;
2322 InstructionCost InstrCost = getRISCVInstructionCost(Op, LT.second, CostKind);
2328 return CastCost + ConstantMatCost + LT.first * InstrCost;