Home | History | Annotate | Download | only in SelectionDAG

Lines Matching refs:dag

53   SelectionDAG &DAG;
62 return TLI.getSetCCResultType(*DAG.getContext(), VT);
68 explicit SelectionDAGLegalize(SelectionDAG &DAG);
163 DAG.RemoveDeadNode(N);
169 DAG.ReplaceAllUsesWith(Old, New);
173 DAG.ReplaceAllUsesWith(Old, New);
177 DAG.ReplaceAllUsesWith(Old, New);
198 return DAG.getVectorShuffle(NVT, dl, N1, N2, &Mask[0]);
212 return DAG.getVectorShuffle(NVT, dl, N1, N2, &NewMask[0]);
215 SelectionDAGLegalize::SelectionDAGLegalize(SelectionDAG &dag)
216 : SelectionDAG::DAGUpdateListener(dag),
217 TM(dag.getTarget()), TLI(dag.getTargetLoweringInfo()),
218 DAG(dag) {
222 DAG.AssignTopologicalOrder();
230 for (LegalizePosition = DAG.allnodes_end();
231 LegalizePosition != DAG.allnodes_begin(); ) {
246 DAG.RemoveDeadNodes();
266 return DAG.getConstant(LLVMC->getValueAPF().bitcastToAPInt(),
279 Type *SType = SVT.getTypeForEVT(*DAG.getContext());
286 SDValue CPIdx = DAG.getConstantPool(LLVMC, TLI.getPointerTy());
290 DAG.getExtLoad(ISD::EXTLOAD, dl, OrigVT,
291 DAG.getEntryNode(),
297 DAG.getLoad(OrigVT, dl, DAG.getEntryNode(), CPIdx,
304 static void ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG,
317 EVT intVT = EVT::getIntegerVT(*DAG.getContext(), VT.getSizeInBits());
322 SDValue Result = DAG.getNode(ISD::BITCAST, dl, intVT, Val);
323 Result = DAG.getStore(Chain, dl, Result, Ptr, ST->getPointerInfo(),
332 TLI.getRegisterType(*DAG.getContext(),
333 EVT::getIntegerVT(*DAG.getContext(),
340 SDValue StackPtr = DAG.CreateStackTemporary(StoredVT, RegVT);
343 SDValue Store = DAG.getTruncStore(Chain, dl,
346 SDValue Increment = DAG.getConstant(RegBytes, TLI.getPointerTy());
353 SDValue Load = DAG.getLoad(RegVT, dl, Store, StackPtr,
357 Stores.push_back(DAG.getStore(Load.getValue(1), dl, Load, Ptr,
363 StackPtr = DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr,
365 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, Increment);
371 EVT MemVT = EVT::getIntegerVT(*DAG.getContext(),
375 SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, RegVT, Store, StackPtr,
379 Stores.push_back(DAG.getTruncStore(Load.getValue(1), dl, Load, Ptr,
387 DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &Stores[0],
396 EVT NewStoredVT = ST->getMemoryVT().getHalfSizedIntegerVT(*DAG.getContext());
401 SDValue ShiftAmount = DAG
404 SDValue Hi = DAG.getNode(ISD::SRL, dl, VT, Val, ShiftAmount);
408 Store1 = DAG.getTruncStore(Chain, dl, TLI.isLittleEndian()?Lo:Hi, Ptr,
411 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
412 DAG.getConstant(IncrementSize, TLI.getPointerTy()));
414 Store2 = DAG.getTruncStore(Chain, dl, TLI.isLittleEndian()?Hi:Lo, Ptr,
420 DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Store1, Store2);
426 ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG,
437 EVT intVT = EVT::getIntegerVT(*DAG.getContext(), LoadedVT.getSizeInBits());
441 SDValue newLoad = DAG.getLoad(intVT, dl, Chain, Ptr, LD->getPointerInfo(),
445 SDValue Result = DAG.getNode(ISD::BITCAST, dl, LoadedVT, newLoad);
447 Result = DAG.getNode(VT.isFloatingPoint() ? ISD::FP_EXTEND :
457 MVT RegVT = TLI.getRegisterType(*DAG.getContext(), intVT);
463 SDValue StackBase = DAG.CreateStackTemporary(LoadedVT, RegVT);
465 SDValue Increment = DAG.getConstant(RegBytes, TLI.getPointerTy());
473 SDValue Load = DAG.getLoad(RegVT, dl, Chain, Ptr,
479 Stores.push_back(DAG.getStore(Load.getValue(1), dl, Load, StackPtr,
483 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr, Increment);
484 StackPtr = DAG.getNode(ISD::ADD, dl, StackPtr.getValueType(), StackPtr,
489 EVT MemVT = EVT::getIntegerVT(*DAG.getContext(),
491 SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, RegVT, Chain, Ptr,
499 Stores.push_back(DAG.getTruncStore(Load.getValue(1), dl, Load, StackPtr,
504 SDValue TF = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, &Stores[0],
508 Load = DAG.getExtLoad(LD->getExtensionType(), dl, VT, TF, StackBase,
523 NewLoadedVT = EVT::getIntegerVT(*DAG.getContext(), NumBits/2);
537 Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, VT, Chain, Ptr, LD->getPointerInfo(),
540 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
541 DAG.getConstant(IncrementSize, TLI.getPointerTy()));
542 Hi = DAG.getExtLoad(HiExtType, dl, VT, Chain, Ptr,
547 Hi = DAG.getExtLoad(HiExtType, dl, VT, Chain, Ptr, LD->getPointerInfo(),
550 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
551 DAG.getConstant(IncrementSize, TLI.getPointerTy()));
552 Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, VT, Chain, Ptr,
559 SDValue ShiftAmount = DAG.getConstant(NumBits,
561 SDValue Result = DAG.getNode(ISD::SHL, dl, VT, Hi, ShiftAmount);
562 Result = DAG.getNode(ISD::OR, dl, VT, Result, Lo);
564 SDValue TF = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1),
592 SDValue StackPtr = DAG.CreateStackTemporary(VT);
597 SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Tmp1, StackPtr,
603 Tmp3 = DAG.getNode(CastOpc, dl, PtrVT, Tmp3);
606 Tmp3 = DAG.getNode(ISD::MUL, dl, IdxVT, Tmp3,DAG.getConstant(EltSize, IdxVT));
607 SDValue StackPtr2 = DAG.getNode(ISD::ADD, dl, IdxVT, Tmp3, StackPtr);
609 Ch = DAG.getTruncStore(Ch, dl, Tmp2, StackPtr2, MachinePointerInfo(), EltVT,
612 return DAG.getLoad(VT, dl, Ch, StackPtr,
627 SDValue ScVec = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl,
638 return DAG.getVectorShuffle(Vec.getValueType(), dl, Vec, ScVec,
648 // FIXME: move this to the DAG Combiner! Note that we can't regress due
649 // to phase ordering between legalized code and the dag combiner. This
650 // probably means that we need to integrate dag combiner and legalizer
662 SDValue Con = DAG.getConstant(CFP->getValueAPF().
665 return DAG.getStore(Chain, dl, Con, Ptr, ST->getPointerInfo(),
672 SDValue Con = DAG.getConstant(CFP->getValueAPF().bitcastToAPInt().
674 return DAG.getStore(Chain, dl, Con, Ptr, ST->getPointerInfo(),
683 SDValue Lo = DAG.getConstant(IntVal.trunc(32), MVT::i32);
684 SDValue Hi = DAG.getConstant(IntVal.lshr(32).trunc(32), MVT::i32);
687 Lo = DAG.getStore(Chain, dl, Lo, Ptr, ST->getPointerInfo(), isVolatile,
689 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
690 DAG.getIntPtrConstant(4));
691 Hi = DAG.getStore(Chain, dl, Hi, Ptr,
695 return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi);
727 Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext());
731 DAG, TLI, this);
735 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG);
744 Value = DAG.getNode(ISD::BITCAST, dl, NVT, Value);
746 DAG.getStore(Chain, dl, Value, Ptr,
765 EVT NVT = EVT::getIntegerVT(*DAG.getContext(),
767 Value = DAG.getZeroExtendInReg(Value, dl, StVT);
769 DAG.getTruncStore(Chain, dl, Value, Ptr, ST->getPointerInfo(),
781 EVT RoundVT = EVT::getIntegerVT(*DAG.getContext(), RoundWidth);
782 EVT ExtraVT = EVT::getIntegerVT(*DAG.getContext(), ExtraWidth);
789 Lo = DAG.getTruncStore(Chain, dl, Value, Ptr, ST->getPointerInfo(),
795 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
796 DAG.getIntPtrConstant(IncrementSize));
797 Hi = DAG.getNode(ISD::SRL, dl, Value.getValueType(), Value,
798 DAG.getConstant(RoundWidth,
800 Hi = DAG.getTruncStore(Chain, dl, Hi, Ptr,
808 Hi = DAG.getNode(ISD::SRL, dl, Value.getValueType(), Value,
809 DAG.getConstant(ExtraWidth,
811 Hi = DAG.getTruncStore(Chain, dl, Hi, Ptr, ST->getPointerInfo(),
816 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
817 DAG.getIntPtrConstant(IncrementSize));
818 Lo = DAG.getTruncStore(Chain, dl, Value, Ptr,
825 SDValue Result = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo, Hi);
835 Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext());
838 ExpandUnalignedStore(cast<StoreSDNode>(Node), DAG, TLI, this);
842 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG);
854 Value = DAG.getNode(ISD::TRUNCATE, dl, StVT, Value);
856 DAG.getStore(Chain, dl, Value, Ptr, ST->getPointerInfo(),
884 Type *Ty = LD->getMemoryVT().getTypeForEVT(*DAG.getContext());
888 ExpandUnalignedLoad(cast<LoadSDNode>(Node), DAG, TLI, RVal, RChain);
893 SDValue Res = TLI.LowerOperation(RVal, DAG);
905 SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(),
908 RVal = DAG.getNode(ISD::BITCAST, dl, VT, Res);
915 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 0), RVal);
916 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), RChain);
941 EVT NVT = EVT::getIntegerVT(*DAG.getContext(), NewWidth);
951 DAG.getExtLoad(NewExtType, dl, Node->getValueType(0),
959 Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl,
961 Result, DAG.getValueType(SrcVT));
964 Result = DAG.getNode(ISD::AssertZext, dl,
966 DAG.getValueType(SrcVT));
979 EVT RoundVT = EVT::getIntegerVT(*DAG.getContext(), RoundWidth);
980 EVT ExtraVT = EVT::getIntegerVT(*DAG.getContext(), ExtraWidth);
987 Lo = DAG.getExtLoad(ISD::ZEXTLOAD, dl, Node->getValueType(0),
994 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
995 DAG.getIntPtrConstant(IncrementSize));
996 Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Chain, Ptr,
1003 Ch = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1),
1007 Hi = DAG.getNode(ISD::SHL, dl, Hi.getValueType(), Hi,
1008 DAG.getConstant(RoundWidth,
1012 Value = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi);
1017 Hi = DAG.getExtLoad(ExtType, dl, Node->getValueType(0), Chain, Ptr,
1023 Ptr = DAG.getNode(ISD::ADD, dl, Ptr.getValueType(), Ptr,
1024 DAG.getIntPtrConstant(IncrementSize));
1025 Lo = DAG.getExtLoad(ISD::ZEXTLOAD,
1033 Ch = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Lo.getValue(1),
1037 Hi = DAG.getNode(ISD::SHL, dl, Hi.getValueType(), Hi,
1038 DAG.getConstant(ExtraWidth,
1042 Value = DAG.getNode(ISD::OR, dl, Node->getValueType(0), Lo, Hi);
1058 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG);
1068 LD->getMemoryVT().getTypeForEVT(*DAG.getContext());
1073 DAG, TLI, Value, Chain);
1081 SDValue Load = DAG.getLoad(SrcVT, dl, Chain, Ptr,
1095 Value = DAG.getNode(ExtendOp, dl, Node->getValueType(0), Load);
1111 SDValue Result = DAG.getExtLoad(ISD::EXTLOAD, dl, Node->getValueType(0),
1117 ValRes = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl,
1119 Result, DAG.getValueType(SrcVT));
1121 ValRes = DAG.getZeroExtendInReg(Result, dl, SrcVT.getScalarType());
1132 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 0), Value);
1133 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), Chain);
1145 assert(TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i)) ==
1150 assert((TLI.getTypeAction(*DAG.getContext(),
1256 NewVal = DAG.getNode(ISD::TRAP, SDLoc(Node), Node->getVTList(),
1286 DAG.getShiftAmountOperand(Node->getOperand(0).getValueType(),
1290 NewNode = DAG.UpdateNodeOperands(Node, Node->getOperand(0),
1301 DAG.getShiftAmountOperand(Node->getOperand(0).getValueType(),
1305 NewNode = DAG.UpdateNodeOperands(Node, Node->getOperand(0),
1313 DAG.ReplaceAllUsesWith(Node, NewNode);
1315 DAG.TransferDbgValues(SDValue(Node, i), SDValue(NewNode, i));
1325 SDValue Res = TLI.LowerOperation(SDValue(Node, 0), DAG);
1335 DAG.ReplaceAllUsesWith(Node, ResultVals.data());
1337 DAG.TransferDbgValues(SDValue(Node, i), ResultVals[i]);
1357 Node->dump( &DAG);
1379 SDValue StackPtr = DAG.CreateStackTemporary(Vec.getValueType());
1380 SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr,
1386 Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx,
1387 DAG.getConstant(EltSize, Idx.getValueType()));
1390 Idx = DAG.getNode(ISD::TRUNCATE, dl, TLI.getPointerTy(), Idx);
1392 Idx = DAG.getNode(ISD::ZERO_EXTEND, dl, TLI.getPointerTy(), Idx);
1394 StackPtr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(), Idx, StackPtr);
1397 return DAG.getLoad(Op.getValueType(), dl, Ch, StackPtr,MachinePointerInfo(),
1399 return DAG.getExtLoad(ISD::EXTLOAD, dl, Op.getValueType(), Ch, StackPtr,
1415 SDValue StackPtr = DAG.CreateStackTemporary(Vec.getValueType());
1420 SDValue Ch = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, PtrInfo,
1429 Idx = DAG.getNode(ISD::MUL, dl, Idx.getValueType(), Idx,
1430 DAG.getConstant(EltSize, Idx.getValueType()));
1433 Idx = DAG.getNode(ISD::TRUNCATE, dl, TLI.getPointerTy(), Idx);
1435 Idx = DAG.getNode(ISD::ZERO_EXTEND, dl, TLI.getPointerTy(), Idx);
1437 SDValue SubStackPtr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(), Idx,
1441 Ch = DAG.getStore(DAG.getEntryNode(), dl, Part, SubStackPtr,
1445 return DAG.getLoad(Op.getValueType(), dl, Ch, StackPtr, PtrInfo,
1457 SDValue FIPtr = DAG.CreateStackTemporary(VT);
1471 SDValue Idx = DAG.getConstant(Offset, FIPtr.getValueType());
1472 Idx = DAG.getNode(ISD::ADD, dl, FIPtr.getValueType(), FIPtr, Idx);
1477 Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl,
1482 Stores.push_back(DAG.getStore(DAG.getEntryNode(), dl,
1490 StoreChain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other,
1493 StoreChain = DAG.getEntryNode();
1496 return DAG.getLoad(VT, dl, StoreChain, FIPtr, PtrInfo,
1509 EVT IVT = EVT::getIntegerVT(*DAG.getContext(), FloatVT.getSizeInBits());
1512 SignBit = DAG.getNode(ISD::BITCAST, dl, IVT, Tmp2);
1517 SDValue StackPtr = DAG.CreateStackTemporary(FloatVT, LoadTy);
1520 DAG.getStore(DAG.getEntryNode(), dl, Tmp2, StackPtr, MachinePointerInfo(),
1525 SignBit = DAG.getLoad(LoadTy, dl, Ch, StackPtr, MachinePointerInfo(),
1533 LoadPtr = DAG.getNode(ISD::ADD, dl, LoadPtr.getValueType(),
1534 LoadPtr, DAG.getIntPtrConstant(ByteOffset));
1536 SignBit = DAG.getLoad(LoadTy, dl, Ch, LoadPtr, MachinePointerInfo(),
1543 SignBit = DAG
1544 DAG.getConstant(BitShift,
1549 SignBit = DAG.getSetCC(dl, getSetCCResultType(SignBit.getValueType()),
1550 SignBit, DAG.getConstant(0, SignBit.getValueType()),
1553 SDValue AbsVal = DAG.getNode(ISD::FABS, dl, Tmp1.getValueType(), Tmp1);
1556 return DAG.getSelect(dl, AbsVal.getValueType(), SignBit,
1557 DAG.getNode(ISD::FNEG, dl, AbsVal.getValueType(), AbsVal),
1575 Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, true),
1579 SDValue SP = DAG.getCopyFromReg(Chain, dl, SPReg, VT);
1584 SP = DAG.getNode(ISD::AND, dl, VT, SP,
1585 DAG.getConstant(-(uint64_t)Align, VT));
1586 Tmp1 = DAG.getNode(ISD::SUB, dl, VT, SP, Size); // Value
1587 Chain = DAG.getCopyToReg(Chain, dl, SPReg, Tmp1); // Output chain
1589 Tmp2 = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, true),
1590 DAG.getIntPtrConstant(0, true), SDValue(),
1661 LHS = DAG.getSetCC(dl, VT, RHS, LHS, InvCC);
1671 SetCC1 = DAG.getSetCC(dl, VT, LHS, RHS, CC1);
1672 SetCC2 = DAG.getSetCC(dl, VT, LHS, RHS, CC2);
1675 SetCC1 = DAG.getSetCC(dl, VT, LHS, LHS, CC1);
1676 SetCC2 = DAG.getSetCC(dl, VT, RHS, RHS, CC2);
1678 LHS = DAG.getNode(Opc, dl, VT, SetCC1, SetCC2);
1697 getTypeForEVT(*DAG.getContext()));
1698 SDValue FIPtr = DAG.CreateStackTemporary(SlotVT, SrcAlign);
1707 Type *DestType = DestVT.getTypeForEVT(*DAG.getContext());
1715 Store = DAG.getTruncStore(DAG.getEntryNode(), dl, SrcOp, FIPtr,
1719 Store = DAG.getStore(DAG.getEntryNode(), dl, SrcOp, FIPtr,
1725 return DAG.getLoad(DestVT, dl, Store, FIPtr, PtrInfo,
1729 return DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT, Store, FIPtr,
1737 SDValue StackPtr = DAG.CreateStackTemporary(Node->getValueType(0));
1742 SDValue Ch = DAG.getTruncStore(DAG.getEntryNode(), dl, Node->getOperand(0),
1747 return DAG.getLoad(Node->getValueType(0), dl, Ch, StackPtr,
1788 return DAG.getUNDEF(VT);
1791 return DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Node->getOperand(0));
1809 CV.push_back(ConstantInt::get(EltVT.getTypeForEVT(*DAG.getContext()),
1814 Type *OpNTy = EltVT.getTypeForEVT(*DAG.getContext());
1819 SDValue CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy());
1821 return DAG.getLoad(VT, dl, DAG.getEntryNode(), CPIdx,
1836 SDValue Vec1 = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Value1);
1839 Vec2 = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, VT, Value2);
1841 Vec2 = DAG.getUNDEF(VT);
1844 return DAG.getVectorShuffle(VT, dl, Vec1, Vec2, ShuffleVec.data());
1862 Type *ArgTy = ArgVT.getTypeForEVT(*DAG.getContext());
1868 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
1871 Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
1877 SDValue InChain = DAG.getEntryNode();
1882 bool isTailCall = TLI.isInTailCallPosition(DAG, Node, TCChain);
1890 Callee, Args, DAG, SDLoc(Node));
1895 // It's a tailcall, return the chain (which is the DAG root).
1896 return DAG.getRoot();
1912 Entry.Ty = Entry.Node.getValueType().getTypeForEVT(*DAG.getContext());
1917 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
1920 Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
1922 CallLoweringInfo CLI(DAG.getEntryNode(), RetTy, isSigned, !isSigned, false,
1926 Callee, Args, DAG, dl);
1944 Type *ArgTy = ArgVT.getTypeForEVT(*DAG.getContext());
1951 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
1954 Type *RetTy = Node->getValueType(0).getTypeForEVT(*DAG.getContext());
1959 Callee, Args, DAG, SDLoc(Node));
2064 SDValue InChain = DAG.getEntryNode();
2067 Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
2073 Type *ArgTy = ArgVT.getTypeForEVT(*DAG.getContext());
2081 SDValue FIPtr = DAG.CreateStackTemporary(RetVT);
2088 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
2096 Callee, Args, DAG, dl);
2100 SDValue Rem = DAG.getLoad(RetVT, dl, CallInfo.second, FIPtr,
2171 SDValue InChain = DAG.getEntryNode();
2174 Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
2187 SDValue SinPtr = DAG.CreateStackTemporary(RetVT);
2195 SDValue CosPtr = DAG.CreateStackTemporary(RetVT);
2202 SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
2207 CallLoweringInfo CLI(InChain, Type::getVoidTy(*DAG.getContext()),
2211 Callee, Args, DAG, dl);
2214 Results.push_back(DAG.getLoad(RetVT, dl, CallInfo.second, SinPtr,
2216 Results.push_back(DAG.getLoad(RetVT, dl, CallInfo.second, CosPtr,
2232 SDValue StackSlot = DAG.CreateStackTemporary(MVT::f64);
2235 SDValue WordOff = DAG.getConstant(sizeof(int), TLI.getPointerTy());
2238 SDValue Lo = DAG.getNode(ISD::ADD, dl,
2247 SDValue SignBit = DAG.getConstant(0x80000000u, MVT::i32);
2248 Op0Mapped = DAG.getNode(ISD::XOR, dl, MVT::i32, Op0, SignBit);
2253 SDValue Store1 = DAG.getStore(DAG.getEntryNode(), dl,
2257 SDValue InitialHi = DAG.getConstant(0x43300000u, MVT::i32);
2259 SDValue Store2 = DAG.getStore(Store1, dl, InitialHi, Hi,
2263 SDValue Load = DAG.getLoad(MVT::f64, dl, Store2, StackSlot,
2266 SDValue Bias = DAG.getConstantFP(isSigned ?
2271 SDValue Sub = DAG.getNode(ISD::FSUB, dl, MVT::f64, Load, Bias);
2279 Result = DAG.getNode(ISD::FP_ROUND, dl, DestVT, Sub,
2280 DAG.getIntPtrConstant(0));
2282 Result = DAG.getNode(ISD::FP_EXTEND, dl, DestVT, Sub);
2296 DAG.getConstant(UINT64_C(0x4330000000000000), MVT::i64);
2298 DAG.getConstantFP(BitsToDouble(UINT64_C(0x4530000000100000)), MVT::f64);
2300 DAG.getConstant(UINT64_C(0x4530000000000000), MVT::i64);
2302 SDValue Lo = DAG.getZeroExtendInReg(Op0, dl, MVT::i32);
2303 SDValue Hi = DAG.getNode(ISD::SRL, dl, MVT::i64, Op0,
2304 DAG.getConstant(32, MVT::i64));
2305 SDValue LoOr = DAG.getNode(ISD::OR, dl, MVT::i64, Lo, TwoP52);
2306 SDValue HiOr = DAG.getNode(ISD::OR, dl, MVT::i64, Hi, TwoP84);
2307 SDValue LoFlt = DAG.getNode(ISD::BITCAST, dl, MVT::f64, LoOr);
2308 SDValue HiFlt = DAG.getNode(ISD::BITCAST, dl, MVT::f64, HiOr);
2309 SDValue HiSub = DAG.getNode(ISD::FSUB, dl, MVT::f64, HiFlt,
2311 return DAG.getNode(ISD::FADD, dl, MVT::f64, LoFlt, HiSub);
2320 SDValue Fast = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Op0);
2323 DAG.getConstant(1, TLI.getShiftAmountTy(Op0.getValueType()));
2324 SDValue Shr = DAG.getNode(ISD::SRL, dl, MVT::i64, Op0, ShiftConst);
2325 SDValue AndConst = DAG.getConstant(1, MVT::i64);
2326 SDValue And = DAG.getNode(ISD::AND, dl, MVT::i64, Op0, AndConst);
2327 SDValue Or = DAG.getNode(ISD::OR, dl, MVT::i64, And, Shr);
2329 SDValue SignCvt = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Or);
2330 DAG.getNode(ISD::FADD, dl, MVT::f32, SignCvt, SignCvt);
2336 SDValue SignBitTest = DAG.getSetCC(dl, getSetCCResultType(MVT::i64),
2337 Op0, DAG.getConstant(0, MVT::i64), ISD::SETLT);
2338 return DAG.getSelect(dl, MVT::f32, SignBitTest, Slow, Fast);
2343 SDValue And = DAG.getNode(ISD::AND, dl, MVT::i64, Op0,
2344 DAG.getConstant(UINT64_C(0xfffffffffffff800), MVT::i64));
2345 SDValue Or = DAG.getNode(ISD::OR, dl, MVT::i64, And,
2346 DAG.getConstant(UINT64_C(0x800), MVT::i64));
2347 SDValue And2 = DAG.getNode(ISD::AND, dl, MVT::i64, Op0,
2348 DAG.getConstant(UINT64_C(0x7ff), MVT::i64));
2349 SDValue Ne = DAG.getSetCC(dl, getSetCCResultType(MVT::i64),
2350 And2, DAG.getConstant(UINT64_C(0), MVT::i64), ISD::SETNE);
2351 SDValue Sel = DAG.getSelect(dl, MVT::i64, Ne, Or, Op0);
2352 SDValue Ge = DAG.getSetCC(dl, getSetCCResultType(MVT::i64),
2353 Op0, DAG.getConstant(UINT64_C(0x0020000000000000), MVT::i64),
2355 SDValue Sel2 = DAG.getSelect(dl, MVT::i64, Ge, Sel, Op0);
2358 SDValue Sh = DAG.getNode(ISD::SRL, dl, MVT::i64, Sel2,
2359 DAG.getConstant(32, SHVT));
2360 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32, Sh);
2361 SDValue Fcvt = DAG.getNode(ISD::UINT_TO_FP, dl, MVT::f64, Trunc);
2363 DAG.getConstantFP(BitsToDouble(UINT64_C(0x41f0000000000000)), MVT::f64);
2364 SDValue Fmul = DAG.getNode(ISD::FMUL, dl, MVT::f64, TwoP32, Fcvt);
2365 SDValue Lo = DAG.getNode(ISD::TRUNCATE, dl, MVT::i32, Sel2);
2366 SDValue Fcvt2 = DAG.getNode(ISD::UINT_TO_FP, dl, MVT::f64, Lo);
2367 SDValue Fadd = DAG.getNode(ISD::FADD, dl, MVT::f64, Fmul, Fcvt2);
2368 return DAG.getNode(ISD::FP_ROUND, dl, MVT::f32, Fadd,
2369 DAG.getIntPtrConstant(0));
2372 SDValue Tmp1 = DAG.getNode(ISD::SINT_TO_FP, dl, DestVT, Op0);
2374 SDValue SignSet = DAG.getSetCC(dl, getSetCCResultType(Op0.getValueType()),
2375 Op0, DAG.getConstant(0, Op0.getValueType()),
2377 SDValue Zero = DAG.getIntPtrConstant(0), Four = DAG.getIntPtrConstant(4);
2378 SDValue CstOffset = DAG.getSelect(dl, Zero.getValueType(),
2394 Type::getInt64Ty(*DAG.getContext()), FF);
2396 SDValue CPIdx = DAG.getConstantPool(FudgeFactor, TLI.getPointerTy());
2398 CPIdx = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(), CPIdx, CstOffset);
2402 FudgeInReg = DAG.getLoad(MVT::f32, dl, DAG.getEntryNode(), CPIdx,
2406 SDValue Load = DAG.getExtLoad(ISD::EXTLOAD, dl, DestVT,
2407 DAG.getEntryNode(), CPIdx,
2415 return DAG.getNode(ISD::FADD, dl, DestVT, Tmp1, FudgeInReg);
2455 return DAG.getNode(OpToUse, dl, DestVT,
2456 DAG.getNode(isSigned ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND,
2494 SDValue Operation = DAG.getNode(OpToUse, dl, NewOutTy, LegalOp);
2498 return DAG.getNode(ISD::TRUNCATE, dl, DestVT, Operation);
2510 Tmp2 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, SHVT));
2511 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, SHVT));
2512 return DAG.getNode(ISD::OR, dl, VT, Tmp1, Tmp2);
2514 Tmp4 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(24, SHVT));
2515 Tmp3 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, SHVT));
2516 Tmp2 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, SHVT));
2517 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(24, SHVT));
2518 Tmp3 = DAG.getNode(ISD::AND, dl, VT, Tmp3, DAG.getConstant(0xFF0000, VT));
2519 Tmp2 = DAG.getNode(ISD::AND, dl, VT, Tmp2, DAG.getConstant(0xFF00, VT));
2520 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp3);
2521 Tmp2 = DAG.getNode(ISD::OR, dl, VT, Tmp2, Tmp1);
2522 return DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp2);
2524 Tmp8 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(56, SHVT));
2525 Tmp7 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(40, SHVT));
2526 Tmp6 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(24, SHVT));
2527 Tmp5 = DAG.getNode(ISD::SHL, dl, VT, Op, DAG.getConstant(8, SHVT));
2528 Tmp4 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(8, SHVT));
2529 Tmp3 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(24, SHVT));
2530 Tmp2 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(40, SHVT));
2531 Tmp1 = DAG.getNode(ISD::SRL, dl, VT, Op, DAG.getConstant(56, SHVT));
2532 Tmp7 = DAG.getNode(ISD::AND, dl, VT, Tmp7, DAG.getConstant(255ULL<<48, VT));
2533 Tmp6 = DAG.getNode(ISD::AND, dl, VT, Tmp6, DAG.getConstant(255ULL<<40, VT));
2534 Tmp5 = DAG.getNode(ISD::AND, dl, VT, Tmp5, DAG.getConstant(255ULL<<32, VT));
2535 Tmp4 = DAG.getNode(ISD::AND, dl, VT, Tmp4, DAG.getConstant(255ULL<<24, VT));
2536 Tmp3 = DAG.getNode(ISD::AND, dl, VT, Tmp3, DAG.getConstant(255ULL<<16, VT));
2537 Tmp2 = DAG.getNode(ISD::AND, dl, VT, Tmp2, DAG.getConstant(255ULL<<8 , VT));
2538 Tmp8 = DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp7);
2539 Tmp6 = DAG.getNode(ISD::OR, dl, VT, Tmp6, Tmp5);
2540 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp3);
2541 Tmp2 = DAG.getNode(ISD::OR, dl, VT, Tmp2, Tmp1);
2542 Tmp8 = DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp6);
2543 Tmp4 = DAG.getNode(ISD::OR, dl, VT, Tmp4, Tmp2);
2544 return DAG.getNode(ISD::OR, dl, VT, Tmp8, Tmp4);
2565 SDValue Mask55 = DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x55)), VT);
2566 SDValue Mask33 = DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x33)), VT);
2567 SDValue Mask0F = DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x0F)), VT);
2568 SDValue Mask01 = DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x01)), VT);
2571 Op = DAG.getNode(ISD::SUB, dl, VT, Op,
2572 DAG.getNode(ISD::AND, dl, VT,
2573 DAG.getNode(ISD::SRL, dl, VT, Op,
2574 DAG.getConstant(1, ShVT)),
2577 Op = DAG.getNode(ISD::ADD, dl, VT,
2578 DAG.getNode(ISD::AND, dl, VT, Op, Mask33),
2579 DAG.getNode(ISD::AND, dl, VT,
2580 DAG.getNode(ISD::SRL, dl, VT, Op,
2581 DAG.getConstant(2, ShVT)),
2584 Op = DAG.getNode(ISD::AND, dl, VT,
2585 DAG.getNode(ISD::ADD, dl, VT, Op,
2586 DAG.getNode(ISD::SRL, dl, VT, Op,
2587 DAG.getConstant(4, ShVT))),
2590 Op = DAG.getNode(ISD::SRL, dl, VT,
2591 DAG.getNode(ISD::MUL, dl, VT, Op, Mask01),
2592 DAG.getConstant(Len - 8, ShVT));
2598 return DAG.getNode(ISD::CTLZ, dl, Op.getValueType(), Op);
2613 SDValue Tmp3 = DAG.getConstant(1ULL << i, ShVT);
2614 Op = DAG.getNode(ISD::OR, dl, VT, Op,
2615 DAG.getNode(ISD::SRL, dl, VT, Op, Tmp3));
2617 Op = DAG.getNOT(dl, Op, VT);
2618 return DAG.getNode(ISD::CTPOP, dl, VT, Op);
2622 return DAG.getNode(ISD::CTTZ, dl, Op.getValueType(), Op);
2629 SDValue Tmp3 = DAG.getNode(ISD::AND, dl, VT,
2630 DAG.getNOT(dl, Op, VT),
2631 DAG.getNode(ISD::SUB, dl, VT, Op,
2632 DAG.getConstant(1, VT)));
2636 return DAG.getNode(ISD::SUB, dl, VT,
2637 DAG.getConstant(VT.getSizeInBits(), VT),
2638 DAG.getNode(ISD::CTLZ, dl, VT, Tmp3));
2639 return DAG.getNode(ISD::CTPOP, dl, VT, Tmp3);
2748 Results.push_back(DAG.getConstant(0, Node->getValueType(0)));
2751 Results.push_back(DAG.getConstant(1, Node->getValueType(0)));
2765 Results.push_back(DAG.getConstant(0, MVT::i32));
2774 Type::getVoidTy(*DAG.getContext()),
2778 DAG.getExternalSymbol("__sync_synchronize",
2780 Args, DAG, dl);
2788 SDValue Zero = DAG.getConstant(0, Node->getValueType(0));
2789 SDValue Swap = DAG.getAtomic(ISD::ATOMIC_CMP_SWAP, dl,
2802 SDValue Swap = DAG.getAtomic(ISD::ATOMIC_SWAP, dl,
2842 Results.push_back(DAG.getConstant(0, VT));
2845 Results.push_back(DAG.getConstantFP(0, VT));
2854 Type::getVoidTy(*DAG.getContext()),
2858 DAG.getExternalSymbol("abort", TLI.getPointerTy()),
2859 Args, DAG, dl);
2887 SDValue ShiftCst = DAG.getConstant(BitsDiff, ShiftAmountTy);
2888 Tmp1 = DAG.getNode(ISD::SHL, dl, Node->getValueType(0),
2890 Tmp1 = DAG.getNode(ISD::SRA, dl, Node->getValueType(0), Tmp1, ShiftCst);
2917 APFloat apf(DAG.EVTToAPFloatSemantics(VT),
2921 Tmp1 = DAG.getConstantFP(apf, VT);
2922 Tmp2 = DAG.getSetCC(dl, getSetCCResultType(VT),
2925 True = DAG.getNode(ISD::FP_TO_SINT, dl, NVT, Node->getOperand(0));
2926 False = DAG.getNode(ISD::FP_TO_SINT, dl, NVT,
2927 DAG.getNode(ISD::FSUB, dl, VT,
2929 False = DAG.getNode(ISD::XOR, dl, NVT, False,
2930 DAG.getConstant(x, NVT));
2931 Tmp1 = DAG.getSelect(dl, NVT, Tmp2, True, False);
2942 SDValue VAListLoad = DAG.getLoad(TLI.getPointerTy(), dl, Tmp1, Tmp2,
2950 VAList = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(), VAList,
2951 DAG.getConstant(Align - 1,
2954 VAList = DAG.getNode(ISD::AND, dl, TLI.getPointerTy(), VAList,
2955 DAG.getConstant(-(int64_t)Align,
2960 Tmp3 = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(), VAList,
2961 DAG.getConstant(TLI.getDataLayout()->
2962 getTypeAllocSize(VT.getTypeForEVT(*DAG.getContext())),
2965 Tmp3 = DAG.getStore(VAListLoad.getValue(1), dl, Tmp3, Tmp2,
2968 Results.push_back(DAG.getLoad(VT, dl, Tmp3, VAList, MachinePointerInfo(),
2978 Tmp1 = DAG.getLoad(TLI.getPointerTy(), dl, Node->getOperand(0),
2981 Tmp1 = DAG.getStore(Tmp1.getValue(1), dl, Tmp1, Node->getOperand(1),
2989 Tmp1 = DAG.getNode(ISD::BITCAST, dl, Node->getValueType(0),
3023 EVT NewEltVT = TLI.getTypeToTransformTo(*DAG.getContext(), EltVT);
3034 EVT NewVT = EVT::getVectorVT(*DAG.getContext(), NewEltVT,
3039 Op0 = DAG.getNode(ISD::BITCAST, dl, NewVT, Op0);
3040 Op1 = DAG.getNode(ISD::BITCAST, dl, NewVT, Op1);
3067 Ops.push_back(DAG.getUNDEF(EltVT));
3072 Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, EltVT,
3074 DAG.getConstant(Idx, TLI.getVectorIdxTy())));
3076 Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, EltVT,
3078 DAG.getConstant(Idx - NumElems,
3082 Tmp1 = DAG.getNode(ISD::BUILD_VECTOR, dl, VT, &Ops[0], Ops.size());
3084 Tmp1 = DAG.getNode(ISD::BITCAST, dl, Node->getValueType(0), Tmp1);
3092 Tmp1 = DAG.getNode(ISD::SRL, dl, OpTy, Node->getOperand(0),
3093 DAG
3095 Tmp1 = DAG.getNode(ISD::TRUNCATE, dl, Node->getValueType(0), Tmp1);
3098 Tmp1 = DAG.getNode(ISD::TRUNCATE, dl, Node->getValueType(0),
3108 Results.push_back(DAG.getCopyFromReg(Node->getOperand(0), dl, SP,
3112 Results.push_back(DAG.getUNDEF(Node->getValueType(0)));
3120 Results.push_back(DAG.getCopyToReg(Node->getOperand(0), dl, SP,
3131 Tmp1 = DAG.getConstantFP(-0.0, Node->getValueType(0));
3132 Tmp1 = DAG.getNode(ISD::FSUB, dl, Node->getValueType(0), Tmp1,
3140 Tmp2 = DAG.getConstantFP(0.0, VT);
3141 Tmp2 = DAG.getSetCC(dl, getSetCCResultType(Tmp1.getValueType()),
3143 Tmp3 = DAG.getNode(ISD::FNEG, dl, VT, Tmp1);
3144 Tmp1 = DAG.getSelect(dl, VT, Tmp2, Tmp1, Tmp3);
3162 SDVTList VTs = DAG.getVTList(VT, VT);
3163 Tmp1 = DAG.getNode(ISD::FSINCOS, dl, VTs, Node->getOperand(0));
3278 Tmp1 = DAG.getNode(ISD::FNEG, dl, VT, Node->getOperand(1));
3279 Tmp1 = DAG.getNode(ISD::FADD, dl, VT, Node->getOperand(0), Tmp1);
3288 Tmp1 = DAG.getNode(ISD::XOR, dl, VT, Node->getOperand(1),
3289 DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), VT));
3290 Tmp1 = DAG.getNode(ISD::ADD, dl, VT, Tmp1, DAG.getConstant(1, VT));
3291 Results.push_back(DAG.getNode(ISD::ADD, dl, VT, Node->getOperand(0), Tmp1));
3307 SDVTList VTs = DAG.getVTList(VT, VT);
3308 Tmp1 = DAG.getNode(DivRemOpc, dl, VTs, Tmp2, Tmp3).getValue(1);
3311 Tmp1 = DAG.getNode(DivOpc, dl, VT, Tmp2, Tmp3);
3312 Tmp1 = DAG.getNode(ISD::MUL, dl, VT, Tmp1, Tmp3);
3313 Tmp1 = DAG.getNode(ISD::SUB, dl, VT, Tmp2, Tmp1);
3332 SDVTList VTs = DAG.getVTList(VT, VT);
3336 Tmp1 = DAG.getNode(DivRemOpc, dl, VTs, Node->getOperand(0),
3356 SDVTList VTs = DAG.getVTList(VT, VT);
3359 Tmp1 = DAG.getNode(ExpandOpcode, dl, VTs, Node->getOperand(0),
3371 SDVTList VTs = DAG.getVTList(VT, VT);
3392 Results.push_back(DAG.getNode(OpToUse, dl, VTs, Node->getOperand(0),
3407 SDValue Sum = DAG.getNode(Node->getOpcode() == ISD::SADDO ?
3413 SDValue Zero = DAG.getConstant(0, LHS.getValueType());
3424 SDValue LHSSign = DAG.getSetCC(dl, OType, LHS, Zero, ISD::SETGE);
3425 SDValue RHSSign = DAG.getSetCC(dl, OType, RHS, Zero, ISD::SETGE);
3426 SDValue SignsMatch = DAG.getSetCC(dl, OType, LHSSign, RHSSign,
3430 SDValue SumSign = DAG.getSetCC(dl, OType, Sum, Zero, ISD::SETGE);
3431 SDValue SumSignNE = DAG.getSetCC(dl, OType, LHSSign, SumSign, ISD::SETNE);
3433 SDValue Cmp = DAG.getNode(ISD::AND, dl, OType, SignsMatch, SumSignNE);
3441 SDValue Sum = DAG.getNode(Node->getOpcode() == ISD::UADDO ?
3445 Results.push_back(DAG.getSetCC(dl, Node->getValueType(1), Sum, LHS,
3453 EVT WideVT = EVT::getIntegerVT(*DAG.getContext(), VT.getSizeInBits() * 2);
3463 BottomHalf = DAG.getNode(ISD::MUL, dl, VT, LHS, RHS);
3464 TopHalf = DAG.getNode(Ops[isSigned][0], dl, VT, LHS, RHS);
3466 BottomHalf = DAG.getNode(Ops[isSigned][1], dl, DAG.getVTList(VT, VT), LHS,
3469 } else if (TLI.isTypeLegal(EVT::getIntegerVT(*DAG.getContext(),
3471 LHS = DAG.getNode(Ops[isSigned][2], dl, WideVT, LHS);
3472 RHS = DAG.getNode(Ops[isSigned][2], dl, WideVT, RHS);
3473 DAG.getNode(ISD::MUL, dl, WideVT, LHS, RHS);
3474 BottomHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Tmp1,
3475 DAG.getIntPtrConstant(0));
3476 TopHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Tmp1,
3477 DAG.getIntPtrConstant(1));
3497 SDValue HiLHS = DAG.getNode(ISD::SRA, dl, VT, RHS,
3498 DAG.getConstant(LoSize-1, TLI.getPointerTy()));
3499 SDValue HiRHS = DAG.getNode(ISD::SRA, dl, VT, LHS,
3500 DAG.getConstant(LoSize-1, TLI.getPointerTy()));
3508 BottomHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Ret,
3509 DAG.getIntPtrConstant(0));
3510 TopHalf = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, VT, Ret,
3511 DAG.getIntPtrConstant(1));
3515 DAG.DeleteNode(Ret.getNode());
3519 Tmp1 = DAG.getConstant(VT.getSizeInBits() - 1,
3521 Tmp1 = DAG.getNode(ISD::SRA, dl, VT, BottomHalf, Tmp1);
3522 TopHalf = DAG.getSetCC(dl, getSetCCResultType(VT), TopHalf, Tmp1,
3525 TopHalf = DAG.getSetCC(dl, getSetCCResultType(VT), TopHalf,
3526 DAG.getConstant(0, VT), ISD::SETNE);
3534 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, PairTy, Node->getOperand(0));
3535 Tmp2 = DAG.getNode(ISD::ANY_EXTEND, dl, PairTy, Node->getOperand(1));
3536 Tmp2 = DAG.getNode(ISD::SHL, dl, PairTy, Tmp2,
3537 DAG.getConstant(PairTy.getSizeInBits()/2,
3539 Results.push_back(DAG.getNode(ISD::OR, dl, PairTy, Tmp1, Tmp2));
3547 Tmp1 = DAG.getSelectCC(dl, Tmp1.getOperand(0), Tmp1.getOperand(1),
3551 Tmp1 = DAG.getSelectCC(dl, Tmp1,
3552 DAG.getConstant(0, Tmp1.getValueType()),
3566 DAG.getMachineFunction().getJumpTableInfo()->getEntrySize(TD);
3568 Index = DAG.getNode(ISD::MUL, dl, PTy,
3569 Index, DAG.getConstant(EntrySize, PTy));
3570 SDValue Addr = DAG.getNode(ISD::ADD, dl, PTy, Index, Table);
3572 EVT MemVT = EVT::getIntegerVT(*DAG.getContext(), EntrySize * 8);
3573 SDValue LD = DAG.getExtLoad(ISD::SEXTLOAD, dl, PTy, Chain, Addr,
3581 Addr = DAG.getNode(ISD::ADD, dl, PTy, Addr,
3582 TLI.getPICJumpTableRelocBase(Table, DAG));
3584 Tmp1 = DAG.getNode(ISD::BRIND, dl, MVT::Other, LD.getValue(1), Addr);
3594 Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other,
3601 DAG.getNode(ISD::AND, dl, Tmp2.getValueType(), Tmp2,
3602 DAG.getConstant(1, Tmp2.getValueType()));
3603 Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other, Tmp1,
3604 DAG.getCondCode(ISD::SETNE), Tmp3,
3605 DAG.getConstant(0, Tmp3.getValueType()),
3635 Tmp1 = DAG.getNode(ISD::SELECT_CC, dl, VT, Tmp1, Tmp2,
3636 DAG.getConstant(TrueValue, VT), DAG.getConstant(0, VT),
3652 Tmp2 = DAG.getConstant(0, Tmp1.getValueType());
3653 CC = DAG.getCondCode(ISD::SETNE);
3654 Tmp1 = DAG.getNode(ISD::SELECT_CC, dl, Node->getValueType(0), Tmp1, Tmp2,
3669 Tmp3 = DAG.getConstant(0, Tmp2.getValueType());
3670 Tmp4 = DAG.getCondCode(ISD::SETNE);
3671 Tmp1 = DAG.getNode(ISD::BR_CC, dl, Node->getValueType(0), Tmp1, Tmp4, Tmp2,
3690 SDValue Ex = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl,
3692 Node->getOperand(0), DAG.getConstant(Idx,
3694 SDValue Sh = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl,
3696 Node->getOperand(1), DAG.getConstant(Idx,
3698 Scalars.push_back(DAG.getNode(Node->getOpcode(), dl,
3702 DAG.getNode(ISD::BUILD_VECTOR, dl, Node->getValueType(0),
3743 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, NVT, Node->getOperand(0));
3746 Tmp1 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1);
3749 Tmp2 = DAG.getSetCC(dl, getSetCCResultType(NVT),
3750 Tmp1, DAG.getConstant(NVT.getSizeInBits(), NVT),
3752 Tmp1 = DAG.getSelect(dl, NVT, Tmp2,
3753 DAG.getConstant(OVT.getSizeInBits(), NVT), Tmp1);
3757 Tmp1 = DAG.getNode(ISD::SUB, dl, NVT, Tmp1,
3758 DAG.getConstant(NVT.getSizeInBits() -
3761 Results.push_back(DAG.getNode(ISD::TRUNCATE, dl, OVT, Tmp1));
3765 Tmp1 = DAG.getNode(ISD::ZERO_EXTEND, dl, NVT, Node->getOperand(0));
3766 Tmp1 = DAG.getNode(ISD::BSWAP, dl, NVT, Tmp1);
3767 Tmp1 = DAG.getNode(ISD::SRL, dl, NVT, Tmp1,
3768 DAG.getConstant(DiffBits, TLI.getShiftAmountTy(NVT)));
3798 Tmp1 = DAG.getVAArg(NVT, dl, Chain, Ptr, Node->getOperand(2),
3802 Tmp2 = DAG.getNode(TruncOp, dl, OVT, Tmp1);
3806 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 0), Tmp2);
3807 DAG.ReplaceAllUsesOfValueWith(SDValue(Node, 1), Chain);
3824 Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(0));
3825 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1));
3827 Tmp1 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2);
3828 Results.push_back(DAG.getNode(TruncOp, dl, OVT, Tmp1));
3845 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1));
3846 Tmp3 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(2));
3848 Tmp1 = DAG.getSelect(dl, NVT, Tmp1, Tmp2, Tmp3);
3850 Tmp1 = DAG.getNode(TruncOp, dl, Node->getValueType(0), Tmp1);
3852 Tmp1 = DAG.getNode(TruncOp, dl, Node->getValueType(0), Tmp1,
3853 DAG.getIntPtrConstant(0));
3861 Tmp1 = DAG.getNode(ISD::BITCAST, dl, NVT, Node->getOperand(0));
3862 Tmp2 = DAG.getNode(ISD::BITCAST, dl, NVT, Node->getOperand(1));
3866 Tmp1 = DAG.getNode(ISD::BITCAST, dl, OVT, Tmp1);
3877 Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(0));
3878 Tmp2 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(1));
3879 Results.push_back(DAG.getNode(ISD::SETCC, dl, Node->getValueType(0),
3886 Tmp1 = DAG
3887 Tmp2 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(1));
3888 Tmp3 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1, Tmp2);
3889 Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT,
3890 Tmp3, DAG.getIntPtrConstant(0)));
3897 Tmp1 = DAG.getNode(ISD::FP_EXTEND, dl, NVT, Node->getOperand(0));
3898 Tmp2 = DAG.getNode(Node->getOpcode(), dl, NVT, Tmp1);
3899 Results.push_back(DAG.getNode(ISD::FP_ROUND, dl, OVT,
3900 Tmp2, DAG.getIntPtrConstant(0)));