Lines Matching refs:TLI

60   const TargetLowering &TLI;  member in __anon79ba08700111::SelectionDAGLegalize
71 return TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT); in getSetCCResultType()
80 : TM(DAG.getTarget()), TLI(DAG.getTargetLoweringInfo()), DAG(DAG), in SelectionDAGLegalize()
240 assert(TLI.isShuffleMaskLegal(NewMask, NVT) && "Shuffle not legal?"); in ShuffleWithNarrowerEltType()
272 TLI.isLoadExtLegal(ISD::EXTLOAD, OrigVT, SVT) && in ExpandConstantFP()
273 TLI.ShouldShrinkFPConstant(OrigVT)) { in ExpandConstantFP()
282 DAG.getConstantPool(LLVMC, TLI.getPointerTy(DAG.getDataLayout())); in ExpandConstantFP()
303 TLI.getPointerTy(DAG.getDataLayout())); in ExpandConstant()
314 const TargetLowering &TLI, in ExpandUnalignedStore() argument
329 if (TLI.isTypeLegal(intVT)) { in ExpandUnalignedStore()
343 TLI.getRegisterType(*DAG.getContext(), in ExpandUnalignedStore()
358 RegBytes, dl, TLI.getPointerTy(DAG.getDataLayout(), AS)); in ExpandUnalignedStore()
413 DAG.getConstant(NumBits, dl, TLI.getShiftAmountTy(Val.getValueType(), in ExpandUnalignedStore()
427 TLI.getPointerTy(DAG.getDataLayout(), AS))); in ExpandUnalignedStore()
442 const TargetLowering &TLI, in ExpandUnalignedLoad() argument
453 if (TLI.isTypeLegal(intVT) && TLI.isTypeLegal(LoadedVT)) { in ExpandUnalignedLoad()
470 MVT RegVT = TLI.getRegisterType(*DAG.getContext(), intVT); in ExpandUnalignedLoad()
479 DAG.getConstant(RegBytes, dl, TLI.getPointerTy(DAG.getDataLayout())); in ExpandUnalignedLoad()
581 DAG.getConstant(NumBits, dl, TLI.getShiftAmountTy(Hi.getValueType(), in ExpandUnalignedLoad()
613 EVT PtrVT = TLI.getPointerTy(DAG.getDataLayout()); in PerformInsertVectorEltInMemory()
685 TLI.isTypeLegal(MVT::i32)) { in OptimizeFloatStore()
695 if (TLI.isTypeLegal(MVT::i64)) { in OptimizeFloatStore()
702 if (TLI.isTypeLegal(MVT::i32) && !ST->isVolatile()) { in OptimizeFloatStore()
748 switch (TLI.getOperationAction(ISD::STORE, VT)) { in LegalizeStoreOps()
757 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) in LegalizeStoreOps()
758 ExpandUnalignedStore(cast<StoreSDNode>(Node), DAG, TLI, this); in LegalizeStoreOps()
762 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeStoreOps()
768 MVT NVT = TLI.getTypeToPromoteTo(ISD::STORE, VT); in LegalizeStoreOps()
830 TLI.getShiftAmountTy(Value.getValueType(), DL))); in LegalizeStoreOps()
842 TLI.getShiftAmountTy(Value.getValueType(), DL))); in LegalizeStoreOps()
862 switch (TLI.getTruncStoreAction(ST->getValue().getValueType(), StVT)) { in LegalizeStoreOps()
870 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) in LegalizeStoreOps()
871 ExpandUnalignedStore(cast<StoreSDNode>(Node), DAG, TLI, this); in LegalizeStoreOps()
875 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeStoreOps()
885 assert(TLI.isTypeLegal(StVT) && in LegalizeStoreOps()
911 switch (TLI.getOperationAction(Node->getOpcode(), VT)) { in LegalizeLoadOps()
920 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) in LegalizeLoadOps()
921 ExpandUnalignedLoad(cast<LoadSDNode>(Node), DAG, TLI, RVal, RChain); in LegalizeLoadOps()
925 SDValue Res = TLI.LowerOperation(RVal, DAG); in LegalizeLoadOps()
933 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT); in LegalizeLoadOps()
973 TLI.getLoadExtAction(ExtType, Node->getValueType(0), MVT::i1) == in LegalizeLoadOps()
1050 TLI.getShiftAmountTy(Hi.getValueType(), DL))); in LegalizeLoadOps()
1082 TLI.getShiftAmountTy(Hi.getValueType(), DL))); in LegalizeLoadOps()
1091 switch (TLI.getLoadExtAction(ExtType, Node->getValueType(0), in LegalizeLoadOps()
1102 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeLoadOps()
1114 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) in LegalizeLoadOps()
1115 ExpandUnalignedLoad(cast<LoadSDNode>(Node), DAG, TLI, Value, Chain); in LegalizeLoadOps()
1121 if (!TLI.isLoadExtLegal(ISD::EXTLOAD, DestVT, SrcVT)) { in LegalizeLoadOps()
1124 EVT LoadVT = TLI.getRegisterType(SrcVT.getSimpleVT()); in LegalizeLoadOps()
1125 if (TLI.isTypeLegal(SrcVT) || // Same as SrcVT == LoadVT? in LegalizeLoadOps()
1126 TLI.isLoadExtLegal(ExtType, LoadVT, SrcVT)) { in LegalizeLoadOps()
1148 EVT LoadVT = TLI.getRegisterType(IDestVT.getSimpleVT()); in LegalizeLoadOps()
1210 assert((TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) == in LegalizeOp()
1212 TLI.isTypeLegal(Node->getValueType(i))) && in LegalizeOp()
1216 assert((TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) == in LegalizeOp()
1218 TLI.isTypeLegal(Op.getValueType()) || in LegalizeOp()
1231 Action = TLI.getOperationAction(Node->getOpcode(), MVT::Other); in LegalizeOp()
1234 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1238 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1241 Action = TLI.getOperationAction(Node->getOpcode(), MVT::Other); in LegalizeOp()
1247 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1253 Action = TLI.getOperationAction(Node->getOpcode(), InnerType); in LegalizeOp()
1257 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1271 Action = TLI.getCondCodeAction(CCCode, OpVT); in LegalizeOp()
1274 Action = TLI.getOperationAction(Node->getOpcode(), in LegalizeOp()
1277 Action = TLI.getOperationAction(Node->getOpcode(), OpVT); in LegalizeOp()
1305 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1315 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1322 Action = TLI.getOperationAction(Node->getOpcode(), MVT::i64); in LegalizeOp()
1332 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1348 Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); in LegalizeOp()
1402 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG); in LegalizeOp()
1510 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy(DAG.getDataLayout())); in ExpandExtractFromVectorThroughStack()
1563 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy(DAG.getDataLayout())); in ExpandInsertToVectorThroughStack()
1653 if (TLI.isTypeLegal(IVT)) { in getSignAsIntValue()
1661 MVT LoadTy = TLI.getRegisterType(*DAG.getContext(), MVT::i8); in getSignAsIntValue()
1725 if (TLI.isOperationLegalOrCustom(ISD::FABS, FloatVT) && in ExpandFCOPYSIGN()
1726 TLI.isOperationLegalOrCustom(ISD::FNEG, FloatVT)) { in ExpandFCOPYSIGN()
1752 if (TLI.isOperationLegalOrCustom(ISD::FCOPYSIGN, FloatVT)) { in ExpandFABS()
1769 unsigned SPReg = TLI.getStackPointerRegisterToSaveRestore(); in ExpandDYNAMIC_STACKALLOC()
1828 switch (TLI.getCondCodeAction(CCCode, OpVT)) { in LegalizeSetCCCondCode()
1835 if (TLI.isCondCodeLegal(InvCC, OpVT)) { in LegalizeSetCCCondCode()
1845 assert(TLI.getCondCodeAction(ISD::SETOEQ, OpVT) in LegalizeSetCCCondCode()
1850 assert(TLI.getCondCodeAction(ISD::SETUNE, OpVT) in LegalizeSetCCCondCode()
1887 if (TLI.isCondCodeLegal(InvCC, OpVT)) { in LegalizeSetCCCondCode()
1985 const TargetLowering &TLI, SDValue &Res) { in ExpandBVWithShuffles() argument
2039 else if (!TLI.isShuffleMaskLegal(ShuffleVec, VT)) in ExpandBVWithShuffles()
2070 else if (!TLI.isShuffleMaskLegal(ShuffleVec, VT)) in ExpandBVWithShuffles()
2144 DAG.getConstantPool(CP, TLI.getPointerTy(DAG.getDataLayout())); in ExpandBUILD_VECTOR()
2159 if (TLI.shouldExpandBuildVectorWithShuffles(VT, DefinedValues.size())) { in ExpandBUILD_VECTOR()
2168 if (TLI.isShuffleMaskLegal(ShuffleVec, Node->getValueType(0))) { in ExpandBUILD_VECTOR()
2182 if (ExpandBVWithShuffles(Node, DAG, TLI, Res)) in ExpandBUILD_VECTOR()
2208 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandLibCall()
2209 TLI.getPointerTy(DAG.getDataLayout())); in ExpandLibCall()
2222 bool isTailCall = TLI.isInTailCallPosition(DAG, Node, TCChain); in ExpandLibCall()
2228 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandLibCall()
2231 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandLibCall()
2256 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandLibCall()
2257 TLI.getPointerTy(DAG.getDataLayout())); in ExpandLibCall()
2263 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandLibCall()
2266 std::pair<SDValue,SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandLibCall()
2290 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandChainLibCall()
2291 TLI.getPointerTy(DAG.getDataLayout())); in ExpandChainLibCall()
2297 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandChainLibCall()
2300 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandChainLibCall()
2386 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandDivRemLibCall()
2387 TLI.getPointerTy(DAG.getDataLayout())); in ExpandDivRemLibCall()
2392 .setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0) in ExpandDivRemLibCall()
2395 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandDivRemLibCall()
2405 static bool isSinCosLibcallAvailable(SDNode *Node, const TargetLowering &TLI) { in isSinCosLibcallAvailable() argument
2415 return TLI.getLibcallName(LC) != nullptr; in isSinCosLibcallAvailable()
2420 static bool canCombineSinCosLibcall(SDNode *Node, const TargetLowering &TLI, in canCombineSinCosLibcall() argument
2422 if (!isSinCosLibcallAvailable(Node, TLI)) in canCombineSinCosLibcall()
2498 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC), in ExpandSinCosLibCall()
2499 TLI.getPointerTy(DAG.getDataLayout())); in ExpandSinCosLibCall()
2504 .setCallee(TLI.getLibcallCallingConv(LC), in ExpandSinCosLibCall()
2507 std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI); in ExpandSinCosLibCall()
2525 if (Op0.getValueType() == MVT::i32 && TLI.isTypeLegal(MVT::f64)) { in ExpandLegalINT_TO_FP()
2622 1, dl, TLI.getShiftAmountTy(Op0.getValueType(), DAG.getDataLayout())); in ExpandLegalINT_TO_FP()
2657 EVT SHVT = TLI.getShiftAmountTy(Sel2.getValueType(), DAG.getDataLayout()); in ExpandLegalINT_TO_FP()
2702 DAG.getConstantPool(FudgeFactor, TLI.getPointerTy(DAG.getDataLayout())); in ExpandLegalINT_TO_FP()
2745 if (TLI.isOperationLegalOrCustom(ISD::SINT_TO_FP, NewInTy)) { in PromoteLegalINT_TO_FP()
2752 if (TLI.isOperationLegalOrCustom(ISD::UINT_TO_FP, NewInTy)) { in PromoteLegalINT_TO_FP()
2788 if (TLI.isOperationLegalOrCustom(ISD::FP_TO_SINT, NewOutTy)) { in PromoteLegalFP_TO_INT()
2794 if (!isSigned && TLI.isOperationLegalOrCustom(ISD::FP_TO_UINT, NewOutTy)) { in PromoteLegalFP_TO_INT()
2814 EVT SHVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout()); in ExpandBITREVERSE()
2839 EVT SHVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout()); in ExpandBSWAP()
2896 EVT ShVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout()); in ExpandBitCount()
2954 EVT ShVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout()); in ExpandBitCount()
2978 if (!TLI.isOperationLegalOrCustom(ISD::CTPOP, VT) && in ExpandBitCount()
2979 TLI.isOperationLegalOrCustom(ISD::CTLZ, VT)) in ExpandBitCount()
3120 EVT ShiftAmountTy = TLI.getShiftAmountTy(VT, DAG.getDataLayout()); in ExpandNode()
3152 if (TLI.expandFP_TO_SINT(Node, Tmp1, DAG)) in ExpandNode()
3220 if (!TLI.isTypeLegal(EltVT)) { in ExpandNode()
3222 EVT NewEltVT = TLI.getTypeToTransformTo(*DAG.getContext(), EltVT); in ExpandNode()
3276 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout())))); in ExpandNode()
3281 TLI.getVectorIdxTy(DAG.getDataLayout())))); in ExpandNode()
3296 TLI.getShiftAmountTy( in ExpandNode()
3311 if (unsigned SP = TLI.getStackPointerRegisterToSaveRestore()) { in ExpandNode()
3323 if (unsigned SP = TLI.getStackPointerRegisterToSaveRestore()) { in ExpandNode()
3373 if ((TLI.isOperationLegalOrCustom(ISD::FSINCOS, VT) || in ExpandNode()
3374 canCombineSinCosLibcall(Node, TLI, TM)) in ExpandNode()
3399 if (!TLI.useSoftFloat() && TM.Options.UnsafeFPMath) { in ExpandNode()
3403 TLI.isOperationLegalOrCustom(ISD::FP_TO_FP16, MVT::f32)) { in ExpandNode()
3417 if (!TLI.isFPImmLegal(CFP->getValueAPF(), Node->getValueType(0))) in ExpandNode()
3428 if (TLI.isOperationLegalOrCustom(ISD::FADD, VT) && in ExpandNode()
3429 TLI.isOperationLegalOrCustom(ISD::FNEG, VT)) { in ExpandNode()
3439 assert(TLI.isOperationLegalOrCustom(ISD::ADD, VT) && in ExpandNode()
3440 TLI.isOperationLegalOrCustom(ISD::XOR, VT) && in ExpandNode()
3457 if (TLI.isOperationLegalOrCustom(DivRemOpc, VT)) { in ExpandNode()
3461 } else if (TLI.isOperationLegalOrCustom(DivOpc, VT)) { in ExpandNode()
3475 if (TLI.isOperationLegalOrCustom(DivRemOpc, VT)) { in ExpandNode()
3489 assert(TLI.isOperationLegalOrCustom(ExpandOpcode, VT) && in ExpandNode()
3504 bool HasSMUL_LOHI = TLI.isOperationLegalOrCustom(ISD::SMUL_LOHI, VT); in ExpandNode()
3505 bool HasUMUL_LOHI = TLI.isOperationLegalOrCustom(ISD::UMUL_LOHI, VT); in ExpandNode()
3506 bool HasMULHS = TLI.isOperationLegalOrCustom(ISD::MULHS, VT); in ExpandNode()
3507 bool HasMULHU = TLI.isOperationLegalOrCustom(ISD::MULHU, VT); in ExpandNode()
3526 if (TLI.isOperationLegalOrCustom(ISD::ZERO_EXTEND, VT) && in ExpandNode()
3527 TLI.isOperationLegalOrCustom(ISD::ANY_EXTEND, VT) && in ExpandNode()
3528 TLI.isOperationLegalOrCustom(ISD::SHL, VT) && in ExpandNode()
3529 TLI.isOperationLegalOrCustom(ISD::OR, VT) && in ExpandNode()
3530 TLI.expandMUL(Node, Lo, Hi, HalfType, DAG)) { in ExpandNode()
3535 TLI.getShiftAmountTy(HalfType, DAG.getDataLayout())); in ExpandNode()
3606 if (TLI.isOperationLegalOrCustom(Ops[isSigned][0], VT)) { in ExpandNode()
3609 } else if (TLI.isOperationLegalOrCustom(Ops[isSigned][1], VT)) { in ExpandNode()
3613 } else if (TLI.isTypeLegal(WideVT)) { in ExpandNode()
3643 TLI.getPointerTy(DAG.getDataLayout()))); in ExpandNode()
3647 TLI.getPointerTy(DAG.getDataLayout()))); in ExpandNode()
3670 TLI.getShiftAmountTy(BottomHalf.getValueType(), DAG.getDataLayout())); in ExpandNode()
3689 TLI.getShiftAmountTy(PairTy, DAG.getDataLayout()))); in ExpandNode()
3713 EVT PTy = TLI.getPointerTy(DAG.getDataLayout()); in ExpandNode()
3735 TLI.getPICJumpTableRelocBase(Table, DAG)); in ExpandNode()
3790 switch (TLI.getBooleanContents(Tmp1->getValueType(0))) { in ExpandNode()
3815 if (TLI.isCondCodeLegal(CCOp, Tmp1.getSimpleValueType())) { in ExpandNode()
3819 assert(!TLI.isOperationExpand(ISD::SELECT, VT) && in ExpandNode()
3823 TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), CmpVT); in ExpandNode()
3836 if (TLI.isCondCodeLegal(InvCC, Tmp1.getSimpleValueType())) { in ExpandNode()
3844 if (TLI.isCondCodeLegal(SwapInvCC, Tmp1.getSimpleValueType())) { in ExpandNode()
3918 assert(TLI.isTypeLegal(VT.getScalarType())&& "Element type must be legal"); in ExpandNode()
3925 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout()))); in ExpandNode()
3928 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout()))); in ExpandNode()
3974 TLI.getPointerTy(DAG.getDataLayout())), in ConvertNodeToLibcall()
3977 std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI); in ConvertNodeToLibcall()
4014 TLI.getPointerTy(DAG.getDataLayout())), in ConvertNodeToLibcall()
4016 std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI); in ConvertNodeToLibcall()
4205 static MVT getPromotedVectorElementType(const TargetLowering &TLI, in getPromotedVectorElementType() argument
4209 assert(TLI.isTypeLegal(MidVT) && "unexpected"); in getPromotedVectorElementType()
4225 MVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), OVT); in PromoteNode()
4262 TLI.getShiftAmountTy(NVT, DAG.getDataLayout()))); in PromoteNode()
4474 MVT MidVT = getPromotedVectorElementType(TLI, EltVT, NewEltVT); in PromoteNode()
4507 MVT MidVT = getPromotedVectorElementType(TLI, EltVT, NewEltVT); in PromoteNode()
4554 MVT MidVT = getPromotedVectorElementType(TLI, EltVT, NewEltVT); in PromoteNode()
4594 MVT MidVT = getPromotedVectorElementType(TLI, EltVT, NewEltVT); in PromoteNode()