Lines Matching refs:N1
255 SDValue SimplifySelect(DebugLoc DL, SDValue N0, SDValue N1, SDValue N2);
256 SDValue SimplifySelectCC(DebugLoc DL, SDValue N0, SDValue N1, SDValue N2,
259 SDValue SimplifySetCC(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond,
267 SDValue MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
269 SDValue MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1);
570 SDValue N0, N1, N2; in isOneUseSetCC() local
571 if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse()) in isOneUseSetCC()
577 SDValue N0, SDValue N1) { in ReassociateOps() argument
580 if (isa<ConstantSDNode>(N1)) { in ReassociateOps()
585 cast<ConstantSDNode>(N1)); in ReassociateOps()
591 N0.getOperand(0), N1); in ReassociateOps()
597 if (N1.getOpcode() == Opc && isa<ConstantSDNode>(N1.getOperand(1))) { in ReassociateOps()
602 cast<ConstantSDNode>(N1.getOperand(1)), in ReassociateOps()
604 return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode); in ReassociateOps()
606 if (N1.hasOneUse()) { in ReassociateOps()
609 N1.getOperand(0), N0); in ReassociateOps()
611 return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1)); in ReassociateOps()
827 SDValue N1 = Op.getOperand(1); in PromoteIntBinOp() local
829 if (N0 == N1) in PromoteIntBinOp()
832 NN1 = PromoteOperand(N1, PVT, Replace1); in PromoteIntBinOp()
844 ReplaceLoadWithPromotedLoad(N1.getNode(), NN1.getNode()); in PromoteIntBinOp()
1227 SDValue N1 = N->getOperand(1); in combine() local
1230 if (isa<ConstantSDNode>(N0) || !isa<ConstantSDNode>(N1)) { in combine()
1231 SDValue Ops[] = { N1, N0 }; in combine()
1353 SDValue combineShlAddConstant(DebugLoc DL, SDValue N0, SDValue N1, in combineShlAddConstant() argument
1368 return DAG.getNode(ISD::ADD, DL, VT, N0, N1); in combineShlAddConstant()
1376 SDValue N1 = N->getOperand(1); in visitADD() local
1378 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADD()
1387 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitADD()
1390 return N1; in visitADD()
1396 if (N1.getOpcode() == ISD::UNDEF) in visitADD()
1397 return N1; in visitADD()
1403 return DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, N0); in visitADD()
1422 SDValue RADD = ReassociateOps(ISD::ADD, N->getDebugLoc(), N0, N1); in visitADD()
1428 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1, N0.getOperand(1)); in visitADD()
1430 if (N1.getOpcode() == ISD::SUB && isa<ConstantSDNode>(N1.getOperand(0)) && in visitADD()
1431 cast<ConstantSDNode>(N1.getOperand(0))->isNullValue()) in visitADD()
1432 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, N1.getOperand(1)); in visitADD()
1434 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1)) in visitADD()
1435 return N1.getOperand(0); in visitADD()
1437 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1)) in visitADD()
1440 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
1441 N0 == N1.getOperand(1).getOperand(0)) in visitADD()
1442 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1.getOperand(0), in visitADD()
1443 N1.getOperand(1).getOperand(1)); in visitADD()
1445 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
1446 N0 == N1.getOperand(1).getOperand(1)) in visitADD()
1447 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1.getOperand(0), in visitADD()
1448 N1.getOperand(1).getOperand(0)); in visitADD()
1450 if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) && in visitADD()
1451 N1.getOperand(0).getOpcode() == ISD::SUB && in visitADD()
1452 N0 == N1.getOperand(0).getOperand(1)) in visitADD()
1453 return DAG.getNode(N1.getOpcode(), N->getDebugLoc(), VT, in visitADD()
1454 N1.getOperand(0).getOperand(0), N1.getOperand(1)); in visitADD()
1457 if (N0.getOpcode() == ISD::SUB && N1.getOpcode() == ISD::SUB) { in visitADD()
1460 SDValue N10 = N1.getOperand(0); in visitADD()
1461 SDValue N11 = N1.getOperand(1); in visitADD()
1466 DAG.getNode(ISD::ADD, N1.getDebugLoc(), VT, N01, N11)); in visitADD()
1479 DAG.ComputeMaskedBits(N1, RHSZero, RHSOne); in visitADD()
1484 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1); in visitADD()
1490 SDValue Result = combineShlAddConstant(N->getDebugLoc(), N0, N1, DAG); in visitADD()
1493 if (N1.getOpcode() == ISD::SHL && N1.getNode()->hasOneUse()) { in visitADD()
1494 SDValue Result = combineShlAddConstant(N->getDebugLoc(), N1, N0, DAG); in visitADD()
1499 if (N1.getOpcode() == ISD::SHL && in visitADD()
1500 N1.getOperand(0).getOpcode() == ISD::SUB) in visitADD()
1502 dyn_cast<ConstantSDNode>(N1.getOperand(0).getOperand(0))) in visitADD()
1506 N1.getOperand(0).getOperand(1), in visitADD()
1507 N1.getOperand(1))); in visitADD()
1513 return DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N1, in visitADD()
1518 if (N1.getOpcode() == ISD::AND) { in visitADD()
1519 SDValue AndOp0 = N1.getOperand(0); in visitADD()
1520 ConstantSDNode *AndOp1 = dyn_cast<ConstantSDNode>(N1->getOperand(1)); in visitADD()
1538 return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt); in visitADD()
1546 SDValue N1 = N->getOperand(1); in visitADDC() local
1548 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDC()
1553 return CombineTo(N, DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N0, N1), in visitADDC()
1559 return DAG.getNode(ISD::ADDC, N->getDebugLoc(), N->getVTList(), N1, N0); in visitADDC()
1572 DAG.ComputeMaskedBits(N1, RHSZero, RHSOne); in visitADDC()
1577 return CombineTo(N, DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N0, N1), in visitADDC()
1587 SDValue N1 = N->getOperand(1); in visitADDE() local
1590 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitADDE()
1595 N1, N0, CarryIn); in visitADDE()
1599 return DAG.getNode(ISD::ADDC, N->getDebugLoc(), N->getVTList(), N0, N1); in visitADDE()
1623 SDValue N1 = N->getOperand(1); in visitSUB() local
1625 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitSUB()
1626 ConstantSDNode *N1C1 = N1.getOpcode() != ISD::ADD ? 0 : in visitSUB()
1627 dyn_cast<ConstantSDNode>(N1.getOperand(1).getNode()); in visitSUB()
1636 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitSUB()
1642 if (N0 == N1) in visitSUB()
1653 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0); in visitSUB()
1655 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0)) in visitSUB()
1656 return N1.getOperand(1); in visitSUB()
1658 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1) in visitSUB()
1661 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) in visitSUB()
1664 if (N1.getOpcode() == ISD::ADD && N0C && N1C1) { in visitSUB()
1668 N1.getOperand(0)); in visitSUB()
1674 N0.getOperand(1).getOperand(0) == N1) in visitSUB()
1680 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
1686 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
1693 if (N1.getOpcode() == ISD::UNDEF) in visitSUB()
1694 return N1; in visitSUB()
1705 if (GlobalAddressSDNode *GB = dyn_cast<GlobalAddressSDNode>(N1)) in visitSUB()
1716 SDValue N1 = N->getOperand(1); in visitSUBC() local
1718 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSUBC()
1723 return CombineTo(N, DAG.getNode(ISD::SUB, N->getDebugLoc(), VT, N0, N1), in visitSUBC()
1728 if (N0 == N1) in visitSUBC()
1740 return CombineTo(N, DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0), in visitSUBC()
1749 SDValue N1 = N->getOperand(1); in visitSUBE() local
1754 return DAG.getNode(ISD::SUBC, N->getDebugLoc(), N->getVTList(), N0, N1); in visitSUBE()
1761 SDValue N1 = N->getOperand(1); in visitMUL() local
1763 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitMUL()
1773 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMUL()
1780 return DAG.getNode(ISD::MUL, N->getDebugLoc(), VT, N1, N0); in visitMUL()
1783 return N1; in visitMUL()
1808 N1, N0.getOperand(1)); in visitMUL()
1821 Sh = N0; Y = N1; in visitMUL()
1822 } else if (N1.getOpcode() == ISD::SHL && in visitMUL()
1823 isa<ConstantSDNode>(N1.getOperand(1)) && in visitMUL()
1824 N1.getNode()->hasOneUse()) { in visitMUL()
1825 Sh = N1; Y = N0; in visitMUL()
1841 N0.getOperand(0), N1), in visitMUL()
1842 DAG.getNode(ISD::MUL, N1.getDebugLoc(), VT, in visitMUL()
1843 N0.getOperand(1), N1)); in visitMUL()
1846 SDValue RMUL = ReassociateOps(ISD::MUL, N->getDebugLoc(), N0, N1); in visitMUL()
1855 SDValue N1 = N->getOperand(1); in visitSDIV() local
1857 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitSDIV()
1879 if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0)) in visitSDIV()
1880 return DAG.getNode(ISD::UDIV, N->getDebugLoc(), N1.getValueType(), in visitSDIV()
1881 N0, N1); in visitSDIV()
1931 if (N1.getOpcode() == ISD::UNDEF) in visitSDIV()
1932 return N1; in visitSDIV()
1939 SDValue N1 = N->getOperand(1); in visitUDIV() local
1941 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in visitUDIV()
1959 if (N1.getOpcode() == ISD::SHL) { in visitUDIV()
1960 if (ConstantSDNode *SHC = dyn_cast<ConstantSDNode>(N1.getOperand(0))) { in visitUDIV()
1962 EVT ADDVT = N1.getOperand(1).getValueType(); in visitUDIV()
1964 N1.getOperand(1), in visitUDIV()
1983 if (N1.getOpcode() == ISD::UNDEF) in visitUDIV()
1984 return N1; in visitUDIV()
1991 SDValue N1 = N->getOperand(1); in visitSREM() local
1993 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSREM()
2002 if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0)) in visitSREM()
2003 return DAG.getNode(ISD::UREM, N->getDebugLoc(), VT, N0, N1); in visitSREM()
2009 SDValue Div = DAG.getNode(ISD::SDIV, N->getDebugLoc(), VT, N0, N1); in visitSREM()
2014 OptimizedDiv, N1); in visitSREM()
2025 if (N1.getOpcode() == ISD::UNDEF) in visitSREM()
2026 return N1; in visitSREM()
2033 SDValue N1 = N->getOperand(1); in visitUREM() local
2035 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitUREM()
2046 if (N1.getOpcode() == ISD::SHL) { in visitUREM()
2047 if (ConstantSDNode *SHC = dyn_cast<ConstantSDNode>(N1.getOperand(0))) { in visitUREM()
2050 DAG.getNode(ISD::ADD, N->getDebugLoc(), VT, N1, in visitUREM()
2062 SDValue Div = DAG.getNode(ISD::UDIV, N->getDebugLoc(), VT, N0, N1); in visitUREM()
2067 OptimizedDiv, N1); in visitUREM()
2078 if (N1.getOpcode() == ISD::UNDEF) in visitUREM()
2079 return N1; in visitUREM()
2086 SDValue N1 = N->getOperand(1); in visitMULHS() local
2087 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitMULHS()
2093 return N1; in visitMULHS()
2100 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMULHS()
2111 N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1); in visitMULHS()
2112 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHS()
2113 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHS()
2114 DAG.getConstant(SimpleSize, getShiftAmountTy(N1.getValueType()))); in visitMULHS()
2115 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHS()
2124 SDValue N1 = N->getOperand(1); in visitMULHU() local
2125 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitMULHU()
2131 return N1; in visitMULHU()
2136 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitMULHU()
2147 N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N1); in visitMULHU()
2148 N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1); in visitMULHU()
2149 N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1, in visitMULHU()
2150 DAG.getConstant(SimpleSize, getShiftAmountTy(N1.getValueType()))); in visitMULHU()
2151 return DAG.getNode(ISD::TRUNCATE, DL, VT, N1); in visitMULHU()
2311 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in SimplifyBinOpWithSameOpcodeHands() local
2313 assert(N0.getOpcode() == N1.getOpcode() && "Bad input!"); in SimplifyBinOpWithSameOpcodeHands()
2337 Op0VT == N1.getOperand(0).getValueType() && in SimplifyBinOpWithSameOpcodeHands()
2341 N0.getOperand(0), N1.getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2352 N0.getOperand(1) == N1.getOperand(1)) { in SimplifyBinOpWithSameOpcodeHands()
2355 N0.getOperand(0), N1.getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2372 SDValue In1 = N1.getOperand(0); in SimplifyBinOpWithSameOpcodeHands()
2395 N1.getOperand(1).getOpcode() == ISD::UNDEF) { in SimplifyBinOpWithSameOpcodeHands()
2397 ShuffleVectorSDNode *SVN1 = cast<ShuffleVectorSDNode>(N1); in SimplifyBinOpWithSameOpcodeHands()
2399 assert(N0.getOperand(0).getValueType() == N1.getOperand(1).getValueType() && in SimplifyBinOpWithSameOpcodeHands()
2418 N0.getOperand(0), N1.getOperand(0)); in SimplifyBinOpWithSameOpcodeHands()
2430 SDValue N1 = N->getOperand(1); in visitAND() local
2433 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitAND()
2434 EVT VT = N1.getValueType(); in visitAND()
2445 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitAND()
2446 return N1; in visitAND()
2450 return N1; in visitAND()
2451 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitAND()
2456 if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) in visitAND()
2463 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N1, N0); in visitAND()
2472 SDValue RAND = ReassociateOps(ISD::AND, N->getDebugLoc(), N0, N1); in visitAND()
2479 return N1; in visitAND()
2515 if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N1)) { in visitAND()
2517 } else if (BuildVectorSDNode *Vector = dyn_cast<BuildVectorSDNode>(N1)) { in visitAND()
2599 if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){ in visitAND()
2646 if (N0.getOpcode() == N1.getOpcode()) { in visitAND()
2663 unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); in visitAND()
2664 if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, in visitAND()
2685 unsigned BitWidth = N1.getValueType().getScalarType().getSizeInBits(); in visitAND()
2686 if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, in visitAND()
2773 if (N0.getOpcode() == ISD::ADD && N1.getOpcode() == ISD::SRL && in visitAND()
2782 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitAND()
2805 SDValue DAGCombiner::MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1, in MatchBSwapHWordLow() argument
2820 std::swap(N0, N1); in MatchBSwapHWordLow()
2821 if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
2822 std::swap(N0, N1); in MatchBSwapHWordLow()
2833 if (N1.getOpcode() == ISD::AND) { in MatchBSwapHWordLow()
2834 if (!N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2836 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
2839 N1 = N1.getOperand(0); in MatchBSwapHWordLow()
2843 if (N0.getOpcode() == ISD::SRL && N1.getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
2844 std::swap(N0, N1); in MatchBSwapHWordLow()
2845 if (N0.getOpcode() != ISD::SHL || N1.getOpcode() != ISD::SRL) in MatchBSwapHWordLow()
2848 !N1.getNode()->hasOneUse()) in MatchBSwapHWordLow()
2852 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
2870 SDValue N10 = N1->getOperand(0); in MatchBSwapHWordLow()
2972 SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) { in MatchBSwapHWord() argument
2991 if (N1.getOpcode() == ISD::OR && in MatchBSwapHWord()
3009 if (!isBSwapHWordElement(N1, Parts)) in MatchBSwapHWord()
3044 SDValue N1 = N->getOperand(1); in visitOR() local
3047 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitOR()
3048 EVT VT = N1.getValueType(); in visitOR()
3057 return N1; in visitOR()
3058 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitOR()
3064 if (ISD::isBuildVectorAllOnes(N1.getNode())) in visitOR()
3065 return N1; in visitOR()
3070 (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF)) { in visitOR()
3079 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, N1, N0); in visitOR()
3085 return N1; in visitOR()
3088 return N1; in visitOR()
3091 SDValue BSwap = MatchBSwapHWord(N, N0, N1); in visitOR()
3094 BSwap = MatchBSwapHWordLow(N, N0, N1); in visitOR()
3099 SDValue ROR = ReassociateOps(ISD::OR, N->getDebugLoc(), N0, N1); in visitOR()
3110 N0.getOperand(0), N1), in visitOR()
3114 if (isSetCCEquivalent(N0, LL, LR, CC0) && isSetCCEquivalent(N1, RL, RR, CC1)){ in visitOR()
3158 if (N0.getOpcode() == N1.getOpcode()) { in visitOR()
3165 N1.getOpcode() == ISD::AND && in visitOR()
3167 N1.getOperand(1).getOpcode() == ISD::Constant && in visitOR()
3169 (N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) { in visitOR()
3175 cast<ConstantSDNode>(N1.getOperand(1))->getAPIntValue(); in visitOR()
3178 DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) { in visitOR()
3180 N0.getOperand(0), N1.getOperand(0)); in visitOR()
3187 if (SDNode *Rot = MatchRotate(N0, N1, N->getDebugLoc())) in visitOR()
3368 SDValue N1 = N->getOperand(1); in visitXOR() local
3371 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitXOR()
3381 return N1; in visitXOR()
3382 if (ISD::isBuildVectorAllZeros(N1.getNode())) in visitXOR()
3387 if (N0.getOpcode() == ISD::UNDEF && N1.getOpcode() == ISD::UNDEF) in visitXOR()
3392 if (N1.getOpcode() == ISD::UNDEF) in visitXOR()
3393 return N1; in visitXOR()
3399 return DAG.getNode(ISD::XOR, N->getDebugLoc(), VT, N1, N0); in visitXOR()
3404 SDValue RXOR = ReassociateOps(ISD::XOR, N->getDebugLoc(), N0, N1); in visitXOR()
3445 LHS = DAG.getNode(ISD::XOR, LHS.getDebugLoc(), VT, LHS, N1); // LHS = ~LHS in visitXOR()
3446 RHS = DAG.getNode(ISD::XOR, RHS.getDebugLoc(), VT, RHS, N1); // RHS = ~RHS in visitXOR()
3457 LHS = DAG.getNode(ISD::XOR, LHS.getDebugLoc(), VT, LHS, N1); // LHS = ~LHS in visitXOR()
3458 RHS = DAG.getNode(ISD::XOR, RHS.getDebugLoc(), VT, RHS, N1); // RHS = ~RHS in visitXOR()
3477 if (N0 == N1) in visitXOR()
3481 if (N0.getOpcode() == N1.getOpcode()) { in visitXOR()
3566 SDValue N1 = N->getOperand(1); in visitSHL() local
3568 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSHL()
3592 if (N1.getOpcode() == ISD::TRUNCATE && in visitSHL()
3593 N1.getOperand(0).getOpcode() == ISD::AND && in visitSHL()
3594 N1.hasOneUse() && N1.getOperand(0).hasOneUse()) { in visitSHL()
3595 SDValue N101 = N1.getOperand(0).getOperand(1); in visitSHL()
3597 EVT TruncVT = N1.getValueType(); in visitSHL()
3598 SDValue N100 = N1.getOperand(0).getOperand(0); in visitSHL()
3621 DAG.getConstant(c1 + c2, N1.getValueType())); in visitSHL()
3645 DAG.getConstant(c1 + c2, N1.getValueType())); in visitSHL()
3664 DAG.getConstant(c2-c1, N1.getValueType())); in visitSHL()
3668 DAG.getConstant(c1-c2, N1.getValueType())); in visitSHL()
3675 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) { in visitSHL()
3696 SDValue N1 = N->getOperand(1); in visitSRA() local
3698 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRA()
3719 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) { in visitSRA()
3779 if (N1.getOpcode() == ISD::TRUNCATE && in visitSRA()
3780 N1.getOperand(0).getOpcode() == ISD::AND && in visitSRA()
3781 N1.hasOneUse() && N1.getOperand(0).hasOneUse()) { in visitSRA()
3782 SDValue N101 = N1.getOperand(0).getOperand(1); in visitSRA()
3784 EVT TruncVT = N1.getValueType(); in visitSRA()
3785 SDValue N100 = N1.getOperand(0).getOperand(0); in visitSRA()
3828 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0, N1); in visitSRA()
3841 SDValue N1 = N->getOperand(1); in visitSRL() local
3843 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSRL()
3872 DAG.getConstant(c1 + c2, N1.getValueType())); in visitSRL()
3897 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1 && in visitSRL()
3926 return DAG.getNode(ISD::SRL, N->getDebugLoc(), VT, N0.getOperand(0), N1); in visitSRL()
3965 if (N1.getOpcode() == ISD::TRUNCATE && in visitSRL()
3966 N1.getOperand(0).getOpcode() == ISD::AND && in visitSRL()
3967 N1.hasOneUse() && N1.getOperand(0).hasOneUse()) { in visitSRL()
3968 SDValue N101 = N1.getOperand(0).getOperand(1); in visitSRL()
3970 EVT TruncVT = N1.getValueType(); in visitSRL()
3971 SDValue N100 = N1.getOperand(0).getOperand(0); in visitSRL()
4084 SDValue N1 = N->getOperand(1); in visitSELECT() local
4087 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1); in visitSELECT()
4093 if (N1 == N2) in visitSELECT()
4094 return N1; in visitSELECT()
4097 return N1; in visitSELECT()
4132 return DAG.getNode(ISD::OR, N->getDebugLoc(), VT, NOTNode, N1); in visitSELECT()
4136 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, N1); in visitSELECT()
4139 if (VT == MVT::i1 && (N0 == N1 || (N1C && N1C->getAPIntValue() == 1))) in visitSELECT()
4144 return DAG.getNode(ISD::AND, N->getDebugLoc(), VT, N0, N1); in visitSELECT()
4147 if (SimplifySelectOps(N, N1, N2)) in visitSELECT()
4160 N1, N2, N0.getOperand(2)); in visitSELECT()
4161 return SimplifySelect(N->getDebugLoc(), N0, N1, N2); in visitSELECT()
4169 SDValue N1 = N->getOperand(1); in visitSELECT_CC() local
4181 N0, N1, CC, N->getDebugLoc(), false); in visitSELECT_CC()
4202 return SimplifySelectCC(N->getDebugLoc(), N0, N1, N2, N3, CC); in visitSELECT_CC()
5187 SDValue N1 = N->getOperand(1); in visitSIGN_EXTEND_INREG() local
5189 EVT EVT = cast<VTSDNode>(N1)->getVT(); in visitSIGN_EXTEND_INREG()
5195 return DAG.getNode(ISD::SIGN_EXTEND_INREG, N->getDebugLoc(), VT, N0, N1); in visitSIGN_EXTEND_INREG()
5205 N0.getOperand(0), N1); in visitSIGN_EXTEND_INREG()
5215 return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, N00, N1); in visitSIGN_EXTEND_INREG()
5290 BSwap, N1); in visitSIGN_EXTEND_INREG()
5798 SDValue N1 = N->getOperand(1); in visitFADD() local
5800 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFADD()
5811 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, N1); in visitFADD()
5814 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N1, N0); in visitFADD()
5821 isNegatibleForFree(N1, LegalOperations, TLI, &DAG.getTarget().Options) == 2) in visitFADD()
5823 GetNegatedExpression(N1, DAG, LegalOperations)); in visitFADD()
5827 return DAG.getNode(ISD::FSUB, N->getDebugLoc(), VT, N1, in visitFADD()
5836 N0.getOperand(1), N1)); in visitFADD()
5840 N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1) { in visitFADD()
5846 N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0) { in visitFADD()
5861 if (CFP00 && !CFP01 && N0.getOperand(1) == N1) { in visitFADD()
5866 N1, NewCFP); in visitFADD()
5870 if (CFP01 && !CFP00 && N0.getOperand(0) == N1) { in visitFADD()
5875 N1, NewCFP); in visitFADD()
5879 if (CFP00 && !CFP01 && N1.getOpcode() == ISD::FADD && in visitFADD()
5880 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5881 N0.getOperand(1) == N1.getOperand(0)) { in visitFADD()
5890 if (CFP01 && !CFP00 && N1.getOpcode() == ISD::FADD && in visitFADD()
5891 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5892 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
5901 if (N1.getOpcode() == ISD::FMUL) { in visitFADD()
5902 ConstantFPSDNode *CFP10 = dyn_cast<ConstantFPSDNode>(N1.getOperand(0)); in visitFADD()
5903 ConstantFPSDNode *CFP11 = dyn_cast<ConstantFPSDNode>(N1.getOperand(1)); in visitFADD()
5906 if (CFP10 && !CFP11 && N1.getOperand(1) == N0) { in visitFADD()
5915 if (CFP11 && !CFP10 && N1.getOperand(0) == N0) { in visitFADD()
5925 if (CFP10 && !CFP11 && N1.getOpcode() == ISD::FADD && in visitFADD()
5926 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5927 N0.getOperand(1) == N1.getOperand(0)) { in visitFADD()
5936 if (CFP11 && !CFP10 && N1.getOpcode() == ISD::FADD && in visitFADD()
5937 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5938 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
5951 (N0.getOperand(0) == N1)) { in visitFADD()
5953 N1, DAG.getConstantFP(3.0, VT)); in visitFADD()
5957 if (N1.getOpcode() == ISD::FADD) { in visitFADD()
5958 ConstantFPSDNode *CFP10 = dyn_cast<ConstantFPSDNode>(N1.getOperand(0)); in visitFADD()
5960 if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5961 N1.getOperand(0) == N0) { in visitFADD()
5968 if (N0.getOpcode() == ISD::FADD && N1.getOpcode() == ISD::FADD && in visitFADD()
5970 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
5971 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
5987 N0.getOperand(0), N0.getOperand(1), N1); in visitFADD()
5992 if (N1.getOpcode() == ISD::FMUL && N1->hasOneUse()) { in visitFADD()
5994 N1.getOperand(0), N1.getOperand(1), N0); in visitFADD()
6003 SDValue N1 = N->getOperand(1); in visitFSUB() local
6005 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFSUB()
6017 return DAG.getNode(ISD::FSUB, N->getDebugLoc(), VT, N0, N1); in visitFSUB()
6025 if (isNegatibleForFree(N1, LegalOperations, TLI, &DAG.getTarget().Options)) in visitFSUB()
6026 return GetNegatedExpression(N1, DAG, LegalOperations); in visitFSUB()
6028 return DAG.getNode(ISD::FNEG, dl, VT, N1); in visitFSUB()
6031 if (isNegatibleForFree(N1, LegalOperations, TLI, &DAG.getTarget().Options)) in visitFSUB()
6033 GetNegatedExpression(N1, DAG, LegalOperations)); in visitFSUB()
6040 if (N0 == N1) in visitFSUB()
6043 if (N1.getOpcode() == ISD::FADD) { in visitFSUB()
6044 SDValue N10 = N1->getOperand(0); in visitFSUB()
6045 SDValue N11 = N1->getOperand(1); in visitFSUB()
6066 DAG.getNode(ISD::FNEG, dl, VT, N1)); in visitFSUB()
6071 if (N1.getOpcode() == ISD::FMUL && N1->hasOneUse()) { in visitFSUB()
6074 N1.getOperand(0)), in visitFSUB()
6075 N1.getOperand(1), N0); in visitFSUB()
6086 DAG.getNode(ISD::FNEG, dl, VT, N1)); in visitFSUB()
6095 SDValue N1 = N->getOperand(1); in visitFMUL() local
6097 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFMUL()
6109 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N0, N1); in visitFMUL()
6112 return DAG.getNode(ISD::FMUL, N->getDebugLoc(), VT, N1, N0); in visitFMUL()
6116 return N1; in visitFMUL()
6119 ISD::isBuildVectorAllZeros(N1.getNode())) in visitFMUL()
6120 return N1; in visitFMUL()
6135 if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, in visitFMUL()
6142 GetNegatedExpression(N1, DAG, LegalOperations)); in visitFMUL()
6152 N0.getOperand(1), N1)); in visitFMUL()
6159 SDValue N1 = N->getOperand(1); in visitFMA() local
6162 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFMA()
6173 return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N1, N2); in visitFMA()
6179 return DAG.getNode(ISD::FMA, N->getDebugLoc(), VT, N1, N0, N2); in visitFMA()
6187 DAG.getNode(ISD::FADD, dl, VT, N1, N2.getOperand(1))); in visitFMA()
6197 DAG.getNode(ISD::FMUL, dl, VT, N1, N0.getOperand(1)), in visitFMA()
6220 N1, DAG.getConstantFP(1.0, VT))); in visitFMA()
6229 N1, DAG.getConstantFP(-1.0, VT))); in visitFMA()
6238 SDValue N1 = N->getOperand(1); in visitFDIV() local
6240 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFDIV()
6252 return DAG.getNode(ISD::FDIV, N->getDebugLoc(), VT, N0, N1); in visitFDIV()
6276 if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, in visitFDIV()
6283 GetNegatedExpression(N1, DAG, LegalOperations)); in visitFDIV()
6292 SDValue N1 = N->getOperand(1); in visitFREM() local
6294 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFREM()
6299 return DAG.getNode(ISD::FREM, N->getDebugLoc(), VT, N0, N1); in visitFREM()
6306 SDValue N1 = N->getOperand(1); in visitFCOPYSIGN() local
6308 ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1); in visitFCOPYSIGN()
6312 return DAG.getNode(ISD::FCOPYSIGN, N->getDebugLoc(), VT, N0, N1); in visitFCOPYSIGN()
6334 N0.getOperand(0), N1); in visitFCOPYSIGN()
6337 if (N1.getOpcode() == ISD::FABS) in visitFCOPYSIGN()
6341 if (N1.getOpcode() == ISD::FCOPYSIGN) in visitFCOPYSIGN()
6343 N0, N1.getOperand(1)); in visitFCOPYSIGN()
6347 if (N1.getOpcode() == ISD::FP_EXTEND || N1.getOpcode() == ISD::FP_ROUND) in visitFCOPYSIGN()
6349 N0, N1.getOperand(0)); in visitFCOPYSIGN()
6481 SDValue N1 = N->getOperand(1); in visitFP_ROUND() local
6487 return DAG.getNode(ISD::FP_ROUND, N->getDebugLoc(), VT, N0, N1); in visitFP_ROUND()
6505 N0.getOperand(0), N1); in visitFP_ROUND()
6700 SDValue N1 = N->getOperand(1); in visitBRCOND() local
6711 if (N1.getOpcode() == ISD::SETCC && in visitBRCOND()
6713 N1.getOperand(0).getValueType())) { in visitBRCOND()
6715 Chain, N1.getOperand(2), in visitBRCOND()
6716 N1.getOperand(0), N1.getOperand(1), N2); in visitBRCOND()
6719 if ((N1.hasOneUse() && N1.getOpcode() == ISD::SRL) || in visitBRCOND()
6720 ((N1.getOpcode() == ISD::TRUNCATE && N1.hasOneUse()) && in visitBRCOND()
6721 (N1.getOperand(0).hasOneUse() && in visitBRCOND()
6722 N1.getOperand(0).getOpcode() == ISD::SRL))) { in visitBRCOND()
6724 if (N1.getOpcode() == ISD::TRUNCATE) { in visitBRCOND()
6726 Trunc = N1.getNode(); in visitBRCOND()
6727 N1 = N1.getOperand(0); in visitBRCOND()
6747 SDValue Op0 = N1.getOperand(0); in visitBRCOND()
6748 SDValue Op1 = N1.getOperand(1); in visitBRCOND()
6777 DAG.ReplaceAllUsesOfValueWith(N1, SetCC); in visitBRCOND()
6778 removeFromWorkList(N1.getNode()); in visitBRCOND()
6779 DAG.DeleteNode(N1.getNode()); in visitBRCOND()
6787 N1 = N->getOperand(1); in visitBRCOND()
6792 if (N1.hasOneUse() && N1.getOpcode() == ISD::XOR) { in visitBRCOND()
6793 SDNode *TheXor = N1.getNode(); in visitBRCOND()
6807 DAG.ReplaceAllUsesOfValueWith(N1, Tmp); in visitBRCOND()
6829 EVT SetCCVT = N1.getValueType(); in visitBRCOND()
6838 DAG.ReplaceAllUsesOfValueWith(N1, SetCC); in visitBRCOND()
6839 removeFromWorkList(N1.getNode()); in visitBRCOND()
6840 DAG.DeleteNode(N1.getNode()); in visitBRCOND()
7577 SDValue N1 = Value.getOperand(1); in ReduceLoadOpStoreWidth() local
7578 unsigned BitWidth = N1.getValueSizeInBits(); in ReduceLoadOpStoreWidth()
7579 APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue(); in ReduceLoadOpStoreWidth()
9031 SDValue N1 = N->getOperand(1); in visitVECTOR_SHUFFLE() local
9036 if (N0.getOpcode() == ISD::UNDEF && N1.getOpcode() == ISD::UNDEF) in visitVECTOR_SHUFFLE()
9042 if (N0 == N1) { in visitVECTOR_SHUFFLE()
9066 return DAG.getVectorShuffle(VT, N->getDebugLoc(), N1, DAG.getUNDEF(VT), in visitVECTOR_SHUFFLE()
9071 if (N1.getOpcode() == ISD::UNDEF) { in visitVECTOR_SHUFFLE()
9083 return DAG.getVectorShuffle(VT, N->getDebugLoc(), N0, N1, &NewMask[0]); in visitVECTOR_SHUFFLE()
9131 N1.getOpcode() == ISD::UNDEF) { in visitVECTOR_SHUFFLE()
9367 SDValue N1, SDValue N2){ in SimplifySelect() argument
9370 SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2, in SimplifySelect()
9511 SDValue DAGCombiner::SimplifySelectCC(DebugLoc DL, SDValue N0, SDValue N1, in SimplifySelectCC() argument
9518 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode()); in SimplifySelectCC()
9524 N0, N1, CC, DL, false); in SimplifySelectCC()
9536 if (ConstantFPSDNode *CFP = dyn_cast<ConstantFPSDNode>(N1)) { in SimplifySelectCC()
9590 N0, N1, CC); in SimplifySelectCC()
9697 N0, N1, CC); in SimplifySelectCC()
9705 SCC = DAG.getSetCC(N0.getDebugLoc(), MVT::i1, N0, N1, CC); in SimplifySelectCC()
9730 SDValue Res = DAG.getSetCC(DL, TLI.getSetCCResultType(XType), N0, N1, CC); in SimplifySelectCC()
9800 SDValue N1, ISD::CondCode Cond, in SimplifySetCC() argument
9804 return TLI.SimplifySetCC(VT, N0, N1, Cond, foldBooleans, DagCombineInfo, DL); in SimplifySetCC()