Lines Matching refs:N1
251 SDValue visitANDLike(SDValue N0, SDValue N1, SDNode *LocReference);
253 SDValue visitORLike(SDValue N0, SDValue N1, SDNode *LocReference);
335 SDValue SimplifySelect(SDLoc DL, SDValue N0, SDValue N1, SDValue N2);
336 SDValue SimplifySelectCC(SDLoc DL, SDValue N0, SDValue N1, SDValue N2,
339 SDValue SimplifySetCC(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond,
361 SDValue MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
363 SDValue MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1);
744 SDValue N0, N1, N2; in isOneUseSetCC() local
745 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
825 SDValue N0, SDValue N1) { in ReassociateOps() argument
829 if (SDNode *R = isConstantIntBuildVectorOrConstantInt(N1)) { in ReassociateOps()
838 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0.getOperand(0), N1); in ReassociateOps()
847 if (N1.getOpcode() == Opc) { in ReassociateOps()
848 if (SDNode *R = isConstantIntBuildVectorOrConstantInt(N1.getOperand(1))) { in ReassociateOps()
852 return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode); in ReassociateOps()
855 if (N1.hasOneUse()) { in ReassociateOps()
858 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N1.getOperand(0), N0); in ReassociateOps()
862 return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1)); in ReassociateOps()
1061 SDValue N1 = Op.getOperand(1); in PromoteIntBinOp() local
1063 if (N0 == N1) in PromoteIntBinOp()
1066 NN1 = PromoteOperand(N1, PVT, Replace1); in PromoteIntBinOp()
1078 ReplaceLoadWithPromotedLoad(N1.getNode(), NN1.getNode()); in PromoteIntBinOp()
1506 SDValue N1 = N->getOperand(1); in combine() local
1509 if (isa<ConstantSDNode>(N0) || !isa<ConstantSDNode>(N1)) { in combine()
1510 SDValue Ops[] = {N1, N0}; in combine()
1640 SDValue N1 = N->getOperand(1); in visitADD() local
1649 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitADD()
1652 return N1; in visitADD()
1658 if (N1.getOpcode() == ISD::UNDEF) in visitADD()
1659 return N1; in visitADD()
1662 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitADD()
1667 !isConstantIntBuildVectorOrConstantInt(N1)) in visitADD()
1668 return DAG.getNode(ISD::ADD, SDLoc(N), VT, N1, N0); in visitADD()
1670 if (isNullConstant(N1)) in visitADD()
1689 if (SDValue RADD = ReassociateOps(ISD::ADD, SDLoc(N), N0, N1)) in visitADD()
1693 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1, N0.getOperand(1)); in visitADD()
1695 if (N1.getOpcode() == ISD::SUB && isNullConstant(N1.getOperand(0))) in visitADD()
1696 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N0, N1.getOperand(1)); in visitADD()
1698 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1)) in visitADD()
1699 return N1.getOperand(0); in visitADD()
1701 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1)) in visitADD()
1704 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
1705 N0 == N1.getOperand(1).getOperand(0)) in visitADD()
1706 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0), in visitADD()
1707 N1.getOperand(1).getOperand(1)); in visitADD()
1709 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
1710 N0 == N1.getOperand(1).getOperand(1)) in visitADD()
1711 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1.getOperand(0), in visitADD()
1712 N1.getOperand(1).getOperand(0)); in visitADD()
1714 if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) && in visitADD()
1715 N1.getOperand(0).getOpcode() == ISD::SUB && in visitADD()
1716 N0 == N1.getOperand(0).getOperand(1)) in visitADD()
1717 return DAG.getNode(N1.getOpcode(), SDLoc(N), VT, in visitADD()
1718 N1.getOperand(0).getOperand(0), N1.getOperand(1)); in visitADD()
1721 if (N0.getOpcode() == ISD::SUB && N1.getOpcode() == ISD::SUB) { in visitADD()
1724 SDValue N10 = N1.getOperand(0); in visitADD()
1725 SDValue N11 = N1.getOperand(1); in visitADD()
1730 DAG.getNode(ISD::ADD, SDLoc(N1), VT, N01, N11)); in visitADD()
1738 VT.isInteger() && !VT.isVector() && DAG.haveNoCommonBitsSet(N0, N1)) in visitADD()
1739 return DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N1); in visitADD()
1742 if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB && in visitADD()
1743 isNullConstant(N1.getOperand(0).getOperand(0))) in visitADD()
1746 N1.getOperand(0).getOperand(1), in visitADD()
1747 N1.getOperand(1))); in visitADD()
1750 return DAG.getNode(ISD::SUB, SDLoc(N), VT, N1, in visitADD()
1755 if (N1.getOpcode() == ISD::AND) { in visitADD()
1756 SDValue AndOp0 = N1.getOperand(0); in visitADD()
1762 if (NumSignBits == DestBits && isOneConstant(N1->getOperand(1))) { in visitADD()
1774 return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt); in visitADD()
1778 if (N1.getOpcode() == ISD::SIGN_EXTEND_INREG) { in visitADD()
1779 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitADD()
1782 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitADD()
1793 SDValue N1 = N->getOperand(1); in visitADDC() local
1798 return CombineTo(N, DAG.getNode(ISD::ADD, SDLoc(N), VT, N0, N1), in visitADDC()
1804 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDC()
1806 return DAG.getNode(ISD::ADDC, SDLoc(N), N->getVTList(), N1, N0); in visitADDC()
1809 if (isNullConstant(N1)) in visitADDC()
1819 DAG.computeKnownBits(N1, RHSZero, RHSOne); in visitADDC()
1824 return CombineTo(N, DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N1), in visitADDC()
1834 SDValue N1 = N->getOperand(1); in visitADDE() local
1839 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDE()
1842 N1, N0, CarryIn); in visitADDE()
1846 return DAG.getNode(ISD::ADDC, SDLoc(N), N->getVTList(), N0, N1); in visitADDE()
1865 SDValue N1 = N->getOperand(1); in visitSUB() local
1874 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitSUB()
1880 if (N0 == N1) in visitSUB()
1884 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitSUB()
1895 return DAG.getNode(ISD::XOR, SDLoc(N), VT, N1, N0); in visitSUB()
1897 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0)) in visitSUB()
1898 return N1.getOperand(1); in visitSUB()
1900 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1) in visitSUB()
1903 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) in visitSUB()
1906 ConstantSDNode *N1C1 = N1.getOpcode() != ISD::ADD ? nullptr : in visitSUB()
1907 dyn_cast<ConstantSDNode>(N1.getOperand(1).getNode()); in visitSUB()
1908 if (N1.getOpcode() == ISD::ADD && N0C && N1C1) { in visitSUB()
1913 N1.getOperand(0)); in visitSUB()
1919 N0.getOperand(1).getOperand(0) == N1) in visitSUB()
1925 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
1931 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
1938 if (N1.getOpcode() == ISD::UNDEF) in visitSUB()
1939 return N1; in visitSUB()
1950 if (GlobalAddressSDNode *GB = dyn_cast<GlobalAddressSDNode>(N1)) in visitSUB()
1957 if (N1.getOpcode() == ISD::SIGN_EXTEND_INREG) { in visitSUB()
1958 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitSUB()
1961 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitSUB()
1972 SDValue N1 = N->getOperand(1); in visitSUBC() local
1978 return CombineTo(N, DAG.getNode(ISD::SUB, DL, VT, N0, N1), in visitSUBC()
1982 if (N0 == N1) in visitSUBC()
1987 if (isNullConstant(N1)) in visitSUBC()
1992 return CombineTo(N, DAG.getNode(ISD::XOR, DL, VT, N1, N0), in visitSUBC()
2000 SDValue N1 = N->getOperand(1); in visitSUBE() local
2005 return DAG.getNode(ISD::SUBC, SDLoc(N), N->getVTList(), N0, N1); in visitSUBE()
2012 SDValue N1 = N->getOperand(1); in visitMUL() local
2016 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMUL()
2030 N1IsConst = isConstantSplatVector(N1.getNode(), ConstValue1); in visitMUL()
2037 N1IsConst = isa<ConstantSDNode>(N1); in visitMUL()
2039 ConstValue1 = cast<ConstantSDNode>(N1)->getAPIntValue(); in visitMUL()
2040 N1IsOpaqueConst = cast<ConstantSDNode>(N1)->isOpaque(); in visitMUL()
2047 N0.getNode(), N1.getNode()); in visitMUL()
2051 !isConstantIntBuildVectorOrConstantInt(N1)) in visitMUL()
2052 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N1, N0); in visitMUL()
2055 return N1; in visitMUL()
2097 N1, N0.getOperand(1)); in visitMUL()
2112 Sh = N0; Y = N1; in visitMUL()
2113 } else if (N1.getOpcode() == ISD::SHL && in visitMUL()
2114 isa<ConstantSDNode>(N1.getOperand(1)) && in visitMUL()
2115 N1.getNode()->hasOneUse()) { in visitMUL()
2116 Sh = N1; Y = N0; in visitMUL()
2128 if (isConstantIntBuildVectorOrConstantInt(N1) && in visitMUL()
2131 isMulAddWithConstProfitable(N, N0, N1)) in visitMUL()
2134 N0.getOperand(0), N1), in visitMUL()
2135 DAG.getNode(ISD::MUL, SDLoc(N1), VT, in visitMUL()
2136 N0.getOperand(1), N1)); in visitMUL()
2139 if (SDValue RMUL = ReassociateOps(ISD::MUL, SDLoc(N), N0, N1)) in visitMUL()
2229 SDValue N1 = N->getOperand(1); in visitSDIV() local
2241 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitSDIV()
2255 if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0)) in visitSDIV()
2256 return DAG.getNode(ISD::UDIV, DL, N1.getValueType(), N0, N1); in visitSDIV()
2320 if (N1.getOpcode() == ISD::UNDEF) in visitSDIV()
2321 return N1; in visitSDIV()
2328 SDValue N1 = N->getOperand(1); in visitUDIV() local
2340 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitUDIV()
2352 if (N1.getOpcode() == ISD::SHL) { in visitUDIV()
2353 if (ConstantSDNode *SHC = getAsNonOpaqueConstant(N1.getOperand(0))) { in visitUDIV()
2355 EVT ADDVT = N1.getOperand(1).getValueType(); in visitUDIV()
2357 N1.getOperand(1), in visitUDIV()
2384 if (N1.getOpcode() == ISD::UNDEF) in visitUDIV()
2385 return N1; in visitUDIV()
2394 SDValue N1 = N->getOperand(1); in visitREM() local
2401 ConstantSDNode *N1C = isConstOrConstSplat(N1); in visitREM()
2410 if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0)) in visitREM()
2411 return DAG.getNode(ISD::UREM, DL, VT, N0, N1); in visitREM()
2421 if (N1.getOpcode() == ISD::SHL) { in visitREM()
2422 if (ConstantSDNode *SHC = getAsNonOpaqueConstant(N1.getOperand(0))) { in visitREM()
2425 DAG.getNode(ISD::ADD, DL, VT, N1, in visitREM()
2447 SDValue Div = DAG.getNode(DivOpcode, DL, VT, N0, N1); in visitREM()
2453 SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, OptimizedDiv, N1); in visitREM()
2468 if (N1.getOpcode() == ISD::UNDEF) in visitREM()
2469 return N1; in visitREM()
2476 SDValue N1 = N->getOperand(1); in visitMULHS() local
2481 if (isNullConstant(N1)) in visitMULHS()
2482 return N1; in visitMULHS()
2484 if (isOneConstant(N1)) { in visitMULHS()
2492 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMULHS()
2503 N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1); in visitMULHS()
2504 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHS()
2505 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHS()
2507 getShiftAmountTy(N1.getValueType()))); in visitMULHS()
2508 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHS()
2517 SDValue N1 = N->getOperand(1); in visitMULHU() local
2522 if (isNullConstant(N1)) in visitMULHU()
2523 return N1; in visitMULHU()
2525 if (isOneConstant(N1)) in visitMULHU()
2528 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMULHU()
2539 N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N1); in visitMULHU()
2540 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHU()
2541 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHU()
2543 getShiftAmountTy(N1.getValueType()))); in visitMULHU()
2544 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHU()
2686 SDValue N1 = N->getOperand(1); in visitIMINMAX() local
2696 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitIMINMAX()
2702 !isConstantIntBuildVectorOrConstantInt(N1)) in visitIMINMAX()
2703 return DAG.getNode(N->getOpcode(), SDLoc(N), VT, N1, N0); in visitIMINMAX()
2711 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in SimplifyBinOpWithSameOpcodeHands() local
2713 assert(N0.getOpcode() == N1.getOpcode() && "Bad input!"); in SimplifyBinOpWithSameOpcodeHands()
2739 Op0VT == N1.getOperand(0).getValueType() && in SimplifyBinOpWithSameOpcodeHands()
2743 N0.getOperand(0), N1.getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2754 N0.getOperand(1) == N1.getOperand(1)) { in SimplifyBinOpWithSameOpcodeHands()
2757 N0.getOperand(0), N1.getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2774 SDValue In1 = N1.getOperand(0); in SimplifyBinOpWithSameOpcodeHands()
2802 ShuffleVectorSDNode *SVN1 = cast<ShuffleVectorSDNode>(N1); in SimplifyBinOpWithSameOpcodeHands()
2804 assert(N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType() && in SimplifyBinOpWithSameOpcodeHands()
2827 if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) { in SimplifyBinOpWithSameOpcodeHands()
2829 N0->getOperand(0), N1->getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2848 if (N0->getOperand(0) == N1->getOperand(0) && ShOp.getNode()) { in SimplifyBinOpWithSameOpcodeHands()
2850 N0->getOperand(1), N1->getOperand(1)); in SimplifyBinOpWithSameOpcodeHands()
2865 SDValue DAGCombiner::visitANDLike(SDValue N0, SDValue N1, in visitANDLike() argument
2867 EVT VT = N1.getValueType(); in visitANDLike()
2870 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitANDLike()
2874 if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){ in visitANDLike()
2939 if (N0.getOpcode() == ISD::ADD && N1.getOpcode() == ISD::SRL && in visitANDLike()
2948 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitANDLike()
3013 SDValue N1 = N->getOperand(1); in visitAND() local
3014 EVT VT = N1.getValueType(); in visitAND()
3028 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitAND()
3032 N1.getValueType().getScalarType().getSizeInBits()), in visitAND()
3033 SDLoc(N), N1.getValueType()); in visitAND()
3037 return N1; in visitAND()
3038 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitAND()
3044 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitAND()
3049 !isConstantIntBuildVectorOrConstantInt(N1)) in visitAND()
3050 return DAG.getNode(ISD::AND, SDLoc(N), VT, N1, N0); in visitAND()
3052 if (isAllOnesConstant(N1)) in visitAND()
3060 if (SDValue RAND = ReassociateOps(ISD::AND, SDLoc(N), N0, N1)) in visitAND()
3066 return N1; in visitAND()
3103 if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N1)) { in visitAND()
3105 } else if (BuildVectorSDNode *Vector = dyn_cast<BuildVectorSDNode>(N1)) { in visitAND()
3252 if (SDValue Combined = visitANDLike(N0, N1, N)) in visitAND()
3256 if (N0.getOpcode() == N1.getOpcode()) in visitAND()
3272 unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); in visitAND()
3273 if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, in visitAND()
3292 unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); in visitAND()
3293 if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, in visitAND()
3317 SDValue DAGCombiner::MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1, in MatchBSwapHWordLow() argument
3332 std::swap(N0, N1); in MatchBSwapHWordLow()
3333 if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
3334 std::swap(N0, N1); in MatchBSwapHWordLow()
3345 if (N1.getOpcode() == ISD::AND) { in MatchBSwapHWordLow()
3346 if (!N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3348 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
3351 N1 = N1.getOperand(0); in MatchBSwapHWordLow()
3355 if (N0.getOpcode() == ISD::SRL && N1.getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
3356 std::swap(N0, N1); in MatchBSwapHWordLow()
3357 if (N0.getOpcode() != ISD::SHL || N1.getOpcode() != ISD::SRL) in MatchBSwapHWordLow()
3360 !N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
3364 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
3382 SDValue N10 = N1->getOperand(0); in MatchBSwapHWordLow()
3503 SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) { in MatchBSwapHWord() argument
3522 if (N1.getOpcode() == ISD::OR && in MatchBSwapHWord()
3540 if (!isBSwapHWordElement(N1, Parts)) in MatchBSwapHWord()
3576 SDValue DAGCombiner::visitORLike(SDValue N0, SDValue N1, SDNode *LocReference) { in visitORLike() argument
3577 EVT VT = N1.getValueType(); in visitORLike()
3580 (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF)) { in visitORLike()
3587 if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){ in visitORLike()
3631 if (N0.getOpcode() == ISD::AND && N1.getOpcode() == ISD::AND && in visitORLike()
3633 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitORLike()
3639 getAsNonOpaqueConstant(N1.getOperand(1))) { in visitORLike()
3646 DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) { in visitORLike()
3648 N0.getOperand(0), N1.getOperand(0)); in visitORLike()
3659 N1.getOpcode() == ISD::AND && in visitORLike()
3660 N0.getOperand(0) == N1.getOperand(0) && in visitORLike()
3662 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitORLike()
3664 N0.getOperand(1), N1.getOperand(1)); in visitORLike()
3673 SDValue N1 = N->getOperand(1); in visitOR() local
3674 EVT VT = N1.getValueType(); in visitOR()
3683 return N1; in visitOR()
3684 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitOR()
3694 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitOR()
3698 N1.getValueType().getScalarType().getSizeInBits()), in visitOR()
3699 SDLoc(N), N1.getValueType()); in visitOR()
3705 isa<ShuffleVectorSDNode>(N1) && in visitOR()
3708 N0->getOperand(1) == N1->getOperand(1) && in visitOR()
3713 const ShuffleVectorSDNode *SV1 = cast<ShuffleVectorSDNode>(N1); in visitOR()
3750 N1->getOperand(0), &Mask1[0]); in visitOR()
3752 return DAG.getVectorShuffle(VT, SDLoc(N), N1->getOperand(0), in visitOR()
3760 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitOR()
3765 !isConstantIntBuildVectorOrConstantInt(N1)) in visitOR()
3766 return DAG.getNode(ISD::OR, SDLoc(N), VT, N1, N0); in visitOR()
3768 if (isNullConstant(N1)) in visitOR()
3771 if (isAllOnesConstant(N1)) in visitOR()
3772 return N1; in visitOR()
3775 return N1; in visitOR()
3777 if (SDValue Combined = visitORLike(N0, N1, N)) in visitOR()
3781 if (SDValue BSwap = MatchBSwapHWord(N, N0, N1)) in visitOR()
3783 if (SDValue BSwap = MatchBSwapHWordLow(N, N0, N1)) in visitOR()
3787 if (SDValue ROR = ReassociateOps(ISD::OR, SDLoc(N), N0, N1)) in visitOR()
3795 if (SDValue COR = DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N1), VT, in visitOR()
3799 DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1), COR); in visitOR()
3804 if (N0.getOpcode() == N1.getOpcode()) in visitOR()
3809 if (SDNode *Rot = MatchRotate(N0, N1, SDLoc(N))) in visitOR()
4081 SDValue N1 = N->getOperand(1); in visitXOR() local
4091 return N1; in visitXOR()
4092 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitXOR()
4097 if (N0.getOpcode() == ISD::UNDEF && N1.getOpcode() == ISD::UNDEF) in visitXOR()
4102 if (N1.getOpcode() == ISD::UNDEF) in visitXOR()
4103 return N1; in visitXOR()
4106 ConstantSDNode *N1C = getAsNonOpaqueConstant(N1); in visitXOR()
4111 !isConstantIntBuildVectorOrConstantInt(N1)) in visitXOR()
4112 return DAG.getNode(ISD::XOR, SDLoc(N), VT, N1, N0); in visitXOR()
4114 if (isNullConstant(N1)) in visitXOR()
4117 if (SDValue RXOR = ReassociateOps(ISD::XOR, SDLoc(N), N0, N1)) in visitXOR()
4122 if (TLI.isConstTrueVal(N1.getNode()) && isSetCCEquivalent(N0, LHS, RHS, CC)) { in visitXOR()
4142 if (isOneConstant(N1) && N0.getOpcode() == ISD::ZERO_EXTEND && in visitXOR()
4154 if (isOneConstant(N1) && VT == MVT::i1 && in visitXOR()
4159 LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS in visitXOR()
4160 RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS in visitXOR()
4166 if (isAllOnesConstant(N1) && in visitXOR()
4171 LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS in visitXOR()
4172 RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS in visitXOR()
4179 N0->getOperand(1) == N1) { in visitXOR()
4183 return DAG.getNode(ISD::AND, SDLoc(N), VT, NotX, N1); in visitXOR()
4201 if (N0 == N1) in visitXOR()
4223 && isAllOnesConstant(N1) && isOneConstant(N0.getOperand(0))) { in visitXOR()
4230 if (N0.getOpcode() == N1.getOpcode()) in visitXOR()
4356 SDValue N1 = N->getOperand(1); in visitSHL() local
4361 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSHL()
4366 BuildVectorSDNode *N1CV = dyn_cast<BuildVectorSDNode>(N1); in visitSHL()
4383 N1C = isConstOrConstSplat(N1); in visitSHL()
4409 if (N1.getOpcode() == ISD::TRUNCATE && in visitSHL()
4410 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSHL()
4411 SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode()); in visitSHL()
4428 DAG.getConstant(c1 + c2, DL, N1.getValueType())); in visitSHL()
4454 DAG.getConstant(c1 + c2, DL, N1.getValueType())); in visitSHL()
4493 DAG.getConstant(C2 - C1, DL, N1.getValueType())); in visitSHL()
4495 DAG.getConstant(C1 - C2, DL, N1.getValueType())); in visitSHL()
4514 DAG.getConstant(c2 - c1, DL, N1.getValueType())); in visitSHL()
4519 DAG.getConstant(c1 - c2, DL, N1.getValueType())); in visitSHL()
4528 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) { in visitSHL()
4546 SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1); in visitSHL()
4547 SDValue Shl1 = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1); in visitSHL()
4555 DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N1), VT, N0C1, N1C)) in visitSHL()
4569 SDValue N1 = N->getOperand(1); in visitSRA() local
4574 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRA()
4579 N1C = isConstOrConstSplat(N1); in visitSRA()
4600 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) { in visitSRA()
4620 DAG.getConstant(Sum, DL, N1.getValueType())); in visitSRA()
4666 if (N1.getOpcode() == ISD::TRUNCATE && in visitSRA()
4667 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRA()
4668 SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode()); in visitSRA()
4705 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0, N1); in visitSRA()
4716 SDValue N1 = N->getOperand(1); in visitSRL() local
4721 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRL()
4726 N1C = isConstOrConstSplat(N1); in visitSRL()
4756 DAG.getConstant(c1 + c2, DL, N1.getValueType())); in visitSRL()
4784 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1) { in visitSRL()
4822 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1); in visitSRL()
4864 if (N1.getOpcode() == ISD::TRUNCATE && in visitSRL()
4865 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRL()
4866 if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode())) in visitSRL()
5017 SDValue N1 = N->getOperand(1); in visitSELECT() local
5023 if (N1 == N2) in visitSELECT()
5024 return N1; in visitSELECT()
5028 return !N0C->isNullValue() ? N1 : N2; in visitSELECT()
5031 if (VT == MVT::i1 && isOneConstant(N1)) in visitSELECT()
5048 isNullConstant(N1) && isOneConstant(N2)) { in visitSELECT()
5064 if (VT == VT0 && VT == MVT::i1 && isNullConstant(N1)) { in visitSELECT()
5073 return DAG.getNode(ISD::OR, SDLoc(N), VT, NOTNode, N1); in visitSELECT()
5077 return DAG.getNode(ISD::AND, SDLoc(N), VT, N0, N1); in visitSELECT()
5080 if (VT == MVT::i1 && (N0 == N1 || isOneConstant(N1))) in visitSELECT()
5085 return DAG.getNode(ISD::AND, SDLoc(N), VT, N0, N1); in visitSELECT()
5088 if (SimplifySelectOps(N, N1, N2)) in visitSELECT()
5108 N1.getValueType(), Cond1, N1, N2); in visitSELECT()
5110 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0, in visitSELECT()
5118 N1.getValueType(), Cond1, N1, N2); in visitSELECT()
5120 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0, N1, in visitSELECT()
5125 if (N1->getOpcode() == ISD::SELECT && N1->hasOneUse()) { in visitSELECT()
5126 SDValue N1_0 = N1->getOperand(0); in visitSELECT()
5127 SDValue N1_1 = N1->getOperand(1); in visitSELECT()
5128 SDValue N1_2 = N1->getOperand(2); in visitSELECT()
5134 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), And, in visitSELECT()
5139 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined, in visitSELECT()
5148 if (N2_1 == N1 && N0.getValueType() == N2_0.getValueType()) { in visitSELECT()
5153 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Or, in visitSELECT()
5154 N1, N2_2); in visitSELECT()
5158 return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined, in visitSELECT()
5159 N1, N2_2); in visitSELECT()
5178 DAG.isKnownNeverNaN(N1) && DAG.isKnownNeverNaN(N2)) { in visitSELECT()
5182 N0.getOperand(1), N1, N2, CC, in visitSELECT()
5192 N1, N2, N0.getOperand(2)); in visitSELECT()
5193 return SimplifySelect(SDLoc(N), N0, N1, N2); in visitSELECT()
5571 SDValue N1 = N->getOperand(1); in visitVSELECT() local
5588 N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1)) in visitVSELECT()
5591 N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1)) in visitVSELECT()
5592 isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitVSELECT()
5606 if (SimplifySelectOps(N, N1, N2)) in visitVSELECT()
5639 return N1; in visitVSELECT()
5647 if (N1.getOpcode() == ISD::CONCAT_VECTORS && in visitVSELECT()
5659 SDValue N1 = N->getOperand(1); in visitSELECT_CC() local
5671 N0, N1, CC, SDLoc(N), false); in visitSELECT_CC()
5697 return SimplifySelectCC(SDLoc(N), N0, N1, N2, N3, CC); in visitSELECT_CC()
6892 SDValue N1 = N->getOperand(1); in visitSIGN_EXTEND_INREG() local
6894 EVT EVT = cast<VTSDNode>(N1)->getVT(); in visitSIGN_EXTEND_INREG()
6903 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0, N1); in visitSIGN_EXTEND_INREG()
6913 N0.getOperand(0), N1); in visitSIGN_EXTEND_INREG()
6922 return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00, N1); in visitSIGN_EXTEND_INREG()
6992 BSwap, N1); in visitSIGN_EXTEND_INREG()
7633 SDValue N1 = N->getOperand(1); in visitFADDForFMACombine() local
7661 N1.getOpcode() == ISD::FMUL) { in visitFADDForFMACombine()
7662 if (N0.getNode()->use_size() > N1.getNode()->use_size()) in visitFADDForFMACombine()
7663 std::swap(N0, N1); in visitFADDForFMACombine()
7670 N0.getOperand(0), N0.getOperand(1), N1); in visitFADDForFMACombine()
7675 if (N1.getOpcode() == ISD::FMUL && in visitFADDForFMACombine()
7676 (Aggressive || N1->hasOneUse())) { in visitFADDForFMACombine()
7678 N1.getOperand(0), N1.getOperand(1), N0); in visitFADDForFMACombine()
7691 N00.getOperand(1)), N1); in visitFADDForFMACombine()
7696 if (N1.getOpcode() == ISD::FP_EXTEND) { in visitFADDForFMACombine()
7697 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
7717 N1)); in visitFADDForFMACombine()
7721 if (N1->getOpcode() == PreferredFusedOpcode && in visitFADDForFMACombine()
7722 N1.getOperand(2).getOpcode() == ISD::FMUL) { in visitFADDForFMACombine()
7724 N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
7726 N1.getOperand(2).getOperand(0), in visitFADDForFMACombine()
7727 N1.getOperand(2).getOperand(1), in visitFADDForFMACombine()
7749 N1); in visitFADDForFMACombine()
7775 N1); in visitFADDForFMACombine()
7781 if (N1.getOpcode() == PreferredFusedOpcode) { in visitFADDForFMACombine()
7782 SDValue N12 = N1.getOperand(2); in visitFADDForFMACombine()
7786 return FoldFAddFMAFPExtFMul(N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
7797 if (N1.getOpcode() == ISD::FP_EXTEND) { in visitFADDForFMACombine()
7798 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
7816 SDValue N1 = N->getOperand(1); in visitFSUBForFMACombine() local
7846 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
7851 if (N1.getOpcode() == ISD::FMUL && in visitFSUBForFMACombine()
7852 (Aggressive || N1->hasOneUse())) in visitFSUBForFMACombine()
7855 N1.getOperand(0)), in visitFSUBForFMACombine()
7856 N1.getOperand(1), N0); in visitFSUBForFMACombine()
7866 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
7881 DAG.getNode(ISD::FNEG, SL, VT, N1)); in visitFSUBForFMACombine()
7887 if (N1.getOpcode() == ISD::FP_EXTEND) { in visitFSUBForFMACombine()
7888 SDValue N10 = N1.getOperand(0); in visitFSUBForFMACombine()
7916 N1)); in visitFSUBForFMACombine()
7938 N1)); in visitFSUBForFMACombine()
7957 N1))); in visitFSUBForFMACombine()
7962 if (N1.getOpcode() == PreferredFusedOpcode && in visitFSUBForFMACombine()
7963 N1.getOperand(2).getOpcode() == ISD::FMUL) { in visitFSUBForFMACombine()
7964 SDValue N20 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
7965 SDValue N21 = N1.getOperand(2).getOperand(1); in visitFSUBForFMACombine()
7968 N1.getOperand(0)), in visitFSUBForFMACombine()
7969 N1.getOperand(1), in visitFSUBForFMACombine()
7992 N1))); in visitFSUBForFMACombine()
8018 N1))); in visitFSUBForFMACombine()
8024 if (N1.getOpcode() == PreferredFusedOpcode && in visitFSUBForFMACombine()
8025 N1.getOperand(2).getOpcode() == ISD::FP_EXTEND) { in visitFSUBForFMACombine()
8026 SDValue N120 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
8031 DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), in visitFSUBForFMACombine()
8032 N1.getOperand(1), in visitFSUBForFMACombine()
8049 if (N1.getOpcode() == ISD::FP_EXTEND && in visitFSUBForFMACombine()
8050 N1.getOperand(0).getOpcode() == PreferredFusedOpcode) { in visitFSUBForFMACombine()
8051 SDValue N100 = N1.getOperand(0).getOperand(0); in visitFSUBForFMACombine()
8052 SDValue N101 = N1.getOperand(0).getOperand(1); in visitFSUBForFMACombine()
8053 SDValue N102 = N1.getOperand(0).getOperand(2); in visitFSUBForFMACombine()
8080 SDValue N1 = N->getOperand(1); in visitFMULForFMACombine() local
8120 if (SDValue FMA = FuseFADD(N0, N1)) in visitFMULForFMACombine()
8122 if (SDValue FMA = FuseFADD(N1, N0)) in visitFMULForFMACombine()
8151 if (SDValue FMA = FuseFSUB(N0, N1)) in visitFMULForFMACombine()
8153 if (SDValue FMA = FuseFSUB(N1, N0)) in visitFMULForFMACombine()
8161 SDValue N1 = N->getOperand(1); in visitFADD() local
8163 bool N1CFP = isConstantFPBuildVectorOrConstantFP(N1); in visitFADD()
8176 return DAG.getNode(ISD::FADD, DL, VT, N0, N1, Flags); in visitFADD()
8180 return DAG.getNode(ISD::FADD, DL, VT, N1, N0, Flags); in visitFADD()
8184 isNegatibleForFree(N1, LegalOperations, TLI, &Options) == 2) in visitFADD()
8186 GetNegatedExpression(N1, DAG, LegalOperations), Flags); in visitFADD()
8191 return DAG.getNode(ISD::FSUB, DL, VT, N1, in visitFADD()
8201 if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N1)) in visitFADD()
8209 DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1, in visitFADD()
8214 if (AllowNewConst && N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1) in visitFADD()
8218 if (AllowNewConst && N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0) in visitFADD()
8230 if (CFP01 && !CFP00 && N0.getOperand(0) == N1) { in visitFADD()
8233 return DAG.getNode(ISD::FMUL, DL, VT, N1, NewCFP, Flags); in visitFADD()
8237 if (CFP01 && !CFP00 && N1.getOpcode() == ISD::FADD && in visitFADD()
8238 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
8239 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
8246 if (N1.getOpcode() == ISD::FMUL) { in visitFADD()
8247 bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
8248 bool CFP11 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(1)); in visitFADD()
8251 if (CFP11 && !CFP10 && N1.getOperand(0) == N0) { in visitFADD()
8252 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
8260 N1.getOperand(0) == N0.getOperand(0)) { in visitFADD()
8261 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
8263 return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP, Flags); in visitFADD()
8271 (N0.getOperand(0) == N1)) { in visitFADD()
8273 N1, DAG.getConstantFP(3.0, DL, VT), Flags); in visitFADD()
8277 if (N1.getOpcode() == ISD::FADD && AllowNewConst) { in visitFADD()
8278 bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
8280 if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
8281 N1.getOperand(0) == N0) { in visitFADD()
8289 N0.getOpcode() == ISD::FADD && N1.getOpcode() == ISD::FADD && in visitFADD()
8291 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
8292 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
8310 SDValue N1 = N->getOperand(1); in visitFSUB() local
8312 ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1); in visitFSUB()
8325 return DAG.getNode(ISD::FSUB, dl, VT, N0, N1, Flags); in visitFSUB()
8328 if (isNegatibleForFree(N1, LegalOperations, TLI, &Options)) in visitFSUB()
8330 GetNegatedExpression(N1, DAG, LegalOperations), Flags); in visitFSUB()
8340 if (isNegatibleForFree(N1, LegalOperations, TLI, &Options)) in visitFSUB()
8341 return GetNegatedExpression(N1, DAG, LegalOperations); in visitFSUB()
8343 return DAG.getNode(ISD::FNEG, dl, VT, N1); in visitFSUB()
8347 if (N0 == N1) in visitFSUB()
8352 if (N1.getOpcode() == ISD::FADD) { in visitFSUB()
8353 SDValue N10 = N1->getOperand(0); in visitFSUB()
8354 SDValue N11 = N1->getOperand(1); in visitFSUB()
8375 SDValue N1 = N->getOperand(1); in visitFMUL() local
8377 ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1); in visitFMUL()
8392 return DAG.getNode(ISD::FMUL, DL, VT, N0, N1, Flags); in visitFMUL()
8396 !isConstantFPBuildVectorOrConstantFP(N1)) in visitFMUL()
8397 return DAG.getNode(ISD::FMUL, DL, VT, N1, N0, Flags); in visitFMUL()
8406 return N1; in visitFMUL()
8415 auto *BV1 = dyn_cast<BuildVectorSDNode>(N1); in visitFMUL()
8426 SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, N01, N1, Flags); in visitFMUL()
8440 SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, Two, N1, Flags); in visitFMUL()
8456 if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, &Options)) { in visitFMUL()
8462 GetNegatedExpression(N1, DAG, LegalOperations), in visitFMUL()
8478 SDValue N1 = N->getOperand(1); in visitFMA() local
8481 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFMA()
8488 isa<ConstantFPSDNode>(N1) && in visitFMA()
8490 return DAG.getNode(ISD::FMA, dl, VT, N0, N1, N2); in visitFMA()
8501 return DAG.getNode(ISD::FADD, SDLoc(N), VT, N1, N2); in visitFMA()
8507 !isConstantFPBuildVectorOrConstantFP(N1)) in visitFMA()
8508 return DAG.getNode(ISD::FMA, SDLoc(N), VT, N1, N0, N2); in visitFMA()
8518 isConstantFPBuildVectorOrConstantFP(N1) && in visitFMA()
8521 DAG.getNode(ISD::FADD, dl, VT, N1, N2.getOperand(1), in visitFMA()
8527 isConstantFPBuildVectorOrConstantFP(N1) && in visitFMA()
8531 DAG.getNode(ISD::FMUL, dl, VT, N1, N0.getOperand(1), in visitFMA()
8558 N1, DAG.getConstantFP(1.0, dl, VT), in visitFMA()
8566 N1, DAG.getConstantFP(-1.0, dl, VT), in visitFMA()
8595 SDValue N1 = N->getOperand(1); in combineRepeatedFPDivisors() local
8597 if (!MinUses || N1->use_size() < MinUses) in combineRepeatedFPDivisors()
8603 for (auto *U : N1->uses()) { in combineRepeatedFPDivisors()
8604 if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) { in combineRepeatedFPDivisors()
8620 SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1, Flags); in combineRepeatedFPDivisors()
8640 SDValue N1 = N->getOperand(1); in visitFDIV() local
8642 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFDIV()
8655 return DAG.getNode(ISD::FDIV, SDLoc(N), VT, N0, N1, Flags); in visitFDIV()
8679 if (N1.getOpcode() == ISD::FSQRT) { in visitFDIV()
8680 if (SDValue RV = BuildRsqrtEstimate(N1.getOperand(0), Flags)) { in visitFDIV()
8683 } else if (N1.getOpcode() == ISD::FP_EXTEND && in visitFDIV()
8684 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
8685 if (SDValue RV = BuildRsqrtEstimate(N1.getOperand(0).getOperand(0), in visitFDIV()
8687 RV = DAG.getNode(ISD::FP_EXTEND, SDLoc(N1), VT, RV); in visitFDIV()
8691 } else if (N1.getOpcode() == ISD::FP_ROUND && in visitFDIV()
8692 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
8693 if (SDValue RV = BuildRsqrtEstimate(N1.getOperand(0).getOperand(0), in visitFDIV()
8695 RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1)); in visitFDIV()
8699 } else if (N1.getOpcode() == ISD::FMUL) { in visitFDIV()
8704 if (N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
8705 SqrtOp = N1.getOperand(0); in visitFDIV()
8706 OtherOp = N1.getOperand(1); in visitFDIV()
8707 } else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) { in visitFDIV()
8708 SqrtOp = N1.getOperand(1); in visitFDIV()
8709 OtherOp = N1.getOperand(0); in visitFDIV()
8715 RV = DAG.getNode(ISD::FDIV, SDLoc(N1), VT, RV, OtherOp, Flags); in visitFDIV()
8723 if (SDValue RV = BuildReciprocalEstimate(N1, Flags)) { in visitFDIV()
8731 if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, &Options)) { in visitFDIV()
8737 GetNegatedExpression(N1, DAG, LegalOperations), in visitFDIV()
8750 SDValue N1 = N->getOperand(1); in visitFREM() local
8752 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFREM()
8757 return DAG.getNode(ISD::FREM, SDLoc(N), VT, N0, N1, in visitFREM()
8802 SDValue N1 = N->getOperand(1); in CanCombineFCOPYSIGN_EXTEND_ROUND() local
8803 EVT N1VT = N1->getValueType(0); in CanCombineFCOPYSIGN_EXTEND_ROUND()
8804 EVT N1Op0VT = N1->getOperand(0)->getValueType(0); in CanCombineFCOPYSIGN_EXTEND_ROUND()
8805 return (N1.getOpcode() == ISD::FP_EXTEND || in CanCombineFCOPYSIGN_EXTEND_ROUND()
8806 N1.getOpcode() == ISD::FP_ROUND) && in CanCombineFCOPYSIGN_EXTEND_ROUND()
8812 SDValue N1 = N->getOperand(1); in visitFCOPYSIGN() local
8814 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFCOPYSIGN()
8818 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1); in visitFCOPYSIGN()
8840 N0.getOperand(0), N1); in visitFCOPYSIGN()
8843 if (N1.getOpcode() == ISD::FABS) in visitFCOPYSIGN()
8847 if (N1.getOpcode() == ISD::FCOPYSIGN) in visitFCOPYSIGN()
8849 N0, N1.getOperand(1)); in visitFCOPYSIGN()
8855 N0, N1.getOperand(0)); in visitFCOPYSIGN()
9022 SDValue N1 = N->getOperand(1); in visitFP_ROUND() local
9028 return DAG.getNode(ISD::FP_ROUND, SDLoc(N), VT, N0, N1); in visitFP_ROUND()
9064 N0.getOperand(0), N1); in visitFP_ROUND()
9233 SDValue N1 = N->getOperand(1); in visitFMINNUM() local
9236 const ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1); in visitFMINNUM()
9246 !isConstantFPBuildVectorOrConstantFP(N1)) in visitFMINNUM()
9247 return DAG.getNode(ISD::FMINNUM, SDLoc(N), VT, N1, N0); in visitFMINNUM()
9254 SDValue N1 = N->getOperand(1); in visitFMAXNUM() local
9257 const ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1); in visitFMAXNUM()
9267 !isConstantFPBuildVectorOrConstantFP(N1)) in visitFMAXNUM()
9268 return DAG.getNode(ISD::FMAXNUM, SDLoc(N), VT, N1, N0); in visitFMAXNUM()
9321 SDValue N1 = N->getOperand(1); in visitBRCOND() local
9332 if (N1.getOpcode() == ISD::SETCC && in visitBRCOND()
9334 N1.getOperand(0).getValueType())) { in visitBRCOND()
9336 Chain, N1.getOperand(2), in visitBRCOND()
9337 N1.getOperand(0), N1.getOperand(1), N2); in visitBRCOND()
9340 if ((N1.hasOneUse() && N1.getOpcode() == ISD::SRL) || in visitBRCOND()
9341 ((N1.getOpcode() == ISD::TRUNCATE && N1.hasOneUse()) && in visitBRCOND()
9342 (N1.getOperand(0).hasOneUse() && in visitBRCOND()
9343 N1.getOperand(0).getOpcode() == ISD::SRL))) { in visitBRCOND()
9345 if (N1.getOpcode() == ISD::TRUNCATE) { in visitBRCOND()
9347 Trunc = N1.getNode(); in visitBRCOND()
9348 N1 = N1.getOperand(0); in visitBRCOND()
9368 SDValue Op0 = N1.getOperand(0); in visitBRCOND()
9369 SDValue Op1 = N1.getOperand(1); in visitBRCOND()
9397 DAG.ReplaceAllUsesOfValueWith(N1, SetCC); in visitBRCOND()
9398 deleteAndRecombine(N1.getNode()); in visitBRCOND()
9406 N1 = N->getOperand(1); in visitBRCOND()
9411 if (N1.hasOneUse() && N1.getOpcode() == ISD::XOR) { in visitBRCOND()
9412 SDNode *TheXor = N1.getNode(); in visitBRCOND()
9425 DAG.ReplaceAllUsesOfValueWith(N1, Tmp); in visitBRCOND()
9445 EVT SetCCVT = N1.getValueType(); in visitBRCOND()
9454 DAG.ReplaceAllUsesOfValueWith(N1, SetCC); in visitBRCOND()
9455 deleteAndRecombine(N1.getNode()); in visitBRCOND()
10787 SDValue N1 = Value.getOperand(1); in ReduceLoadOpStoreWidth() local
10788 unsigned BitWidth = N1.getValueSizeInBits(); in ReduceLoadOpStoreWidth()
10789 APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue(); in ReduceLoadOpStoreWidth()
13121 SDValue N1, SelectionDAG &DAG) { in simplifyShuffleOperands() argument
13132 SDValue S1 = simplifyShuffleOperandRecursively(N1UsedElements, N1, DAG); in simplifyShuffleOperands()
13133 if (S0 == N0 && S1 == N1) in simplifyShuffleOperands()
13146 SDValue N1 = N->getOperand(1); in partitionShuffleOfConcats() local
13157 if (NumElemsPerConcat * 2 == NumElts && N1.getOpcode() == ISD::UNDEF && in partitionShuffleOfConcats()
13162 N1 = DAG.getUNDEF(ConcatVT); in partitionShuffleOfConcats()
13163 return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, N0, N1); in partitionShuffleOfConcats()
13191 Ops.push_back(N1.getOperand(FirstElt - N0.getNumOperands())); in partitionShuffleOfConcats()
13208 SDValue N1 = N->getOperand(1); in visitVECTOR_SHUFFLE() local
13213 if (N0.getOpcode() == ISD::UNDEF && N1.getOpcode() == ISD::UNDEF) in visitVECTOR_SHUFFLE()
13219 if (N0 == N1) { in visitVECTOR_SHUFFLE()
13243 return DAG.getVectorShuffle(VT, SDLoc(N), N1, DAG.getUNDEF(VT), in visitVECTOR_SHUFFLE()
13248 if (N1.getOpcode() == ISD::UNDEF) { in visitVECTOR_SHUFFLE()
13260 return DAG.getVectorShuffle(VT, SDLoc(N), N0, N1, &NewMask[0]); in visitVECTOR_SHUFFLE()
13319 if (SDValue S = simplifyShuffleOperands(SVN, N0, N1, DAG)) in visitVECTOR_SHUFFLE()
13324 (N1.getOpcode() == ISD::UNDEF || in visitVECTOR_SHUFFLE()
13325 (N1.getOpcode() == ISD::CONCAT_VECTORS && in visitVECTOR_SHUFFLE()
13326 N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()))) { in visitVECTOR_SHUFFLE()
13341 SDValue &S = (M < (int)NumElts ? N0 : N1); in visitVECTOR_SHUFFLE()
13374 N1.getOpcode() == ISD::UNDEF && Level < AfterLegalizeVectorOps && in visitVECTOR_SHUFFLE()
13449 if (N1.getOpcode() == ISD::VECTOR_SHUFFLE && in visitVECTOR_SHUFFLE()
13454 assert(N1->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
13457 SDValue SV0 = N1->getOperand(0); in visitVECTOR_SHUFFLE()
13458 SDValue SV1 = N1->getOperand(1); in visitVECTOR_SHUFFLE()
13509 CurrentVec = N1; in visitVECTOR_SHUFFLE()
13793 SDValue N1, SDValue N2){ in SimplifySelect() argument
13796 SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2, in SimplifySelect()
13976 SDValue DAGCombiner::SimplifySelectCC(SDLoc DL, SDValue N0, SDValue N1, in SimplifySelectCC() argument
13983 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC()
13988 N0, N1, CC, DL, false); in SimplifySelectCC()
13998 if (ConstantFPSDNode *CFP = dyn_cast<ConstantFPSDNode>(N1)) { in SimplifySelectCC()
14055 N0, N1, CC); in SimplifySelectCC()
14073 (isNullConstant(N1) || // (a < 0) ? b : 0 in SimplifySelectCC()
14074 (isOneConstant(N1) && N0 == N2))) { // (a < 1) ? a : 0 in SimplifySelectCC()
14120 N0->getValueType(0) == VT && isNullConstant(N1) && isNullConstant(N2)) { in SimplifySelectCC()
14160 N0, N1, CC); in SimplifySelectCC()
14168 SCC = DAG.getSetCC(SDLoc(N0), MVT::i1, N0, N1, CC); in SimplifySelectCC()
14224 SDValue N1, ISD::CondCode Cond, in SimplifySetCC() argument
14228 return TLI.SimplifySetCC(VT, N0, N1, Cond, foldBooleans, DagCombineInfo, DL); in SimplifySetCC()