Lines Matching refs:TLI
57 const TargetLowering &TLI; member in __anoncfc85a100111::SelectionDAGLegalize
68 return TLI.getSetCCResultType(*DAG.getContext(), VT); in getSetCCResultType()
77 : TM(DAG.getTarget()), TLI(DAG.getTargetLoweringInfo()), DAG(DAG), in SelectionDAGLegalize()
231 assert(TLI.isShuffleMaskLegal(NewMask, NVT) && "Shuffle not legal?"); in ShuffleWithNarrowerEltType()
263 TLI.isLoadExtLegal(ISD::EXTLOAD, OrigVT, SVT) && in ExpandConstantFP()
264 TLI.ShouldShrinkFPConstant(OrigVT)) { in ExpandConstantFP()
272 SDValue CPIdx = DAG.getConstantPool(LLVMC, TLI.getPointerTy()); in ExpandConstantFP()
291 const TargetLowering &TLI, in ExpandUnalignedStore() argument
306 if (TLI.isTypeLegal(intVT)) { in ExpandUnalignedStore()
320 TLI.getRegisterType(*DAG.getContext(), in ExpandUnalignedStore()
334 SDValue Increment = DAG.getConstant(RegBytes, TLI.getPointerTy(AS)); in ExpandUnalignedStore()
389 TLI.getShiftAmountTy(Val.getValueType())); in ExpandUnalignedStore()
395 Store1 = DAG.getTruncStore(Chain, dl, TLI.isLittleEndian()?Lo:Hi, Ptr, in ExpandUnalignedStore()
400 DAG.getConstant(IncrementSize, TLI.getPointerTy(AS))); in ExpandUnalignedStore()
402 Store2 = DAG.getTruncStore(Chain, dl, TLI.isLittleEndian()?Hi:Lo, Ptr, in ExpandUnalignedStore()
415 const TargetLowering &TLI, in ExpandUnalignedLoad() argument
426 if (TLI.isTypeLegal(intVT) && TLI.isTypeLegal(LoadedVT)) { in ExpandUnalignedLoad()
443 MVT RegVT = TLI.getRegisterType(*DAG.getContext(), intVT); in ExpandUnalignedLoad()
451 SDValue Increment = DAG.getConstant(RegBytes, TLI.getPointerTy()); in ExpandUnalignedLoad()
525 if (TLI.isLittleEndian()) { in ExpandUnalignedLoad()
553 TLI.getShiftAmountTy(Hi.getValueType())); in ExpandUnalignedLoad()
584 EVT PtrVT = TLI.getPointerTy(); in PerformInsertVectorEltInMemory()
655 TLI.isTypeLegal(MVT::i32)) { in OptimizeFloatStore()
665 if (TLI.isTypeLegal(MVT::i64)) { in OptimizeFloatStore()
672 if (TLI.isTypeLegal(MVT::i32) && !ST->isVolatile()) { in OptimizeFloatStore()
679 if (TLI.isBigEndian()) std::swap(Lo, Hi); in OptimizeFloatStore()
717 switch (TLI.getOperationAction(ISD::STORE, VT)) { in LegalizeStoreOps()
724 if (!TLI.allowsMisalignedMemoryAccesses(ST->getMemoryVT(), AS, Align)) { in LegalizeStoreOps()
726 unsigned ABIAlignment= TLI.getDataLayout()->getABITypeAlignment(Ty); in LegalizeStoreOps()
728 ExpandUnalignedStore(cast<StoreSDNode>(Node), DAG, TLI, this); in LegalizeStoreOps()
733 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeStoreOps()
739 MVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT); in LegalizeStoreOps()
784 if (TLI.isLittleEndian()) { in LegalizeStoreOps()
798 TLI.getShiftAmountTy(Value.getValueType()))); in LegalizeStoreOps()
809 TLI.getShiftAmountTy(Value.getValueType()))); in LegalizeStoreOps()
828 switch (TLI.getTruncStoreAction(ST->getValue().getSimpleValueType(), in LegalizeStoreOps()
836 if (!TLI.allowsMisalignedMemoryAccesses(ST->getMemoryVT(), AS, Align)) { in LegalizeStoreOps()
838 unsigned ABIAlignment= TLI.getDataLayout()->getABITypeAlignment(Ty); in LegalizeStoreOps()
840 ExpandUnalignedStore(cast<StoreSDNode>(Node), DAG, TLI, this); in LegalizeStoreOps()
845 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeStoreOps()
855 assert(TLI.isTypeLegal(StVT) && in LegalizeStoreOps()
881 switch (TLI.getOperationAction(Node->getOpcode(), VT)) { in LegalizeLoadOps()
888 if (!TLI.allowsMisalignedMemoryAccesses(LD->getMemoryVT(), AS, Align)) { in LegalizeLoadOps()
891 TLI.getDataLayout()->getABITypeAlignment(Ty); in LegalizeLoadOps()
893 ExpandUnalignedLoad(cast<LoadSDNode>(Node), DAG, TLI, RVal, RChain); in LegalizeLoadOps()
899 SDValue Res = TLI.LowerOperation(RVal, DAG); in LegalizeLoadOps()
907 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); in LegalizeLoadOps()
947 TLI.getLoadExtAction(ExtType, Node->getValueType(0), MVT::i1) == in LegalizeLoadOps()
996 if (TLI.isLittleEndian()) { in LegalizeLoadOps()
1021 TLI.getShiftAmountTy(Hi.getValueType()))); in LegalizeLoadOps()
1051 TLI.getShiftAmountTy(Hi.getValueType()))); in LegalizeLoadOps()
1060 switch (TLI.getLoadExtAction(ExtType, Node->getValueType(0), in LegalizeLoadOps()
1071 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeLoadOps()
1082 if (!TLI.allowsMisalignedMemoryAccesses(MemVT, AS, Align)) { in LegalizeLoadOps()
1084 unsigned ABIAlignment = TLI.getDataLayout()->getABITypeAlignment(Ty); in LegalizeLoadOps()
1086 ExpandUnalignedLoad(cast<LoadSDNode>(Node), DAG, TLI, Value, Chain); in LegalizeLoadOps()
1093 if (!TLI.isLoadExtLegal(ISD::EXTLOAD, Node->getValueType(0), SrcVT)) { in LegalizeLoadOps()
1096 EVT LoadVT = TLI.getRegisterType(SrcVT.getSimpleVT()); in LegalizeLoadOps()
1097 if (TLI.isTypeLegal(SrcVT) || // Same as SrcVT == LoadVT? in LegalizeLoadOps()
1098 TLI.isLoadExtLegal(ExtType, LoadVT, SrcVT)) { in LegalizeLoadOps()
1164 assert(TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) == in LegalizeOp()
1169 assert((TLI.getTypeAction(*DAG.getContext(), in LegalizeOp()
1183 Action = TLI.getOperationAction(Node->getOpcode(), MVT::Other); in LegalizeOp()
1186 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1189 Action = TLI.getOperationAction(Node->getOpcode(), MVT::Other); in LegalizeOp()
1195 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1201 Action = TLI.getOperationAction(Node->getOpcode(), InnerType); in LegalizeOp()
1205 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1218 Action = TLI.getCondCodeAction(CCCode, OpVT); in LegalizeOp()
1221 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1224 Action = TLI.getOperationAction(Node->getOpcode(), OpVT); in LegalizeOp()
1257 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1267 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1279 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1295 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1349 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeOp()
1442 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy()); in ExpandExtractFromVectorThroughStack()
1494 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy()); in ExpandInsertToVectorThroughStack()
1568 if (TLI.isTypeLegal(IVT)) { in ExpandFCOPYSIGN()
1573 MVT LoadTy = TLI.getPointerTy(); in ExpandFCOPYSIGN()
1580 if (TLI.isBigEndian()) { in ExpandFCOPYSIGN()
1603 TLI.getShiftAmountTy(SignBit.getValueType()))); in ExpandFCOPYSIGN()
1621 unsigned SPReg = TLI.getStackPointerRegisterToSaveRestore(); in ExpandDYNAMIC_STACKALLOC()
1682 switch (TLI.getCondCodeAction(CCCode, OpVT)) { in LegalizeSetCCCondCode()
1689 if (TLI.isCondCodeLegal(InvCC, OpVT)) { in LegalizeSetCCCondCode()
1699 assert(TLI.getCondCodeAction(ISD::SETOEQ, OpVT) in LegalizeSetCCCondCode()
1704 assert(TLI.getCondCodeAction(ISD::SETUNE, OpVT) in LegalizeSetCCCondCode()
1741 if (TLI.isCondCodeLegal(InvCC, OpVT)) { in LegalizeSetCCCondCode()
1781 TLI.getDataLayout()->getPrefTypeAlignment(SrcOp.getValueType(). in EmitStackConvert()
1793 unsigned DestAlign = TLI.getDataLayout()->getPrefTypeAlignment(DestType); in EmitStackConvert()
1839 const TargetLowering &TLI, SDValue &Res) { in ExpandBVWithShuffles() argument
1893 else if (!TLI.isShuffleMaskLegal(ShuffleVec, VT)) in ExpandBVWithShuffles()
1924 else if (!TLI.isShuffleMaskLegal(ShuffleVec, VT)) in ExpandBVWithShuffles()
1997 SDValue CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy()); in ExpandBUILD_VECTOR()
2011 if (TLI.shouldExpandBuildVectorWithShuffles(VT, DefinedValues.size())) { in ExpandBUILD_VECTOR()
2020 if (TLI.isShuffleMaskLegal(ShuffleVec, Node->getValueType(0))) { in ExpandBUILD_VECTOR()
2034 if (ExpandBVWithShuffles(Node, DAG, TLI, Res)) in ExpandBUILD_VECTOR()
2059 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandLibCall()
2060 TLI.getPointerTy()); in ExpandLibCall()
2073 bool isTailCall = TLI.isInTailCallPosition(DAG, Node, TCChain); in ExpandLibCall()
2079 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandLibCall()
2082 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandLibCall()
2107 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandLibCall()
2108 TLI.getPointerTy()); in ExpandLibCall()
2114 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandLibCall()
2117 std::pair<SDValue,SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandLibCall()
2141 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandChainLibCall()
2142 TLI.getPointerTy()); in ExpandChainLibCall()
2148 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandChainLibCall()
2151 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandChainLibCall()
2194 const TargetLowering &TLI) { in isDivRemLibcallAvailable() argument
2205 return TLI.getLibcallName(LC) != nullptr; in isDivRemLibcallAvailable()
2277 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandDivRemLibCall()
2278 TLI.getPointerTy()); in ExpandDivRemLibCall()
2283 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandDivRemLibCall()
2286 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandDivRemLibCall()
2296 static bool isSinCosLibcallAvailable(SDNode *Node, const TargetLowering &TLI) { in isSinCosLibcallAvailable() argument
2306 return TLI.getLibcallName(LC) != nullptr; in isSinCosLibcallAvailable()
2311 static bool canCombineSinCosLibcall(SDNode *Node, const TargetLowering &TLI, in canCombineSinCosLibcall() argument
2313 if (!isSinCosLibcallAvailable(Node, TLI)) in canCombineSinCosLibcall()
2389 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandSinCosLibCall()
2390 TLI.getPointerTy()); in ExpandSinCosLibCall()
2395 .setCallee(TLI.getLibcallCallingConv(LC), in ExpandSinCosLibCall()
2398 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandSinCosLibCall()
2414 if (Op0.getValueType() == MVT::i32 && TLI.isTypeLegal(MVT::f64)) { in ExpandLegalINT_TO_FP()
2426 if (TLI.isLittleEndian()) in ExpandLegalINT_TO_FP()
2509 DAG.getConstant(1, TLI.getShiftAmountTy(Op0.getValueType())); in ExpandLegalINT_TO_FP()
2542 EVT SHVT = TLI.getShiftAmountTy(Sel2.getValueType()); in ExpandLegalINT_TO_FP()
2578 if (TLI.isLittleEndian()) FF <<= 32; in ExpandLegalINT_TO_FP()
2582 SDValue CPIdx = DAG.getConstantPool(FudgeFactor, TLI.getPointerTy()); in ExpandLegalINT_TO_FP()
2624 if (TLI.isOperationLegalOrCustom(ISD::SINT_TO_FP, NewInTy)) { in PromoteLegalINT_TO_FP()
2631 if (TLI.isOperationLegalOrCustom(ISD::UINT_TO_FP, NewInTy)) { in PromoteLegalINT_TO_FP()
2667 if (TLI.isOperationLegalOrCustom(ISD::FP_TO_SINT, NewOutTy)) { in PromoteLegalFP_TO_INT()
2673 if (!isSigned && TLI.isOperationLegalOrCustom(ISD::FP_TO_UINT, NewOutTy)) { in PromoteLegalFP_TO_INT()
2693 EVT SHVT = TLI.getShiftAmountTy(VT); in ExpandBSWAP()
2743 EVT ShVT = TLI.getShiftAmountTy(VT); in ExpandBitCount()
2797 EVT ShVT = TLI.getShiftAmountTy(VT); in ExpandBitCount()
2821 if (!TLI.isOperationLegalOrCustom(ISD::CTPOP, VT) && in ExpandBitCount()
2822 TLI.isOperationLegalOrCustom(ISD::CTLZ, VT)) in ExpandBitCount()
2889 TLI.getPointerTy()), std::move(Args), 0); in ExpandNode()
2891 std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI); in ExpandNode()
2987 DAG.getExternalSymbol("abort", TLI.getPointerTy()), in ExpandNode()
2989 std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI); in ExpandNode()
3011 EVT ShiftAmountTy = TLI.getShiftAmountTy(VT); in ExpandNode()
3043 if (TLI.expandFP_TO_SINT(Node, Tmp1, DAG)) in ExpandNode()
3075 SDValue VAListLoad = DAG.getLoad(TLI.getPointerTy(), dl, Tmp1, Tmp2, in ExpandNode()
3080 if (Align > TLI.getMinStackArgumentAlignment()) { in ExpandNode()
3094 DAG.getConstant(TLI.getDataLayout()-> in ExpandNode()
3111 Tmp1 = DAG.getLoad(TLI.getPointerTy(), dl, Node->getOperand(0), in ExpandNode()
3154 if (!TLI.isTypeLegal(EltVT)) { in ExpandNode()
3156 EVT NewEltVT = TLI.getTypeToTransformTo(*DAG.getContext(), EltVT); in ExpandNode()
3210 DAG.getConstant(Idx, TLI.getVectorIdxTy()))); in ExpandNode()
3215 TLI.getVectorIdxTy()))); in ExpandNode()
3230 TLI.getShiftAmountTy(Node->getOperand(0).getValueType()))); in ExpandNode()
3243 if (unsigned SP = TLI.getStackPointerRegisterToSaveRestore()) { in ExpandNode()
3255 if (unsigned SP = TLI.getStackPointerRegisterToSaveRestore()) { in ExpandNode()
3305 if ((TLI.isOperationLegalOrCustom(ISD::FSINCOS, VT) || in ExpandNode()
3306 canCombineSinCosLibcall(Node, TLI, TM)) in ExpandNode()
3445 TLI.isOperationLegalOrCustom(ISD::FP_TO_FP16, MVT::f32)) { in ExpandNode()
3466 if (!TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0))) in ExpandNode()
3472 if (TLI.isOperationLegalOrCustom(ISD::FADD, VT) && in ExpandNode()
3473 TLI.isOperationLegalOrCustom(ISD::FNEG, VT)) { in ExpandNode()
3486 assert(TLI.isOperationLegalOrCustom(ISD::ADD, VT) && in ExpandNode()
3487 TLI.isOperationLegalOrCustom(ISD::XOR, VT) && in ExpandNode()
3503 if (TLI.isOperationLegalOrCustom(DivRemOpc, VT) || in ExpandNode()
3504 (isDivRemLibcallAvailable(Node, isSigned, TLI) && in ExpandNode()
3506 !TLI.isOperationLegalOrCustom(DivOpc, Node->getValueType(0)) && in ExpandNode()
3510 } else if (TLI.isOperationLegalOrCustom(DivOpc, VT)) { in ExpandNode()
3534 if (TLI.isOperationLegalOrCustom(DivRemOpc, VT) || in ExpandNode()
3535 (isDivRemLibcallAvailable(Node, isSigned, TLI) && in ExpandNode()
3558 assert(TLI.isOperationLegalOrCustom(ExpandOpcode, VT) && in ExpandNode()
3578 bool HasSMUL_LOHI = TLI.isOperationLegalOrCustom(ISD::SMUL_LOHI, VT); in ExpandNode()
3579 bool HasUMUL_LOHI = TLI.isOperationLegalOrCustom(ISD::UMUL_LOHI, VT); in ExpandNode()
3580 bool HasMULHS = TLI.isOperationLegalOrCustom(ISD::MULHS, VT); in ExpandNode()
3581 bool HasMULHU = TLI.isOperationLegalOrCustom(ISD::MULHU, VT); in ExpandNode()
3600 if (TLI.isOperationLegalOrCustom(ISD::ZERO_EXTEND, VT) && in ExpandNode()
3601 TLI.isOperationLegalOrCustom(ISD::ANY_EXTEND, VT) && in ExpandNode()
3602 TLI.isOperationLegalOrCustom(ISD::SHL, VT) && in ExpandNode()
3603 TLI.isOperationLegalOrCustom(ISD::OR, VT) && in ExpandNode()
3604 TLI.expandMUL(Node, Lo, Hi, HalfType, DAG)) { in ExpandNode()
3608 TLI.getShiftAmountTy(HalfType)); in ExpandNode()
3686 if (TLI.isOperationLegalOrCustom(Ops[isSigned][0], VT)) { in ExpandNode()
3689 } else if (TLI.isOperationLegalOrCustom(Ops[isSigned][1], VT)) { in ExpandNode()
3693 } else if (TLI.isTypeLegal(WideVT)) { in ExpandNode()
3721 DAG.getConstant(LoSize-1, TLI.getPointerTy())); in ExpandNode()
3723 DAG.getConstant(LoSize-1, TLI.getPointerTy())); in ExpandNode()
3745 TLI.getShiftAmountTy(BottomHalf.getValueType())); in ExpandNode()
3763 TLI.getShiftAmountTy(PairTy))); in ExpandNode()
3787 EVT PTy = TLI.getPointerTy(); in ExpandNode()
3789 const DataLayout &TD = *TLI.getDataLayout(); in ExpandNode()
3808 TLI.getPICJumpTableRelocBase(Table, DAG)); in ExpandNode()
3863 switch (TLI.getBooleanContents(Tmp1->getValueType(0))) { in ExpandNode()
3887 if (TLI.isCondCodeLegal(CCOp, Tmp1.getSimpleValueType())) { in ExpandNode()
3891 assert(!TLI.isOperationExpand(ISD::SELECT, VT) && in ExpandNode()
3894 EVT CCVT = TLI.getSetCCResultType(*DAG.getContext(), CmpVT); in ExpandNode()
3907 if (TLI.isCondCodeLegal(InvCC, Tmp1.getSimpleValueType())) { in ExpandNode()
3915 if (TLI.isCondCodeLegal(SwapInvCC, Tmp1.getSimpleValueType())) { in ExpandNode()
3989 assert(TLI.isTypeLegal(VT.getScalarType())&& "Element type must be legal"); in ExpandNode()
3997 TLI.getVectorIdxTy())); in ExpandNode()
4001 TLI.getVectorIdxTy())); in ExpandNode()
4038 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), OVT); in PromoteNode()
4073 DAG.getConstant(DiffBits, TLI.getShiftAmountTy(NVT))); in PromoteNode()