Lines Matching full:dl

97                                          const SDLoc &dl);
99 const SDLoc &dl);
105 SDValue ShuffleWithNarrowerEltType(EVT NVT, EVT VT, const SDLoc &dl,
110 bool &NeedInvert, const SDLoc &dl);
114 unsigned NumOps, bool isSigned, const SDLoc &dl);
132 const SDLoc &dl);
137 void getSignAsIntValue(FloatSignAsInt &State, const SDLoc &DL,
139 SDValue modifySignAsInt(const FloatSignAsInt &State, const SDLoc &DL,
144 const SDLoc &dl);
146 const SDLoc &dl);
148 const SDLoc &dl);
150 SDValue ExpandBITREVERSE(SDValue Op, const SDLoc &dl);
151 SDValue ExpandBSWAP(SDValue Op, const SDLoc &dl);
152 SDValue ExpandBitCount(unsigned Opc, SDValue Op, const SDLoc &dl);
215 EVT NVT, EVT VT, const SDLoc &dl, SDValue N1, SDValue N2, in ShuffleWithNarrowerEltType() argument
224 return DAG.getVectorShuffle(NVT, dl, N1, N2, Mask); in ShuffleWithNarrowerEltType()
238 return DAG.getVectorShuffle(NVT, dl, N1, N2, NewMask); in ShuffleWithNarrowerEltType()
246 SDLoc dl(CFP); in ExpandConstantFP() local
258 return DAG.getConstant(LLVMC->getValueAPF().bitcastToAPInt(), dl, in ExpandConstantFP()
283 ISD::EXTLOAD, dl, OrigVT, DAG.getEntryNode(), CPIdx, in ExpandConstantFP()
289 DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx, in ExpandConstantFP()
297 SDLoc dl(CP); in ExpandConstant() local
303 DAG.getLoad(VT, dl, DAG.getEntryNode(), CPIdx, in ExpandConstant()
316 const SDLoc &dl) { in PerformInsertVectorEltInMemory() argument
337 DAG.getEntryNode(), dl, Tmp1, StackPtr, in PerformInsertVectorEltInMemory()
342 Tmp3 = DAG.getZExtOrTrunc(Tmp3, dl, PtrVT); in PerformInsertVectorEltInMemory()
345 Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3, in PerformInsertVectorEltInMemory()
346 DAG.getConstant(EltSize, dl, IdxVT)); in PerformInsertVectorEltInMemory()
347 SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr); in PerformInsertVectorEltInMemory()
349 Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2, MachinePointerInfo(), EltVT, in PerformInsertVectorEltInMemory()
352 return DAG.getLoad(VT, dl, Ch, StackPtr, MachinePointerInfo::getFixedStack( in PerformInsertVectorEltInMemory()
359 const SDLoc &dl) { in ExpandINSERT_VECTOR_ELT() argument
367 SDValue ScVec = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, in ExpandINSERT_VECTOR_ELT()
378 return DAG.getVectorShuffle(Vec.getValueType(), dl, Vec, ScVec, ShufOps); in ExpandINSERT_VECTOR_ELT()
381 return PerformInsertVectorEltInMemory(Vec, Val, Idx, dl); in ExpandINSERT_VECTOR_ELT()
398 SDLoc dl(ST); in OptimizeFloatStore() local
405 return DAG.getStore(Chain, dl, Con, Ptr, ST->getPointerInfo(), in OptimizeFloatStore()
414 return DAG.getStore(Chain, dl, Con, Ptr, ST->getPointerInfo(), in OptimizeFloatStore()
423 SDValue Lo = DAG.getConstant(IntVal.trunc(32), dl, MVT::i32); in OptimizeFloatStore()
424 SDValue Hi = DAG.getConstant(IntVal.lshr(32).trunc(32), dl, MVT::i32); in OptimizeFloatStore()
428 Lo = DAG.getStore(Chain, dl, Lo, Ptr, ST->getPointerInfo(), isVolatile, in OptimizeFloatStore()
430 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, in OptimizeFloatStore()
431 DAG.getConstant(4, dl, Ptr.getValueType())); in OptimizeFloatStore()
432 Hi = DAG.getStore(Chain, dl, Hi, Ptr, in OptimizeFloatStore()
437 return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi); in OptimizeFloatStore()
448 SDLoc dl(Node); in LegalizeStoreOps() local
472 const DataLayout &DL = DAG.getDataLayout(); in LegalizeStoreOps() local
473 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) { in LegalizeStoreOps()
489 Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value); in LegalizeStoreOps()
491 DAG.getStore(Chain, dl, Value, Ptr, in LegalizeStoreOps()
505 auto &DL = DAG.getDataLayout(); in LegalizeStoreOps() local
513 Value = DAG.getZeroExtendInReg(Value, dl, StVT); in LegalizeStoreOps()
515 DAG.getTruncStore(Chain, dl, Value, Ptr, ST->getPointerInfo(), in LegalizeStoreOps()
532 if (DL.isLittleEndian()) { in LegalizeStoreOps()
535 Lo = DAG.getTruncStore(Chain, dl, Value, Ptr, ST->getPointerInfo(), in LegalizeStoreOps()
542 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, in LegalizeStoreOps()
543 DAG.getConstant(IncrementSize, dl, in LegalizeStoreOps()
546 ISD::SRL, dl, Value.getValueType(), Value, in LegalizeStoreOps()
547 DAG.getConstant(RoundWidth, dl, in LegalizeStoreOps()
548 TLI.getShiftAmountTy(Value.getValueType(), DL))); in LegalizeStoreOps()
549 Hi = DAG.getTruncStore(Chain, dl, Hi, Ptr, in LegalizeStoreOps()
558 ISD::SRL, dl, Value.getValueType(), Value, in LegalizeStoreOps()
559 DAG.getConstant(ExtraWidth, dl, in LegalizeStoreOps()
560 TLI.getShiftAmountTy(Value.getValueType(), DL))); in LegalizeStoreOps()
561 Hi = DAG.getTruncStore(Chain, dl, Hi, Ptr, ST->getPointerInfo(), in LegalizeStoreOps()
567 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, in LegalizeStoreOps()
568 DAG.getConstant(IncrementSize, dl, in LegalizeStoreOps()
570 Lo = DAG.getTruncStore(Chain, dl, Value, Ptr, in LegalizeStoreOps()
577 SDValue Result = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi); in LegalizeStoreOps()
588 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) { in LegalizeStoreOps()
607 Value = DAG.getNode(ISD::TRUNCATE, dl, StVT, Value); in LegalizeStoreOps()
609 DAG.getStore(Chain, dl, Value, Ptr, ST->getPointerInfo(), in LegalizeStoreOps()
623 SDLoc dl(Node); in LegalizeLoadOps() local
637 const DataLayout &DL = DAG.getDataLayout(); in LegalizeLoadOps() local
640 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) { in LegalizeLoadOps()
657 SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getMemOperand()); in LegalizeLoadOps()
658 RVal = DAG.getNode(ISD::BITCAST, dl, VT, Res); in LegalizeLoadOps()
708 DAG.getExtLoad(NewExtType, dl, Node->getValueType(0), in LegalizeLoadOps()
717 Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, in LegalizeLoadOps()
722 Result = DAG.getNode(ISD::AssertZext, dl, in LegalizeLoadOps()
741 auto &DL = DAG.getDataLayout(); in LegalizeLoadOps() local
743 if (DL.isLittleEndian()) { in LegalizeLoadOps()
746 Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, Node->getValueType(0), in LegalizeLoadOps()
753 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, in LegalizeLoadOps()
754 DAG.getConstant(IncrementSize, dl, in LegalizeLoadOps()
756 Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Chain, Ptr, in LegalizeLoadOps()
763 Ch = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1), in LegalizeLoadOps()
768 ISD::SHL, dl, Hi.getValueType(), Hi, in LegalizeLoadOps()
769 DAG.getConstant(RoundWidth, dl, in LegalizeLoadOps()
770 TLI.getShiftAmountTy(Hi.getValueType(), DL))); in LegalizeLoadOps()
773 Value = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); in LegalizeLoadOps()
778 Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Chain, Ptr, in LegalizeLoadOps()
784 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, in LegalizeLoadOps()
785 DAG.getConstant(IncrementSize, dl, in LegalizeLoadOps()
788 dl, Node->getValueType(0), Chain, Ptr, in LegalizeLoadOps()
795 Ch = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1), in LegalizeLoadOps()
800 ISD::SHL, dl, Hi.getValueType(), Hi, in LegalizeLoadOps()
801 DAG.getConstant(ExtraWidth, dl, in LegalizeLoadOps()
802 TLI.getShiftAmountTy(Hi.getValueType(), DL))); in LegalizeLoadOps()
805 Value = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi); in LegalizeLoadOps()
832 const DataLayout &DL = DAG.getDataLayout(); in LegalizeLoadOps() local
833 if (!TLI.allowsMemoryAccess(*DAG.getContext(), DL, MemVT, AS, Align)) { in LegalizeLoadOps()
852 SDValue Load = DAG.getExtLoad(MidExtType, dl, LoadVT, Chain, Ptr, in LegalizeLoadOps()
856 Value = DAG.getNode(ExtendOp, dl, Node->getValueType(0), Load); in LegalizeLoadOps()
870 SDValue Result = DAG.getExtLoad(ISD::ZEXTLOAD, dl, LoadVT, in LegalizeLoadOps()
873 Value = DAG.getNode(ISD::FP16_TO_FP, dl, DestVT, Result); in LegalizeLoadOps()
890 SDValue Result = DAG.getExtLoad(ISD::EXTLOAD, dl, in LegalizeLoadOps()
896 ValRes = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, in LegalizeLoadOps()
900 ValRes = DAG.getZeroExtendInReg(Result, dl, SrcVT.getScalarType()); in LegalizeLoadOps()
1177 SDLoc dl(Op); in ExpandExtractFromVectorThroughStack() local
1219 Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, in ExpandExtractFromVectorThroughStack()
1226 Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx, in ExpandExtractFromVectorThroughStack()
1229 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy(DAG.getDataLayout())); in ExpandExtractFromVectorThroughStack()
1230 StackPtr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(), Idx, StackPtr); in ExpandExtractFromVectorThroughStack()
1235 NewLoad = DAG.getLoad(Op.getValueType(), dl, Ch, StackPtr, in ExpandExtractFromVectorThroughStack()
1239 ISD::EXTLOAD, dl, Op.getValueType(), Ch, StackPtr, MachinePointerInfo(), in ExpandExtractFromVectorThroughStack()
1261 SDLoc dl(Op); in ExpandInsertToVectorThroughStack() local
1271 SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, PtrInfo, in ExpandInsertToVectorThroughStack()
1280 Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx, in ExpandInsertToVectorThroughStack()
1282 Idx = DAG.getZExtOrTrunc(Idx, dl, TLI.getPointerTy(DAG.getDataLayout())); in ExpandInsertToVectorThroughStack()
1284 SDValue SubStackPtr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(), Idx, in ExpandInsertToVectorThroughStack()
1288 Ch = DAG.getStore(Ch, dl, Part, SubStackPtr, in ExpandInsertToVectorThroughStack()
1292 return DAG.getLoad(Op.getValueType(), dl, Ch, StackPtr, PtrInfo, in ExpandInsertToVectorThroughStack()
1303 SDLoc dl(Node); in ExpandVectorBuildThroughStack() local
1319 SDValue Idx = DAG.getConstant(Offset, dl, FIPtr.getValueType()); in ExpandVectorBuildThroughStack()
1320 Idx = DAG.getNode(ISD::ADD, dl, FIPtr.getValueType(), FIPtr, Idx); in ExpandVectorBuildThroughStack()
1325 Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl, in ExpandVectorBuildThroughStack()
1330 Stores.push_back(DAG.getStore(DAG.getEntryNode(), dl, in ExpandVectorBuildThroughStack()
1338 StoreChain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Stores); in ExpandVectorBuildThroughStack()
1343 return DAG.getLoad(VT, dl, StoreChain, FIPtr, PtrInfo, in ExpandVectorBuildThroughStack()
1367 const SDLoc &DL, in getSignAsIntValue() argument
1375 State.IntValue = DAG.getNode(ISD::BITCAST, DL, IVT, Value); in getSignAsIntValue()
1391 State.Chain = DAG.getStore(DAG.getEntryNode(), DL, Value, State.FloatPtr, in getSignAsIntValue()
1403 IntPtr = DAG.getNode(ISD::ADD, DL, StackPtr.getValueType(), StackPtr, in getSignAsIntValue()
1404 DAG.getConstant(ByteOffset, DL, StackPtr.getValueType())); in getSignAsIntValue()
1410 State.IntValue = DAG.getExtLoad(ISD::EXTLOAD, DL, LoadTy, State.Chain, in getSignAsIntValue()
1420 const SDLoc &DL, in modifySignAsInt() argument
1423 return DAG.getNode(ISD::BITCAST, DL, State.FloatVT, NewIntValue); in modifySignAsInt()
1426 SDValue Chain = DAG.getTruncStore(State.Chain, DL, NewIntValue, State.IntPtr, in modifySignAsInt()
1429 return DAG.getLoad(State.FloatVT, DL, Chain, State.FloatPtr, in modifySignAsInt()
1434 SDLoc DL(Node); in ExpandFCOPYSIGN() local
1440 getSignAsIntValue(SignAsInt, DL, Sign); in ExpandFCOPYSIGN()
1443 SDValue SignMask = DAG.getConstant(SignAsInt.SignMask, DL, IntVT); in ExpandFCOPYSIGN()
1444 SDValue SignBit = DAG.getNode(ISD::AND, DL, IntVT, SignAsInt.IntValue, in ExpandFCOPYSIGN()
1451 SDValue AbsValue = DAG.getNode(ISD::FABS, DL, FloatVT, Mag); in ExpandFCOPYSIGN()
1452 SDValue NegValue = DAG.getNode(ISD::FNEG, DL, FloatVT, AbsValue); in ExpandFCOPYSIGN()
1453 SDValue Cond = DAG.getSetCC(DL, getSetCCResultType(IntVT), SignBit, in ExpandFCOPYSIGN()
1454 DAG.getConstant(0, DL, IntVT), ISD::SETNE); in ExpandFCOPYSIGN()
1455 return DAG.getSelect(DL, FloatVT, Cond, NegValue, AbsValue); in ExpandFCOPYSIGN()
1460 getSignAsIntValue(MagAsInt, DL, Mag); in ExpandFCOPYSIGN()
1462 SDValue ClearSignMask = DAG.getConstant(~MagAsInt.SignMask, DL, MagVT); in ExpandFCOPYSIGN()
1463 SDValue ClearedSign = DAG.getNode(ISD::AND, DL, MagVT, MagAsInt.IntValue, in ExpandFCOPYSIGN()
1470 SDValue ShiftCnst = DAG.getConstant(ShiftAmount, DL, IntVT); in ExpandFCOPYSIGN()
1471 SignBit = DAG.getNode(ISD::SRL, DL, IntVT, SignBit, ShiftCnst); in ExpandFCOPYSIGN()
1473 SDValue ShiftCnst = DAG.getConstant(-ShiftAmount, DL, IntVT); in ExpandFCOPYSIGN()
1474 SignBit = DAG.getNode(ISD::SHL, DL, IntVT, SignBit, ShiftCnst); in ExpandFCOPYSIGN()
1476 SignBit = DAG.getNode(ISD::TRUNCATE, DL, MagVT, SignBit); in ExpandFCOPYSIGN()
1478 SignBit = DAG.getNode(ISD::ZERO_EXTEND, DL, MagVT, SignBit); in ExpandFCOPYSIGN()
1480 SDValue ShiftCnst = DAG.getConstant(ShiftAmount, DL, MagVT); in ExpandFCOPYSIGN()
1481 SignBit = DAG.getNode(ISD::SRL, DL, MagVT, SignBit, ShiftCnst); in ExpandFCOPYSIGN()
1483 SDValue ShiftCnst = DAG.getConstant(-ShiftAmount, DL, MagVT); in ExpandFCOPYSIGN()
1484 SignBit = DAG.getNode(ISD::SHL, DL, MagVT, SignBit, ShiftCnst); in ExpandFCOPYSIGN()
1489 SDValue CopiedSign = DAG.getNode(ISD::OR, DL, MagVT, ClearedSign, SignBit); in ExpandFCOPYSIGN()
1490 return modifySignAsInt(MagAsInt, DL, CopiedSign); in ExpandFCOPYSIGN()
1494 SDLoc DL(Node); in ExpandFABS() local
1500 SDValue Zero = DAG.getConstantFP(0.0, DL, FloatVT); in ExpandFABS()
1501 return DAG.getNode(ISD::FCOPYSIGN, DL, FloatVT, Value, Zero); in ExpandFABS()
1506 getSignAsIntValue(ValueAsInt, DL, Value); in ExpandFABS()
1508 SDValue ClearSignMask = DAG.getConstant(~ValueAsInt.SignMask, DL, IntVT); in ExpandFABS()
1509 SDValue ClearedSign = DAG.getNode(ISD::AND, DL, IntVT, ValueAsInt.IntValue, in ExpandFABS()
1511 return modifySignAsInt(ValueAsInt, DL, ClearedSign); in ExpandFABS()
1519 SDLoc dl(Node); in ExpandDYNAMIC_STACKALLOC() local
1528 Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, dl, true), dl); in ExpandDYNAMIC_STACKALLOC()
1531 SDValue SP = DAG.getCopyFromReg(Chain, dl, SPReg, VT); in ExpandDYNAMIC_STACKALLOC()
1536 Tmp1 = DAG.getNode(ISD::SUB, dl, VT, SP, Size); // Value in ExpandDYNAMIC_STACKALLOC()
1538 Tmp1 = DAG.getNode(ISD::AND, dl, VT, Tmp1, in ExpandDYNAMIC_STACKALLOC()
1539 DAG.getConstant(-(uint64_t)Align, dl, VT)); in ExpandDYNAMIC_STACKALLOC()
1540 Chain = DAG.getCopyToReg(Chain, dl, SPReg, Tmp1); // Output chain in ExpandDYNAMIC_STACKALLOC()
1542 Tmp2 = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true), in ExpandDYNAMIC_STACKALLOC()
1543 DAG.getIntPtrConstant(0, dl, true), SDValue(), dl); in ExpandDYNAMIC_STACKALLOC()
1570 const SDLoc &dl) { in LegalizeSetCCCondCode() argument
1647 SetCC1 = DAG.getSetCC(dl, VT, LHS, RHS, CC1); in LegalizeSetCCCondCode()
1648 SetCC2 = DAG.getSetCC(dl, VT, LHS, RHS, CC2); in LegalizeSetCCCondCode()
1651 SetCC1 = DAG.getSetCC(dl, VT, LHS, LHS, CC1); in LegalizeSetCCCondCode()
1652 SetCC2 = DAG.getSetCC(dl, VT, RHS, RHS, CC2); in LegalizeSetCCCondCode()
1654 LHS = DAG.getNode(Opc, dl, VT, SetCC1, SetCC2); in LegalizeSetCCCondCode()
1668 EVT DestVT, const SDLoc &dl) { in EmitStackConvert() argument
1690 Store = DAG.getTruncStore(DAG.getEntryNode(), dl, SrcOp, FIPtr, in EmitStackConvert()
1694 Store = DAG.getStore(DAG.getEntryNode(), dl, SrcOp, FIPtr, in EmitStackConvert()
1700 return DAG.getLoad(DestVT, dl, Store, FIPtr, PtrInfo, in EmitStackConvert()
1704 return DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT, Store, FIPtr, in EmitStackConvert()
1709 SDLoc dl(Node); in ExpandSCALAR_TO_VECTOR() local
1718 DAG.getEntryNode(), dl, Node->getOperand(0), StackPtr, in ExpandSCALAR_TO_VECTOR()
1722 Node->getValueType(0), dl, Ch, StackPtr, in ExpandSCALAR_TO_VECTOR()
1731 SDLoc dl(Node); in ExpandBVWithShuffles() local
1751 Vec = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, V); in ExpandBVWithShuffles()
1780 Shuffle = DAG.getVectorShuffle(VT, dl, IntermedVals[i].first, in ExpandBVWithShuffles()
1813 Res = DAG.getVectorShuffle(VT, dl, Vec1, Vec2, ShuffleVec); in ExpandBVWithShuffles()
1826 SDLoc dl(Node); in ExpandBUILD_VECTOR() local
1859 return DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Node->getOperand(0)); in ExpandBUILD_VECTOR()
1891 VT, dl, DAG.getEntryNode(), CPIdx, in ExpandBUILD_VECTOR()
1914 SDValue Vec1 = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Value1); in ExpandBUILD_VECTOR()
1917 Vec2 = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Value2); in ExpandBUILD_VECTOR()
1922 return DAG.getVectorShuffle(VT, dl, Vec1, Vec2, ShuffleVec); in ExpandBUILD_VECTOR()
1991 bool isSigned, const SDLoc &dl) { in ExpandLibCall() argument
2009 CLI.setDebugLoc(dl).setChain(DAG.getEntryNode()) in ExpandLibCall()
2136 SDLoc dl(Node); in ExpandDivRemLibCall() local
2138 CLI.setDebugLoc(dl).setChain(InChain) in ExpandDivRemLibCall()
2145 SDValue Rem = DAG.getLoad(RetVT, dl, CallInfo.second, FIPtr, in ExpandDivRemLibCall()
2247 SDLoc dl(Node); in ExpandSinCosLibCall() local
2249 CLI.setDebugLoc(dl).setChain(InChain) in ExpandSinCosLibCall()
2255 Results.push_back(DAG.getLoad(RetVT, dl, CallInfo.second, SinPtr, in ExpandSinCosLibCall()
2257 Results.push_back(DAG.getLoad(RetVT, dl, CallInfo.second, CosPtr, in ExpandSinCosLibCall()
2267 const SDLoc &dl) { in ExpandLegalINT_TO_FP() argument
2277 SDValue WordOff = DAG.getConstant(sizeof(int), dl, in ExpandLegalINT_TO_FP()
2281 SDValue Lo = DAG.getNode(ISD::ADD, dl, StackSlot.getValueType(), in ExpandLegalINT_TO_FP()
2290 SDValue SignBit = DAG.getConstant(0x80000000u, dl, MVT::i32); in ExpandLegalINT_TO_FP()
2291 Op0Mapped = DAG.getNode(ISD::XOR, dl, MVT::i32, Op0, SignBit); in ExpandLegalINT_TO_FP()
2296 SDValue Store1 = DAG.getStore(DAG.getEntryNode(), dl, in ExpandLegalINT_TO_FP()
2300 SDValue InitialHi = DAG.getConstant(0x43300000u, dl, MVT::i32); in ExpandLegalINT_TO_FP()
2302 SDValue Store2 = DAG.getStore(Store1, dl, InitialHi, Hi, in ExpandLegalINT_TO_FP()
2306 SDValue Load = DAG.getLoad(MVT::f64, dl, Store2, StackSlot, in ExpandLegalINT_TO_FP()
2312 dl, MVT::f64); in ExpandLegalINT_TO_FP()
2314 SDValue Sub = DAG.getNode(ISD::FSUB, dl, MVT::f64, Load, Bias); in ExpandLegalINT_TO_FP()
2322 Result = DAG.getNode(ISD::FP_ROUND, dl, DestVT, Sub, in ExpandLegalINT_TO_FP()
2323 DAG.getIntPtrConstant(0, dl)); in ExpandLegalINT_TO_FP()
2325 Result = DAG.getNode(ISD::FP_EXTEND, dl, DestVT, Sub); in ExpandLegalINT_TO_FP()
2339 DAG.getConstant(UINT64_C(0x4330000000000000), dl, MVT::i64); in ExpandLegalINT_TO_FP()
2341 DAG.getConstantFP(BitsToDouble(UINT64_C(0x4530000000100000)), dl, in ExpandLegalINT_TO_FP()
2344 DAG.getConstant(UINT64_C(0x4530000000000000), dl, MVT::i64); in ExpandLegalINT_TO_FP()
2346 SDValue Lo = DAG.getZeroExtendInReg(Op0, dl, MVT::i32); in ExpandLegalINT_TO_FP()
2347 SDValue Hi = DAG.getNode(ISD::SRL, dl, MVT::i64, Op0, in ExpandLegalINT_TO_FP()
2348 DAG.getConstant(32, dl, MVT::i64)); in ExpandLegalINT_TO_FP()
2349 SDValue LoOr = DAG.getNode(ISD::OR, dl, MVT::i64, Lo, TwoP52); in ExpandLegalINT_TO_FP()
2350 SDValue HiOr = DAG.getNode(ISD::OR, dl, MVT::i64, Hi, TwoP84); in ExpandLegalINT_TO_FP()
2351 SDValue LoFlt = DAG.getNode(ISD::BITCAST, dl, MVT::f64, LoOr); in ExpandLegalINT_TO_FP()
2352 SDValue HiFlt = DAG.getNode(ISD::BITCAST, dl, MVT::f64, HiOr); in ExpandLegalINT_TO_FP()
2353 SDValue HiSub = DAG.getNode(ISD::FSUB, dl, MVT::f64, HiFlt, in ExpandLegalINT_TO_FP()
2355 return DAG.getNode(ISD::FADD, dl, MVT::f64, LoFlt, HiSub); in ExpandLegalINT_TO_FP()
2364 SDValue Fast = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Op0); in ExpandLegalINT_TO_FP()
2367 1, dl, TLI.getShiftAmountTy(Op0.getValueType(), DAG.getDataLayout())); in ExpandLegalINT_TO_FP()
2368 SDValue Shr = DAG.getNode(ISD::SRL, dl, MVT::i64, Op0, ShiftConst); in ExpandLegalINT_TO_FP()
2369 SDValue AndConst = DAG.getConstant(1, dl, MVT::i64); in ExpandLegalINT_TO_FP()
2370 SDValue And = DAG.getNode(ISD::AND, dl, MVT::i64, Op0, AndConst); in ExpandLegalINT_TO_FP()
2371 SDValue Or = DAG.getNode(ISD::OR, dl, MVT::i64, And, Shr); in ExpandLegalINT_TO_FP()
2373 SDValue SignCvt = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Or); in ExpandLegalINT_TO_FP()
2374 SDValue Slow = DAG.getNode(ISD::FADD, dl, MVT::f32, SignCvt, SignCvt); in ExpandLegalINT_TO_FP()
2380 SDValue SignBitTest = DAG.getSetCC(dl, getSetCCResultType(MVT::i64), in ExpandLegalINT_TO_FP()
2381 Op0, DAG.getConstant(0, dl, MVT::i64), ISD::SETLT); in ExpandLegalINT_TO_FP()
2382 return DAG.getSelect(dl, MVT::f32, SignBitTest, Slow, Fast); in ExpandLegalINT_TO_FP()
2387 SDValue And = DAG.getNode(ISD::AND, dl, MVT::i64, Op0, in ExpandLegalINT_TO_FP()
2388 DAG.getConstant(UINT64_C(0xfffffffffffff800), dl, MVT::i64)); in ExpandLegalINT_TO_FP()
2389 SDValue Or = DAG.getNode(ISD::OR, dl, MVT::i64, And, in ExpandLegalINT_TO_FP()
2390 DAG.getConstant(UINT64_C(0x800), dl, MVT::i64)); in ExpandLegalINT_TO_FP()
2391 SDValue And2 = DAG.getNode(ISD::AND, dl, MVT::i64, Op0, in ExpandLegalINT_TO_FP()
2392 DAG.getConstant(UINT64_C(0x7ff), dl, MVT::i64)); in ExpandLegalINT_TO_FP()
2393 SDValue Ne = DAG.getSetCC(dl, getSetCCResultType(MVT::i64), And2, in ExpandLegalINT_TO_FP()
2394 DAG.getConstant(UINT64_C(0), dl, MVT::i64), in ExpandLegalINT_TO_FP()
2396 SDValue Sel = DAG.getSelect(dl, MVT::i64, Ne, Or, Op0); in ExpandLegalINT_TO_FP()
2397 SDValue Ge = DAG.getSetCC(dl, getSetCCResultType(MVT::i64), Op0, in ExpandLegalINT_TO_FP()
2398 DAG.getConstant(UINT64_C(0x0020000000000000), dl, in ExpandLegalINT_TO_FP()
2401 SDValue Sel2 = DAG.getSelect(dl, MVT::i64, Ge, Sel, Op0); in ExpandLegalINT_TO_FP()
2404 SDValue Sh = DAG.getNode(ISD::SRL, dl, MVT::i64, Sel2, in ExpandLegalINT_TO_FP()
2405 DAG.getConstant(32, dl, SHVT)); in ExpandLegalINT_TO_FP()
2406 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32, Sh); in ExpandLegalINT_TO_FP()
2407 SDValue Fcvt = DAG.getNode(ISD::UINT_TO_FP, dl, MVT::f64, Trunc); in ExpandLegalINT_TO_FP()
2409 DAG.getConstantFP(BitsToDouble(UINT64_C(0x41f0000000000000)), dl, in ExpandLegalINT_TO_FP()
2411 SDValue Fmul = DAG.getNode(ISD::FMUL, dl, MVT::f64, TwoP32, Fcvt); in ExpandLegalINT_TO_FP()
2412 SDValue Lo = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32, Sel2); in ExpandLegalINT_TO_FP()
2413 SDValue Fcvt2 = DAG.getNode(ISD::UINT_TO_FP, dl, MVT::f64, Lo); in ExpandLegalINT_TO_FP()
2414 SDValue Fadd = DAG.getNode(ISD::FADD, dl, MVT::f64, Fmul, Fcvt2); in ExpandLegalINT_TO_FP()
2415 return DAG.getNode(ISD::FP_ROUND, dl, MVT::f32, Fadd, in ExpandLegalINT_TO_FP()
2416 DAG.getIntPtrConstant(0, dl)); in ExpandLegalINT_TO_FP()
2419 SDValue Tmp1 = DAG.getNode(ISD::SINT_TO_FP, dl, DestVT, Op0); in ExpandLegalINT_TO_FP()
2421 SDValue SignSet = DAG.getSetCC(dl, getSetCCResultType(Op0.getValueType()), in ExpandLegalINT_TO_FP()
2423 DAG.getConstant(0, dl, Op0.getValueType()), in ExpandLegalINT_TO_FP()
2425 SDValue Zero = DAG.getIntPtrConstant(0, dl), in ExpandLegalINT_TO_FP()
2426 Four = DAG.getIntPtrConstant(4, dl); in ExpandLegalINT_TO_FP()
2427 SDValue CstOffset = DAG.getSelect(dl, Zero.getValueType(), in ExpandLegalINT_TO_FP()
2449 CPIdx = DAG.getNode(ISD::ADD, dl, CPIdx.getValueType(), CPIdx, CstOffset); in ExpandLegalINT_TO_FP()
2454 MVT::f32, dl, DAG.getEntryNode(), CPIdx, in ExpandLegalINT_TO_FP()
2459 ISD::EXTLOAD, dl, DestVT, DAG.getEntryNode(), CPIdx, in ExpandLegalINT_TO_FP()
2467 return DAG.getNode(ISD::FADD, dl, DestVT, Tmp1, FudgeInReg); in ExpandLegalINT_TO_FP()
2477 const SDLoc &dl) { in PromoteLegalINT_TO_FP() argument
2506 return DAG.getNode(OpToUse, dl, DestVT, in PromoteLegalINT_TO_FP()
2508 dl, NewInTy, LegalOp)); in PromoteLegalINT_TO_FP()
2518 const SDLoc &dl) { in PromoteLegalFP_TO_INT() argument
2547 SDValue Operation = DAG.getNode(OpToUse, dl, NewOutTy, LegalOp); in PromoteLegalFP_TO_INT()
2551 return DAG.getNode(ISD::TRUNCATE, dl, DestVT, Operation); in PromoteLegalFP_TO_INT()
2555 SDValue SelectionDAGLegalize::ExpandBITREVERSE(SDValue Op, const SDLoc &dl) { in ExpandBITREVERSE() argument
2561 Tmp = DAG.getConstant(0, dl, VT); in ExpandBITREVERSE()
2565 DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(J - I, dl, SHVT)); in ExpandBITREVERSE()
2568 DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(I - J, dl, SHVT)); in ExpandBITREVERSE()
2572 Tmp2 = DAG.getNode(ISD::AND, dl, VT, Tmp2, DAG.getConstant(Shift, dl, VT)); in ExpandBITREVERSE()
2573 Tmp = DAG.getNode(ISD::OR, dl, VT, Tmp, Tmp2); in ExpandBITREVERSE()
2580 SDValue SelectionDAGLegalize::ExpandBSWAP(SDValue Op, const SDLoc &dl) { in ExpandBSWAP() argument
2587 Tmp2 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2588 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2589 return DAG.getNode(ISD::OR, dl, VT, Tmp1, Tmp2); in ExpandBSWAP()
2591 Tmp4 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(24, dl, SHVT)); in ExpandBSWAP()
2592 Tmp3 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2593 Tmp2 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2594 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(24, dl, SHVT)); in ExpandBSWAP()
2595 Tmp3 = DAG.getNode(ISD::AND, dl, VT, Tmp3, in ExpandBSWAP()
2596 DAG.getConstant(0xFF0000, dl, VT)); in ExpandBSWAP()
2597 Tmp2 = DAG.getNode(ISD::AND, dl, VT, Tmp2, DAG.getConstant(0xFF00, dl, VT)); in ExpandBSWAP()
2598 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp3); in ExpandBSWAP()
2599 Tmp2 = DAG.getNode(ISD::OR, dl, VT, Tmp2, Tmp1); in ExpandBSWAP()
2600 return DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp2); in ExpandBSWAP()
2602 Tmp8 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(56, dl, SHVT)); in ExpandBSWAP()
2603 Tmp7 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(40, dl, SHVT)); in ExpandBSWAP()
2604 Tmp6 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(24, dl, SHVT)); in ExpandBSWAP()
2605 Tmp5 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2606 Tmp4 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, dl, SHVT)); in ExpandBSWAP()
2607 Tmp3 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(24, dl, SHVT)); in ExpandBSWAP()
2608 Tmp2 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(40, dl, SHVT)); in ExpandBSWAP()
2609 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(56, dl, SHVT)); in ExpandBSWAP()
2610 Tmp7 = DAG.getNode(ISD::AND, dl, VT, Tmp7, in ExpandBSWAP()
2611 DAG.getConstant(255ULL<<48, dl, VT)); in ExpandBSWAP()
2612 Tmp6 = DAG.getNode(ISD::AND, dl, VT, Tmp6, in ExpandBSWAP()
2613 DAG.getConstant(255ULL<<40, dl, VT)); in ExpandBSWAP()
2614 Tmp5 = DAG.getNode(ISD::AND, dl, VT, Tmp5, in ExpandBSWAP()
2615 DAG.getConstant(255ULL<<32, dl, VT)); in ExpandBSWAP()
2616 Tmp4 = DAG.getNode(ISD::AND, dl, VT, Tmp4, in ExpandBSWAP()
2617 DAG.getConstant(255ULL<<24, dl, VT)); in ExpandBSWAP()
2618 Tmp3 = DAG.getNode(ISD::AND, dl, VT, Tmp3, in ExpandBSWAP()
2619 DAG.getConstant(255ULL<<16, dl, VT)); in ExpandBSWAP()
2620 Tmp2 = DAG.getNode(ISD::AND, dl, VT, Tmp2, in ExpandBSWAP()
2621 DAG.getConstant(255ULL<<8 , dl, VT)); in ExpandBSWAP()
2622 Tmp8 = DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp7); in ExpandBSWAP()
2623 Tmp6 = DAG.getNode(ISD::OR, dl, VT, Tmp6, Tmp5); in ExpandBSWAP()
2624 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp3); in ExpandBSWAP()
2625 Tmp2 = DAG.getNode(ISD::OR, dl, VT, Tmp2, Tmp1); in ExpandBSWAP()
2626 Tmp8 = DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp6); in ExpandBSWAP()
2627 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp2); in ExpandBSWAP()
2628 return DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp4); in ExpandBSWAP()
2634 const SDLoc &dl) { in ExpandBitCount() argument
2649 dl, VT); in ExpandBitCount()
2651 dl, VT); in ExpandBitCount()
2653 dl, VT); in ExpandBitCount()
2655 dl, VT); in ExpandBitCount()
2658 Op = DAG.getNode(ISD::SUB, dl, VT, Op, in ExpandBitCount()
2659 DAG.getNode(ISD::AND, dl, VT, in ExpandBitCount()
2660 DAG.getNode(ISD::SRL, dl, VT, Op, in ExpandBitCount()
2661 DAG.getConstant(1, dl, ShVT)), in ExpandBitCount()
2664 Op = DAG.getNode(ISD::ADD, dl, VT, in ExpandBitCount()
2665 DAG.getNode(ISD::AND, dl, VT, Op, Mask33), in ExpandBitCount()
2666 DAG.getNode(ISD::AND, dl, VT, in ExpandBitCount()
2667 DAG.getNode(ISD::SRL, dl, VT, Op, in ExpandBitCount()
2668 DAG.getConstant(2, dl, ShVT)), in ExpandBitCount()
2671 Op = DAG.getNode(ISD::AND, dl, VT, in ExpandBitCount()
2672 DAG.getNode(ISD::ADD, dl, VT, Op, in ExpandBitCount()
2673 DAG.getNode(ISD::SRL, dl, VT, Op, in ExpandBitCount()
2674 DAG.getConstant(4, dl, ShVT))), in ExpandBitCount()
2677 Op = DAG.getNode(ISD::SRL, dl, VT, in ExpandBitCount()
2678 DAG.getNode(ISD::MUL, dl, VT, Op, Mask01), in ExpandBitCount()
2679 DAG.getConstant(Len - 8, dl, ShVT)); in ExpandBitCount()
2685 return DAG.getNode(ISD::CTLZ, dl, Op.getValueType(), Op); in ExpandBitCount()
2692 SDValue CTLZ = DAG.getNode(ISD::CTLZ_ZERO_UNDEF, dl, VT, Op); in ExpandBitCount()
2693 SDValue Zero = DAG.getConstant(0, dl, VT); in ExpandBitCount()
2694 SDValue SrcIsZero = DAG.getSetCC(dl, SetCCVT, Op, Zero, ISD::SETEQ); in ExpandBitCount()
2695 return DAG.getNode(ISD::SELECT, dl, VT, SrcIsZero, in ExpandBitCount()
2696 DAG.getConstant(len, dl, VT), CTLZ); in ExpandBitCount()
2710 SDValue Tmp3 = DAG.getConstant(1ULL << i, dl, ShVT); in ExpandBitCount()
2711 Op = DAG.getNode(ISD::OR, dl, VT, Op, in ExpandBitCount()
2712 DAG.getNode(ISD::SRL, dl, VT, Op, Tmp3)); in ExpandBitCount()
2714 Op = DAG.getNOT(dl, Op, VT); in ExpandBitCount()
2715 return DAG.getNode(ISD::CTPOP, dl, VT, Op); in ExpandBitCount()
2719 return DAG.getNode(ISD::CTTZ, dl, Op.getValueType(), Op); in ExpandBitCount()
2726 SDValue Tmp3 = DAG.getNode(ISD::AND, dl, VT, in ExpandBitCount()
2727 DAG.getNOT(dl, Op, VT), in ExpandBitCount()
2728 DAG.getNode(ISD::SUB, dl, VT, Op, in ExpandBitCount()
2729 DAG.getConstant(1, dl, VT))); in ExpandBitCount()
2733 return DAG.getNode(ISD::SUB, dl, VT, in ExpandBitCount()
2734 DAG.getConstant(VT.getSizeInBits(), dl, VT), in ExpandBitCount()
2735 DAG.getNode(ISD::CTLZ, dl, VT, Tmp3)); in ExpandBitCount()
2736 return DAG.getNode(ISD::CTPOP, dl, VT, Tmp3); in ExpandBitCount()
2743 SDLoc dl(Node); in ExpandNode() local
2752 Tmp1 = ExpandBitCount(Node->getOpcode(), Node->getOperand(0), dl); in ExpandNode()
2756 Results.push_back(ExpandBITREVERSE(Node->getOperand(0), dl)); in ExpandNode()
2759 Results.push_back(ExpandBSWAP(Node->getOperand(0), dl)); in ExpandNode()
2764 Results.push_back(DAG.getConstant(0, dl, Node->getValueType(0))); in ExpandNode()
2767 Results.push_back(DAG.getConstant(1, dl, Node->getValueType(0))); in ExpandNode()
2782 DAG.getConstant(0, dl, Node->getValueType(0))); in ExpandNode()
2788 Results.push_back(DAG.getConstant(0, dl, MVT::i32)); in ExpandNode()
2793 SDValue Zero = DAG.getConstant(0, dl, Node->getValueType(0)); in ExpandNode()
2796 ISD::ATOMIC_CMP_SWAP, dl, cast<AtomicSDNode>(Node)->getMemoryVT(), VTs, in ExpandNode()
2808 SDValue Swap = DAG.getAtomic(ISD::ATOMIC_SWAP, dl, in ExpandNode()
2824 ISD::ATOMIC_CMP_SWAP, dl, cast<AtomicSDNode>(Node)->getMemoryVT(), VTs, in ExpandNode()
2839 LHS = DAG.getNode(ISD::AssertSext, dl, OuterType, Res, in ExpandNode()
2841 RHS = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, OuterType, in ExpandNode()
2846 LHS = DAG.getNode(ISD::AssertZext, dl, OuterType, Res, in ExpandNode()
2848 RHS = DAG.getNode(ISD::ZERO_EXTEND, dl, OuterType, Node->getOperand(2)); in ExpandNode()
2852 LHS = DAG.getZeroExtendInReg(Res, dl, AtomicType); in ExpandNode()
2853 RHS = DAG.getNode(ISD::ZERO_EXTEND, dl, OuterType, Node->getOperand(2)); in ExpandNode()
2860 DAG.getSetCC(dl, Node->getValueType(1), LHS, RHS, ISD::SETEQ); in ExpandNode()
2877 Results.push_back(DAG.getConstant(0, dl, VT)); in ExpandNode()
2880 Results.push_back(DAG.getConstantFP(0, dl, VT)); in ExpandNode()
2887 Node->getValueType(0), dl); in ExpandNode()
2893 Node->getValueType(0), dl); in ExpandNode()
2906 SDValue ShiftCst = DAG.getConstant(BitsDiff, dl, ShiftAmountTy); in ExpandNode()
2907 Tmp1 = DAG.getNode(ISD::SHL, dl, Node->getValueType(0), in ExpandNode()
2909 Tmp1 = DAG.getNode(ISD::SRA, dl, Node->getValueType(0), Tmp1, ShiftCst); in ExpandNode()
2922 Node->getValueType(0), dl); in ExpandNode()
2929 Node->getOperand(0), Node->getValueType(0), dl); in ExpandNode()
2944 Tmp1 = DAG.getConstantFP(apf, dl, VT); in ExpandNode()
2945 Tmp2 = DAG.getSetCC(dl, getSetCCResultType(VT), in ExpandNode()
2948 True = DAG.getNode(ISD::FP_TO_SINT, dl, NVT, Node->getOperand(0)); in ExpandNode()
2950 False = DAG.getNode(ISD::FP_TO_SINT, dl, NVT, in ExpandNode()
2951 DAG.getNode(ISD::FSUB, dl, VT, in ExpandNode()
2953 False = DAG.getNode(ISD::XOR, dl, NVT, False, in ExpandNode()
2954 DAG.getConstant(x, dl, NVT)); in ExpandNode()
2955 Tmp1 = DAG.getSelect(dl, NVT, Tmp2, True, False); in ExpandNode()
2969 Tmp1 = DAG.getNode(ISD::BITCAST, dl, Node->getValueType(0), in ExpandNode()
2991 Node->getOperand(2), dl)); in ExpandNode()
3021 Op0 = DAG.getNode(ISD::BITCAST, dl, NewVT, Op0); in ExpandNode()
3022 Op1 = DAG.getNode(ISD::BITCAST, dl, NewVT, Op1); in ExpandNode()
3056 ISD::EXTRACT_VECTOR_ELT, dl, EltVT, Op0, in ExpandNode()
3057 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout())))); in ExpandNode()
3060 ISD::EXTRACT_VECTOR_ELT, dl, EltVT, Op1, in ExpandNode()
3061 DAG.getConstant(Idx - NumElems, dl, in ExpandNode()
3065 Tmp1 = DAG.getNode(ISD::BUILD_VECTOR, dl, VT, Ops); in ExpandNode()
3067 Tmp1 = DAG.getNode(ISD::BITCAST, dl, Node->getValueType(0), Tmp1); in ExpandNode()
3075 Tmp1 = DAG.getNode(ISD::SRL, dl, OpTy, Node->getOperand(0), in ExpandNode()
3076 DAG.getConstant(OpTy.getSizeInBits() / 2, dl, in ExpandNode()
3080 Tmp1 = DAG.getNode(ISD::TRUNCATE, dl, Node->getValueType(0), Tmp1); in ExpandNode()
3083 Tmp1 = DAG.getNode(ISD::TRUNCATE, dl, Node->getValueType(0), in ExpandNode()
3093 Results.push_back(DAG.getCopyFromReg(Node->getOperand(0), dl, SP, in ExpandNode()
3105 Results.push_back(DAG.getCopyToReg(Node->getOperand(0), dl, SP, in ExpandNode()
3112 Results.push_back(DAG.getConstant(0, dl, Node->getValueType(0))); in ExpandNode()
3120 Tmp1 = DAG.getConstantFP(-0.0, dl, Node->getValueType(0)); in ExpandNode()
3122 Tmp1 = DAG.getNode(ISD::FSUB, dl, Node->getValueType(0), Tmp1, in ExpandNode()
3144 Tmp1 = DAG.getSelectCC(dl, Tmp1, Tmp2, Tmp1, Tmp2, Pred); in ExpandNode()
3158 Tmp1 = DAG.getNode(ISD::FSINCOS, dl, VTs, Node->getOperand(0)); in ExpandNode()
3174 DAG.getNode(ISD::FP16_TO_FP, dl, MVT::f32, Node->getOperand(0)); in ExpandNode()
3176 DAG.getNode(ISD::FP_EXTEND, dl, Node->getValueType(0), Res)); in ExpandNode()
3187 SDValue FloatVal = DAG.getNode(ISD::FP_ROUND, dl, MVT::f32, Op, in ExpandNode()
3188 DAG.getIntPtrConstant(0, dl)); in ExpandNode()
3190 DAG.getNode(ISD::FP_TO_FP16, dl, Node->getValueType(0), FloatVal)); in ExpandNode()
3212 Tmp1 = DAG.getNode(ISD::FNEG, dl, VT, Node->getOperand(1)); in ExpandNode()
3213 Tmp1 = DAG.getNode(ISD::FADD, dl, VT, Node->getOperand(0), Tmp1, Flags); in ExpandNode()
3223 Tmp1 = DAG.getNode(ISD::XOR, dl, VT, Node->getOperand(1), in ExpandNode()
3224 DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), dl, in ExpandNode()
3226 Tmp1 = DAG.getNode(ISD::ADD, dl, VT, Tmp1, DAG.getConstant(1, dl, VT)); in ExpandNode()
3227 Results.push_back(DAG.getNode(ISD::ADD, dl, VT, Node->getOperand(0), Tmp1)); in ExpandNode()
3240 Tmp1 = DAG.getNode(DivRemOpc, dl, VTs, Tmp2, Tmp3).getValue(1); in ExpandNode()
3244 Tmp1 = DAG.getNode(DivOpc, dl, VT, Tmp2, Tmp3); in ExpandNode()
3245 Tmp1 = DAG.getNode(ISD::MUL, dl, VT, Tmp1, Tmp3); in ExpandNode()
3246 Tmp1 = DAG.getNode(ISD::SUB, dl, VT, Tmp2, Tmp1); in ExpandNode()
3258 Tmp1 = DAG.getNode(DivRemOpc, dl, VTs, Node->getOperand(0), in ExpandNode()
3272 Tmp1 = DAG.getNode(ExpandOpcode, dl, VTs, Node->getOperand(0), in ExpandNode()
3300 Results.push_back(DAG.getNode(OpToUse, dl, VTs, Node->getOperand(0), in ExpandNode()
3312 Lo = DAG.getNode(ISD::ZERO_EXTEND, dl, VT, Lo); in ExpandNode()
3313 Hi = DAG.getNode(ISD::ANY_EXTEND, dl, VT, Hi); in ExpandNode()
3315 DAG.getConstant(HalfType.getSizeInBits(), dl, in ExpandNode()
3317 Hi = DAG.getNode(ISD::SHL, dl, VT, Hi, Shift); in ExpandNode()
3318 Results.push_back(DAG.getNode(ISD::OR, dl, VT, Lo, Hi)); in ExpandNode()
3327 ISD::ADD : ISD::SUB, dl, LHS.getValueType(), in ExpandNode()
3333 SDValue Zero = DAG.getConstant(0, dl, LHS.getValueType()); in ExpandNode()
3344 SDValue LHSSign = DAG.getSetCC(dl, OType, LHS, Zero, ISD::SETGE); in ExpandNode()
3345 SDValue RHSSign = DAG.getSetCC(dl, OType, RHS, Zero, ISD::SETGE); in ExpandNode()
3346 SDValue SignsMatch = DAG.getSetCC(dl, OType, LHSSign, RHSSign, in ExpandNode()
3350 SDValue SumSign = DAG.getSetCC(dl, OType, Sum, Zero, ISD::SETGE); in ExpandNode()
3351 SDValue SumSignNE = DAG.getSetCC(dl, OType, LHSSign, SumSign, ISD::SETNE); in ExpandNode()
3353 SDValue Cmp = DAG.getNode(ISD::AND, dl, OType, SignsMatch, SumSignNE); in ExpandNode()
3354 Results.push_back(DAG.getBoolExtOrTrunc(Cmp, dl, ResultType, ResultType)); in ExpandNode()
3362 ISD::ADD : ISD::SUB, dl, LHS.getValueType(), in ExpandNode()
3370 SDValue SetCC = DAG.getSetCC(dl, SetCCType, Sum, LHS, CC); in ExpandNode()
3372 Results.push_back(DAG.getBoolExtOrTrunc(SetCC, dl, ResultType, ResultType)); in ExpandNode()
3388 BottomHalf = DAG.getNode(ISD::MUL, dl, VT, LHS, RHS); in ExpandNode()
3389 TopHalf = DAG.getNode(Ops[isSigned][0], dl, VT, LHS, RHS); in ExpandNode()
3391 BottomHalf = DAG.getNode(Ops[isSigned][1], dl, DAG.getVTList(VT, VT), LHS, in ExpandNode()
3395 LHS = DAG.getNode(Ops[isSigned][2], dl, WideVT, LHS); in ExpandNode()
3396 RHS = DAG.getNode(Ops[isSigned][2], dl, WideVT, RHS); in ExpandNode()
3397 Tmp1 = DAG.getNode(ISD::MUL, dl, WideVT, LHS, RHS); in ExpandNode()
3398 BottomHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Tmp1, in ExpandNode()
3399 DAG.getIntPtrConstant(0, dl)); in ExpandNode()
3400 TopHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Tmp1, in ExpandNode()
3401 DAG.getIntPtrConstant(1, dl)); in ExpandNode()
3422 DAG.getNode(ISD::SRA, dl, VT, RHS, in ExpandNode()
3423 DAG.getConstant(LoSize - 1, dl, in ExpandNode()
3426 DAG.getNode(ISD::SRA, dl, VT, LHS, in ExpandNode()
3427 DAG.getConstant(LoSize - 1, dl, in ExpandNode()
3435 SDValue Ret = ExpandLibCall(LC, WideVT, Args, 4, isSigned, dl); in ExpandNode()
3436 BottomHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Ret, in ExpandNode()
3437 DAG.getIntPtrConstant(0, dl)); in ExpandNode()
3438 TopHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Ret, in ExpandNode()
3439 DAG.getIntPtrConstant(1, dl)); in ExpandNode()
3450 VT.getSizeInBits() - 1, dl, in ExpandNode()
3452 Tmp1 = DAG.getNode(ISD::SRA, dl, VT, BottomHalf, Tmp1); in ExpandNode()
3453 TopHalf = DAG.getSetCC(dl, getSetCCResultType(VT), TopHalf, Tmp1, in ExpandNode()
3456 TopHalf = DAG.getSetCC(dl, getSetCCResultType(VT), TopHalf, in ExpandNode()
3457 DAG.getConstant(0, dl, VT), ISD::SETNE); in ExpandNode()
3465 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, PairTy, Node->getOperand(0)); in ExpandNode()
3466 Tmp2 = DAG.getNode(ISD::ANY_EXTEND, dl, PairTy, Node->getOperand(1)); in ExpandNode()
3468 ISD::SHL, dl, PairTy, Tmp2, in ExpandNode()
3469 DAG.getConstant(PairTy.getSizeInBits() / 2, dl, in ExpandNode()
3471 Results.push_back(DAG.getNode(ISD::OR, dl, PairTy, Tmp1, Tmp2)); in ExpandNode()
3479 Tmp1 = DAG.getSelectCC(dl, Tmp1.getOperand(0), Tmp1.getOperand(1), in ExpandNode()
3483 Tmp1 = DAG.getSelectCC(dl, Tmp1, in ExpandNode()
3484 DAG.getConstant(0, dl, Tmp1.getValueType()), in ExpandNode()
3500 Index = DAG.getNode(ISD::MUL, dl, Index.getValueType(), Index, in ExpandNode()
3501 DAG.getConstant(EntrySize, dl, Index.getValueType())); in ExpandNode()
3502 SDValue Addr = DAG.getNode(ISD::ADD, dl, Index.getValueType(), in ExpandNode()
3507 ISD::SEXTLOAD, dl, PTy, Chain, Addr, in ExpandNode()
3515 Addr = DAG.getNode(ISD::ADD, dl, PTy, Addr, in ExpandNode()
3518 Tmp1 = DAG.getNode(ISD::BRIND, dl, MVT::Other, LD.getValue(1), Addr); in ExpandNode()
3528 Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other, in ExpandNode()
3535 DAG.getNode(ISD::AND, dl, Tmp2.getValueType(), Tmp2, in ExpandNode()
3536 DAG.getConstant(1, dl, Tmp2.getValueType())); in ExpandNode()
3537 Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other, Tmp1, in ExpandNode()
3539 DAG.getConstant(0, dl, Tmp3.getValueType()), in ExpandNode()
3549 Tmp3, NeedInvert, dl); in ExpandNode()
3555 Tmp1 = DAG.getNode(ISD::SETCC, dl, Node->getValueType(0), in ExpandNode()
3561 Tmp1 = DAG.getLogicalNOT(dl, Tmp1, Tmp1->getValueType(0)); in ExpandNode()
3580 Tmp1 = DAG.getNode(ISD::SELECT_CC, dl, VT, Tmp1, Tmp2, in ExpandNode()
3581 DAG.getConstant(TrueValue, dl, VT), in ExpandNode()
3582 DAG.getConstant(0, dl, VT), in ExpandNode()
3605 SDValue Cond = DAG.getNode(ISD::SETCC, dl, CCVT, Tmp1, Tmp2, CC); in ExpandNode()
3606 Results.push_back(DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4)); in ExpandNode()
3620 Tmp1 = DAG.getSelectCC(dl, Tmp1, Tmp2, Tmp4, Tmp3, InvCC); in ExpandNode()
3629 Tmp1 = DAG.getSelectCC(dl, Tmp2, Tmp1, Tmp4, Tmp3, SwapInvCC); in ExpandNode()
3636 dl); in ExpandNode()
3648 Tmp1 = DAG.getNode(ISD::SELECT_CC, dl, Node->getValueType(0), in ExpandNode()
3651 Tmp2 = DAG.getConstant(0, dl, Tmp1.getValueType()); in ExpandNode()
3653 Tmp1 = DAG.getNode(ISD::SELECT_CC, dl, Node->getValueType(0), Tmp1, in ExpandNode()
3667 Tmp2.getValueType()), Tmp2, Tmp3, Tmp4, NeedInvert, dl); in ExpandNode()
3674 Tmp4 = DAG.getNOT(dl, Tmp4, Tmp4->getValueType(0)); in ExpandNode()
3679 Tmp1 = DAG.getNode(ISD::BR_CC, dl, Node->getValueType(0), Tmp1, in ExpandNode()
3682 Tmp3 = DAG.getConstant(0, dl, Tmp2.getValueType()); in ExpandNode()
3684 Tmp1 = DAG.getNode(ISD::BR_CC, dl, Node->getValueType(0), Tmp1, Tmp4, in ExpandNode()
3705 ISD::EXTRACT_VECTOR_ELT, dl, VT.getScalarType(), Node->getOperand(0), in ExpandNode()
3706 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout()))); in ExpandNode()
3708 ISD::EXTRACT_VECTOR_ELT, dl, VT.getScalarType(), Node->getOperand(1), in ExpandNode()
3709 DAG.getConstant(Idx, dl, TLI.getVectorIdxTy(DAG.getDataLayout()))); in ExpandNode()
3710 Scalars.push_back(DAG.getNode(Node->getOpcode(), dl, in ExpandNode()
3714 DAG.getNode(ISD::BUILD_VECTOR, dl, Node->getValueType(0), Scalars); in ExpandNode()
3741 SDLoc dl(Node); in ConvertNodeToLibcall() local
3751 CLI.setDebugLoc(dl) in ConvertNodeToLibcall()
3791 CLI.setDebugLoc(dl) in ConvertNodeToLibcall()
4007 SDLoc dl(Node); in PromoteNode() local
4016 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4023 Tmp1 = DAG.getNode(ISD::OR, dl, NVT, Tmp1, in PromoteNode()
4024 DAG.getConstant(TopBit, dl, NVT)); in PromoteNode()
4028 Tmp1 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1); in PromoteNode()
4032 Tmp1 = DAG.getNode(ISD::SUB, dl, NVT, Tmp1, in PromoteNode()
4034 OVT.getSizeInBits(), dl, NVT)); in PromoteNode()
4036 Results.push_back(DAG.getNode(ISD::TRUNCATE, dl, OVT, Tmp1)); in PromoteNode()
4040 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4041 Tmp1 = DAG.getNode(ISD::BSWAP, dl, NVT, Tmp1); in PromoteNode()
4043 ISD::SRL, dl, NVT, Tmp1, in PromoteNode()
4044 DAG.getConstant(DiffBits, dl, in PromoteNode()
4052 Node->getOpcode() == ISD::FP_TO_SINT, dl); in PromoteNode()
4058 Node->getOpcode() == ISD::SINT_TO_FP, dl); in PromoteNode()
4075 Tmp1 = DAG.getVAArg(NVT, dl, Chain, Ptr, Node->getOperand(2), in PromoteNode()
4079 Tmp2 = DAG.getNode(TruncOp, dl, OVT, Tmp1); in PromoteNode()
4105 Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(0)); in PromoteNode()
4106 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1)); in PromoteNode()
4108 Tmp1 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2); in PromoteNode()
4109 Results.push_back(DAG.getNode(TruncOp, dl, OVT, Tmp1)); in PromoteNode()
4127 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1)); in PromoteNode()
4128 Tmp3 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(2)); in PromoteNode()
4130 Tmp1 = DAG.getSelect(dl, NVT, Tmp1, Tmp2, Tmp3); in PromoteNode()
4132 Tmp1 = DAG.getNode(TruncOp, dl, Node->getValueType(0), Tmp1); in PromoteNode()
4134 Tmp1 = DAG.getNode(TruncOp, dl, Node->getValueType(0), Tmp1, in PromoteNode()
4135 DAG.getIntPtrConstant(0, dl)); in PromoteNode()
4143 Tmp1 = DAG.getNode(ISD::BITCAST, dl, NVT, Node->getOperand(0)); in PromoteNode()
4144 Tmp2 = DAG.getNode(ISD::BITCAST, dl, NVT, Node->getOperand(1)); in PromoteNode()
4147 Tmp1 = ShuffleWithNarrowerEltType(NVT, OVT, dl, Tmp1, Tmp2, Mask); in PromoteNode()
4148 Tmp1 = DAG.getNode(ISD::BITCAST, dl, OVT, Tmp1); in PromoteNode()
4159 Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(0)); in PromoteNode()
4160 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1)); in PromoteNode()
4161 Results.push_back(DAG.getNode(ISD::SETCC, dl, Node->getValueType(0), in PromoteNode()
4172 Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(2)); in PromoteNode()
4173 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(3)); in PromoteNode()
4174 Results.push_back(DAG.getNode(ISD::BR_CC, dl, Node->getValueType(0), in PromoteNode()
4187 Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4188 Tmp2 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(1)); in PromoteNode()
4189 Tmp3 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2, in PromoteNode()
4191 Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT, in PromoteNode()
4192 Tmp3, DAG.getIntPtrConstant(0, dl))); in PromoteNode()
4196 Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4197 Tmp2 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(1)); in PromoteNode()
4198 Tmp3 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(2)); in PromoteNode()
4200 DAG.getNode(ISD::FP_ROUND, dl, OVT, in PromoteNode()
4201 DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2, Tmp3), in PromoteNode()
4202 DAG.getIntPtrConstant(0, dl))); in PromoteNode()
4207 Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4209 Tmp3 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2); in PromoteNode()
4217 Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT, in PromoteNode()
4218 Tmp3, DAG.getIntPtrConstant(isTrunc, dl))); in PromoteNode()
4237 Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0)); in PromoteNode()
4238 Tmp2 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1); in PromoteNode()
4239 Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT, in PromoteNode()
4240 Tmp2, DAG.getIntPtrConstant(0, dl))); in PromoteNode()