Lines Matching refs:getNode
578 AddToWorklist(Op.getNode()); in deleteAndRecombine()
660 const SDNodeFlags *Flags = Op.getNode()->getFlags(); in GetNegatedExpression()
676 return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
681 return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
695 return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
705 return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
711 return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
718 return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
722 return DAG.getNode(ISD::FP_ROUND, SDLoc(Op), Op.getValueType(), in GetNegatedExpression()
744 !TLI.isConstTrueVal(N.getOperand(2).getNode()) || in isSetCCEquivalent()
745 !TLI.isConstFalseVal(N.getOperand(3).getNode())) in isSetCCEquivalent()
763 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
772 return N.getNode(); in isConstantFPBuildVectorOrConstantFP()
773 if (ISD::isBuildVectorOfConstantFPSDNodes(N.getNode())) in isConstantFPBuildVectorOrConstantFP()
774 return N.getNode(); in isConstantFPBuildVectorOrConstantFP()
824 return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode); in ReassociateOps()
830 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0.getOperand(0), N1); in ReassociateOps()
831 if (!OpNode.getNode()) in ReassociateOps()
833 AddToWorklist(OpNode.getNode()); in ReassociateOps()
834 return DAG.getNode(Opc, DL, VT, OpNode, N0.getOperand(1)); in ReassociateOps()
844 return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode); in ReassociateOps()
850 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0, N1.getOperand(0)); in ReassociateOps()
851 if (!OpNode.getNode()) in ReassociateOps()
853 AddToWorklist(OpNode.getNode()); in ReassociateOps()
854 return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1)); in ReassociateOps()
869 To[0].getNode()->dump(&DAG); in CombineTo()
872 assert((!To[i].getNode() || in CombineTo()
881 if (To[i].getNode()) { in CombineTo()
882 AddToWorklist(To[i].getNode()); in CombineTo()
883 AddUsersToWorklist(To[i].getNode()); in CombineTo()
904 AddToWorklist(TLO.New.getNode()); in CommitTargetLoweringOpt()
905 AddUsersToWorklist(TLO.New.getNode()); in CommitTargetLoweringOpt()
910 if (TLO.Old.getNode()->use_empty()) in CommitTargetLoweringOpt()
911 deleteAndRecombine(TLO.Old.getNode()); in CommitTargetLoweringOpt()
923 AddToWorklist(Op.getNode()); in SimplifyDemandedBits()
928 TLO.Old.getNode()->dump(&DAG); in SimplifyDemandedBits()
930 TLO.New.getNode()->dump(&DAG); in SimplifyDemandedBits()
940 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, VT, SDValue(ExtLoad, 0)); in ReplaceLoadWithPromotedLoad()
945 Trunc.getNode()->dump(&DAG); in ReplaceLoadWithPromotedLoad()
951 AddToWorklist(Trunc.getNode()); in ReplaceLoadWithPromotedLoad()
957 if (ISD::isUNINDEXEDLoad(Op.getNode())) { in PromoteOperand()
974 return DAG.getNode(ISD::AssertSext, dl, PVT, in PromoteOperand()
978 return DAG.getNode(ISD::AssertZext, dl, PVT, in PromoteOperand()
984 return DAG.getNode(ExtOpc, dl, PVT, Op); in PromoteOperand()
990 return DAG.getNode(ISD::ANY_EXTEND, dl, PVT, Op); in PromoteOperand()
1000 if (!NewOp.getNode()) in SExtPromoteOperand()
1002 AddToWorklist(NewOp.getNode()); in SExtPromoteOperand()
1005 ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode()); in SExtPromoteOperand()
1006 return DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, NewOp.getValueType(), NewOp, in SExtPromoteOperand()
1015 if (!NewOp.getNode()) in ZExtPromoteOperand()
1017 AddToWorklist(NewOp.getNode()); in ZExtPromoteOperand()
1020 ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode()); in ZExtPromoteOperand()
1050 if (!NN0.getNode()) in PromoteIntBinOp()
1060 if (!NN1.getNode()) in PromoteIntBinOp()
1064 AddToWorklist(NN0.getNode()); in PromoteIntBinOp()
1065 if (NN1.getNode()) in PromoteIntBinOp()
1066 AddToWorklist(NN1.getNode()); in PromoteIntBinOp()
1069 ReplaceLoadWithPromotedLoad(N0.getNode(), NN0.getNode()); in PromoteIntBinOp()
1071 ReplaceLoadWithPromotedLoad(N1.getNode(), NN1.getNode()); in PromoteIntBinOp()
1074 Op.getNode()->dump(&DAG)); in PromoteIntBinOp()
1076 return DAG.getNode(ISD::TRUNCATE, dl, VT, in PromoteIntBinOp()
1077 DAG.getNode(Opc, dl, PVT, NN0, NN1)); in PromoteIntBinOp()
1113 if (!N0.getNode()) in PromoteIntShiftOp()
1116 AddToWorklist(N0.getNode()); in PromoteIntShiftOp()
1118 ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode()); in PromoteIntShiftOp()
1121 Op.getNode()->dump(&DAG)); in PromoteIntShiftOp()
1123 return DAG.getNode(ISD::TRUNCATE, dl, VT, in PromoteIntShiftOp()
1124 DAG.getNode(Opc, dl, PVT, N0, Op.getOperand(1))); in PromoteIntShiftOp()
1152 Op.getNode()->dump(&DAG)); in PromoteExtend()
1153 return DAG.getNode(Op.getOpcode(), SDLoc(Op), VT, Op.getOperand(0)); in PromoteExtend()
1162 if (!ISD::isUNINDEXEDLoad(Op.getNode())) in PromoteLoad()
1182 SDNode *N = Op.getNode(); in PromoteLoad()
1192 SDValue Result = DAG.getNode(ISD::TRUNCATE, dl, VT, NewLD); in PromoteLoad()
1197 Result.getNode()->dump(&DAG); in PromoteLoad()
1203 AddToWorklist(Result.getNode()); in PromoteLoad()
1228 Nodes.insert(ChildN.getNode()); in recursivelyDeleteUnusedNodes()
1300 if (!CombinedNodes.count(ChildN.getNode())) in Run()
1301 AddToWorklist(ChildN.getNode()); in Run()
1305 if (!RV.getNode()) in Run()
1314 if (RV.getNode() == N) in Run()
1318 RV.getNode()->getOpcode() != ISD::DELETED_NODE && in Run()
1322 RV.getNode()->dump(&DAG)); in Run()
1324 if (N->getNumValues() == RV.getNode()->getNumValues()) in Run()
1325 DAG.ReplaceAllUsesWith(N, RV.getNode()); in Run()
1334 AddToWorklist(RV.getNode()); in Run()
1335 AddUsersToWorklist(RV.getNode()); in Run()
1452 if (!RV.getNode()) { in combine()
1468 if (!RV.getNode()) { in combine()
1498 if (!RV.getNode() && SelectionDAG::isCommutativeBinOp(N->getOpcode()) && in combine()
1535 if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1)) in visitTokenFactor()
1537 if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0)) in visitTokenFactor()
1566 std::find(TFs.begin(), TFs.end(), Op.getNode()) == TFs.end()) { in visitTokenFactor()
1568 TFs.push_back(Op.getNode()); in visitTokenFactor()
1570 AddToWorklist(Op.getNode()); in visitTokenFactor()
1578 if (SeenOps.insert(Op.getNode()).second) in visitTokenFactor()
1596 Result = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Ops); in visitTokenFactor()
1644 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitADD()
1646 if (ISD::isBuildVectorAllZeros(N0.getNode())) in visitADD()
1658 return DAG.getNode(ISD::ADD, SDLoc(N), VT, N1, N0); in visitADD()
1661 N0.getNode(), N1.getNode()); in visitADD()
1671 return DAG.getNode(ISD::SUB, DL, VT, in visitADD()
1682 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1, N0.getOperand(1)); in visitADD()
1685 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N0, N1.getOperand(1)); in visitADD()
1695 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0), in visitADD()
1700 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0), in visitADD()
1706 return DAG.getNode(N1.getOpcode(), SDLoc(N), VT, in visitADD()
1717 return DAG.getNode(ISD::SUB, SDLoc(N), VT, in visitADD()
1718 DAG.getNode(ISD::ADD, SDLoc(N0), VT, N00, N10), in visitADD()
1719 DAG.getNode(ISD::ADD, SDLoc(N1), VT, N01, N11)); in visitADD()
1728 return DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N1); in visitADD()
1733 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N0, in visitADD()
1734 DAG.getNode(ISD::SHL, SDLoc(N), VT, in visitADD()
1739 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1, in visitADD()
1740 DAG.getNode(ISD::SHL, SDLoc(N), VT, in visitADD()
1753 return DAG.getNode(ISD::SUB, DL, VT, N->getOperand(0), AndOp0); in visitADD()
1762 SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitADD()
1763 return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt); in visitADD()
1771 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitADD()
1773 return DAG.getNode(ISD::SUB, DL, VT, N0, ZExt); in visitADD()
1787 return CombineTo(N, DAG.getNode(ISD::ADD, SDLoc(N), VT, N0, N1), in visitADDC()
1788 DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1795 return DAG.getNode(ISD::ADDC, SDLoc(N), N->getVTList(), N1, N0); in visitADDC()
1799 return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1813 return CombineTo(N, DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N1), in visitADDC()
1814 DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1830 return DAG.getNode(ISD::ADDE, SDLoc(N), N->getVTList(), in visitADDE()
1835 return DAG.getNode(ISD::ADDC, SDLoc(N), N->getVTList(), N0, N1); in visitADDE()
1863 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitSUB()
1875 N0.getNode(), N1.getNode()); in visitSUB()
1882 return DAG.getNode(ISD::ADD, DL, VT, N0, in visitSUB()
1887 return DAG.getNode(ISD::XOR, SDLoc(N), VT, N1, N0); in visitSUB()
1899 dyn_cast<ConstantSDNode>(N1.getOperand(1).getNode()); in visitSUB()
1904 return DAG.getNode(ISD::SUB, DL, VT, NewC, in visitSUB()
1912 return DAG.getNode(N0.getOperand(1).getOpcode(), SDLoc(N), VT, in visitSUB()
1918 return DAG.getNode(ISD::ADD, SDLoc(N), VT, in visitSUB()
1924 return DAG.getNode(ISD::SUB, SDLoc(N), VT, in visitSUB()
1953 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitSUB()
1955 return DAG.getNode(ISD::ADD, DL, VT, N0, ZExt); in visitSUB()
1970 return CombineTo(N, DAG.getNode(ISD::SUB, DL, VT, N0, N1), in visitSUBC()
1971 DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue)); in visitSUBC()
1976 DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue)); in visitSUBC()
1980 return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue)); in visitSUBC()
1984 return CombineTo(N, DAG.getNode(ISD::XOR, DL, VT, N1, N0), in visitSUBC()
1985 DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue)); in visitSUBC()
1997 return DAG.getNode(ISD::SUBC, SDLoc(N), N->getVTList(), N0, N1); in visitSUBE()
2021 N0IsConst = ISD::isConstantSplatVector(N0.getNode(), ConstValue0); in visitMUL()
2022 N1IsConst = ISD::isConstantSplatVector(N1.getNode(), ConstValue1); in visitMUL()
2039 N0.getNode(), N1.getNode()); in visitMUL()
2044 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N1, N0); in visitMUL()
2058 return DAG.getNode(ISD::SUB, DL, VT, in visitMUL()
2065 return DAG.getNode(ISD::SHL, DL, VT, N0, in visitMUL()
2076 return DAG.getNode(ISD::SUB, DL, VT, in visitMUL()
2078 DAG.getNode(ISD::SHL, DL, VT, N0, in visitMUL()
2086 (ISD::isConstantSplatVector(N0.getOperand(1).getNode(), Val) || in visitMUL()
2088 SDValue C3 = DAG.getNode(ISD::SHL, SDLoc(N), VT, N1, N0.getOperand(1)); in visitMUL()
2089 AddToWorklist(C3.getNode()); in visitMUL()
2090 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), C3); in visitMUL()
2099 (ISD::isConstantSplatVector(N0.getOperand(1).getNode(), Val) || in visitMUL()
2101 N0.getNode()->hasOneUse()) { in visitMUL()
2105 N1.getNode()->hasOneUse()) { in visitMUL()
2109 if (Sh.getNode()) { in visitMUL()
2110 SDValue Mul = DAG.getNode(ISD::MUL, SDLoc(N), VT, Sh.getOperand(0), Y); in visitMUL()
2111 return DAG.getNode(ISD::SHL, SDLoc(N), VT, Mul, Sh.getOperand(1)); in visitMUL()
2120 return DAG.getNode(ISD::ADD, SDLoc(N), VT, in visitMUL()
2121 DAG.getNode(ISD::MUL, SDLoc(N0), VT, in visitMUL()
2123 DAG.getNode(ISD::MUL, SDLoc(N1), VT, in visitMUL()
2190 for (SDNode::use_iterator UI = Op0.getNode()->use_begin(), in useDivRem()
2191 UE = Op0.getNode()->use_end(); UI != UE; ++UI) { in useDivRem()
2205 combined = DAG.getNode(DivRemOpc, SDLoc(Node), VTs, Op0, Op1); in useDivRem()
2244 return DAG.getNode(ISD::SUB, DL, VT, in visitSDIV()
2251 return DAG.getNode(ISD::UDIV, DL, N1.getValueType(), N0, N1); in visitSDIV()
2270 DAG.getNode(ISD::SRA, DL, VT, N0, in visitSDIV()
2273 AddToWorklist(SGN.getNode()); in visitSDIV()
2277 DAG.getNode(ISD::SRL, DL, VT, SGN, in visitSDIV()
2280 SDValue ADD = DAG.getNode(ISD::ADD, DL, VT, N0, SRL); in visitSDIV()
2281 AddToWorklist(SRL.getNode()); in visitSDIV()
2282 AddToWorklist(ADD.getNode()); // Divide by pow2 in visitSDIV()
2283 SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, ADD, in visitSDIV()
2292 AddToWorklist(SRA.getNode()); in visitSDIV()
2293 return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), SRA); in visitSDIV()
2342 return DAG.getNode(ISD::SRL, DL, VT, N0, in visitUDIV()
2351 SDValue Add = DAG.getNode(ISD::ADD, DL, ADDVT, in visitUDIV()
2356 AddToWorklist(Add.getNode()); in visitUDIV()
2357 return DAG.getNode(ISD::SRL, DL, VT, N0, Add); in visitUDIV()
2406 return DAG.getNode(ISD::UREM, DL, VT, N0, N1); in visitREM()
2412 return DAG.getNode(ISD::AND, DL, VT, N0, in visitREM()
2421 DAG.getNode(ISD::ADD, DL, VT, N1, DAG.getConstant(NegOne, DL, VT)); in visitREM()
2422 AddToWorklist(Add.getNode()); in visitREM()
2423 return DAG.getNode(ISD::AND, DL, VT, N0, Add); in visitREM()
2440 SDValue Div = DAG.getNode(DivOpcode, DL, VT, N0, N1); in visitREM()
2441 AddToWorklist(Div.getNode()); in visitREM()
2442 SDValue OptimizedDiv = combine(Div.getNode()); in visitREM()
2443 if (OptimizedDiv.getNode() && OptimizedDiv.getNode() != Div.getNode()) { in visitREM()
2446 SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, OptimizedDiv, N1); in visitREM()
2447 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, Mul); in visitREM()
2448 AddToWorklist(Mul.getNode()); in visitREM()
2479 return DAG.getNode(ISD::SRA, DL, N0.getValueType(), N0, in visitMULHS()
2495 N0 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N0); in visitMULHS()
2496 N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1); in visitMULHS()
2497 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHS()
2498 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHS()
2501 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHS()
2531 N0 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N0); in visitMULHU()
2532 N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N1); in visitMULHU()
2533 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHU()
2534 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHU()
2537 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHU()
2554 SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0), N->ops()); in SimplifyNodeWithTwoResults()
2563 SDValue Res = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1), N->ops()); in SimplifyNodeWithTwoResults()
2573 SDValue Lo = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0), N->ops()); in SimplifyNodeWithTwoResults()
2574 AddToWorklist(Lo.getNode()); in SimplifyNodeWithTwoResults()
2575 SDValue LoOpt = combine(Lo.getNode()); in SimplifyNodeWithTwoResults()
2576 if (LoOpt.getNode() && LoOpt.getNode() != Lo.getNode() && in SimplifyNodeWithTwoResults()
2583 SDValue Hi = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1), N->ops()); in SimplifyNodeWithTwoResults()
2584 AddToWorklist(Hi.getNode()); in SimplifyNodeWithTwoResults()
2585 SDValue HiOpt = combine(Hi.getNode()); in SimplifyNodeWithTwoResults()
2586 if (HiOpt.getNode() && HiOpt != Hi && in SimplifyNodeWithTwoResults()
2609 SDValue Lo = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(0)); in visitSMUL_LOHI()
2610 SDValue Hi = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(1)); in visitSMUL_LOHI()
2611 Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi); in visitSMUL_LOHI()
2613 Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo, in visitSMUL_LOHI()
2616 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi); in visitSMUL_LOHI()
2618 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo); in visitSMUL_LOHI()
2640 SDValue Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(0)); in visitUMUL_LOHI()
2641 SDValue Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(1)); in visitUMUL_LOHI()
2642 Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi); in visitUMUL_LOHI()
2644 Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo, in visitUMUL_LOHI()
2647 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi); in visitUMUL_LOHI()
2649 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo); in visitUMUL_LOHI()
2661 return DAG.getNode(ISD::SADDO, SDLoc(N), N->getVTList(), in visitSMULO()
2671 return DAG.getNode(ISD::UADDO, SDLoc(N), N->getVTList(), in visitUMULO()
2696 return DAG.getNode(N->getOpcode(), SDLoc(N), VT, N1, N0); in visitIMINMAX()
2709 if (N0.getNode()->getNumOperands() == 0) return SDValue(); in SimplifyBinOpWithSameOpcodeHands()
2734 SDValue ORNode = DAG.getNode(N->getOpcode(), SDLoc(N0), in SimplifyBinOpWithSameOpcodeHands()
2737 AddToWorklist(ORNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2738 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, ORNode); in SimplifyBinOpWithSameOpcodeHands()
2748 SDValue ORNode = DAG.getNode(N->getOpcode(), SDLoc(N0), in SimplifyBinOpWithSameOpcodeHands()
2751 AddToWorklist(ORNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2752 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, in SimplifyBinOpWithSameOpcodeHands()
2774 SDValue Op = DAG.getNode(N->getOpcode(), DL, In0Ty, In0, In1); in SimplifyBinOpWithSameOpcodeHands()
2775 SDValue BC = DAG.getNode(N0.getOpcode(), DL, VT, Op); in SimplifyBinOpWithSameOpcodeHands()
2776 AddToWorklist(Op.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2820 if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) { in SimplifyBinOpWithSameOpcodeHands()
2821 SDValue NewNode = DAG.getNode(N->getOpcode(), SDLoc(N), VT, in SimplifyBinOpWithSameOpcodeHands()
2823 AddToWorklist(NewNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2841 if (N0->getOperand(0) == N1->getOperand(0) && ShOp.getNode()) { in SimplifyBinOpWithSameOpcodeHands()
2842 SDValue NewNode = DAG.getNode(N->getOpcode(), SDLoc(N), VT, in SimplifyBinOpWithSameOpcodeHands()
2844 AddToWorklist(NewNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2875 SDValue ORNode = DAG.getNode(ISD::OR, SDLoc(N0), in visitANDLike()
2877 AddToWorklist(ORNode.getNode()); in visitANDLike()
2883 SDValue ANDNode = DAG.getNode(ISD::AND, SDLoc(N0), in visitANDLike()
2885 AddToWorklist(ANDNode.getNode()); in visitANDLike()
2890 SDValue ORNode = DAG.getNode(ISD::OR, SDLoc(N0), in visitANDLike()
2892 AddToWorklist(ORNode.getNode()); in visitANDLike()
2903 SDValue ADDNode = DAG.getNode(ISD::ADD, DL, LL.getValueType(), in visitANDLike()
2906 AddToWorklist(ADDNode.getNode()); in visitANDLike()
2949 DAG.getNode(ISD::ADD, DL, VT, in visitANDLike()
2951 CombineTo(N0.getNode(), NewAdd); in visitANDLike()
2992 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, HalfVT, in visitANDLike()
2997 SDValue Shift = DAG.getNode(ISD::SRL, SL, HalfVT, Trunc, ShiftK); in visitANDLike()
2998 SDValue And = DAG.getNode(ISD::AND, SL, HalfVT, Shift, NewMask); in visitANDLike()
2999 return DAG.getNode(ISD::ZERO_EXTEND, SL, VT, And); in visitANDLike()
3059 if (ISD::isBuildVectorAllZeros(N0.getNode())) in visitAND()
3065 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitAND()
3073 if (ISD::isBuildVectorAllOnes(N0.getNode())) in visitAND()
3075 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitAND()
3087 return DAG.getNode(ISD::AND, SDLoc(N), VT, N1, N0); in visitAND()
3110 SDValue Zext = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), in visitAND()
3119 CombineTo(N0.getNode(), Zext); in visitAND()
3224 CombineTo(N, (N0.getNode() == Load) ? NewLoad : N0); in visitAND()
3269 NewPtr = DAG.getNode(ISD::ADD, DL, PtrType, in visitAND()
3274 AddToWorklist(NewPtr.getNode()); in visitAND()
3305 if (ISD::isEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode())) { in visitAND()
3319 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitAND()
3324 if (ISD::isSEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitAND()
3339 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitAND()
3345 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitAND()
3373 if (!N0.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3383 if (!N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3396 if (!N0.getNode()->hasOneUse() || in MatchBSwapHWordLow()
3397 !N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3410 if (!N00.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3421 if (!N10.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3451 SDValue Res = DAG.getNode(ISD::BSWAP, SDLoc(N), VT, N00); in MatchBSwapHWordLow()
3454 Res = DAG.getNode(ISD::SRL, DL, VT, Res, in MatchBSwapHWordLow()
3468 if (!N.getNode()->hasOneUse()) in isBSwapHWordElement()
3530 Parts[Num] = N0.getOperand(0).getNode(); in isBSwapHWordElement()
3596 SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, in MatchBSwapHWord()
3603 return DAG.getNode(ISD::ROTL, DL, VT, BSwap, ShAmt); in MatchBSwapHWord()
3605 return DAG.getNode(ISD::ROTR, DL, VT, BSwap, ShAmt); in MatchBSwapHWord()
3606 return DAG.getNode(ISD::OR, DL, VT, in MatchBSwapHWord()
3607 DAG.getNode(ISD::SHL, DL, VT, BSwap, ShAmt), in MatchBSwapHWord()
3608 DAG.getNode(ISD::SRL, DL, VT, BSwap, ShAmt)); in MatchBSwapHWord()
3632 SDValue ORNode = DAG.getNode(ISD::OR, SDLoc(LR), in visitORLike()
3634 AddToWorklist(ORNode.getNode()); in visitORLike()
3640 SDValue ANDNode = DAG.getNode(ISD::AND, SDLoc(LR), in visitORLike()
3642 AddToWorklist(ANDNode.getNode()); in visitORLike()
3670 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitORLike()
3684 SDValue X = DAG.getNode(ISD::OR, SDLoc(N0), VT, in visitORLike()
3687 return DAG.getNode(ISD::AND, DL, VT, X, in visitORLike()
3699 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitORLike()
3700 SDValue X = DAG.getNode(ISD::OR, SDLoc(N0), VT, in visitORLike()
3702 return DAG.getNode(ISD::AND, SDLoc(LocReference), VT, N0.getOperand(0), X); in visitORLike()
3719 if (ISD::isBuildVectorAllZeros(N0.getNode())) in visitOR()
3721 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitOR()
3725 if (ISD::isBuildVectorAllOnes(N0.getNode())) in visitOR()
3731 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitOR()
3744 bool ZeroN00 = ISD::isBuildVectorAllZeros(N0.getOperand(0).getNode()); in visitOR()
3745 bool ZeroN01 = ISD::isBuildVectorAllZeros(N0.getOperand(1).getNode()); in visitOR()
3746 bool ZeroN10 = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitOR()
3747 bool ZeroN11 = ISD::isBuildVectorAllZeros(N1.getOperand(1).getNode()); in visitOR()
3814 return DAG.getNode(ISD::OR, SDLoc(N), VT, N1, N0); in visitOR()
3839 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && in visitOR()
3845 return DAG.getNode( in visitOR()
3847 DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1), COR); in visitOR()
4009 return DAG.getNode(HasPos ? PosOpcode : NegOpcode, DL, VT, Shifted, in MatchRotatePosNeg()
4010 HasPos ? Pos : Neg).getNode(); in MatchRotatePosNeg()
4067 SDValue Rot = DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT, in MatchRotate()
4071 if (LHSMask.getNode() || RHSMask.getNode()) { in MatchRotate()
4075 if (LHSMask.getNode()) { in MatchRotate()
4077 Mask = DAG.getNode(ISD::AND, DL, VT, Mask, in MatchRotate()
4078 DAG.getNode(ISD::OR, DL, VT, LHSMask, in MatchRotate()
4081 if (RHSMask.getNode()) { in MatchRotate()
4083 Mask = DAG.getNode(ISD::AND, DL, VT, Mask, in MatchRotate()
4084 DAG.getNode(ISD::OR, DL, VT, RHSMask, in MatchRotate()
4088 Rot = DAG.getNode(ISD::AND, DL, VT, Rot, Mask); in MatchRotate()
4091 return Rot.getNode(); in MatchRotate()
4096 if (LHSMask.getNode() || RHSMask.getNode()) in MatchRotate()
4138 if (ISD::isBuildVectorAllZeros(N0.getNode())) in visitXOR()
4140 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitXOR()
4160 return DAG.getNode(ISD::XOR, SDLoc(N), VT, N1, N0); in visitXOR()
4170 if (TLI.isConstTrueVal(N1.getNode()) && isSetCCEquivalent(N0, LHS, RHS, CC)) { in visitXOR()
4191 N0.getNode()->hasOneUse() && in visitXOR()
4195 V = DAG.getNode(ISD::XOR, DL, V.getValueType(), V, in visitXOR()
4197 AddToWorklist(V.getNode()); in visitXOR()
4198 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, V); in visitXOR()
4207 LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS in visitXOR()
4208 RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS in visitXOR()
4209 AddToWorklist(LHS.getNode()); AddToWorklist(RHS.getNode()); in visitXOR()
4210 return DAG.getNode(NewOpcode, SDLoc(N), VT, LHS, RHS); in visitXOR()
4219 LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS in visitXOR()
4220 RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS in visitXOR()
4221 AddToWorklist(LHS.getNode()); AddToWorklist(RHS.getNode()); in visitXOR()
4222 return DAG.getNode(NewOpcode, SDLoc(N), VT, LHS, RHS); in visitXOR()
4226 if (N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && in visitXOR()
4230 AddToWorklist(NotX.getNode()); in visitXOR()
4231 return DAG.getNode(ISD::AND, SDLoc(N), VT, NotX, N1); in visitXOR()
4237 return DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1), in visitXOR()
4243 return DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0), in visitXOR()
4273 return DAG.getNode(ISD::ROTL, DL, VT, DAG.getConstant(~1, DL, VT), in visitXOR()
4293 SDNode *LHS = N->getOperand(0).getNode(); in visitShiftByConstant()
4327 SDNode *BinOpLHSVal = LHS->getOperand(0).getNode(); in visitShiftByConstant()
4350 SDValue NewRHS = DAG.getNode(N->getOpcode(), SDLoc(LHS->getOperand(1)), in visitShiftByConstant()
4356 SDValue NewShift = DAG.getNode(N->getOpcode(), in visitShiftByConstant()
4361 return DAG.getNode(LHS->getOpcode(), SDLoc(N), VT, NewShift, NewRHS); in visitShiftByConstant()
4380 return DAG.getNode(ISD::AND, DL, TruncVT, in distributeTruncateThroughAnd()
4381 DAG.getNode(ISD::TRUNCATE, DL, TruncVT, N00), in distributeTruncateThroughAnd()
4395 distributeTruncateThroughAnd(N->getOperand(1).getNode())) in visitRotate()
4396 return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), in visitRotate()
4428 return DAG.getNode(ISD::AND, SDLoc(N), VT, N00, C); in visitSHL()
4459 if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode())) in visitSHL()
4460 return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0, NewOp1); in visitSHL()
4474 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), in visitSHL()
4498 return DAG.getNode(ISD::SHL, DL, VT, in visitSHL()
4499 DAG.getNode(N0.getOpcode(), DL, VT, in visitSHL()
4520 SDValue NewSHL = DAG.getNode(ISD::SHL, DL, NewOp0.getValueType(), in visitSHL()
4523 AddToWorklist(NewSHL.getNode()); in visitSHL()
4524 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N0), VT, NewSHL); in visitSHL()
4539 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), in visitSHL()
4541 return DAG.getNode(N0.getOpcode(), DL, VT, N0.getOperand(0), in visitSHL()
4560 Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), in visitSHL()
4565 Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), in visitSHL()
4569 return DAG.getNode(ISD::AND, DL, VT, Shift, in visitSHL()
4582 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), in visitSHL()
4590 if (N1C && N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() && in visitSHL()
4592 ISD::isConstantSplatVector(N0.getOperand(1).getNode(), Val))) { in visitSHL()
4593 SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1); in visitSHL()
4594 SDValue Shl1 = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1); in visitSHL()
4595 return DAG.getNode(ISD::ADD, SDLoc(N), VT, Shl0, Shl1); in visitSHL()
4599 if (N1C && N0.getOpcode() == ISD::MUL && N0.getNode()->hasOneUse()) { in visitSHL()
4603 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), Folded); in visitSHL()
4655 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, in visitSRA()
4666 return DAG.getNode(ISD::SRA, DL, VT, N0.getOperand(0), in visitSRA()
4702 SDValue Shift = DAG.getNode(ISD::SRL, DL, VT, in visitSRA()
4704 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, TruncVT, in visitSRA()
4706 return DAG.getNode(ISD::SIGN_EXTEND, DL, in visitSRA()
4715 if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode())) in visitSRA()
4716 return DAG.getNode(ISD::SRA, SDLoc(N), VT, N0, NewOp1); in visitSRA()
4737 SDValue SRA = DAG.getNode(ISD::SRA, DL, LargeVT, in visitSRA()
4739 return DAG.getNode(ISD::TRUNCATE, DL, VT, SRA); in visitSRA()
4751 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0, N1); in visitSRA()
4801 return DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), in visitSRL()
4821 return DAG.getNode(ISD::TRUNCATE, DL, VT, in visitSRL()
4822 DAG.getNode(ISD::SRL, DL, InnerShiftVT, in visitSRL()
4835 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), in visitSRL()
4851 SDValue SmallShift = DAG.getNode(ISD::SRL, DL0, SmallVT, in visitSRL()
4855 AddToWorklist(SmallShift.getNode()); in visitSRL()
4858 return DAG.getNode(ISD::AND, DL, VT, in visitSRL()
4859 DAG.getNode(ISD::ANY_EXTEND, DL, VT, SmallShift), in visitSRL()
4868 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1); in visitSRL()
4897 Op = DAG.getNode(ISD::SRL, DL, VT, Op, in visitSRL()
4900 AddToWorklist(Op.getNode()); in visitSRL()
4904 return DAG.getNode(ISD::XOR, DL, VT, in visitSRL()
4912 if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode())) in visitSRL()
4913 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0, NewOp1); in visitSRL()
4967 return DAG.getNode(ISD::BSWAP, SDLoc(N), VT, N0); in visitBSWAP()
4989 return DAG.getNode(ISD::CTLZ, SDLoc(N), VT, N0); in visitCTLZ()
4999 return DAG.getNode(ISD::CTLZ_ZERO_UNDEF, SDLoc(N), VT, N0); in visitCTLZ_ZERO_UNDEF()
5009 return DAG.getNode(ISD::CTTZ, SDLoc(N), VT, N0); in visitCTTZ()
5019 return DAG.getNode(ISD::CTTZ_ZERO_UNDEF, SDLoc(N), VT, N0); in visitCTTZ_ZERO_UNDEF()
5029 return DAG.getNode(ISD::CTPOP, SDLoc(N), VT, N0); in visitCTPOP()
5051 return DAG.getNode(Opcode, DL, VT, LHS, RHS); in combineMinNumMaxNum()
5062 return DAG.getNode(Opcode, DL, VT, LHS, RHS); in combineMinNumMaxNum()
5087 return DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N2); in visitSELECT()
5107 return DAG.getNode(ISD::XOR, DL, VT0, in visitSELECT()
5111 XORNode = DAG.getNode(ISD::XOR, DL0, VT0, in visitSELECT()
5113 AddToWorklist(XORNode.getNode()); in visitSELECT()
5115 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, XORNode); in visitSELECT()
5116 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, XORNode); in visitSELECT()
5121 AddToWorklist(NOTNode.getNode()); in visitSELECT()
5122 return DAG.getNode(ISD::AND, SDLoc(N), VT, NOTNode, N2); in visitSELECT()
5127 AddToWorklist(NOTNode.getNode()); in visitSELECT()
5128 return DAG.getNode(ISD::OR, SDLoc(N), VT, NOTNode, N1); in visitSELECT()
5132 return DAG.getNode(ISD::AND, SDLoc(N), VT, N0, N1); in visitSELECT()
5136 return DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N2); in visitSELECT()
5140 return DAG.getNode(ISD::AND, SDLoc(N), VT, N0, N1); in visitSELECT()
5162 SDValue InnerSelect = DAG.getNode(ISD::SELECT, SDLoc(N), in visitSELECT()
5165 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0, in visitSELECT()
5172 SDValue InnerSelect = DAG.getNode(ISD::SELECT, SDLoc(N), in visitSELECT()
5175 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0, N1, in visitSELECT()
5187 SDValue And = DAG.getNode(ISD::AND, SDLoc(N), N0.getValueType(), in visitSELECT()
5189 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), And, in visitSELECT()
5194 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined, in visitSELECT()
5206 SDValue Or = DAG.getNode(ISD::OR, SDLoc(N), N0.getValueType(), in visitSELECT()
5208 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Or, in visitSELECT()
5213 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined, in visitSELECT()
5245 return DAG.getNode(ISD::SELECT_CC, SDLoc(N), VT, in visitSELECT()
5265 Lo = DAG.getNode(N->getOpcode(), DL, LoVT, LL, RL, N->getOperand(2)); in SplitVSETCC()
5266 Hi = DAG.getNode(N->getOpcode(), DL, HiVT, LH, RH, N->getOperand(2)); in SplitVSETCC()
5301 else if (Cond->getOperand(i).getNode() != BottomHalf) in ConvertSelectToConcatVector()
5313 else if (Cond->getOperand(i).getNode() != TopHalf) in ConvertSelectToConcatVector()
5320 return DAG.getNode( in ConvertSelectToConcatVector()
5348 std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG); in visitMSCATTER()
5381 AddToWorklist(Lo.getNode()); in visitMSCATTER()
5382 AddToWorklist(Hi.getNode()); in visitMSCATTER()
5384 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo, Hi); in visitMSCATTER()
5409 std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG); in visitMSTORE()
5441 Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, in visitMSTORE()
5453 AddToWorklist(Lo.getNode()); in visitMSTORE()
5454 AddToWorklist(Hi.getNode()); in visitMSTORE()
5456 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo, Hi); in visitMSTORE()
5486 std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG); in visitMGATHER()
5520 AddToWorklist(Lo.getNode()); in visitMGATHER()
5521 AddToWorklist(Hi.getNode()); in visitMGATHER()
5525 Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo.getValue(1), in visitMGATHER()
5532 SDValue GatherRes = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Lo, Hi); in visitMGATHER()
5561 std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG); in visitMLOAD()
5593 Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, in visitMLOAD()
5604 AddToWorklist(Lo.getNode()); in visitMLOAD()
5605 AddToWorklist(Hi.getNode()); in visitMLOAD()
5609 Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo.getValue(1), in visitMLOAD()
5616 SDValue LoadRes = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Lo, Hi); in visitMLOAD()
5639 bool RHSIsAllZeros = ISD::isBuildVectorAllZeros(RHS.getNode()); in visitVSELECT()
5642 (ISD::isBuildVectorAllOnes(RHS.getNode()) && CC == ISD::SETGT)) && in visitVSELECT()
5644 isAbs = ISD::isBuildVectorAllZeros(N2.getOperand(0).getNode()); in visitVSELECT()
5647 isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitVSELECT()
5651 SDValue Shift = DAG.getNode( in visitVSELECT()
5654 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, LHS, Shift); in visitVSELECT()
5655 AddToWorklist(Shift.getNode()); in visitVSELECT()
5656 AddToWorklist(Add.getNode()); in visitVSELECT()
5657 return DAG.getNode(ISD::XOR, DL, VT, Add, Shift); in visitVSELECT()
5677 std::tie(CCLo, CCHi) = SplitVSETCC(N0.getNode(), DAG); in visitVSELECT()
5681 Lo = DAG.getNode(N->getOpcode(), DL, LL.getValueType(), CCLo, LL, RL); in visitVSELECT()
5682 Hi = DAG.getNode(N->getOpcode(), DL, LH.getValueType(), CCHi, LH, RH); in visitVSELECT()
5686 AddToWorklist(Lo.getNode()); in visitVSELECT()
5687 AddToWorklist(Hi.getNode()); in visitVSELECT()
5689 return DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Lo, Hi); in visitVSELECT()
5693 if (ISD::isBuildVectorAllOnes(N0.getNode())) in visitVSELECT()
5696 if (ISD::isBuildVectorAllZeros(N0.getNode())) in visitVSELECT()
5704 ISD::isBuildVectorOfConstantSDNodes(N0.getNode())) { in visitVSELECT()
5727 AddToWorklist(SCC.getNode()); in visitSELECT_CC()
5729 if (ConstantSDNode *SCCC = dyn_cast<ConstantSDNode>(SCC.getNode())) { in visitSELECT_CC()
5740 return DAG.getNode(ISD::SELECT_CC, SDLoc(N), N2.getValueType(), in visitSELECT_CC()
5768 return DAG.getNode(ISD::SETCC, SDLoc(N), N->getVTList(), LHS, RHS, Cond); in visitSETCCE()
5795 return DAG.getNode(Opcode, SDLoc(N), VT, N0).getNode(); in tryToFoldExtendOfConstant()
5803 ISD::isBuildVectorOfConstantSDNodes(N0.getNode()))) in tryToFoldExtendOfConstant()
5830 return DAG.getBuildVector(VT, DL, Elts).getNode(); in tryToFoldExtendOfConstant()
5843 for (SDNode::use_iterator UI = N0.getNode()->use_begin(), in ExtendUsesToFormExtLoad()
5844 UE = N0.getNode()->use_end(); in ExtendUsesToFormExtLoad()
5910 Ops.push_back(DAG.getNode(ExtType, DL, ExtLoad->getValueType(0), SOp)); in ExtendSetCCUses()
5914 CombineTo(SetCC, DAG.getNode(ISD::SETCC, DL, SetCC->getValueType(0), Ops)); in ExtendSetCCUses()
5992 BasePtr = DAG.getNode(ISD::ADD, DL, BasePtr.getValueType(), BasePtr, in CombineExtLoad()
5999 SDValue NewChain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chains); in CombineExtLoad()
6000 SDValue NewValue = DAG.getNode(ISD::CONCAT_VECTORS, DL, DstVT, Loads); in CombineExtLoad()
6007 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(), NewValue); in CombineExtLoad()
6008 CombineTo(N0.getNode(), Trunc, NewChain); in CombineExtLoad()
6025 return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, in visitSIGN_EXTEND()
6031 if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) { in visitSIGN_EXTEND()
6032 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitSIGN_EXTEND()
6033 if (NarrowLoad.getNode() != N0.getNode()) { in visitSIGN_EXTEND()
6034 CombineTo(N0.getNode(), NarrowLoad); in visitSIGN_EXTEND()
6058 return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, Op); in visitSIGN_EXTEND()
6063 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op); in visitSIGN_EXTEND()
6070 Op = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N0), VT, Op); in visitSIGN_EXTEND()
6072 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT, Op); in visitSIGN_EXTEND()
6073 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, Op, in visitSIGN_EXTEND()
6081 if (ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitSIGN_EXTEND()
6098 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), in visitSIGN_EXTEND()
6100 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitSIGN_EXTEND()
6114 if ((ISD::isSEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) && in visitSIGN_EXTEND()
6115 ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) { in visitSIGN_EXTEND()
6125 CombineTo(N0.getNode(), in visitSIGN_EXTEND()
6126 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), in visitSIGN_EXTEND()
6156 SDValue And = DAG.getNode(N0.getOpcode(), DL, VT, in visitSIGN_EXTEND()
6158 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, in visitSIGN_EXTEND()
6162 CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1)); in visitSIGN_EXTEND()
6232 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, N0); in visitSIGN_EXTEND()
6284 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, in visitZERO_EXTEND()
6303 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, Op); in visitZERO_EXTEND()
6305 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op); in visitZERO_EXTEND()
6314 if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) { in visitZERO_EXTEND()
6315 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitZERO_EXTEND()
6316 if (NarrowLoad.getNode() != N0.getNode()) { in visitZERO_EXTEND()
6317 CombineTo(N0.getNode(), NarrowLoad); in visitZERO_EXTEND()
6329 if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) { in visitZERO_EXTEND()
6330 SDNode *oye = N0.getNode()->getOperand(0).getNode(); in visitZERO_EXTEND()
6331 if (NarrowLoad.getNode() != N0.getNode()) { in visitZERO_EXTEND()
6332 CombineTo(N0.getNode(), NarrowLoad); in visitZERO_EXTEND()
6349 AddToWorklist(Op.getNode()); in visitZERO_EXTEND()
6357 Op = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, Op); in visitZERO_EXTEND()
6358 AddToWorklist(Op.getNode()); in visitZERO_EXTEND()
6360 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op); in visitZERO_EXTEND()
6361 AddToWorklist(Op.getNode()); in visitZERO_EXTEND()
6377 X = DAG.getNode(ISD::ANY_EXTEND, SDLoc(X), VT, X); in visitZERO_EXTEND()
6379 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X); in visitZERO_EXTEND()
6384 return DAG.getNode(ISD::AND, DL, VT, in visitZERO_EXTEND()
6391 if (ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitZERO_EXTEND()
6408 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), in visitZERO_EXTEND()
6410 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitZERO_EXTEND()
6459 SDValue And = DAG.getNode(N0.getOpcode(), DL, VT, in visitZERO_EXTEND()
6461 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, in visitZERO_EXTEND()
6465 CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1)); in visitZERO_EXTEND()
6475 if ((ISD::isZEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) && in visitZERO_EXTEND()
6476 ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) { in visitZERO_EXTEND()
6486 CombineTo(N0.getNode(), in visitZERO_EXTEND()
6487 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(), in visitZERO_EXTEND()
6511 SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0), in visitZERO_EXTEND()
6513 return DAG.getNode(ISD::AND, DL, VT, VSetCC, VecOnes); in visitZERO_EXTEND()
6524 DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0), in visitZERO_EXTEND()
6526 return DAG.getNode(ISD::AND, DL, VT, DAG.getSExtOrTrunc(VsetCC, DL, VT), in visitZERO_EXTEND()
6560 ShAmt = DAG.getNode(ISD::ZERO_EXTEND, DL, MVT::i32, ShAmt); in visitZERO_EXTEND()
6562 return DAG.getNode(N0.getOpcode(), DL, VT, in visitZERO_EXTEND()
6563 DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)), in visitZERO_EXTEND()
6584 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitANY_EXTEND()
6589 if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) { in visitANY_EXTEND()
6590 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitANY_EXTEND()
6591 if (NarrowLoad.getNode() != N0.getNode()) { in visitANY_EXTEND()
6592 CombineTo(N0.getNode(), NarrowLoad); in visitANY_EXTEND()
6606 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, TruncOp); in visitANY_EXTEND()
6607 return DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, TruncOp); in visitANY_EXTEND()
6619 X = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, X); in visitANY_EXTEND()
6621 X = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, X); in visitANY_EXTEND()
6626 return DAG.getNode(ISD::AND, DL, VT, in visitANY_EXTEND()
6634 if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() && in visitANY_EXTEND()
6635 ISD::isUNINDEXEDLoad(N0.getNode()) && in visitANY_EXTEND()
6648 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), in visitANY_EXTEND()
6650 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitANY_EXTEND()
6661 !ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitANY_EXTEND()
6671 CombineTo(N0.getNode(), in visitANY_EXTEND()
6672 DAG.getNode(ISD::TRUNCATE, SDLoc(N0), in visitANY_EXTEND()
6728 const ConstantSDNode *CV = cast<ConstantSDNode>(V.getNode()); in GetDemandedBits()
6746 if (!V.getNode()->hasOneUse()) in GetDemandedBits()
6756 return DAG.getNode(ISD::SRL, SDLoc(V), V.getValueType(), in GetDemandedBits()
6896 SDValue NewPtr = DAG.getNode(ISD::ADD, DL, in ReduceLoadWidth()
6900 AddToWorklist(NewPtr.getNode()); in ReduceLoadWidth()
6932 Result = DAG.getNode(ISD::SHL, DL, VT, in ReduceLoadWidth()
6953 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0, N1); in visitSIGN_EXTEND_INREG()
6962 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, in visitSIGN_EXTEND_INREG()
6972 return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00, N1); in visitSIGN_EXTEND_INREG()
6999 return DAG.getNode(ISD::SRA, SDLoc(N), VT, in visitSIGN_EXTEND_INREG()
7005 if (ISD::isEXTLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
7006 ISD::isUNINDEXEDLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
7016 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitSIGN_EXTEND_INREG()
7017 AddToWorklist(ExtLoad.getNode()); in visitSIGN_EXTEND_INREG()
7021 if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
7032 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitSIGN_EXTEND_INREG()
7038 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND_INREG()
7040 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, in visitSIGN_EXTEND_INREG()
7085 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0); in visitTRUNCATE()
7088 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
7095 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
7098 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
7134 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, TrTy, in visitTRUNCATE()
7147 SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1)); in visitTRUNCATE()
7148 SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2)); in visitTRUNCATE()
7149 return DAG.getNode(ISD::SELECT, SDLoc(N), VT, Cond, TruncOp0, TruncOp1); in visitTRUNCATE()
7165 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0)); in visitTRUNCATE()
7166 return DAG.getNode(ISD::SHL, SL, VT, Trunc, in visitTRUNCATE()
7212 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter); in visitTRUNCATE()
7222 if (N0.hasOneUse() && ISD::isUNINDEXEDLoad(N0.getNode())) { in visitTRUNCATE()
7262 assert(V.getNode() && "The single defined operand is empty!"); in visitTRUNCATE()
7269 SDValue NV = DAG.getNode(ISD::TRUNCATE, SDLoc(V), VTs[i], V); in visitTRUNCATE()
7270 AddToWorklist(NV.getNode()); in visitTRUNCATE()
7273 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Opnds); in visitTRUNCATE()
7290 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, VT, in visitTRUNCATE()
7306 return Elt.getNode(); in getBuildPairElt()
7307 return Elt.getOperand(Elt.getResNo()).getNode(); in getBuildPairElt()
7382 return DAG.getNode(FPOpcode, SDLoc(N), VT, LogicOp0->getOperand(0)); in foldBitcastedFPLogic()
7396 N0.getOpcode() == ISD::BUILD_VECTOR && N0.getNode()->hasOneUse() && in visitBITCAST()
7404 return ConstantFoldBITCASTofBUILD_VECTOR(N0.getNode(), DestEltVT); in visitBITCAST()
7426 if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() && in visitBITCAST()
7468 N0.getNode()->hasOneUse() && VT.isInteger() && in visitBITCAST()
7471 AddToWorklist(NewConv.getNode()); in visitBITCAST()
7481 AddToWorklist(FlipBit.getNode()); in visitBITCAST()
7485 DAG.getNode(ISD::EXTRACT_ELEMENT, SDLoc(NewConv), MVT::i64, NewConv, in visitBITCAST()
7488 AddToWorklist(Hi.getNode()); in visitBITCAST()
7489 FlipBit = DAG.getNode(ISD::AND, SDLoc(N0), MVT::i64, Hi, SignBit); in visitBITCAST()
7490 AddToWorklist(FlipBit.getNode()); in visitBITCAST()
7493 DAG.getNode(ISD::BUILD_PAIR, SDLoc(N0), VT, FlipBit, FlipBit); in visitBITCAST()
7494 AddToWorklist(FlipBits.getNode()); in visitBITCAST()
7495 return DAG.getNode(ISD::XOR, DL, VT, NewConv, FlipBits); in visitBITCAST()
7499 return DAG.getNode(ISD::XOR, DL, VT, in visitBITCAST()
7502 return DAG.getNode(ISD::AND, DL, VT, in visitBITCAST()
7517 if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse() && in visitBITCAST()
7524 AddToWorklist(X.getNode()); in visitBITCAST()
7529 X = DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, X); in visitBITCAST()
7530 AddToWorklist(X.getNode()); in visitBITCAST()
7535 X = DAG.getNode(ISD::SRL, DL, in visitBITCAST()
7539 AddToWorklist(X.getNode()); in visitBITCAST()
7540 X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X); in visitBITCAST()
7541 AddToWorklist(X.getNode()); in visitBITCAST()
7547 AddToWorklist(Cst.getNode()); in visitBITCAST()
7549 AddToWorklist(X.getNode()); in visitBITCAST()
7550 SDValue XorResult = DAG.getNode(ISD::XOR, SDLoc(N0), VT, Cst, X); in visitBITCAST()
7551 AddToWorklist(XorResult.getNode()); in visitBITCAST()
7552 SDValue XorResult64 = DAG.getNode( in visitBITCAST()
7556 AddToWorklist(XorResult64.getNode()); in visitBITCAST()
7558 DAG.getNode(ISD::AND, SDLoc(XorResult64), MVT::i64, XorResult64, in visitBITCAST()
7560 AddToWorklist(FlipBit.getNode()); in visitBITCAST()
7562 DAG.getNode(ISD::BUILD_PAIR, SDLoc(N0), VT, FlipBit, FlipBit); in visitBITCAST()
7563 AddToWorklist(FlipBits.getNode()); in visitBITCAST()
7564 return DAG.getNode(ISD::XOR, SDLoc(N), VT, Cst, FlipBits); in visitBITCAST()
7567 X = DAG.getNode(ISD::AND, SDLoc(X), VT, in visitBITCAST()
7569 AddToWorklist(X.getNode()); in visitBITCAST()
7572 Cst = DAG.getNode(ISD::AND, SDLoc(Cst), VT, in visitBITCAST()
7574 AddToWorklist(Cst.getNode()); in visitBITCAST()
7576 return DAG.getNode(ISD::OR, SDLoc(N), VT, X, Cst); in visitBITCAST()
7582 if (SDValue CombineLD = CombineConsecutiveLoads(N0.getNode(), VT)) in visitBITCAST()
7601 if (ISD::isBuildVectorOfConstantSDNodes(Op.getNode()) || in visitBITCAST()
7602 ISD::isBuildVectorOfConstantFPSDNodes(Op.getNode())) in visitBITCAST()
7659 return DAG.getNode(ISD::SCALAR_TO_VECTOR, SDLoc(BV), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
7667 Op = DAG.getNode(ISD::TRUNCATE, SDLoc(BV), SrcEltVT, Op); in ConstantFoldBITCASTofBUILD_VECTOR()
7669 AddToWorklist(Ops.back().getNode()); in ConstantFoldBITCASTofBUILD_VECTOR()
7681 BV = ConstantFoldBITCASTofBUILD_VECTOR(BV, IntVT).getNode(); in ConstantFoldBITCASTofBUILD_VECTOR()
7689 SDNode *Tmp = ConstantFoldBITCASTofBUILD_VECTOR(BV, TmpVT).getNode(); in ConstantFoldBITCASTofBUILD_VECTOR()
7797 if (N0.getNode()->use_size() > N1.getNode()->use_size()) in visitFADDForFMACombine()
7804 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7812 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7822 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7823 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFADDForFMACombine()
7825 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFADDForFMACombine()
7834 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7835 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFADDForFMACombine()
7837 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFADDForFMACombine()
7847 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7849 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7858 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7860 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7871 return DAG.getNode(PreferredFusedOpcode, SL, VT, X, Y, in visitFADDForFMACombine()
7872 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7873 DAG.getNode(ISD::FP_EXTEND, SL, VT, U), in visitFADDForFMACombine()
7874 DAG.getNode(ISD::FP_EXTEND, SL, VT, V), in visitFADDForFMACombine()
7895 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7896 DAG.getNode(ISD::FP_EXTEND, SL, VT, X), in visitFADDForFMACombine()
7897 DAG.getNode(ISD::FP_EXTEND, SL, VT, Y), in visitFADDForFMACombine()
7898 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFADDForFMACombine()
7899 DAG.getNode(ISD::FP_EXTEND, SL, VT, U), in visitFADDForFMACombine()
7900 DAG.getNode(ISD::FP_EXTEND, SL, VT, V), in visitFADDForFMACombine()
7983 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
7985 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
7992 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
7993 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8003 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8004 DAG.getNode(ISD::FNEG, SL, VT, N00), N01, in visitFSUBForFMACombine()
8005 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
8015 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8016 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8018 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8020 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
8029 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8030 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8031 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8033 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8049 return DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8050 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8051 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8053 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8071 return DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8072 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8073 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8075 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8090 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8092 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8095 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8105 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8106 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8109 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8110 DAG.getNode(ISD::FNEG, SL, VT, N20), in visitFSUBForFMACombine()
8123 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8125 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8126 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8128 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8130 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8146 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8147 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8149 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8151 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8152 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8154 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8156 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8169 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8170 DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), in visitFSUBForFMACombine()
8172 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8173 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8174 DAG.getNode(ISD::FP_EXTEND, SL, in visitFSUBForFMACombine()
8176 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8196 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8197 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8198 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8200 DAG.getNode(ISD::FP_EXTEND, SL, VT, N101), in visitFSUBForFMACombine()
8201 DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFSUBForFMACombine()
8202 DAG.getNode(ISD::FNEG, SL, VT, in visitFSUBForFMACombine()
8203 DAG.getNode(ISD::FP_EXTEND, SL, in visitFSUBForFMACombine()
8205 DAG.getNode(ISD::FP_EXTEND, SL, VT, in visitFSUBForFMACombine()
8251 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, Y); in visitFMULForFMACombine()
8253 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMACombine()
8254 DAG.getNode(ISD::FNEG, SL, VT, Y)); in visitFMULForFMACombine()
8272 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFMULForFMACombine()
8273 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMACombine()
8276 return DAG.getNode(PreferredFusedOpcode, SL, VT, in visitFMULForFMACombine()
8277 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMACombine()
8278 DAG.getNode(ISD::FNEG, SL, VT, Y)); in visitFMULForFMACombine()
8282 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMACombine()
8283 DAG.getNode(ISD::FNEG, SL, VT, Y)); in visitFMULForFMACombine()
8285 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, Y); in visitFMULForFMACombine()
8315 return DAG.getNode(ISD::FADD, DL, VT, N0, N1, Flags); in visitFADD()
8319 return DAG.getNode(ISD::FADD, DL, VT, N1, N0, Flags); in visitFADD()
8324 return DAG.getNode(ISD::FSUB, DL, VT, N0, in visitFADD()
8330 return DAG.getNode(ISD::FSUB, DL, VT, N1, in visitFADD()
8345 if (N1CFP && N0.getOpcode() == ISD::FADD && N0.getNode()->hasOneUse() && in visitFADD()
8347 return DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(0), in visitFADD()
8348 DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1, in visitFADD()
8370 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
8372 return DAG.getNode(ISD::FMUL, DL, VT, N1, NewCFP, Flags); in visitFADD()
8379 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
8381 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), NewCFP, Flags); in visitFADD()
8391 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
8393 return DAG.getNode(ISD::FMUL, DL, VT, N0, NewCFP, Flags); in visitFADD()
8400 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
8402 return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP, Flags); in visitFADD()
8411 return DAG.getNode(ISD::FMUL, DL, VT, in visitFADD()
8421 return DAG.getNode(ISD::FMUL, DL, VT, in visitFADD()
8432 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), in visitFADD()
8440 AddToWorklist(Fused.getNode()); in visitFADD()
8463 return DAG.getNode(ISD::FSUB, dl, VT, N0, N1, Flags); in visitFSUB()
8467 return DAG.getNode(ISD::FADD, dl, VT, N0, in visitFSUB()
8481 return DAG.getNode(ISD::FNEG, dl, VT, N1); in visitFSUB()
8504 AddToWorklist(Fused.getNode()); in visitFSUB()
8530 return DAG.getNode(ISD::FMUL, DL, VT, N0, N1, Flags); in visitFMUL()
8535 return DAG.getNode(ISD::FMUL, DL, VT, N1, N0, Flags); in visitFMUL()
8564 SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, N01, N1, Flags); in visitFMUL()
8565 return DAG.getNode(ISD::FMUL, DL, VT, N00, MulConsts, Flags); in visitFMUL()
8578 SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, Two, N1, Flags); in visitFMUL()
8579 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), MulConsts, Flags); in visitFMUL()
8585 return DAG.getNode(ISD::FADD, DL, VT, N0, N0, Flags); in visitFMUL()
8590 return DAG.getNode(ISD::FNEG, DL, VT, N0); in visitFMUL()
8598 return DAG.getNode(ISD::FMUL, DL, VT, in visitFMUL()
8607 AddToWorklist(Fused.getNode()); in visitFMUL()
8628 return DAG.getNode(ISD::FMA, dl, VT, N0, N1, N2); in visitFMA()
8639 return DAG.getNode(ISD::FADD, SDLoc(N), VT, N1, N2); in visitFMA()
8641 return DAG.getNode(ISD::FADD, SDLoc(N), VT, N0, N2); in visitFMA()
8646 return DAG.getNode(ISD::FMA, SDLoc(N), VT, N1, N0, N2); in visitFMA()
8658 return DAG.getNode(ISD::FMUL, dl, VT, N0, in visitFMA()
8659 DAG.getNode(ISD::FADD, dl, VT, N1, N2.getOperand(1), in visitFMA()
8667 return DAG.getNode(ISD::FMA, dl, VT, in visitFMA()
8669 DAG.getNode(ISD::FMUL, dl, VT, N1, N0.getOperand(1), in visitFMA()
8680 return DAG.getNode(ISD::FADD, dl, VT, N0, N2); in visitFMA()
8684 SDValue RHSNeg = DAG.getNode(ISD::FNEG, dl, VT, N0); in visitFMA()
8685 AddToWorklist(RHSNeg.getNode()); in visitFMA()
8687 return DAG.getNode(ISD::FADD, dl, VT, N2, RHSNeg); in visitFMA()
8694 return DAG.getNode(ISD::FMUL, dl, VT, N0, in visitFMA()
8695 DAG.getNode(ISD::FADD, dl, VT, in visitFMA()
8702 return DAG.getNode(ISD::FMUL, dl, VT, N0, in visitFMA()
8703 DAG.getNode(ISD::FADD, dl, VT, in visitFMA()
8758 SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1, Flags); in combineRepeatedFPDivisors()
8764 SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(U), VT, Dividend, in combineRepeatedFPDivisors()
8767 } else if (U != Reciprocal.getNode()) { in combineRepeatedFPDivisors()
8793 return DAG.getNode(ISD::FDIV, SDLoc(N), VT, N0, N1, Flags); in visitFDIV()
8811 return DAG.getNode(ISD::FMUL, DL, VT, N0, in visitFDIV()
8819 return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags); in visitFDIV()
8825 RV = DAG.getNode(ISD::FP_EXTEND, SDLoc(N1), VT, RV); in visitFDIV()
8826 AddToWorklist(RV.getNode()); in visitFDIV()
8827 return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags); in visitFDIV()
8833 RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1)); in visitFDIV()
8834 AddToWorklist(RV.getNode()); in visitFDIV()
8835 return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags); in visitFDIV()
8849 if (SqrtOp.getNode()) { in visitFDIV()
8853 RV = DAG.getNode(ISD::FDIV, SDLoc(N1), VT, RV, OtherOp, Flags); in visitFDIV()
8854 AddToWorklist(RV.getNode()); in visitFDIV()
8855 return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags); in visitFDIV()
8862 AddToWorklist(RV.getNode()); in visitFDIV()
8863 return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags); in visitFDIV()
8873 return DAG.getNode(ISD::FDIV, SDLoc(N), VT, in visitFDIV()
8895 return DAG.getNode(ISD::FREM, SDLoc(N), VT, N0, N1, in visitFREM()
8937 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1); in visitFCOPYSIGN()
8945 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0); in visitFCOPYSIGN()
8948 return DAG.getNode(ISD::FNEG, SDLoc(N), VT, in visitFCOPYSIGN()
8949 DAG.getNode(ISD::FABS, SDLoc(N0), VT, N0)); in visitFCOPYSIGN()
8958 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, in visitFCOPYSIGN()
8963 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0); in visitFCOPYSIGN()
8967 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, in visitFCOPYSIGN()
8973 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, in visitFCOPYSIGN()
8989 return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0); in visitSINT_TO_FP()
8997 return DAG.getNode(ISD::UINT_TO_FP, SDLoc(N), VT, N0); in visitSINT_TO_FP()
9012 return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops); in visitSINT_TO_FP()
9026 return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops); in visitSINT_TO_FP()
9043 return DAG.getNode(ISD::UINT_TO_FP, SDLoc(N), VT, N0); in visitUINT_TO_FP()
9051 return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0); in visitUINT_TO_FP()
9066 return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops); in visitUINT_TO_FP()
9106 return DAG.getNode(ExtOp, SDLoc(N), VT, Src); in FoldIntToFPToInt()
9109 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Src); in FoldIntToFPToInt()
9121 return DAG.getNode(ISD::FP_TO_SINT, SDLoc(N), VT, N0); in visitFP_TO_SINT()
9132 return DAG.getNode(ISD::FP_TO_UINT, SDLoc(N), VT, N0); in visitFP_TO_UINT()
9145 return DAG.getNode(ISD::FP_ROUND, SDLoc(N), VT, N0, N1); in visitFP_ROUND()
9154 const bool N0IsTrunc = N0.getNode()->getConstantOperandVal(1) == 1; in visitFP_ROUND()
9173 return DAG.getNode(ISD::FP_ROUND, DL, VT, N0.getOperand(0), in visitFP_ROUND()
9179 if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse()) { in visitFP_ROUND()
9180 SDValue Tmp = DAG.getNode(ISD::FP_ROUND, SDLoc(N0), VT, in visitFP_ROUND()
9182 AddToWorklist(Tmp.getNode()); in visitFP_ROUND()
9183 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, in visitFP_ROUND()
9200 return DAG.getNode(ISD::FP_EXTEND, DL, VT, Round); in visitFP_ROUND_INREG()
9217 return DAG.getNode(ISD::FP_EXTEND, SDLoc(N), VT, N0); in visitFP_EXTEND()
9222 return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), VT, N0.getOperand(0)); in visitFP_EXTEND()
9227 && N0.getNode()->getConstantOperandVal(1) == 1) { in visitFP_EXTEND()
9231 return DAG.getNode(ISD::FP_ROUND, SDLoc(N), VT, in visitFP_EXTEND()
9233 return DAG.getNode(ISD::FP_EXTEND, SDLoc(N), VT, In); in visitFP_EXTEND()
9237 if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() && in visitFP_EXTEND()
9245 CombineTo(N0.getNode(), in visitFP_EXTEND()
9246 DAG.getNode(ISD::FP_ROUND, SDLoc(N0), in visitFP_EXTEND()
9262 return DAG.getNode(ISD::FCEIL, SDLoc(N), VT, N0); in visitFCEIL()
9273 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0); in visitFTRUNC()
9284 return DAG.getNode(ISD::FFLOOR, SDLoc(N), VT, N0); in visitFFLOOR()
9296 return DAG.getNode(ISD::FNEG, SDLoc(N), VT, N0); in visitFNEG()
9306 N0.getNode()->hasOneUse()) { in visitFNEG()
9321 Int = DAG.getNode(ISD::XOR, DL0, IntVT, Int, in visitFNEG()
9323 AddToWorklist(Int.getNode()); in visitFNEG()
9330 (N0.getNode()->hasOneUse() || !TLI.isFNegFree(VT))) { in visitFNEG()
9338 return DAG.getNode(ISD::FMUL, SDLoc(N), VT, N0.getOperand(0), in visitFNEG()
9339 DAG.getNode(ISD::FNEG, SDLoc(N), VT, in visitFNEG()
9364 return DAG.getNode(ISD::FMINNUM, SDLoc(N), VT, N1, N0); in visitFMINNUM()
9385 return DAG.getNode(ISD::FMAXNUM, SDLoc(N), VT, N1, N0); in visitFMAXNUM()
9396 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0); in visitFABS()
9405 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0.getOperand(0)); in visitFABS()
9411 N0.getNode()->hasOneUse()) { in visitFABS()
9426 Int = DAG.getNode(ISD::AND, DL, IntVT, Int, in visitFABS()
9428 AddToWorklist(Int.getNode()); in visitFABS()
9452 return DAG.getNode(ISD::BR_CC, SDLoc(N), MVT::Other, in visitBRCOND()
9464 Trunc = N1.getNode(); in visitBRCOND()
9504 SDValue NewBRCond = DAG.getNode(ISD::BRCOND, DL, in visitBRCOND()
9515 deleteAndRecombine(N1.getNode()); in visitBRCOND()
9529 SDNode *TheXor = N1.getNode(); in visitBRCOND()
9535 if (Tmp.getNode() != TheXor) { in visitBRCOND()
9539 Tmp.getNode()->dump(&DAG); in visitBRCOND()
9544 return DAG.getNode(ISD::BRCOND, SDLoc(N), in visitBRCOND()
9558 TheXor = Op0.getNode(); in visitBRCOND()
9572 deleteAndRecombine(N1.getNode()); in visitBRCOND()
9573 return DAG.getNode(ISD::BRCOND, SDLoc(N), in visitBRCOND()
9597 if (Simp.getNode()) AddToWorklist(Simp.getNode()); in visitBR_CC()
9600 if (Simp.getNode() && Simp.getOpcode() == ISD::SETCC) in visitBR_CC()
9601 return DAG.getNode(ISD::BR_CC, SDLoc(N), MVT::Other, in visitBR_CC()
9618 if (LD->isIndexed() || LD->getBasePtr().getNode() != N) in canFoldInAddressingMode()
9623 if (ST->isIndexed() || ST->getBasePtr().getNode() != N) in canFoldInAddressingMode()
9690 Ptr.getNode()->hasOneUse()) in CombineToPreIndexedLoadStore()
9729 if (Val == BasePtr || BasePtr.getNode()->isPredecessorOf(Val.getNode())) in CombineToPreIndexedLoadStore()
9743 for (SDNode::use_iterator UI = BasePtr.getNode()->use_begin(), in CombineToPreIndexedLoadStore()
9744 UE = BasePtr.getNode()->use_end(); in CombineToPreIndexedLoadStore()
9749 if (Use.getUser() == Ptr.getNode() || Use != BasePtr) in CombineToPreIndexedLoadStore()
9782 for (SDNode *Use : Ptr.getNode()->uses()) { in CombineToPreIndexedLoadStore()
9790 if (!canFoldInAddressingMode(Ptr.getNode(), Use, DAG, TLI)) in CombineToPreIndexedLoadStore()
9809 Result.getNode()->dump(&DAG); in CombineToPreIndexedLoadStore()
9828 if (OtherUses[i]->getOperand(OffsetIdx).getNode() == BasePtr.getNode()) in CombineToPreIndexedLoadStore()
9830 assert(OtherUses[i]->getOperand(!OffsetIdx).getNode() == in CombineToPreIndexedLoadStore()
9831 BasePtr.getNode() && "Expected BasePtr operand"); in CombineToPreIndexedLoadStore()
9868 SDValue NewUse = DAG.getNode(Opcode, in CombineToPreIndexedLoadStore()
9877 deleteAndRecombine(Ptr.getNode()); in CombineToPreIndexedLoadStore()
9914 if (Ptr.getNode()->hasOneUse()) in CombineToPostIndexedLoadStore()
9917 for (SDNode *Op : Ptr.getNode()->uses()) { in CombineToPostIndexedLoadStore()
9942 for (SDNode *Use : BasePtr.getNode()->uses()) { in CombineToPostIndexedLoadStore()
9943 if (Use == Ptr.getNode()) in CombineToPostIndexedLoadStore()
9977 Result.getNode()->dump(&DAG); in CombineToPostIndexedLoadStore()
10023 return DAG.getNode(Opc, SDLoc(LD), BP.getSimpleValueType(), BP, Inc); in SplitIndexingFromLoad()
10047 Chain.getNode()->dump(&DAG); in visitLOAD()
10082 Undef.getNode()->dump(&DAG); in visitLOAD()
10099 if (ISD::isNON_TRUNCStore(Chain.getNode())) { in visitLOAD()
10118 if (NewLoad.getNode() != N) in visitLOAD()
10119 return CombineTo(N, NewLoad, SDValue(NewLoad.getNode(), 1), true); in visitLOAD()
10151 SDValue Token = DAG.getNode(ISD::TokenFactor, SDLoc(N), in visitLOAD()
10155 AddToWorklist(Token.getNode()); in visitLOAD()
10410 BaseAddr = DAG->getNode(ISD::ADD, DL, ArithType, BaseAddr, in loadSlice()
10427 DAG->getNode(ISD::ZERO_EXTEND, SDLoc(LastInst), FinalType, LastInst); in loadSlice()
10703 if (SliceInst.getNode()->getOpcode() != ISD::LOAD) in SliceUpLoad()
10710 SDValue Chain = DAG.getNode(ISD::TokenFactor, SDLoc(LD), MVT::Other, in SliceUpLoad()
10726 !ISD::isNormalLoad(V->getOperand(0).getNode())) in CheckForMaskedLoad()
10735 if (LD == Chain.getNode()) in CheckForMaskedLoad()
10742 if (ChainOp.getNode() == LD) { in CheckForMaskedLoad()
10819 IVal = DAG.getNode(ISD::SRL, DL, IVal.getValueType(), IVal, in ShrinkLoadReplaceStoreWithStore()
10836 Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), in ShrinkLoadReplaceStoreWithStore()
10842 IVal = DAG.getNode(ISD::TRUNCATE, SDLoc(IVal), VT, IVal); in ShrinkLoadReplaceStoreWithStore()
10847 false, false, NewAlign).getNode(); in ShrinkLoadReplaceStoreWithStore()
10896 if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() && in ReduceLoadOpStoreWidth()
10897 Chain == SDValue(N0.getNode(), 1)) { in ReduceLoadOpStoreWidth()
10949 SDValue NewPtr = DAG.getNode(ISD::ADD, SDLoc(LD), in ReduceLoadOpStoreWidth()
10959 SDValue NewVal = DAG.getNode(Opc, SDLoc(Value), NewVT, NewLD, in ReduceLoadOpStoreWidth()
10967 AddToWorklist(NewPtr.getNode()); in ReduceLoadOpStoreWidth()
10968 AddToWorklist(NewLD.getNode()); in ReduceLoadOpStoreWidth()
10969 AddToWorklist(NewVal.getNode()); in ReduceLoadOpStoreWidth()
10987 if (ISD::isNormalStore(ST) && ISD::isNormalLoad(Value.getNode()) && in TransformFPLoadStorePair()
10989 Chain == SDValue(Value.getNode(), 1)) { in TransformFPLoadStorePair()
11024 AddToWorklist(NewLD.getNode()); in TransformFPLoadStorePair()
11025 AddToWorklist(NewST.getNode()); in TransformFPLoadStorePair()
11158 if (AddNode.getNode()->hasOneUse()) in isMulAddWithConstProfitable()
11169 SDNode *MulVar = AddNode.getOperand(0).getNode(); in isMulAddWithConstProfitable()
11173 OtherOp = Use->getOperand(1).getNode(); in isMulAddWithConstProfitable()
11175 OtherOp = Use->getOperand(0).getNode(); in isMulAddWithConstProfitable()
11205 OtherOp->getOperand(0).getNode() == MulVar) in isMulAddWithConstProfitable()
11281 StoredVal = DAG.getNode(IsVec ? ISD::CONCAT_VECTORS : ISD::BUILD_VECTOR, in MergeStoresOfConstantsOrVecElts()
11317 SDValue NewChain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chains); in MergeStoresOfConstantsOrVecElts()
11365 if (!BasePtr.Base.getNode()) in getStoreMergeAndAliasCandidates()
11448 SDNode *NextInChain = Index->getChain().getNode(); in getStoreMergeAndAliasCandidates()
11462 NextInChain = Ldn->getChain().getNode(); in getStoreMergeAndAliasCandidates()
11486 Worklist.push_back(n->getOperand(j).getNode()); in checkMergeStoreCandidatesForDependencies()
11735 if (LdBasePtr.Base.getNode()) { in MergeConsecutiveStores()
11871 DAG.getNode(ISD::TokenFactor, StoreDL, MVT::Other, MergeStoreChains); in MergeConsecutiveStores()
11881 SDValue(NewLoad.getNode(), 1)); in MergeConsecutiveStores()
11920 SDValue Token = DAG.getNode(ISD::TokenFactor, SL, in replaceStoreChain()
11924 AddToWorklist(Token.getNode()); in replaceStoreChain()
11998 Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, in replaceStoreOfFPConstant()
12005 return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, in replaceStoreOfFPConstant()
12053 if (NewStore.getNode() != N) in visitSTORE()
12102 AddToWorklist(Value.getNode()); in visitSTORE()
12103 if (Shorter.getNode()) in visitSTORE()
12143 && Value.getNode()->hasOneUse() && ST->isUnindexed() && in visitSTORE()
12215 SDValue NewOp = DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(N), VT, in visitINSERT_VECTOR_ELT()
12217 AddToWorklist(NewOp.getNode()); in visitINSERT_VECTOR_ELT()
12218 return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(InVec.getNode()), in visitINSERT_VECTOR_ELT()
12230 Ops.append(InVec.getNode()->op_begin(), in visitINSERT_VECTOR_ELT()
12231 InVec.getNode()->op_end()); in visitINSERT_VECTOR_ELT()
12246 DAG.getNode(ISD::ANY_EXTEND, dl, OpVT, InVal) : in visitINSERT_VECTOR_ELT()
12247 DAG.getNode(ISD::TRUNCATE, dl, OpVT, InVal); in visitINSERT_VECTOR_ELT()
12282 Offset = DAG.getNode( in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12287 NewPtr = DAG.getNode(ISD::ADD, DL, PtrType, NewPtr, Offset); in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12316 Load = DAG.getNode(ISD::TRUNCATE, SDLoc(EVE), ResultVT, Load); in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12326 AddToWorklist(Load.getNode()); in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12327 AddUsersToWorklist(Load.getNode()); // Add users too in ReplaceExtractVectorEltOfLoadWithNarrowedLoad()
12377 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), NVT, BCSrc); in visitEXTRACT_VECTOR_ELT()
12430 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(N), NVT, SVInVec, in visitEXTRACT_VECTOR_ELT()
12460 ISD::isNormalLoad(InVec.getNode()) && in visitEXTRACT_VECTOR_ELT()
12461 !N->getOperand(1)->hasPredecessor(InVec.getNode())) { in visitEXTRACT_VECTOR_ELT()
12484 if (ISD::isNormalLoad(InVec.getNode())) { in visitEXTRACT_VECTOR_ELT()
12488 ISD::isNormalLoad(InVec.getOperand(0).getNode())) { in visitEXTRACT_VECTOR_ELT()
12520 if (ISD::isNormalLoad(InVec.getNode())) { in visitEXTRACT_VECTOR_ELT()
12647 AddToWorklist(BV.getNode()); in reduceBuildVecExtToExtBuildVec()
12718 AddToWorklist(BV.getNode()); in reduceBuildVecConvertToConvertBuildVec()
12720 return DAG.getNode(Opcode, dl, VT, BV); in reduceBuildVecConvertToConvertBuildVec()
12758 if (!VecIn2.getNode() && (isNullConstant(Op) || isNullFPConstant(Op))) { in visitBUILD_VECTOR()
12776 if (!VecIn1.getNode()) { in visitBUILD_VECTOR()
12778 } else if (!VecIn2.getNode() && !UsesZeroVector) { in visitBUILD_VECTOR()
12788 if (VecIn1.getNode()) { in visitBUILD_VECTOR()
12831 (VecIn2.getNode() && in visitBUILD_VECTOR()
12841 if (!VecIn2.getNode()) in visitBUILD_VECTOR()
12842 VecIn1 = DAG.getNode(ISD::CONCAT_VECTORS, dl, VT, VecIn1, in visitBUILD_VECTOR()
12846 VecIn1 = DAG.getNode(ISD::CONCAT_VECTORS, dl, VT, VecIn1, VecIn2); in visitBUILD_VECTOR()
12855 if (UsesZeroVector || VecIn2.getNode()) in visitBUILD_VECTOR()
12863 VecIn2 = DAG.getNode( in visitBUILD_VECTOR()
12867 VecIn1 = DAG.getNode( in visitBUILD_VECTOR()
12879 VecIn2 = VecIn2.getNode() ? VecIn2 : DAG.getUNDEF(VT); in visitBUILD_VECTOR()
12910 SDValue ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT); in combineConcatVectorOfScalars()
12940 ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT); in combineConcatVectorOfScalars()
13082 SDValue Res = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, NVT, Scalar); in visitCONCAT_VECTORS()
13126 DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinVT, Op.getOperand(i))); in visitCONCAT_VECTORS()
13163 if (SingleSource.getNode()) { in visitCONCAT_VECTORS()
13187 if (SingleSource.getNode()) in visitCONCAT_VECTORS()
13241 return DAG.getNode( in visitEXTRACT_SUBVECTOR()
13282 V = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, NewOps); in simplifyShuffleOperandRecursively()
13311 V = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, in simplifyShuffleOperandRecursively()
13361 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, N0, N1); in partitionShuffleOfConcats()
13398 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Ops); in partitionShuffleOfConcats()
13450 SDNode *V = N0.getNode(); in visitVECTOR_SHUFFLE()
13459 V = ConvInput.getNode(); in visitVECTOR_SHUFFLE()
13474 if (!Base.getNode()) in visitVECTOR_SHUFFLE()
13653 if (N0.getOpcode() == ISD::VECTOR_SHUFFLE && N->isOnlyUserOf(N0.getNode()) && in visitVECTOR_SHUFFLE()
13701 if (!SV0.getNode() || SV0 == CurrentVec) { in visitVECTOR_SHUFFLE()
13710 if (SV1.getNode() && SV1 != CurrentVec) in visitVECTOR_SHUFFLE()
13727 if (!SV0.getNode()) in visitVECTOR_SHUFFLE()
13729 if (!SV1.getNode()) in visitVECTOR_SHUFFLE()
13800 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, N1, in visitINSERT_SUBVECTOR()
13806 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, N0.getOperand(0), in visitINSERT_SUBVECTOR()
13830 return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), N->getValueType(0), in visitFP16_TO_FP()
13964 SDValue NewBinOp = DAG.getNode(N->getOpcode(), SDLoc(N), VT, in SimplifyVBinOp()
13986 if (SCC.getNode()) { in SimplifySelect()
13990 SDValue SETCC = DAG.getNode(ISD::SETCC, SDLoc(N0), in SimplifySelect()
13994 AddToWorklist(SETCC.getNode()); in SimplifySelect()
14091 SDNode *CondNode = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
14104 SDNode *CondLHS = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
14105 SDNode *CondRHS = TheSelect->getOperand(1).getNode(); in SimplifySelectOps()
14113 Addr = DAG.getNode(ISD::SELECT_CC, SDLoc(TheSelect), in SimplifySelectOps()
14150 CombineTo(LHS.getNode(), Load.getValue(0), Load.getValue(1)); in SimplifySelectOps()
14151 CombineTo(RHS.getNode(), Load.getValue(0), Load.getValue(1)); in SimplifySelectOps()
14167 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC()
14168 ConstantSDNode *N2C = dyn_cast<ConstantSDNode>(N2.getNode()); in SimplifySelectCC()
14173 if (SCC.getNode()) AddToWorklist(SCC.getNode()); in SimplifySelectCC()
14175 if (ConstantSDNode *SCCC = dyn_cast_or_null<ConstantSDNode>(SCC.getNode())) { in SimplifySelectCC()
14189 return DAG.getNode(ISD::FABS, DL, VT, N0); in SimplifySelectCC()
14195 return DAG.getNode(ISD::FABS, DL, VT, N3); in SimplifySelectCC()
14240 AddToWorklist(Cond.getNode()); in SimplifySelectCC()
14243 AddToWorklist(CstOffset.getNode()); in SimplifySelectCC()
14244 CPIdx = DAG.getNode(ISD::ADD, DL, CPIdx.getValueType(), CPIdx, in SimplifySelectCC()
14246 AddToWorklist(CPIdx.getNode()); in SimplifySelectCC()
14269 SDValue Shift = DAG.getNode(ISD::SRL, SDLoc(N0), in SimplifySelectCC()
14271 AddToWorklist(Shift.getNode()); in SimplifySelectCC()
14274 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift); in SimplifySelectCC()
14275 AddToWorklist(Shift.getNode()); in SimplifySelectCC()
14278 return DAG.getNode(ISD::AND, DL, AType, Shift, N2); in SimplifySelectCC()
14281 SDValue Shift = DAG.getNode(ISD::SRA, SDLoc(N0), in SimplifySelectCC()
14286 AddToWorklist(Shift.getNode()); in SimplifySelectCC()
14289 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift); in SimplifySelectCC()
14290 AddToWorklist(Shift.getNode()); in SimplifySelectCC()
14293 return DAG.getNode(ISD::AND, DL, AType, Shift, N2); in SimplifySelectCC()
14313 SDValue Shl = DAG.getNode(ISD::SHL, SDLoc(N0), VT, AndLHS, ShlAmt); in SimplifySelectCC()
14320 SDValue Shr = DAG.getNode(ISD::SRA, SDLoc(N0), VT, Shl, ShrAmt); in SimplifySelectCC()
14322 return DAG.getNode(ISD::AND, DL, VT, Shr, N3); in SimplifySelectCC()
14349 Temp = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N2), in SimplifySelectCC()
14353 Temp = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N2), in SimplifySelectCC()
14357 AddToWorklist(SCC.getNode()); in SimplifySelectCC()
14358 AddToWorklist(Temp.getNode()); in SimplifySelectCC()
14364 return DAG.getNode( in SimplifySelectCC()
14391 SDValue Shift = DAG.getNode(ISD::SRA, DL, XType, in SimplifySelectCC()
14395 SDValue Add = DAG.getNode(ISD::ADD, DL, in SimplifySelectCC()
14397 AddToWorklist(Shift.getNode()); in SimplifySelectCC()
14398 AddToWorklist(Add.getNode()); in SimplifySelectCC()
14399 return DAG.getNode(ISD::XOR, DL, XType, Add, Shift); in SimplifySelectCC()
14426 return DAG.getNode(ISD::CTTZ, DL, VT, N0); in SimplifySelectCC()
14433 return DAG.getNode(ISD::CTLZ, DL, VT, N0); in SimplifySelectCC()
14543 AddToWorklist(Est.getNode()); in BuildReciprocalEstimate()
14547 SDValue NewEst = DAG.getNode(ISD::FMUL, DL, VT, Op, Est, Flags); in BuildReciprocalEstimate()
14548 AddToWorklist(NewEst.getNode()); in BuildReciprocalEstimate()
14550 NewEst = DAG.getNode(ISD::FSUB, DL, VT, FPOne, NewEst, Flags); in BuildReciprocalEstimate()
14551 AddToWorklist(NewEst.getNode()); in BuildReciprocalEstimate()
14553 NewEst = DAG.getNode(ISD::FMUL, DL, VT, Est, NewEst, Flags); in BuildReciprocalEstimate()
14554 AddToWorklist(NewEst.getNode()); in BuildReciprocalEstimate()
14556 Est = DAG.getNode(ISD::FADD, DL, VT, Est, NewEst, Flags); in BuildReciprocalEstimate()
14557 AddToWorklist(Est.getNode()); in BuildReciprocalEstimate()
14581 SDValue HalfArg = DAG.getNode(ISD::FMUL, DL, VT, ThreeHalves, Arg, Flags); in buildSqrtNROneConst()
14582 AddToWorklist(HalfArg.getNode()); in buildSqrtNROneConst()
14584 HalfArg = DAG.getNode(ISD::FSUB, DL, VT, HalfArg, Arg, Flags); in buildSqrtNROneConst()
14585 AddToWorklist(HalfArg.getNode()); in buildSqrtNROneConst()
14589 SDValue NewEst = DAG.getNode(ISD::FMUL, DL, VT, Est, Est, Flags); in buildSqrtNROneConst()
14590 AddToWorklist(NewEst.getNode()); in buildSqrtNROneConst()
14592 NewEst = DAG.getNode(ISD::FMUL, DL, VT, HalfArg, NewEst, Flags); in buildSqrtNROneConst()
14593 AddToWorklist(NewEst.getNode()); in buildSqrtNROneConst()
14595 NewEst = DAG.getNode(ISD::FSUB, DL, VT, ThreeHalves, NewEst, Flags); in buildSqrtNROneConst()
14596 AddToWorklist(NewEst.getNode()); in buildSqrtNROneConst()
14598 Est = DAG.getNode(ISD::FMUL, DL, VT, Est, NewEst, Flags); in buildSqrtNROneConst()
14599 AddToWorklist(Est.getNode()); in buildSqrtNROneConst()
14604 Est = DAG.getNode(ISD::FMUL, DL, VT, Est, Arg, Flags); in buildSqrtNROneConst()
14605 AddToWorklist(Est.getNode()); in buildSqrtNROneConst()
14631 SDValue AE = DAG.getNode(ISD::FMUL, DL, VT, Arg, Est, Flags); in buildSqrtNRTwoConst()
14632 AddToWorklist(AE.getNode()); in buildSqrtNRTwoConst()
14634 SDValue AEE = DAG.getNode(ISD::FMUL, DL, VT, AE, Est, Flags); in buildSqrtNRTwoConst()
14635 AddToWorklist(AEE.getNode()); in buildSqrtNRTwoConst()
14637 SDValue RHS = DAG.getNode(ISD::FADD, DL, VT, AEE, MinusThree, Flags); in buildSqrtNRTwoConst()
14638 AddToWorklist(RHS.getNode()); in buildSqrtNRTwoConst()
14646 LHS = DAG.getNode(ISD::FMUL, DL, VT, Est, MinusHalf, Flags); in buildSqrtNRTwoConst()
14649 LHS = DAG.getNode(ISD::FMUL, DL, VT, AE, MinusHalf, Flags); in buildSqrtNRTwoConst()
14651 AddToWorklist(LHS.getNode()); in buildSqrtNRTwoConst()
14653 Est = DAG.getNode(ISD::FMUL, DL, VT, LHS, RHS, Flags); in buildSqrtNRTwoConst()
14654 AddToWorklist(Est.getNode()); in buildSqrtNRTwoConst()
14673 AddToWorklist(Est.getNode()); in buildSqrtEstimateImpl()
14701 AddToWorklist(ZeroCmp.getNode()); in buildSqrtEstimate()
14703 Est = DAG.getNode(VT.isVector() ? ISD::VSELECT : ISD::SELECT, DL, VT, ZeroCmp, in buildSqrtEstimate()
14705 AddToWorklist(Est.getNode()); in buildSqrtEstimate()
14877 if (!Visited.insert(Chain.getNode()).second) in GatherAllAliases()
14888 bool IsOpLoad = isa<LoadSDNode>(Chain.getNode()) && in GatherAllAliases()
14889 !cast<LSBaseSDNode>(Chain.getNode())->isVolatile(); in GatherAllAliases()
14893 isAlias(cast<LSBaseSDNode>(N), cast<LSBaseSDNode>(Chain.getNode()))) { in GatherAllAliases()
14942 return DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Aliases); in FindBetterChain()
14951 if (!BasePtr.Base.getNode()) in findBetterNeighborChains()
14984 SDNode *NextInChain = Index->getChain().getNode(); in findBetterNeighborChains()
14996 NextInChain = Ldn->getChain().getNode(); in findBetterNeighborChains()