Lines Matching defs:N1C

1319   ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1334 if (N0C && N1C)
1335 return DAG.FoldConstantArithmetic(ISD::ADD, VT, N0C, N1C);
1337 if (N0C && !N1C)
1340 if (N1C && N1C->isNullValue())
1344 if (!LegalOperations && TLI.isOffsetFoldingLegal(GA) && N1C &&
1346 return DAG.getGlobalAddress(GA->getGlobal(), N1C->getDebugLoc(), VT,
1348 (uint64_t)N1C->getSExtValue());
1350 if (N1C && N0.getOpcode() == ISD::SUB)
1353 DAG.getConstant(N1C->getAPIntValue()+
1485 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1495 if (N0C && !N1C)
1499 if (N1C && N1C->isNullValue())
1529 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1532 if (N0C && !N1C)
1564 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
1580 if (N0C && N1C)
1581 return DAG.FoldConstantArithmetic(ISD::SUB, VT, N0C, N1C);
1583 if (N1C)
1585 DAG.getConstant(-N1C->getAPIntValue(), VT));
1634 if (N1C && GA->getOpcode() == ISD::GlobalAddress)
1635 return DAG.getGlobalAddress(GA->getGlobal(), N1C->getDebugLoc(), VT,
1637 (uint64_t)N1C->getSExtValue());
1652 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1665 if (N0C && N1C)
1666 return DAG.FoldConstantArithmetic(ISD::MUL, VT, N0C, N1C);
1668 if (N0C && !N1C)
1671 if (N1C && N1C->isNullValue())
1674 if (N1C && N1C->isAllOnesValue())
1678 if (N1C && N1C->getAPIntValue().isPowerOf2())
1680 DAG.getConstant(N1C->getAPIntValue().logBase2(),
1683 if (N1C && (-N1C->getAPIntValue()).isPowerOf2()) {
1684 unsigned Log2Val = (-N1C->getAPIntValue()).logBase2();
1694 if (N1C && N0.getOpcode() == ISD::SHL &&
1726 if (N1C && N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() &&
1746 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
1756 if (N0C && N1C && !N1C->isNullValue())
1757 return DAG.FoldConstantArithmetic(ISD::SDIV, VT, N0C, N1C);
1759 if (N1C && N1C->getSExtValue() == 1LL)
1762 if (N1C && N1C->isAllOnesValue())
1773 if (N1C && !N1C->isNullValue() && !TLI.isIntDivCheap() &&
1774 (isPowerOf2_64(N1C->getSExtValue()) ||
1775 isPowerOf2_64(-N1C->getSExtValue()))) {
1781 int64_t pow2 = N1C->getSExtValue();
1813 if (N1C && (N1C->getSExtValue() < -1 || N1C->getSExtValue() > 1) &&
1833 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
1843 if (N0C && N1C && !N1C->isNullValue())
1844 return DAG.FoldConstantArithmetic(ISD::UDIV, VT, N0C, N1C);
1846 if (N1C && N1C->getAPIntValue().isPowerOf2())
1848 DAG.getConstant(N1C->getAPIntValue().logBase2(),
1866 if (N1C && !N1C->isNullValue() && !TLI.isIntDivCheap()) {
1885 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1889 if (N0C && N1C && !N1C->isNullValue())
1890 return DAG.FoldConstantArithmetic(ISD::SREM, VT, N0C, N1C);
1900 if (N1C && !N1C->isNullValue()) {
1927 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1931 if (N0C && N1C && !N1C->isNullValue())
1932 return DAG.FoldConstantArithmetic(ISD::UREM, VT, N0C, N1C);
1934 if (N1C && !N1C->isNullValue() && N1C->getAPIntValue().isPowerOf2())
1936 DAG.getConstant(N1C->getAPIntValue()-1,VT));
1953 if (N1C && !N1C->isNullValue()) {
1979 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
1984 if (N1C && N1C->isNullValue())
1987 if (N1C && N1C->getAPIntValue() == 1)
2017 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2022 if (N1C && N1C->isNullValue())
2025 if (N1C && N1C->getAPIntValue() == 1)
2261 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2275 if (N0C && N1C)
2276 return DAG.FoldConstantArithmetic(ISD::AND, VT, N0C, N1C);
2278 if (N0C && !N1C)
2281 if (N1C && N1C->isAllOnesValue())
2284 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
2292 if (N1C && N0.getOpcode() == ISD::OR)
2294 if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue())
2297 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
2299 APInt Mask = ~N1C->getAPIntValue();
2419 if (N1C && (N0.getOpcode() == ISD::LOAD ||
2428 uint32_t ActiveBits = N1C->getAPIntValue().getActiveBits();
2429 if (ActiveBits > 0 && APIntOps::isMask(ActiveBits, N1C->getAPIntValue())){
2597 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1));
2598 if (!N1C)
2602 switch (N1C->getZExtValue()) {
2733 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
2749 if (N0C && N1C)
2750 return DAG.FoldConstantArithmetic(ISD::OR, VT, N0C, N1C);
2752 if (N0C && !N1C)
2755 if (N1C && N1C->isNullValue())
2758 if (N1C && N1C->isAllOnesValue())
2761 if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue()))
2778 if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
2781 if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0)
2785 DAG.FoldConstantArithmetic(ISD::OR, VT, N1C, C1));
3053 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3071 if (N0C && N1C)
3072 return DAG.FoldConstantArithmetic(ISD::XOR, VT, N0C, N1C);
3074 if (N0C && !N1C)
3077 if (N1C && N1C->isNullValue())
3085 if (N1C && N1C->getAPIntValue() == 1 && isSetCCEquivalent(N0, LHS, RHS, CC)) {
3104 if (N1C && N1C->getAPIntValue() == 1 && N0.getOpcode() == ISD::ZERO_EXTEND &&
3115 if (N1C && N1C->getAPIntValue() == 1 && VT == MVT::i1 &&
3127 if (N1C && N1C->isAllOnesValue() &&
3139 if (N1C && N0.getOpcode() == ISD::XOR) {
3144 DAG.getConstant(N1C->getAPIntValue() ^
3148 DAG.getConstant(N1C->getAPIntValue() ^
3243 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3248 if (N0C && N1C)
3249 return DAG.FoldConstantArithmetic(ISD::SHL, VT, N0C, N1C);
3254 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
3257 if (N1C && N1C->isNullValue())
3285 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
3289 if (N1C && N0.getOpcode() == ISD::SHL &&
3292 uint64_t c2 = N1C->getZExtValue();
3304 if (N1C && (N0.getOpcode() == ISD::ZERO_EXTEND ||
3311 uint64_t c2 = N1C->getZExtValue();
3326 if (N1C && N0.getOpcode() == ISD::SRL &&
3330 uint64_t c2 = N1C->getZExtValue();
3348 if (N1C && N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1)) {
3352 N1C->getZExtValue()),
3358 if (N1C) {
3359 SDValue NewSHL = visitShiftByConstant(N, N1C->getZExtValue());
3371 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3376 if (N0C && N1C)
3377 return DAG.FoldConstantArithmetic(ISD::SRA, VT, N0C, N1C);
3385 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
3388 if (N1C && N1C->isNullValue())
3392 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) {
3393 unsigned LowBits = OpSizeInBits - (unsigned)N1C->getZExtValue();
3405 if (N1C && N0.getOpcode() == ISD::SRA) {
3407 unsigned Sum = N1C->getZExtValue() + C1->getZExtValue();
3410 DAG.getConstant(Sum, N1C->getValueType(0)));
3422 if (N01C && N1C) {
3426 OpSizeInBits - N1C->getZExtValue());
3428 signed ShiftAmt = N1C->getZExtValue() - N01C->getZExtValue();
3478 N1C && isa<ConstantSDNode>(N0.getOperand(0).getOperand(1))) {
3486 DAG.getConstant(LargeShiftAmt->getZExtValue() + N1C->getZExtValue(),
3495 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
3503 if (N1C) {
3504 SDValue NewSRA = visitShiftByConstant(N, N1C->getZExtValue());
3516 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3521 if (N0C && N1C)
3522 return DAG.FoldConstantArithmetic(ISD::SRL, VT, N0C, N1C);
3527 if (N1C && N1C->getZExtValue() >= OpSizeInBits)
3530 if (N1C && N1C->isNullValue())
3533 if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
3538 if (N1C && N0.getOpcode() == ISD::SRL &&
3541 uint64_t c2 = N1C->getZExtValue();
3549 if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
3554 uint64_t c2 = N1C->getZExtValue();
3570 if (N1C && N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1 &&
3572 uint64_t ShAmt = N1C->getZExtValue()+64-N0.getValueSizeInBits();
3579 if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
3582 if (N1C->getZExtValue() >= SmallVT.getSizeInBits())
3586 uint64_t ShiftAmt = N1C->getZExtValue();
3597 if (N1C && N1C->getZExtValue() + 1 == VT.getSizeInBits()) {
3603 if (N1C && N0.getOpcode() == ISD::CTLZ &&
3604 N1C->getAPIntValue() == Log2_32(VT.getSizeInBits())) {
3660 if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
3663 if (N1C) {
3664 SDValue NewSRL = visitShiftByConstant(N, N1C->getZExtValue());
3741 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
3756 if (VT == MVT::i1 && N1C && N1C->getAPIntValue() == 1)
3763 N1C && N2C && N1C->isNullValue() && N2C->getAPIntValue() == 1) {
3776 if (VT == VT0 && VT == MVT::i1 && N1C && N1C->isNullValue()) {
3792 if (VT == MVT::i1 && (N0 == N1 || (N1C && N1C->getAPIntValue() == 1)))
7441 ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
7530 if (N1C && N3C && N3C->isNullValue() && CC == ISD::SETLT &&
7533 (N1C->isNullValue() || // (a < 0) ? b : 0
7534 (N1C->getAPIntValue() == 1 && N0 == N2))) { // (a < 1) ? a : 0
7580 N1C && N1C->isNullValue() &&
7658 if (N1C && N1C->isNullValue() && CC == ISD::SETEQ &&
7667 if (N1C && N1C->isNullValue() && CC == ISD::SETGT) {
7677 if (N1C && N1C->isAllOnesValue() && CC == ISD::SETGT) {
7691 if (N1C) {
7693 if (((N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
7694 (N1C->isAllOnesValue() && CC == ISD::SETGT)) &&
7697 else if (((N1C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE)) ||
7698 (N1C->isOne() && CC == ISD::SETLT)) &&