• Home
  • Raw
  • Download

Lines Matching refs:getNode

475       return DAG.getNode(ISD::FSUB, Op.getDebugLoc(), Op.getValueType(),  in GetNegatedExpression()
480 return DAG.getNode(ISD::FSUB, Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
494 return DAG.getNode(ISD::FSUB, Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
505 return DAG.getNode(Op.getOpcode(), Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
511 return DAG.getNode(Op.getOpcode(), Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
518 return DAG.getNode(Op.getOpcode(), Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
522 return DAG.getNode(ISD::FP_ROUND, Op.getDebugLoc(), Op.getValueType(), in GetNegatedExpression()
561 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
576 return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode); in ReassociateOps()
580 SDValue OpNode = DAG.getNode(Opc, N0.getDebugLoc(), VT, in ReassociateOps()
582 AddToWorkList(OpNode.getNode()); in ReassociateOps()
583 return DAG.getNode(Opc, DL, VT, OpNode, N0.getOperand(1)); in ReassociateOps()
594 return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode); in ReassociateOps()
598 SDValue OpNode = DAG.getNode(Opc, N0.getDebugLoc(), VT, in ReassociateOps()
600 AddToWorkList(OpNode.getNode()); in ReassociateOps()
601 return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1)); in ReassociateOps()
615 To[0].getNode()->dump(&DAG); in CombineTo()
618 assert((!To[i].getNode() || in CombineTo()
627 if (To[i].getNode()) { in CombineTo()
628 AddToWorkList(To[i].getNode()); in CombineTo()
629 AddUsersToWorkList(To[i].getNode()); in CombineTo()
656 AddToWorkList(TLO.New.getNode()); in CommitTargetLoweringOpt()
657 AddUsersToWorkList(TLO.New.getNode()); in CommitTargetLoweringOpt()
662 if (TLO.Old.getNode()->use_empty()) { in CommitTargetLoweringOpt()
663 removeFromWorkList(TLO.Old.getNode()); in CommitTargetLoweringOpt()
667 for (unsigned i = 0, e = TLO.Old.getNode()->getNumOperands(); i != e; ++i) in CommitTargetLoweringOpt()
668 if (TLO.Old.getNode()->getOperand(i).getNode()->hasOneUse()) in CommitTargetLoweringOpt()
669 AddToWorkList(TLO.Old.getNode()->getOperand(i).getNode()); in CommitTargetLoweringOpt()
671 DAG.DeleteNode(TLO.Old.getNode()); in CommitTargetLoweringOpt()
685 AddToWorkList(Op.getNode()); in SimplifyDemandedBits()
690 TLO.Old.getNode()->dump(&DAG); in SimplifyDemandedBits()
692 TLO.New.getNode()->dump(&DAG); in SimplifyDemandedBits()
702 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, dl, VT, SDValue(ExtLoad, 0)); in ReplaceLoadWithPromotedLoad()
707 Trunc.getNode()->dump(&DAG); in ReplaceLoadWithPromotedLoad()
715 AddToWorkList(Trunc.getNode()); in ReplaceLoadWithPromotedLoad()
739 return DAG.getNode(ISD::AssertSext, dl, PVT, in PromoteOperand()
743 return DAG.getNode(ISD::AssertZext, dl, PVT, in PromoteOperand()
749 return DAG.getNode(ExtOpc, dl, PVT, Op); in PromoteOperand()
755 return DAG.getNode(ISD::ANY_EXTEND, dl, PVT, Op); in PromoteOperand()
765 if (NewOp.getNode() == 0) in SExtPromoteOperand()
767 AddToWorkList(NewOp.getNode()); in SExtPromoteOperand()
770 ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode()); in SExtPromoteOperand()
771 return DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, NewOp.getValueType(), NewOp, in SExtPromoteOperand()
780 if (NewOp.getNode() == 0) in ZExtPromoteOperand()
782 AddToWorkList(NewOp.getNode()); in ZExtPromoteOperand()
785 ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode()); in ZExtPromoteOperand()
815 if (NN0.getNode() == 0) in PromoteIntBinOp()
825 if (NN1.getNode() == 0) in PromoteIntBinOp()
829 AddToWorkList(NN0.getNode()); in PromoteIntBinOp()
830 if (NN1.getNode()) in PromoteIntBinOp()
831 AddToWorkList(NN1.getNode()); in PromoteIntBinOp()
834 ReplaceLoadWithPromotedLoad(N0.getNode(), NN0.getNode()); in PromoteIntBinOp()
836 ReplaceLoadWithPromotedLoad(N1.getNode(), NN1.getNode()); in PromoteIntBinOp()
839 Op.getNode()->dump(&DAG)); in PromoteIntBinOp()
841 return DAG.getNode(ISD::TRUNCATE, dl, VT, in PromoteIntBinOp()
842 DAG.getNode(Opc, dl, PVT, NN0, NN1)); in PromoteIntBinOp()
878 if (N0.getNode() == 0) in PromoteIntShiftOp()
881 AddToWorkList(N0.getNode()); in PromoteIntShiftOp()
883 ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode()); in PromoteIntShiftOp()
886 Op.getNode()->dump(&DAG)); in PromoteIntShiftOp()
888 return DAG.getNode(ISD::TRUNCATE, dl, VT, in PromoteIntShiftOp()
889 DAG.getNode(Opc, dl, PVT, N0, Op.getOperand(1))); in PromoteIntShiftOp()
917 Op.getNode()->dump(&DAG)); in PromoteExtend()
918 return DAG.getNode(Op.getOpcode(), Op.getDebugLoc(), VT, Op.getOperand(0)); in PromoteExtend()
944 SDNode *N = Op.getNode(); in PromoteLoad()
956 SDValue Result = DAG.getNode(ISD::TRUNCATE, dl, VT, NewLD); in PromoteLoad()
961 Result.getNode()->dump(&DAG); in PromoteLoad()
968 AddToWorkList(Result.getNode()); in PromoteLoad()
1016 AddToWorkList(N->getOperand(i).getNode()); in Run()
1024 if (RV.getNode() == 0) in Run()
1033 if (RV.getNode() == N) in Run()
1037 RV.getNode()->getOpcode() != ISD::DELETED_NODE && in Run()
1043 RV.getNode()->dump(&DAG); in Run()
1049 if (N->getNumValues() == RV.getNode()->getNumValues()) in Run()
1050 DAG.ReplaceAllUsesWith(N, RV.getNode(), &DeadNodes); in Run()
1059 AddToWorkList(RV.getNode()); in Run()
1060 AddUsersToWorkList(RV.getNode()); in Run()
1066 AddToWorkList(N->getOperand(i).getNode()); in Run()
1165 if (RV.getNode() == 0) { in combine()
1181 if (RV.getNode() == 0) { in combine()
1211 if (RV.getNode() == 0 && in combine()
1249 if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1)) in visitTokenFactor()
1251 if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0)) in visitTokenFactor()
1281 std::find(TFs.begin(), TFs.end(), Op.getNode()) == TFs.end()) { in visitTokenFactor()
1283 TFs.push_back(Op.getNode()); in visitTokenFactor()
1285 AddToWorkList(Op.getNode()); in visitTokenFactor()
1293 if (SeenOps.insert(Op.getNode())) in visitTokenFactor()
1311 Result = DAG.getNode(ISD::TokenFactor, N->getDebugLoc(), in visitTokenFactor()
1346 if (N01C && N00.getOpcode() == ISD::ADD && N00.getNode()->hasOneUse() && in combineShlAddConstant()
1349 N0 = DAG.getNode(ISD::ADD, N0.getDebugLoc(), VT, in combineShlAddConstant()
1350 DAG.getNode(ISD::SHL, N00.getDebugLoc(), VT, in combineShlAddConstant()
1352 DAG.getNode(ISD::SHL, N01.getDebugLoc(), VT, in combineShlAddConstant()
1354 return DAG.getNode(ISD::ADD, DL, VT, N0, N1); in combineShlAddConstant()
1370 if (FoldedVOp.getNode()) return FoldedVOp; in visitADD()
1383 return DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, N0); in visitADD()
1397 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitADD()
1403 if (RADD.getNode() != 0) in visitADD()
1408 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1, N0.getOperand(1)); in visitADD()
1412 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, N1.getOperand(1)); in visitADD()
1422 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1.getOperand(0), in visitADD()
1427 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1.getOperand(0), in visitADD()
1433 return DAG.getNode(N1.getOpcode(), N->getDebugLoc(), VT, in visitADD()
1444 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitADD()
1445 DAG.getNode(ISD::ADD, N0.getDebugLoc(), VT, N00, N10), in visitADD()
1446 DAG.getNode(ISD::ADD, N1.getDebugLoc(), VT, N01, N11)); in visitADD()
1464 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1); in visitADD()
1469 if (N0.getOpcode() == ISD::SHL && N0.getNode()->hasOneUse()) { in visitADD()
1471 if (Result.getNode()) return Result; in visitADD()
1473 if (N1.getOpcode() == ISD::SHL && N1.getNode()->hasOneUse()) { in visitADD()
1475 if (Result.getNode()) return Result; in visitADD()
1484 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, in visitADD()
1485 DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, in visitADD()
1493 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1, in visitADD()
1494 DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, in visitADD()
1508 return DAG.getNode(ISD::SUB, DL, VT, N->getOperand(0), AndOp0); in visitADD()
1517 SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitADD()
1518 return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt); in visitADD()
1533 return CombineTo(N, DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N0, N1), in visitADDC()
1534 DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1539 return DAG.getNode(ISD::ADDC, N->getDebugLoc(), N->getVTList(), N1, N0); in visitADDC()
1543 return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1557 return CombineTo(N, DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1), in visitADDC()
1558 DAG.getNode(ISD::CARRY_FALSE, in visitADDC()
1574 return DAG.getNode(ISD::ADDE, N->getDebugLoc(), N->getVTList(), in visitADDE()
1579 return DAG.getNode(ISD::ADDC, N->getDebugLoc(), N->getVTList(), N0, N1); in visitADDE()
1595 return DAG.getNode(ISD::BUILD_VECTOR, DL, VT, in tryFoldToZero()
1604 ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0.getNode()); in visitSUB()
1605 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitSUB()
1607 dyn_cast<ConstantSDNode>(N1.getOperand(1).getNode()); in visitSUB()
1613 if (FoldedVOp.getNode()) return FoldedVOp; in visitSUB()
1625 return DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N0, in visitSUB()
1629 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0); in visitSUB()
1642 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, NewC, in visitSUB()
1650 return DAG.getNode(N0.getOperand(1).getOpcode(), N->getDebugLoc(), VT, in visitSUB()
1656 return DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, in visitSUB()
1662 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitSUB()
1698 return CombineTo(N, DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, N1), in visitSUBC()
1699 DAG.getNode(ISD::CARRY_FALSE, N->getDebugLoc(), in visitSUBC()
1705 DAG.getNode(ISD::CARRY_FALSE, N->getDebugLoc(), in visitSUBC()
1710 return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, N->getDebugLoc(), in visitSUBC()
1715 return CombineTo(N, DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0), in visitSUBC()
1716 DAG.getNode(ISD::CARRY_FALSE, N->getDebugLoc(), in visitSUBC()
1729 return DAG.getNode(ISD::SUBC, N->getDebugLoc(), N->getVTList(), N0, N1); in visitSUBE()
1744 if (FoldedVOp.getNode()) return FoldedVOp; in visitMUL()
1755 return DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, N1, N0); in visitMUL()
1761 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitMUL()
1765 return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, N0, in visitMUL()
1773 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitMUL()
1775 DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, N0, in visitMUL()
1782 SDValue C3 = DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, in visitMUL()
1784 AddToWorkList(C3.getNode()); in visitMUL()
1785 return DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, in visitMUL()
1795 N0.getNode()->hasOneUse()) { in visitMUL()
1799 N1.getNode()->hasOneUse()) { in visitMUL()
1803 if (Sh.getNode()) { in visitMUL()
1804 SDValue Mul = DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, in visitMUL()
1806 return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, in visitMUL()
1812 if (N1C && N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() && in visitMUL()
1814 return DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, in visitMUL()
1815 DAG.getNode(ISD::MUL, N0.getDebugLoc(), VT, in visitMUL()
1817 DAG.getNode(ISD::MUL, N1.getDebugLoc(), VT, in visitMUL()
1822 if (RMUL.getNode() != 0) in visitMUL()
1831 ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0.getNode()); in visitSDIV()
1832 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitSDIV()
1838 if (FoldedVOp.getNode()) return FoldedVOp; in visitSDIV()
1849 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitSDIV()
1855 return DAG.getNode(ISD::UDIV, N->getDebugLoc(), N1.getValueType(), in visitSDIV()
1870 SDValue SGN = DAG.getNode(ISD::SRA, N->getDebugLoc(), VT, N0, in visitSDIV()
1873 AddToWorkList(SGN.getNode()); in visitSDIV()
1876 SDValue SRL = DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, SGN, in visitSDIV()
1879 SDValue ADD = DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N0, SRL); in visitSDIV()
1880 AddToWorkList(SRL.getNode()); in visitSDIV()
1881 AddToWorkList(ADD.getNode()); // Divide by pow2 in visitSDIV()
1882 SDValue SRA = DAG.getNode(ISD::SRA, N->getDebugLoc(), VT, ADD, in visitSDIV()
1890 AddToWorkList(SRA.getNode()); in visitSDIV()
1891 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, in visitSDIV()
1899 if (Op.getNode()) return Op; in visitSDIV()
1915 ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0.getNode()); in visitUDIV()
1916 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitUDIV()
1922 if (FoldedVOp.getNode()) return FoldedVOp; in visitUDIV()
1930 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0, in visitUDIV()
1938 SDValue Add = DAG.getNode(ISD::ADD, N->getDebugLoc(), ADDVT, in visitUDIV()
1943 AddToWorkList(Add.getNode()); in visitUDIV()
1944 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0, Add); in visitUDIV()
1951 if (Op.getNode()) return Op; in visitUDIV()
1978 return DAG.getNode(ISD::UREM, N->getDebugLoc(), VT, N0, N1); in visitSREM()
1984 SDValue Div = DAG.getNode(ISD::SDIV, N->getDebugLoc(), VT, N0, N1); in visitSREM()
1985 AddToWorkList(Div.getNode()); in visitSREM()
1986 SDValue OptimizedDiv = combine(Div.getNode()); in visitSREM()
1987 if (OptimizedDiv.getNode() && OptimizedDiv.getNode() != Div.getNode()) { in visitSREM()
1988 SDValue Mul = DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, in visitSREM()
1990 SDValue Sub = DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, Mul); in visitSREM()
1991 AddToWorkList(Mul.getNode()); in visitSREM()
2018 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, in visitUREM()
2025 DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, in visitUREM()
2028 AddToWorkList(Add.getNode()); in visitUREM()
2029 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, Add); in visitUREM()
2037 SDValue Div = DAG.getNode(ISD::UDIV, N->getDebugLoc(), VT, N0, N1); in visitUREM()
2038 AddToWorkList(Div.getNode()); in visitUREM()
2039 SDValue OptimizedDiv = combine(Div.getNode()); in visitUREM()
2040 if (OptimizedDiv.getNode() && OptimizedDiv.getNode() != Div.getNode()) { in visitUREM()
2041 SDValue Mul = DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, in visitUREM()
2043 SDValue Sub = DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, Mul); in visitUREM()
2044 AddToWorkList(Mul.getNode()); in visitUREM()
2071 return DAG.getNode(ISD::SRA, N->getDebugLoc(), N0.getValueType(), N0, in visitMULHS()
2085 N0 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N0); in visitMULHS()
2086 N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1); in visitMULHS()
2087 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHS()
2088 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHS()
2090 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHS()
2121 N0 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N0); in visitMULHU()
2122 N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N1); in visitMULHU()
2123 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHU()
2124 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHU()
2126 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHU()
2144 SDValue Res = DAG.getNode(LoOp, N->getDebugLoc(), N->getValueType(0), in SimplifyNodeWithTwoResults()
2154 SDValue Res = DAG.getNode(HiOp, N->getDebugLoc(), N->getValueType(1), in SimplifyNodeWithTwoResults()
2165 SDValue Lo = DAG.getNode(LoOp, N->getDebugLoc(), N->getValueType(0), in SimplifyNodeWithTwoResults()
2167 AddToWorkList(Lo.getNode()); in SimplifyNodeWithTwoResults()
2168 SDValue LoOpt = combine(Lo.getNode()); in SimplifyNodeWithTwoResults()
2169 if (LoOpt.getNode() && LoOpt.getNode() != Lo.getNode() && in SimplifyNodeWithTwoResults()
2176 SDValue Hi = DAG.getNode(HiOp, N->getDebugLoc(), N->getValueType(1), in SimplifyNodeWithTwoResults()
2178 AddToWorkList(Hi.getNode()); in SimplifyNodeWithTwoResults()
2179 SDValue HiOpt = combine(Hi.getNode()); in SimplifyNodeWithTwoResults()
2180 if (HiOpt.getNode() && HiOpt != Hi && in SimplifyNodeWithTwoResults()
2191 if (Res.getNode()) return Res; in visitSMUL_LOHI()
2203 SDValue Lo = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(0)); in visitSMUL_LOHI()
2204 SDValue Hi = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(1)); in visitSMUL_LOHI()
2205 Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi); in visitSMUL_LOHI()
2207 Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo, in visitSMUL_LOHI()
2209 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi); in visitSMUL_LOHI()
2211 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo); in visitSMUL_LOHI()
2221 if (Res.getNode()) return Res; in visitUMUL_LOHI()
2233 SDValue Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(0)); in visitUMUL_LOHI()
2234 SDValue Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(1)); in visitUMUL_LOHI()
2235 Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi); in visitUMUL_LOHI()
2237 Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo, in visitUMUL_LOHI()
2239 Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi); in visitUMUL_LOHI()
2241 Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo); in visitUMUL_LOHI()
2253 return DAG.getNode(ISD::SADDO, N->getDebugLoc(), N->getVTList(), in visitSMULO()
2263 return DAG.getNode(ISD::UADDO, N->getDebugLoc(), N->getVTList(), in visitUMULO()
2271 if (Res.getNode()) return Res; in visitSDIVREM()
2278 if (Res.getNode()) return Res; in visitUDIVREM()
2291 if (N0.getNode()->getNumOperands() == 0) return SDValue(); in SimplifyBinOpWithSameOpcodeHands()
2314 SDValue ORNode = DAG.getNode(N->getOpcode(), N0.getDebugLoc(), in SimplifyBinOpWithSameOpcodeHands()
2317 AddToWorkList(ORNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2318 return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, ORNode); in SimplifyBinOpWithSameOpcodeHands()
2328 SDValue ORNode = DAG.getNode(N->getOpcode(), N0.getDebugLoc(), in SimplifyBinOpWithSameOpcodeHands()
2331 AddToWorkList(ORNode.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2332 return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, in SimplifyBinOpWithSameOpcodeHands()
2351 SDValue Op = DAG.getNode(N->getOpcode(), N->getDebugLoc(), In0Ty, In0, In1); in SimplifyBinOpWithSameOpcodeHands()
2352 SDValue BC = DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, Op); in SimplifyBinOpWithSameOpcodeHands()
2353 AddToWorkList(Op.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2389 SDValue Op = DAG.getNode(N->getOpcode(), N->getDebugLoc(), VT, in SimplifyBinOpWithSameOpcodeHands()
2391 AddToWorkList(Op.getNode()); in SimplifyBinOpWithSameOpcodeHands()
2412 if (FoldedVOp.getNode()) return FoldedVOp; in visitAND()
2423 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N1, N0); in visitAND()
2433 if (RAND.getNode() != 0) in visitAND()
2446 SDValue Zext = DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), in visitAND()
2455 CombineTo(N0.getNode(), Zext); in visitAND()
2536 CombineTo(N, (N0.getNode() == Load) ? NewLoad : N0); in visitAND()
2550 SDValue ORNode = DAG.getNode(ISD::OR, N0.getDebugLoc(), in visitAND()
2552 AddToWorkList(ORNode.getNode()); in visitAND()
2557 SDValue ANDNode = DAG.getNode(ISD::AND, N0.getDebugLoc(), in visitAND()
2559 AddToWorkList(ANDNode.getNode()); in visitAND()
2564 SDValue ORNode = DAG.getNode(ISD::OR, N0.getDebugLoc(), in visitAND()
2566 AddToWorkList(ORNode.getNode()); in visitAND()
2588 if (Tmp.getNode()) return Tmp; in visitAND()
2598 if (ISD::isEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode())) { in visitAND()
2614 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitAND()
2619 if (ISD::isSEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitAND()
2637 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitAND()
2691 NewPtr = DAG.getNode(ISD::ADD, LN0->getDebugLoc(), PtrType, in visitAND()
2696 AddToWorkList(NewPtr.getNode()); in visitAND()
2737 if (!N0.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2747 if (!N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2760 if (!N0.getNode()->hasOneUse() || in MatchBSwapHWordLow()
2761 !N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2774 if (!N00.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2785 if (!N10.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2805 SDValue Res = DAG.getNode(ISD::BSWAP, N->getDebugLoc(), VT, N00); in MatchBSwapHWordLow()
2807 Res = DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, Res, in MatchBSwapHWordLow()
2816 if (!N.getNode()->hasOneUse()) in isBSwapHWordElement()
2878 Parts[Num] = N0.getOperand(0).getNode(); in isBSwapHWordElement()
2939 SDValue BSwap = DAG.getNode(ISD::BSWAP, N->getDebugLoc(), VT, in MatchBSwapHWord()
2946 return DAG.getNode(ISD::ROTL, N->getDebugLoc(), VT, BSwap, ShAmt); in MatchBSwapHWord()
2948 return DAG.getNode(ISD::ROTR, N->getDebugLoc(), VT, BSwap, ShAmt); in MatchBSwapHWord()
2949 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, in MatchBSwapHWord()
2950 DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, BSwap, ShAmt), in MatchBSwapHWord()
2951 DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, BSwap, ShAmt)); in MatchBSwapHWord()
2965 if (FoldedVOp.getNode()) return FoldedVOp; in visitOR()
2979 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N1, N0); in visitOR()
2992 if (BSwap.getNode() != 0) in visitOR()
2995 if (BSwap.getNode() != 0) in visitOR()
3000 if (ROR.getNode() != 0) in visitOR()
3004 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() && in visitOR()
3008 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitOR()
3009 DAG.getNode(ISD::OR, N0.getDebugLoc(), VT, in visitOR()
3024 SDValue ORNode = DAG.getNode(ISD::OR, LR.getDebugLoc(), in visitOR()
3026 AddToWorkList(ORNode.getNode()); in visitOR()
3033 SDValue ANDNode = DAG.getNode(ISD::AND, LR.getDebugLoc(), in visitOR()
3035 AddToWorkList(ANDNode.getNode()); in visitOR()
3057 if (Tmp.getNode()) return Tmp; in visitOR()
3066 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitOR()
3076 SDValue X = DAG.getNode(ISD::OR, N0.getDebugLoc(), VT, in visitOR()
3078 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, X, in visitOR()
3167 Rot = DAG.getNode(ISD::ROTL, DL, VT, LHSShiftArg, LHSShiftAmt); in MatchRotate()
3169 Rot = DAG.getNode(ISD::ROTR, DL, VT, LHSShiftArg, RHSShiftAmt); in MatchRotate()
3172 if (LHSMask.getNode() || RHSMask.getNode()) { in MatchRotate()
3175 if (LHSMask.getNode()) { in MatchRotate()
3179 if (RHSMask.getNode()) { in MatchRotate()
3184 Rot = DAG.getNode(ISD::AND, DL, VT, Rot, DAG.getConstant(Mask, VT)); in MatchRotate()
3187 return Rot.getNode(); in MatchRotate()
3192 if (LHSMask.getNode() || RHSMask.getNode()) in MatchRotate()
3203 return DAG.getNode(ISD::ROTL, DL, VT, in MatchRotate()
3204 LHSShiftArg, LHSShiftAmt).getNode(); in MatchRotate()
3206 return DAG.getNode(ISD::ROTR, DL, VT, in MatchRotate()
3207 LHSShiftArg, RHSShiftAmt).getNode(); in MatchRotate()
3220 return DAG.getNode(ISD::ROTR, DL, VT, in MatchRotate()
3221 LHSShiftArg, RHSShiftAmt).getNode(); in MatchRotate()
3223 return DAG.getNode(ISD::ROTL, DL, VT, in MatchRotate()
3224 LHSShiftArg, LHSShiftAmt).getNode(); in MatchRotate()
3249 return DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT, in MatchRotate()
3251 HasROTL ? LHSShiftAmt : RHSShiftAmt).getNode(); in MatchRotate()
3263 return DAG.getNode(HasROTR ? ISD::ROTR : ISD::ROTL, DL, VT, in MatchRotate()
3265 HasROTR ? RHSShiftAmt : LHSShiftAmt).getNode(); in MatchRotate()
3285 if (FoldedVOp.getNode()) return FoldedVOp; in visitXOR()
3301 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0); in visitXOR()
3307 if (RXOR.getNode() != 0) in visitXOR()
3331 N0.getNode()->hasOneUse() && in visitXOR()
3334 V = DAG.getNode(ISD::XOR, N0.getDebugLoc(), V.getValueType(), V, in visitXOR()
3336 AddToWorkList(V.getNode()); in visitXOR()
3337 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, V); in visitXOR()
3346 LHS = DAG.getNode(ISD::XOR, LHS.getDebugLoc(), VT, LHS, N1); // LHS = ~LHS in visitXOR()
3347 RHS = DAG.getNode(ISD::XOR, RHS.getDebugLoc(), VT, RHS, N1); // RHS = ~RHS in visitXOR()
3348 AddToWorkList(LHS.getNode()); AddToWorkList(RHS.getNode()); in visitXOR()
3349 return DAG.getNode(NewOpcode, N->getDebugLoc(), VT, LHS, RHS); in visitXOR()
3358 LHS = DAG.getNode(ISD::XOR, LHS.getDebugLoc(), VT, LHS, N1); // LHS = ~LHS in visitXOR()
3359 RHS = DAG.getNode(ISD::XOR, RHS.getDebugLoc(), VT, RHS, N1); // RHS = ~RHS in visitXOR()
3360 AddToWorkList(LHS.getNode()); AddToWorkList(RHS.getNode()); in visitXOR()
3361 return DAG.getNode(NewOpcode, N->getDebugLoc(), VT, LHS, RHS); in visitXOR()
3369 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N0.getOperand(1), in visitXOR()
3373 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N0.getOperand(0), in visitXOR()
3384 if (Tmp.getNode()) return Tmp; in visitXOR()
3398 SDNode *LHS = N->getOperand(0).getNode(); in visitShiftByConstant()
3432 SDNode *BinOpLHSVal = LHS->getOperand(0).getNode(); in visitShiftByConstant()
3452 SDValue NewRHS = DAG.getNode(N->getOpcode(), LHS->getOperand(1).getDebugLoc(), in visitShiftByConstant()
3457 SDValue NewShift = DAG.getNode(N->getOpcode(), in visitShiftByConstant()
3462 return DAG.getNode(LHS->getOpcode(), N->getDebugLoc(), VT, NewShift, NewRHS); in visitShiftByConstant()
3502 return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, N0, in visitSHL()
3503 DAG.getNode(ISD::AND, N->getDebugLoc(), TruncVT, in visitSHL()
3504 DAG.getNode(ISD::TRUNCATE, in visitSHL()
3521 return DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, N0.getOperand(0), in visitSHL()
3543 return DAG.getNode(ISD::SHL, N0->getDebugLoc(), VT, in visitSHL()
3544 DAG.getNode(N0.getOpcode(), N0->getDebugLoc(), VT, in visitSHL()
3564 Shift = DAG.getNode(ISD::SHL, N->getDebugLoc(), VT, N0.getOperand(0), in visitSHL()
3568 Shift = DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0.getOperand(0), in visitSHL()
3571 return DAG.getNode(ISD::AND, N0.getDebugLoc(), VT, Shift, in visitSHL()
3582 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0.getOperand(0), in visitSHL()
3588 if (NewSHL.getNode()) in visitSHL()
3628 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, in visitSRA()
3637 return DAG.getNode(ISD::SRA, N->getDebugLoc(), VT, N0.getOperand(0), in visitSRA()
3669 SDValue Shift = DAG.getNode(ISD::SRL, N0.getDebugLoc(), VT, in visitSRA()
3671 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), TruncVT, in visitSRA()
3673 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), in visitSRA()
3689 return DAG.getNode(ISD::SRA, N->getDebugLoc(), VT, N0, in visitSRA()
3690 DAG.getNode(ISD::AND, N->getDebugLoc(), in visitSRA()
3692 DAG.getNode(ISD::TRUNCATE, in visitSRA()
3716 SDValue SRA = DAG.getNode(ISD::SRA, N->getDebugLoc(), LargeVT, in visitSRA()
3718 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, SRA); in visitSRA()
3729 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0, N1); in visitSRA()
3733 if (NewSRA.getNode()) in visitSRA()
3772 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0.getOperand(0), in visitSRL()
3790 return DAG.getNode(ISD::TRUNCATE, N0->getDebugLoc(), VT, in visitSRL()
3791 DAG.getNode(ISD::SRL, N0->getDebugLoc(), InnerShiftVT, in visitSRL()
3801 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0.getOperand(0), in visitSRL()
3815 SDValue SmallShift = DAG.getNode(ISD::SRL, N0.getDebugLoc(), SmallVT, in visitSRL()
3818 AddToWorkList(SmallShift.getNode()); in visitSRL()
3819 return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, SmallShift); in visitSRL()
3827 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0.getOperand(0), N1); in visitSRL()
3855 Op = DAG.getNode(ISD::SRL, N0.getDebugLoc(), VT, Op, in visitSRL()
3857 AddToWorkList(Op.getNode()); in visitSRL()
3860 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, in visitSRL()
3875 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0, in visitSRL()
3876 DAG.getNode(ISD::AND, N->getDebugLoc(), in visitSRL()
3878 DAG.getNode(ISD::TRUNCATE, in visitSRL()
3892 if (NewSRL.getNode()) in visitSRL()
3898 if (NarrowLoad.getNode()) in visitSRL()
3939 return DAG.getNode(ISD::CTLZ, N->getDebugLoc(), VT, N0); in visitCTLZ()
3949 return DAG.getNode(ISD::CTLZ_ZERO_UNDEF, N->getDebugLoc(), VT, N0); in visitCTLZ_ZERO_UNDEF()
3959 return DAG.getNode(ISD::CTTZ, N->getDebugLoc(), VT, N0); in visitCTTZ()
3969 return DAG.getNode(ISD::CTTZ_ZERO_UNDEF, N->getDebugLoc(), VT, N0); in visitCTTZ_ZERO_UNDEF()
3979 return DAG.getNode(ISD::CTPOP, N->getDebugLoc(), VT, N0); in visitCTPOP()
4004 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N2); in visitSELECT()
4013 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT0, in visitSELECT()
4015 XORNode = DAG.getNode(ISD::XOR, N0.getDebugLoc(), VT0, in visitSELECT()
4017 AddToWorkList(XORNode.getNode()); in visitSELECT()
4019 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, XORNode); in visitSELECT()
4020 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, XORNode); in visitSELECT()
4025 AddToWorkList(NOTNode.getNode()); in visitSELECT()
4026 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, NOTNode, N2); in visitSELECT()
4031 AddToWorkList(NOTNode.getNode()); in visitSELECT()
4032 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, NOTNode, N1); in visitSELECT()
4036 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, N1); in visitSELECT()
4040 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N2); in visitSELECT()
4044 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, N1); in visitSELECT()
4058 return DAG.getNode(ISD::SELECT_CC, N->getDebugLoc(), VT, in visitSELECT()
4082 if (SCC.getNode()) AddToWorkList(SCC.getNode()); in visitSELECT_CC()
4084 if (ConstantSDNode *SCCC = dyn_cast_or_null<ConstantSDNode>(SCC.getNode())) { in visitSELECT_CC()
4092 if (SCC.getNode() && SCC.getOpcode() == ISD::SETCC) in visitSELECT_CC()
4093 return DAG.getNode(ISD::SELECT_CC, N->getDebugLoc(), N2.getValueType(), in visitSELECT_CC()
4121 for (SDNode::use_iterator UI = N0.getNode()->use_begin(), in ExtendUsesToFormExtLoad()
4122 UE = N0.getNode()->use_end(); in ExtendUsesToFormExtLoad()
4188 Ops.push_back(DAG.getNode(ExtType, DL, ExtLoad->getValueType(0), SOp)); in ExtendSetCCUses()
4192 CombineTo(SetCC, DAG.getNode(ISD::SETCC, DL, SetCC->getValueType(0), in ExtendSetCCUses()
4203 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, N0); in visitSIGN_EXTEND()
4208 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, in visitSIGN_EXTEND()
4214 SDValue NarrowLoad = ReduceLoadWidth(N0.getNode()); in visitSIGN_EXTEND()
4215 if (NarrowLoad.getNode()) { in visitSIGN_EXTEND()
4216 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitSIGN_EXTEND()
4217 if (NarrowLoad.getNode() != N0.getNode()) { in visitSIGN_EXTEND()
4218 CombineTo(N0.getNode(), NarrowLoad); in visitSIGN_EXTEND()
4242 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, Op); in visitSIGN_EXTEND()
4247 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, Op); in visitSIGN_EXTEND()
4254 Op = DAG.getNode(ISD::ANY_EXTEND, N0.getDebugLoc(), VT, Op); in visitSIGN_EXTEND()
4256 Op = DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), VT, Op); in visitSIGN_EXTEND()
4257 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, Op, in visitSIGN_EXTEND()
4266 if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() && in visitSIGN_EXTEND()
4282 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), in visitSIGN_EXTEND()
4284 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitSIGN_EXTEND()
4293 if ((ISD::isSEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) && in visitSIGN_EXTEND()
4294 ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) { in visitSIGN_EXTEND()
4306 CombineTo(N0.getNode(), in visitSIGN_EXTEND()
4307 DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), in visitSIGN_EXTEND()
4339 SDValue And = DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, in visitSIGN_EXTEND()
4341 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, in visitSIGN_EXTEND()
4345 CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1)); in visitSIGN_EXTEND()
4400 if (SCC.getNode()) return SCC; in visitSIGN_EXTEND()
4403 return DAG.getNode(ISD::SELECT, N->getDebugLoc(), VT, in visitSIGN_EXTEND()
4414 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, N0); in visitSIGN_EXTEND()
4463 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, N0); in visitZERO_EXTEND()
4467 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4486 return DAG.getNode(ISD::ZERO_EXTEND, N->getDebugLoc(), VT, Op); in visitZERO_EXTEND()
4488 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, Op); in visitZERO_EXTEND()
4497 SDValue NarrowLoad = ReduceLoadWidth(N0.getNode()); in visitZERO_EXTEND()
4498 if (NarrowLoad.getNode()) { in visitZERO_EXTEND()
4499 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitZERO_EXTEND()
4500 if (NarrowLoad.getNode() != N0.getNode()) { in visitZERO_EXTEND()
4501 CombineTo(N0.getNode(), NarrowLoad); in visitZERO_EXTEND()
4515 SDValue NarrowLoad = ReduceLoadWidth(N0.getNode()); in visitZERO_EXTEND()
4516 if (NarrowLoad.getNode()) { in visitZERO_EXTEND()
4517 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitZERO_EXTEND()
4518 if (NarrowLoad.getNode() != N0.getNode()) { in visitZERO_EXTEND()
4519 CombineTo(N0.getNode(), NarrowLoad); in visitZERO_EXTEND()
4528 Op = DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, Op); in visitZERO_EXTEND()
4530 Op = DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, Op); in visitZERO_EXTEND()
4546 X = DAG.getNode(ISD::ANY_EXTEND, X.getDebugLoc(), VT, X); in visitZERO_EXTEND()
4548 X = DAG.getNode(ISD::TRUNCATE, X.getDebugLoc(), VT, X); in visitZERO_EXTEND()
4552 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4560 if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() && in visitZERO_EXTEND()
4576 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), in visitZERO_EXTEND()
4578 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitZERO_EXTEND()
4611 SDValue And = DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, in visitZERO_EXTEND()
4613 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, in visitZERO_EXTEND()
4617 CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1)); in visitZERO_EXTEND()
4627 if ((ISD::isZEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) && in visitZERO_EXTEND()
4628 ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) { in visitZERO_EXTEND()
4640 CombineTo(N0.getNode(), in visitZERO_EXTEND()
4641 DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), N0.getValueType(), in visitZERO_EXTEND()
4662 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4666 DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4682 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4684 DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), VT, in visitZERO_EXTEND()
4693 if (SCC.getNode()) return SCC; in visitZERO_EXTEND()
4717 ShAmt = DAG.getNode(ISD::ZERO_EXTEND, DL, MVT::i32, ShAmt); in visitZERO_EXTEND()
4719 return DAG.getNode(N0.getOpcode(), DL, VT, in visitZERO_EXTEND()
4720 DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)), in visitZERO_EXTEND()
4733 return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, N0); in visitANY_EXTEND()
4740 return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, N0.getOperand(0)); in visitANY_EXTEND()
4745 SDValue NarrowLoad = ReduceLoadWidth(N0.getNode()); in visitANY_EXTEND()
4746 if (NarrowLoad.getNode()) { in visitANY_EXTEND()
4747 SDNode* oye = N0.getNode()->getOperand(0).getNode(); in visitANY_EXTEND()
4748 if (NarrowLoad.getNode() != N0.getNode()) { in visitANY_EXTEND()
4749 CombineTo(N0.getNode(), NarrowLoad); in visitANY_EXTEND()
4763 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, TruncOp); in visitANY_EXTEND()
4764 return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, TruncOp); in visitANY_EXTEND()
4776 X = DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, X); in visitANY_EXTEND()
4778 X = DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, X); in visitANY_EXTEND()
4782 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitANY_EXTEND()
4790 if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() && in visitANY_EXTEND()
4806 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), in visitANY_EXTEND()
4808 CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1)); in visitANY_EXTEND()
4819 !ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitANY_EXTEND()
4829 CombineTo(N0.getNode(), in visitANY_EXTEND()
4830 DAG.getNode(ISD::TRUNCATE, N0.getDebugLoc(), in visitANY_EXTEND()
4873 if (SCC.getNode()) in visitANY_EXTEND()
4887 const ConstantSDNode *CV = cast<ConstantSDNode>(V.getNode()); in GetDemandedBits()
4906 if (!V.getNode()->hasOneUse()) in GetDemandedBits()
4916 if (SimplifyLHS.getNode()) in GetDemandedBits()
4917 return DAG.getNode(ISD::SRL, V.getDebugLoc(), V.getValueType(), in GetDemandedBits()
5025 SDValue NewPtr = DAG.getNode(ISD::ADD, LN0->getDebugLoc(), in ReduceLoadWidth()
5028 AddToWorkList(NewPtr.getNode()); in ReduceLoadWidth()
5053 Result = DAG.getNode(ISD::SHL, N0.getDebugLoc(), VT, in ReduceLoadWidth()
5071 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, N0, N1); in visitSIGN_EXTEND_INREG()
5080 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, in visitSIGN_EXTEND_INREG()
5091 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, N00, N1); in visitSIGN_EXTEND_INREG()
5106 if (NarrowLoad.getNode()) in visitSIGN_EXTEND_INREG()
5119 return DAG.getNode(ISD::SRA, N->getDebugLoc(), VT, in visitSIGN_EXTEND_INREG()
5125 if (ISD::isEXTLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
5126 ISD::isUNINDEXEDLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
5138 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitSIGN_EXTEND_INREG()
5142 if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) && in visitSIGN_EXTEND_INREG()
5155 CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1)); in visitSIGN_EXTEND_INREG()
5161 SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND_INREG()
5163 if (BSwap.getNode() != 0) in visitSIGN_EXTEND_INREG()
5164 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, in visitSIGN_EXTEND_INREG()
5181 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, N0); in visitTRUNCATE()
5184 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, N0.getOperand(0)); in visitTRUNCATE()
5191 return DAG.getNode(N0.getOpcode(), N->getDebugLoc(), VT, in visitTRUNCATE()
5195 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, N0.getOperand(0)); in visitTRUNCATE()
5231 SDValue V = DAG.getNode(ISD::BITCAST, N->getDebugLoc(), in visitTRUNCATE()
5234 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, in visitTRUNCATE()
5249 if (Shorter.getNode()) in visitTRUNCATE()
5250 return DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, Shorter); in visitTRUNCATE()
5256 if (Reduced.getNode()) in visitTRUNCATE()
5271 return Elt.getNode(); in getBuildPairElt()
5272 return Elt.getOperand(Elt.getResNo()).getNode(); in getBuildPairElt()
5318 N0.getOpcode() == ISD::BUILD_VECTOR && N0.getNode()->hasOneUse() && in visitBITCAST()
5333 return ConstantFoldBITCASTofBUILD_VECTOR(N0.getNode(), DestEltVT); in visitBITCAST()
5338 SDValue Res = DAG.getNode(ISD::BITCAST, N->getDebugLoc(), VT, N0); in visitBITCAST()
5339 if (Res.getNode() != N) { in visitBITCAST()
5341 TLI.isOperationLegal(Res.getNode()->getOpcode(), VT)) in visitBITCAST()
5349 DAG.DeleteNode(Res.getNode()); in visitBITCAST()
5355 return DAG.getNode(ISD::BITCAST, N->getDebugLoc(), VT, in visitBITCAST()
5360 if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() && in visitBITCAST()
5375 CombineTo(N0.getNode(), in visitBITCAST()
5376 DAG.getNode(ISD::BITCAST, N0.getDebugLoc(), in visitBITCAST()
5388 N0.getNode()->hasOneUse() && VT.isInteger() && !VT.isVector()) { in visitBITCAST()
5389 SDValue NewConv = DAG.getNode(ISD::BITCAST, N0.getDebugLoc(), VT, in visitBITCAST()
5391 AddToWorkList(NewConv.getNode()); in visitBITCAST()
5395 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, in visitBITCAST()
5398 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, in visitBITCAST()
5406 if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse() && in visitBITCAST()
5412 SDValue X = DAG.getNode(ISD::BITCAST, N0.getDebugLoc(), in visitBITCAST()
5414 AddToWorkList(X.getNode()); in visitBITCAST()
5419 X = DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, X); in visitBITCAST()
5420 AddToWorkList(X.getNode()); in visitBITCAST()
5424 X = DAG.getNode(ISD::SRL, X.getDebugLoc(), in visitBITCAST()
5427 AddToWorkList(X.getNode()); in visitBITCAST()
5428 X = DAG.getNode(ISD::TRUNCATE, X.getDebugLoc(), VT, X); in visitBITCAST()
5429 AddToWorkList(X.getNode()); in visitBITCAST()
5433 X = DAG.getNode(ISD::AND, X.getDebugLoc(), VT, in visitBITCAST()
5435 AddToWorkList(X.getNode()); in visitBITCAST()
5437 SDValue Cst = DAG.getNode(ISD::BITCAST, N0.getDebugLoc(), in visitBITCAST()
5439 Cst = DAG.getNode(ISD::AND, Cst.getDebugLoc(), VT, in visitBITCAST()
5441 AddToWorkList(Cst.getNode()); in visitBITCAST()
5443 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, X, Cst); in visitBITCAST()
5449 SDValue CombineLD = CombineConsecutiveLoads(N0.getNode(), VT); in visitBITCAST()
5450 if (CombineLD.getNode()) in visitBITCAST()
5484 return DAG.getNode(ISD::SCALAR_TO_VECTOR, BV->getDebugLoc(), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
5485 DAG.getNode(ISD::BITCAST, BV->getDebugLoc(), in ConstantFoldBITCASTofBUILD_VECTOR()
5494 Op = DAG.getNode(ISD::TRUNCATE, BV->getDebugLoc(), SrcEltVT, Op); in ConstantFoldBITCASTofBUILD_VECTOR()
5495 Ops.push_back(DAG.getNode(ISD::BITCAST, BV->getDebugLoc(), in ConstantFoldBITCASTofBUILD_VECTOR()
5497 AddToWorkList(Ops.back().getNode()); in ConstantFoldBITCASTofBUILD_VECTOR()
5499 return DAG.getNode(ISD::BUILD_VECTOR, BV->getDebugLoc(), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
5511 BV = ConstantFoldBITCASTofBUILD_VECTOR(BV, IntVT).getNode(); in ConstantFoldBITCASTofBUILD_VECTOR()
5520 SDNode *Tmp = ConstantFoldBITCASTofBUILD_VECTOR(BV, TmpVT).getNode(); in ConstantFoldBITCASTofBUILD_VECTOR()
5556 return DAG.getNode(ISD::BUILD_VECTOR, BV->getDebugLoc(), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
5583 return DAG.getNode(ISD::SCALAR_TO_VECTOR, BV->getDebugLoc(), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
5593 return DAG.getNode(ISD::BUILD_VECTOR, BV->getDebugLoc(), VT, in ConstantFoldBITCASTofBUILD_VECTOR()
5607 if (FoldedVOp.getNode()) return FoldedVOp; in visitFADD()
5612 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, N1); in visitFADD()
5615 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N1, N0); in visitFADD()
5623 return DAG.getNode(ISD::FSUB, N->getDebugLoc(), VT, N0, in visitFADD()
5628 return DAG.getNode(ISD::FSUB, N->getDebugLoc(), VT, N1, in visitFADD()
5633 N0.getOpcode() == ISD::FADD && N0.getNode()->hasOneUse() && in visitFADD()
5635 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0.getOperand(0), in visitFADD()
5636 DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, in visitFADD()
5652 if (FoldedVOp.getNode()) return FoldedVOp; in visitFSUB()
5657 return DAG.getNode(ISD::FSUB, N->getDebugLoc(), VT, N0, N1); in visitFSUB()
5668 return DAG.getNode(ISD::FNEG, N->getDebugLoc(), VT, N1); in visitFSUB()
5672 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, in visitFSUB()
5706 if (FoldedVOp.getNode()) return FoldedVOp; in visitFMUL()
5711 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N0, N1); in visitFMUL()
5714 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N1, N0); in visitFMUL()
5721 ISD::isBuildVectorAllZeros(N1.getNode())) in visitFMUL()
5725 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, N0); in visitFMUL()
5729 return DAG.getNode(ISD::FNEG, N->getDebugLoc(), VT, N0); in visitFMUL()
5739 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, in visitFMUL()
5748 N0.getNode()->hasOneUse() && isa<ConstantFPSDNode>(N0.getOperand(1))) in visitFMUL()
5749 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N0.getOperand(0), in visitFMUL()
5750 DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, in visitFMUL()
5767 if (FoldedVOp.getNode()) return FoldedVOp; in visitFDIV()
5772 return DAG.getNode(ISD::FDIV, N->getDebugLoc(), VT, N0, N1); in visitFDIV()
5789 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N0, in visitFDIV()
5801 return DAG.getNode(ISD::FDIV, N->getDebugLoc(), VT, in visitFDIV()
5819 return DAG.getNode(ISD::FREM, N->getDebugLoc(), VT, N0, N1); in visitFREM()
5832 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, N0, N1); in visitFCOPYSIGN()
5840 return DAG.getNode(ISD::FABS, N->getDebugLoc(), VT, N0); in visitFCOPYSIGN()
5843 return DAG.getNode(ISD::FNEG, N->getDebugLoc(), VT, in visitFCOPYSIGN()
5844 DAG.getNode(ISD::FABS, N0.getDebugLoc(), VT, N0)); in visitFCOPYSIGN()
5853 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, in visitFCOPYSIGN()
5858 return DAG.getNode(ISD::FABS, N->getDebugLoc(), VT, N0); in visitFCOPYSIGN()
5862 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, in visitFCOPYSIGN()
5868 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, in visitFCOPYSIGN()
5885 return DAG.getNode(ISD::SINT_TO_FP, N->getDebugLoc(), VT, N0); in visitSINT_TO_FP()
5893 return DAG.getNode(ISD::UINT_TO_FP, N->getDebugLoc(), VT, N0); in visitSINT_TO_FP()
5910 return DAG.getNode(ISD::UINT_TO_FP, N->getDebugLoc(), VT, N0); in visitUINT_TO_FP()
5918 return DAG.getNode(ISD::SINT_TO_FP, N->getDebugLoc(), VT, N0); in visitUINT_TO_FP()
5931 return DAG.getNode(ISD::FP_TO_SINT, N->getDebugLoc(), VT, N0); in visitFP_TO_SINT()
5943 return DAG.getNode(ISD::FP_TO_UINT, N->getDebugLoc(), VT, N0); in visitFP_TO_UINT()
5956 return DAG.getNode(ISD::FP_ROUND, N->getDebugLoc(), VT, N0, N1); in visitFP_ROUND()
5966 N0.getNode()->getConstantOperandVal(1) == 1; in visitFP_ROUND()
5967 return DAG.getNode(ISD::FP_ROUND, N->getDebugLoc(), VT, N0.getOperand(0), in visitFP_ROUND()
5972 if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse()) { in visitFP_ROUND()
5973 SDValue Tmp = DAG.getNode(ISD::FP_ROUND, N0.getDebugLoc(), VT, in visitFP_ROUND()
5975 AddToWorkList(Tmp.getNode()); in visitFP_ROUND()
5976 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, in visitFP_ROUND()
5992 return DAG.getNode(ISD::FP_EXTEND, N->getDebugLoc(), VT, Round); in visitFP_ROUND_INREG()
6010 return DAG.getNode(ISD::FP_EXTEND, N->getDebugLoc(), VT, N0); in visitFP_EXTEND()
6015 && N0.getNode()->getConstantOperandVal(1) == 1) { in visitFP_EXTEND()
6019 return DAG.getNode(ISD::FP_ROUND, N->getDebugLoc(), VT, in visitFP_EXTEND()
6021 return DAG.getNode(ISD::FP_EXTEND, N->getDebugLoc(), VT, In); in visitFP_EXTEND()
6025 if (ISD::isNON_EXTLoad(N0.getNode()) && N0.hasOneUse() && in visitFP_EXTEND()
6036 CombineTo(N0.getNode(), in visitFP_EXTEND()
6037 DAG.getNode(ISD::FP_ROUND, N0.getDebugLoc(), in visitFP_EXTEND()
6058 N0.getNode()->hasOneUse() && in visitFNEG()
6063 Int = DAG.getNode(ISD::XOR, N0.getDebugLoc(), IntVT, Int, in visitFNEG()
6065 AddToWorkList(Int.getNode()); in visitFNEG()
6066 return DAG.getNode(ISD::BITCAST, N->getDebugLoc(), in visitFNEG()
6081 return DAG.getNode(ISD::FABS, N->getDebugLoc(), VT, N0); in visitFABS()
6088 return DAG.getNode(ISD::FABS, N->getDebugLoc(), VT, N0.getOperand(0)); in visitFABS()
6093 N0.getOpcode() == ISD::BITCAST && N0.getNode()->hasOneUse() && in visitFABS()
6099 Int = DAG.getNode(ISD::AND, N0.getDebugLoc(), IntVT, Int, in visitFABS()
6101 AddToWorkList(Int.getNode()); in visitFABS()
6102 return DAG.getNode(ISD::BITCAST, N->getDebugLoc(), in visitFABS()
6125 return DAG.getNode(ISD::BR_CC, N->getDebugLoc(), MVT::Other, in visitBRCOND()
6137 Trunc = N1.getNode(); in visitBRCOND()
6176 SDValue NewBRCond = DAG.getNode(ISD::BRCOND, N->getDebugLoc(), in visitBRCOND()
6189 removeFromWorkList(N1.getNode()); in visitBRCOND()
6190 DAG.DeleteNode(N1.getNode()); in visitBRCOND()
6204 SDNode *TheXor = N1.getNode(); in visitBRCOND()
6210 if (Tmp.getNode() && Tmp.getNode() != TheXor) { in visitBRCOND()
6214 Tmp.getNode()->dump(&DAG); in visitBRCOND()
6220 return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), in visitBRCOND()
6230 TheXor = Op0.getNode(); in visitBRCOND()
6244 removeFromWorkList(N1.getNode()); in visitBRCOND()
6245 DAG.DeleteNode(N1.getNode()); in visitBRCOND()
6246 return DAG.getNode(ISD::BRCOND, N->getDebugLoc(), in visitBRCOND()
6270 if (Simp.getNode()) AddToWorkList(Simp.getNode()); in visitBR_CC()
6273 if (Simp.getNode() && Simp.getOpcode() == ISD::SETCC) in visitBR_CC()
6274 return DAG.getNode(ISD::BR_CC, N->getDebugLoc(), MVT::Other, in visitBR_CC()
6290 if (LD->isIndexed() || LD->getBasePtr().getNode() != N) in canFoldInAddressingMode()
6294 if (ST->isIndexed() || ST->getBasePtr().getNode() != N) in canFoldInAddressingMode()
6360 Ptr.getNode()->hasOneUse()) in CombineToPreIndexedLoadStore()
6390 if (Val == BasePtr || BasePtr.getNode()->isPredecessorOf(Val.getNode())) in CombineToPreIndexedLoadStore()
6401 for (SDNode::use_iterator I = Ptr.getNode()->use_begin(), in CombineToPreIndexedLoadStore()
6402 E = Ptr.getNode()->use_end(); I != E; ++I) { in CombineToPreIndexedLoadStore()
6411 if (!canFoldInAddressingMode(Ptr.getNode(), Use, DAG, TLI)) in CombineToPreIndexedLoadStore()
6430 Result.getNode()->dump(&DAG); in CombineToPreIndexedLoadStore()
6449 removeFromWorkList(Ptr.getNode()); in CombineToPreIndexedLoadStore()
6450 DAG.DeleteNode(Ptr.getNode()); in CombineToPreIndexedLoadStore()
6488 if (Ptr.getNode()->hasOneUse()) in CombineToPostIndexedLoadStore()
6491 for (SDNode::use_iterator I = Ptr.getNode()->use_begin(), in CombineToPostIndexedLoadStore()
6492 E = Ptr.getNode()->use_end(); I != E; ++I) { in CombineToPostIndexedLoadStore()
6519 for (SDNode::use_iterator II = BasePtr.getNode()->use_begin(), in CombineToPostIndexedLoadStore()
6520 EE = BasePtr.getNode()->use_end(); II != EE; ++II) { in CombineToPostIndexedLoadStore()
6522 if (Use == Ptr.getNode()) in CombineToPostIndexedLoadStore()
6558 Result.getNode()->dump(&DAG); in CombineToPostIndexedLoadStore()
6609 Chain.getNode()->dump(&DAG); in visitLOAD()
6629 Undef.getNode()->dump(&DAG); in visitLOAD()
6649 if (ISD::isNON_TRUNCStore(Chain.getNode())) { in visitLOAD()
6694 SDValue Token = DAG.getNode(ISD::TokenFactor, N->getDebugLoc(), in visitLOAD()
6698 AddToWorkList(Token.getNode()); in visitLOAD()
6723 !ISD::isNormalLoad(V->getOperand(0).getNode())) in CheckForMaskedLoad()
6732 if (LD == Chain.getNode()) in CheckForMaskedLoad()
6739 if (Chain->getOperand(i).getNode() == LD) { in CheckForMaskedLoad()
6815 IVal = DAG.getNode(ISD::SRL, IVal->getDebugLoc(), IVal.getValueType(), IVal, in ShrinkLoadReplaceStoreWithStore()
6830 Ptr = DAG.getNode(ISD::ADD, IVal->getDebugLoc(), Ptr.getValueType(), in ShrinkLoadReplaceStoreWithStore()
6836 IVal = DAG.getNode(ISD::TRUNCATE, IVal->getDebugLoc(), VT, IVal); in ShrinkLoadReplaceStoreWithStore()
6841 false, false, NewAlign).getNode(); in ShrinkLoadReplaceStoreWithStore()
6890 if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() && in ReduceLoadOpStoreWidth()
6891 Chain == SDValue(N0.getNode(), 1)) { in ReduceLoadOpStoreWidth()
6939 SDValue NewPtr = DAG.getNode(ISD::ADD, LD->getDebugLoc(), in ReduceLoadOpStoreWidth()
6947 SDValue NewVal = DAG.getNode(Opc, Value.getDebugLoc(), NewVT, NewLD, in ReduceLoadOpStoreWidth()
6954 AddToWorkList(NewPtr.getNode()); in ReduceLoadOpStoreWidth()
6955 AddToWorkList(NewLD.getNode()); in ReduceLoadOpStoreWidth()
6956 AddToWorkList(NewVal.getNode()); in ReduceLoadOpStoreWidth()
6976 if (ISD::isNormalStore(ST) && ISD::isNormalLoad(Value.getNode()) && in TransformFPLoadStorePair()
6978 Chain == SDValue(Value.getNode(), 1)) { in TransformFPLoadStorePair()
7013 AddToWorkList(NewLD.getNode()); in TransformFPLoadStorePair()
7014 AddToWorkList(NewST.getNode()); in TransformFPLoadStorePair()
7104 Ptr = DAG.getNode(ISD::ADD, N->getDebugLoc(), Ptr.getValueType(), Ptr, in visitSTORE()
7111 return DAG.getNode(ISD::TokenFactor, N->getDebugLoc(), MVT::Other, in visitSTORE()
7133 if (NewST.getNode()) in visitSTORE()
7158 SDValue Token = DAG.getNode(ISD::TokenFactor, N->getDebugLoc(), in visitSTORE()
7162 AddToWorkList(Token.getNode()); in visitSTORE()
7184 AddToWorkList(Value.getNode()); in visitSTORE()
7185 if (Shorter.getNode()) in visitSTORE()
7216 && Value.getNode()->hasOneUse() && ST->isUnindexed() && in visitSTORE()
7254 Ops.append(InVec.getNode()->op_begin(), in visitINSERT_VECTOR_ELT()
7255 InVec.getNode()->op_end()); in visitINSERT_VECTOR_ELT()
7270 DAG.getNode(ISD::ANY_EXTEND, dl, OpVT, InVal) : in visitINSERT_VECTOR_ELT()
7271 DAG.getNode(ISD::TRUNCATE, dl, OpVT, InVal); in visitINSERT_VECTOR_ELT()
7276 return DAG.getNode(ISD::BUILD_VECTOR, dl, in visitINSERT_VECTOR_ELT()
7326 return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, N->getDebugLoc(), NVT, in visitEXTRACT_VECTOR_ELT()
7367 if (ISD::isNormalLoad(InVec.getNode())) { in visitEXTRACT_VECTOR_ELT()
7371 ISD::isNormalLoad(InVec.getOperand(0).getNode())) { in visitEXTRACT_VECTOR_ELT()
7403 if (ISD::isNormalLoad(InVec.getNode())) { in visitEXTRACT_VECTOR_ELT()
7440 NewPtr = DAG.getNode(ISD::ADD, N->getDebugLoc(), PtrType, NewPtr, in visitEXTRACT_VECTOR_ELT()
7468 Load = DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), NVT, Load); in visitEXTRACT_VECTOR_ELT()
7470 Load = DAG.getNode(ISD::BITCAST, N->getDebugLoc(), NVT, Load); in visitEXTRACT_VECTOR_ELT()
7478 AddToWorkList(Load.getNode()); in visitEXTRACT_VECTOR_ELT()
7479 AddUsersToWorkList(Load.getNode()); // Add users too in visitEXTRACT_VECTOR_ELT()
7588 SDValue BV = DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), in visitBUILD_VECTOR()
7592 AddToWorkList(BV.getNode()); in visitBUILD_VECTOR()
7594 return DAG.getNode(ISD::BITCAST, dl, N->getValueType(0), BV); in visitBUILD_VECTOR()
7624 if (VecIn1.getNode() == 0) { in visitBUILD_VECTOR()
7626 } else if (VecIn2.getNode() == 0) { in visitBUILD_VECTOR()
7636 if (VecIn1.getNode()) { in visitBUILD_VECTOR()
7665 if (VecIn2.getNode() != 0) in visitBUILD_VECTOR()
7674 VecIn1 = DAG.getNode(ISD::CONCAT_VECTORS, N->getDebugLoc(), VT, in visitBUILD_VECTOR()
7679 VecIn2 = VecIn2.getNode() ? VecIn2 : DAG.getUNDEF(VT); in visitBUILD_VECTOR()
7739 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, N->getDebugLoc(), NVT, in visitEXTRACT_SUBVECTOR()
7810 SDNode *V = N0.getNode(); in visitVECTOR_SHUFFLE()
7819 V = ConvInput.getNode(); in visitVECTOR_SHUFFLE()
7834 if (!Base.getNode()) in visitVECTOR_SHUFFLE()
7913 return SDValue(DAG.UpdateNodeOperands(atomic.getNode(), in visitMEMBARRIER()
7928 return SDValue(DAG.UpdateNodeOperands(atomic.getNode(), in visitMEMBARRIER()
7974 SDValue Zero = DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), in XformToShuffleWithZero()
7976 LHS = DAG.getNode(ISD::BITCAST, dl, RVT, LHS); in XformToShuffleWithZero()
7978 return DAG.getNode(ISD::BITCAST, dl, VT, Shuf); in XformToShuffleWithZero()
7998 if (Shuffle.getNode()) return Shuffle; in SimplifyVBinOp()
8021 cast<ConstantSDNode>(RHSOp.getNode())->isNullValue()) || in SimplifyVBinOp()
8023 cast<ConstantFPSDNode>(RHSOp.getNode())->getValueAPF().isZero())) in SimplifyVBinOp()
8035 RHSOp = DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), VT, RHSOp); in SimplifyVBinOp()
8037 LHSOp = DAG.getNode(ISD::TRUNCATE, N->getDebugLoc(), RVT, LHSOp); in SimplifyVBinOp()
8041 SDValue FoldOp = DAG.getNode(N->getOpcode(), LHS.getDebugLoc(), VT, in SimplifyVBinOp()
8048 AddToWorkList(FoldOp.getNode()); in SimplifyVBinOp()
8052 return DAG.getNode(ISD::BUILD_VECTOR, N->getDebugLoc(), in SimplifyVBinOp()
8069 if (SCC.getNode()) { in SimplifySelect()
8073 SDValue SETCC = DAG.getNode(ISD::SETCC, N0.getDebugLoc(), in SimplifySelect()
8077 AddToWorkList(SETCC.getNode()); in SimplifySelect()
8078 return DAG.getNode(ISD::SELECT, SCC.getDebugLoc(), SCC.getValueType(), in SimplifySelect()
8138 SDNode *CondNode = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
8142 Addr = DAG.getNode(ISD::SELECT, TheSelect->getDebugLoc(), in SimplifySelectOps()
8147 SDNode *CondLHS = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
8148 SDNode *CondRHS = TheSelect->getOperand(1).getNode(); in SimplifySelectOps()
8156 Addr = DAG.getNode(ISD::SELECT_CC, TheSelect->getDebugLoc(), in SimplifySelectOps()
8188 CombineTo(LHS.getNode(), Load.getValue(0), Load.getValue(1)); in SimplifySelectOps()
8189 CombineTo(RHS.getNode(), Load.getValue(0), Load.getValue(1)); in SimplifySelectOps()
8205 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC()
8206 ConstantSDNode *N2C = dyn_cast<ConstantSDNode>(N2.getNode()); in SimplifySelectCC()
8207 ConstantSDNode *N3C = dyn_cast<ConstantSDNode>(N3.getNode()); in SimplifySelectCC()
8212 if (SCC.getNode()) AddToWorkList(SCC.getNode()); in SimplifySelectCC()
8213 ConstantSDNode *SCCC = dyn_cast_or_null<ConstantSDNode>(SCC.getNode()); in SimplifySelectCC()
8230 return DAG.getNode(ISD::FABS, DL, VT, N0); in SimplifySelectCC()
8236 return DAG.getNode(ISD::FABS, DL, VT, N3); in SimplifySelectCC()
8278 AddToWorkList(Cond.getNode()); in SimplifySelectCC()
8279 SDValue CstOffset = DAG.getNode(ISD::SELECT, DL, Zero.getValueType(), in SimplifySelectCC()
8281 AddToWorkList(CstOffset.getNode()); in SimplifySelectCC()
8282 CPIdx = DAG.getNode(ISD::ADD, DL, TLI.getPointerTy(), CPIdx, in SimplifySelectCC()
8284 AddToWorkList(CPIdx.getNode()); in SimplifySelectCC()
8307 SDValue Shift = DAG.getNode(ISD::SRL, N0.getDebugLoc(), in SimplifySelectCC()
8309 AddToWorkList(Shift.getNode()); in SimplifySelectCC()
8312 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift); in SimplifySelectCC()
8313 AddToWorkList(Shift.getNode()); in SimplifySelectCC()
8316 return DAG.getNode(ISD::AND, DL, AType, Shift, N2); in SimplifySelectCC()
8319 SDValue Shift = DAG.getNode(ISD::SRA, N0.getDebugLoc(), in SimplifySelectCC()
8323 AddToWorkList(Shift.getNode()); in SimplifySelectCC()
8326 Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift); in SimplifySelectCC()
8327 AddToWorkList(Shift.getNode()); in SimplifySelectCC()
8330 return DAG.getNode(ISD::AND, DL, AType, Shift, N2); in SimplifySelectCC()
8352 SDValue Shl = DAG.getNode(ISD::SHL, N0.getDebugLoc(), VT, AndLHS, ShlAmt); in SimplifySelectCC()
8359 SDValue Shr = DAG.getNode(ISD::SRA, N0.getDebugLoc(), VT, Shl, ShrAmt); in SimplifySelectCC()
8361 return DAG.getNode(ISD::AND, DL, VT, Shr, N3); in SimplifySelectCC()
8386 Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getDebugLoc(), in SimplifySelectCC()
8390 Temp = DAG.getNode(ISD::ZERO_EXTEND, N2.getDebugLoc(), in SimplifySelectCC()
8394 AddToWorkList(SCC.getNode()); in SimplifySelectCC()
8395 AddToWorkList(Temp.getNode()); in SimplifySelectCC()
8401 return DAG.getNode(ISD::SHL, DL, N2.getValueType(), Temp, in SimplifySelectCC()
8415 Res = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Res); in SimplifySelectCC()
8423 SDValue Ctlz = DAG.getNode(ISD::CTLZ, N0.getDebugLoc(), XType, N0); in SimplifySelectCC()
8424 return DAG.getNode(ISD::SRL, DL, XType, Ctlz, in SimplifySelectCC()
8430 SDValue NegN0 = DAG.getNode(ISD::SUB, N0.getDebugLoc(), in SimplifySelectCC()
8433 return DAG.getNode(ISD::SRL, DL, XType, in SimplifySelectCC()
8434 DAG.getNode(ISD::AND, DL, XType, NegN0, NotN0), in SimplifySelectCC()
8440 SDValue Sign = DAG.getNode(ISD::SRL, N0.getDebugLoc(), XType, N0, in SimplifySelectCC()
8443 return DAG.getNode(ISD::XOR, DL, XType, Sign, DAG.getConstant(1, XType)); in SimplifySelectCC()
8466 SDValue Shift = DAG.getNode(ISD::SRA, N0.getDebugLoc(), XType, in SimplifySelectCC()
8470 SDValue Add = DAG.getNode(ISD::ADD, N0.getDebugLoc(), in SimplifySelectCC()
8472 AddToWorkList(Shift.getNode()); in SimplifySelectCC()
8473 AddToWorkList(Add.getNode()); in SimplifySelectCC()
8474 return DAG.getNode(ISD::XOR, DL, XType, Add, Shift); in SimplifySelectCC()
8691 if (!Visited.insert(Chain.getNode())) in GatherAllAliases()
8708 bool IsOpLoad = FindAliasInfo(Chain.getNode(), OpPtr, OpSize, in GatherAllAliases()
8767 return DAG.getNode(ISD::TokenFactor, N->getDebugLoc(), MVT::Other, in FindBetterChain()